To open, play and retrieve information about video data stored in a file, descriptor, or URL, use the video player utility of the Multimedia Framework to develop your application. To play a video clip, the application needs to repeat the steps described in the illustration below.
To play a video clip, use the methods of the CVideoPlayerUtility class to construct your application.
Create a video player object, open a video clip and prepare it to be played.
Create a player object using the CVideoPlayerUtility::NewL() method.
Open a video clip from a file, descriptor using the respective CVideoPlayerUtility::OpenFileL() or CVideoPlayerUtility::OpenDesL(). Streamed content can be opened with CVideoPlayerUtility::OpenUrlL(). MVideoPlayerUtilityObserver::MvpuoOpenComplete() is called upon completion.
Prepare the video clip to be read using CVideoPlayerUtility::Prepare(). MVideoPlayerUtilityObserver::MvpuoPrepareComplete() is called upon completion.
Configure the player settings.
You can check and set, for example, the playback priority, display window, audio track, video frame size and frame rate, audio and video codecs and bitrates, and the MIME type of the video clip. For more information on the options, see the CVideoPlayerUtility class.
Play the video clip.
Start the playback of a video clip using the CVideoPlayerUtility::Play() method.
Pause playback using the CVideoPlayerUtility::PauseL() method. Resume playback by calling CVideoPlayerUtility::Play() again.
Stop playback using the CVideoPlayerUtility::Stop() method. If the playback is not explicitly stopped, MVideoPlayerUtilityObserver::MvpuoPlayComplete() is called upon completion.
To exit the application or to switch it to the background, close the video clip and unload all controllers using the CVideoPlayerUtility::Close() method.
Include the VideoPlayer.h header file in the appropriate class file(s).
Make sure you have correct capabilities information set for your application. You need at least the UserEnvironment capability. If you want to set the recording priority for the video/audio device, you need the MultimediaDD capability.
Make sure mediaclientvideo.lib is accessible to your linker when compiling your application by including it in your mmp file or by editing the project properties in your IDE, depending on your build environment.
For code examples, see How to play a video using CVideoPlayerUtility on Forum Nokia Developer Community Wiki.
For more information on CVideoPlayerUtility, see Multimedia recipes at the Symbian Foundation.
For information on the codecs needed to play a video clip, see Supported codecs.
For more information about CVideoPlayerUtility in the Video Client library see following documents: