Qt 4 includes a suite of multimedia APIs called Phonon, which allow you to do just this. They are currently being implemented for Symbian - while the Qt for S60 "Tower" pre-release
does not include support for Phonon on Symbian, Qt 4.6 will do.
In the meantime, your only option is to use the Symbian MMF APIs directly. Specifically, your video widget - or an object owned by it - will need to create an instance of CVideoPlayerUtility
, and therefore will need to implement MVideoPlayerUtilityObserver
. The video player API requires the client to provide an RWindow in which to display the video - this can be obtained by calling QWidget::winId()
, which returns a CCoeControl*
pointer. You can therefore obtain a window handle by calling
RWindow& window = *static_cast<RWindow*>(widget->winId()->DrawableWindow())
All in all however, playing video from a Qt app (or indeed any app) on Symbian currently requires quite a lot of work - especially if you want to support dynamic re-sizing and/or re-positioning of the video content. Note also that the way in which Qt is currently implemented on Symbian means that moving other widgets (partially or completely) on top of the video widget will not work correctly - the video will continue to appear on top. This is due to the fact that calling QWidget::winId()
currently doesn't cause Qt to create a native Symbian window, and will be rectified in 4.6.
In summary, unless you are in a hurry to do this, it is probably better to wait for the 4.6 beta which is due in a few weeks time.