127 * @param const TDesC8& Mime type of the file. |
127 * @param const TDesC8& Mime type of the file. |
128 * @return TSize The resolution of the image. |
128 * @return TSize The resolution of the image. |
129 */ |
129 */ |
130 TSize GetImageResolutionL( RFile& aFile, const TDesC8& aMimetype ); |
130 TSize GetImageResolutionL( RFile& aFile, const TDesC8& aMimetype ); |
131 |
131 |
132 // from base class MMdaAudioPlayerCallback |
132 // from base class MMdaAudioPlayerCallback (used from audio resolving thread) |
133 |
133 |
134 /** |
134 /** |
135 * From MMdaAudioPlayerCallback. |
135 * From MMdaAudioPlayerCallback. |
136 * MapcPlayComplete |
136 * MapcPlayComplete |
137 * |
137 * |
148 * @param aError error code |
148 * @param aError error code |
149 * @param aDuration duration of the file |
149 * @param aDuration duration of the file |
150 */ |
150 */ |
151 void MapcInitComplete( TInt aError, |
151 void MapcInitComplete( TInt aError, |
152 const TTimeIntervalMicroSeconds& aDuration ); |
152 const TTimeIntervalMicroSeconds& aDuration ); |
|
153 |
|
154 // audio resolving thread |
|
155 |
|
156 /** |
|
157 * Thread function for audio resolving thread. |
|
158 * |
|
159 * @param aSelf Pointer to CUpnpResResolver class instance. |
|
160 * @return Possible return values: |
|
161 * KErrNone: Thread exited ok. |
|
162 * Otherwise system wide error code. |
|
163 */ |
|
164 static TInt ThreadFunction( TAny* aSelf ); |
|
165 |
|
166 /** |
|
167 * Resolves audio duration from iAVFile. |
|
168 * |
|
169 * @param None. |
|
170 * @return None. |
|
171 */ |
|
172 void ResolveAudioDurationL(); |
153 |
173 |
154 private: // data |
174 private: // data |
155 // attributes related to CMdaAudioPlayerUtility usage |
175 // duration of the media file (video or audio) |
156 CActiveSchedulerWait* iWait; // owned |
176 TTimeIntervalMicroSeconds iDuration; |
157 CMdaAudioPlayerUtility* iAudioplayer; // owned. |
|
158 |
177 |
159 // duration of the media file (video or audio) |
178 // current audio/video file |
160 TTimeIntervalMicroSeconds iDuration; |
179 HBufC* iAVFile; |
|
180 |
|
181 // semaphore for keeping sync between main thread and audio resolving thread |
|
182 RSemaphore iSemaphore; |
161 }; |
183 }; |
162 |
184 |
163 |
185 |
164 #endif // C_UPNPRESRESOLVER_H |
186 #endif // C_UPNPRESRESOLVER_H |