Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.6.0
-
None
-
3117e3, bed33a, 66b765
Description
The main question here is how best to implement the MIME type detection for streams. The OpenUrlL functions only take a URL, whereas the corresponding OpenFileL functions have overloads for filenames and for open RFile handles. This is because files support random access whereas streams do not. A naieve approach to MIME type detection for streams is as follows; is there a more efficient approach?
1. Open network connection
2. Download header
3. Detect MIME type and create AbstractMediaPlayer instance
4. Close network connection
5. Pass URL to MMF client utility, which will then re-open the stream
An alternative approach is to always create a VideoPlayer when passed an RTSP URL, and then modify VideoPlayer::hasVideo to check CVideoPlayerUtility::VideoMimeTypeL before returning. This way, we would always use CVideoPlayerUtility for RTSP streaming, whether the source is audio or video. Well-behaved client apps, however, should check MediaObject::hasVideo before creating the UI - and therefore the VideoWidget would only be connected if the source is actually a video stream.