summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/videooutput.h
Commit message (Collapse)AuthorAgeFilesLines
* Implemented aspect ratio and scale mode handling in Phonon MMF backendGareth Stockwell2009-11-131-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Replaced VolumeObserver and VideoOutputObserver interfaces with signals. - Added signals for propagating changes in aspect ratio and scale mode from VideoOutput to VideoPlayer. - Removed VideoPlayer::getNativeWindowSystemHandles. Interaction with window system is moved into VideoOutput, so that VideoPlayer is better focussed on its main task: interacting with CVideoPlayerUtility. - WId changes, resize and move events received by the VideoOutput widget cause it to emit a videoWindowChanged signal. This is received by the VideoPlayer, which triggers a call to updateVideoRect. The main task of this function is to calculate the scale factors which are provided to the MMF via CVideoPlayerUtility::SetScaleFactorL. Note that: i) This function must be called both before and after the call to SetDisplayWindowL. For changes in aspect ratio or scale mode, setting the scale mode after updating the display window is sufficient. However, testing showed that, when switching in or out of full-screen mode, two calls were necessary in order to preserve the correct aspect ratio. ii) The screen rectangle passed to the MMF is still the full window extent; it is not the region in which video will actually be rendered. The post-processor will fill in the remainder of the window with a background colour (typically black). If, on the other hand, we passed in the actual video display rectangle, we would need to do this background painting in the widget. This in turn would require a change to QtGui: at present, we can only disable blitting on a per-widget basis (by setting QWExtra::disableBlit). If we needed to paint the borders of the video window, disableBlit would need to contain the actual DSA region, rather than just a single boolean flag. Task-number: QTBUG-5585 Reviewed-by: Frans Englich
* Video screen region is updated in response to ancestors of video widgetGareth Stockwell2009-10-231-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | being moved. Because QWidget::moveEvent is only called when a widget moves relative to its parent, a widget's absolute screen position may change without it receiving a moveEvent (for example, as a result of its parent being moved). The MMF video playback API on Symbian v9.4 requires, in addition to a window handle, an absolute screen rectangle. Changes in the video widget's absolute screen position therefore need to be propagated into the MMF. This change introduces a new object, AncestorMoveMonitor, which installs an event filter on the QCoreApplication instance. A VideoOutput object registers with the AncestorMoveMonitor, which listens on its behalf for MoveEvents and ParentChangeEvents directed at any of the ancestors of the VideoOutput. MoveEvents trigger a callback to the VideoOutput instance, which then notifies the MMF of the new screen rectangle. ParentChangeEvents cause the AncestorMoveMonitor to update the ancestor list associated with the target VideoOutput instance. The video position now tracks that of the associated widget, but there are two problems which require further investigation: 1. The video window lags behind. This may be an unavoidable consequence of the fact that setting a new screen rectangle causes the MMF to tear down its DSA session and start a new one; this is known to block the window server and take some time to complete. 2. Artifacts are visible around the edges of the moving video widget. Task-number: QTBUG-4787 Reviewed-by: Frans Englich
* Modified video widget to respond to WinIdChange eventsGareth Stockwell2009-10-091-0/+1
| | | | | Task-number: QTBUG-4664 Reviewed-by: Frans Englich
* Refactored event-handling code in video widgetGareth Stockwell2009-10-091-1/+2
| | | | | | Moved common code into videoOutputRegionChanged() Reviewed-by: Frans Englich
* Removed transparency-blitting / -painting code from video widgetGareth Stockwell2009-09-231-1/+0
|
* Removed temporary hacks used during initial development of video widgetGareth Stockwell2009-09-231-2/+0
|
* Added function for writing transparent pixels directly to the backing storeGareth Stockwell2009-09-231-0/+3
| | | | | | See VideoOutput::transparentFill. This should be called from the paintEvent, having removed the TranslucentWindowBackground hack from the mediaplayer demo. As yet this has not been tested.
* Added visitor-based object tree dumping framework, which dumps details of ↵Gareth Stockwell2009-09-071-5/+3
| | | | Symbian control / window associated with each widget
* Video playback now visible; flickering problems now observedGareth Stockwell2009-08-281-1/+0
|
* Reformatted code to comply with Qt styleGareth Stockwell2009-08-281-34/+34
|
* Wrapped code using QT_BEGIN/END_NAMESPACE macrosGareth Stockwell2009-08-281-2/+5
|
* Wrapped VideoOuput::dump() in a macro for easier removal later onGareth Stockwell2009-08-261-1/+2
|
* Added VideoOutputObserver, to propagate screen region updates back to ↵Gareth Stockwell2009-08-261-0/+6
| | | | VideoPlayer
* Made video playback visible using a couple of hacksGareth Stockwell2009-08-251-1/+8
| | | | | | | | | | | | These hacks, which are enabled using macros in defs.h, are: PHONON_MMF_HARD_CODE_VIDEO_RECT VideoPlayer should obtain the screen rectangle into which video rendering will occur, using the CoeControl associated with the video widget (i.e. the VideoOutput object). However, this control always has co-ordinates (relative to its parent) of (0,0)-(100,30), regardless of whether updateGeometry() and show() are called on the widget. So, this macro just hard-codes the screen rectangle to a value which works when the breakfast.mp4 clip is used for testing. PHONON_MMF_EXPLICITLY_SHOW_VIDEO_WIDGET In order that the video region does not overwrite the slider and buttons below it, the parent widget of the VideoObject instance must be appropriately re-sized. Debugging showed that both the parent and grandparent of VideoObject are in fact invisible at the time playback begins, so for now we just manually call show() on the grandparent. Clearly both of these are only temporary measures, for use until the underlying cause of the problem has been determined.
* Modified video player to call updateGeometry on video display widget; having ↵Gareth Stockwell2009-08-251-0/+11
| | | | no effect at present
* Further tidied up volume handlingGareth Stockwell2009-08-211-0/+42