summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/mmf/backend.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Implemented audio effects capability querying in Phonon MMF backendGareth Stockwell2010-01-081-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch addresses the following deficiencies in the existing implementation of audio effects: 1. Native effect objects (e.g. CAudioEqualizer, CBassBoost etc) were created frequently, just in order to check whether a given effect is supported, or retrieve the list of parameters which it requires. Although this is in part due to a deficiency in the S60 audio effects API (it doesn't have a 'capability query' concept), it can be improved by using caching. This patch introduces a singleton EffectFactory object, which lazily initializes a data structure containing information about support and parameters. 2. In order to either query effect support, the native effect object ultimately needs to access a DevSound instance. Previously, the effect object was provided with a CMdaAudioPlayerUtility object. If this player utility has not loaded an MMF controller plugin *before* the effects object makes any calls to the player utility, incorrect results will be returned. This was observed in the previous code. For querying, we don't actually need to load an MMF controller; instead, we would like to directly provide a CMMFDevSound instance to the effect object. Unfortunately, this API is not available in public S60 SDKs, so we must use the next lowest interface available, namely CMdaAudioOutputStream. By making this change, this patch ensures that support and parameter queries made via the EffectFactory will return the correct result. At this point, however, effect settings made via the Phonon API are not actually applied to the audio output. Fixing this will require notifying the audio effects backend nodes of state changes in the MediaObject. Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Implemented node disconnection in Phonon MMF backendGareth Stockwell2009-12-081-13/+16
| | | | | Task-number: QTBUG-4663 Reviewed-by: Frans Englich
* Implemented aspect ratio and scale mode handling in Phonon MMF backendGareth Stockwell2009-11-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* mediaplayer: crash in settings dialog.Frans Englich2009-10-071-4/+14
| | | | | | | The MediaPlayer requires that an output device is available. Task-number: QTBUG-4755 Reviewed-by: Gareth Stockwell
* qdoc: Marked some undocumented Phonon classes internalMartin Smith2009-10-011-0/+8
|
* Essentially do 's/NULL/0/g', to adhere to Qt coding style.Frans Englich2009-09-241-1/+1
| | | | Addresses review comment.
* Up-date to our new website address.Frans Englich2009-09-241-1/+1
|
* Make the MediaObject propagation generic for all kinds of nodes.Frans Englich2009-09-091-3/+1
| | | | | Previously the MediaObject propagation was only done for effects, but now it's for all kinds of nodes. This is needed for AudioOutput.
* Work on extending the framework for accomodating effects.Frans Englich2009-09-091-32/+43
| | | | | | | | | This extends the framework for being able to handle audio effects, largely affecting how the audio chain is set up, connected and disconnected, and therefore the Backend has been refactored slightly, and the class MediaNode introduced, see its documentation. In addition two effects has been written: BassBoost and AudioEqualizer.
* Reformatted code to comply with Qt styleGareth Stockwell2009-08-281-91/+86
|
* Wrapped code using QT_BEGIN/END_NAMESPACE macrosGareth Stockwell2009-08-281-0/+4
|
* Implemented Backend::availableMimeTypesGareth Stockwell2009-08-251-2/+37
|
* Implemented connection between MediaOutput and VideoWidgetGareth Stockwell2009-08-211-4/+7
| | | | | Video is still not visible; need to debug the initialization of the VideoOutput object to determine whether DSA is being aborted.
* Further tidied up volume handlingGareth Stockwell2009-08-211-3/+10
|
* Tidied up trace statementsGareth Stockwell2009-08-211-13/+27
|
* Started fleshing out the VideoPlayer implementationGareth Stockwell2009-08-201-5/+4
| | | | | | Now loads, prepares and plays a clip, but the video is not visible because it's not yet wired up to a VideoWidget. Video 'playback' can be tested using the demos/mediaplayer application, but the menus are not displayed properly, so a video clip filename must be hardcoded in main.cpp and passed to the MediaPlayer constructor.
* Added VolumeControlInterface to abstract details of path between MediaObject ↵Gareth Stockwell2009-08-201-16/+33
| | | | and AudioOutput
* Merged recognizer changes with abstraction for audio / video playback.Gareth Stockwell2009-08-181-1/+1
| | | | | | | | | | | | | | Audio playback now working to the same extent as prior to the abstraction, with one regression: the initial volume level in the UI is set to zero, although playback is audible. Some cleanup is required: - Functionality common to AudioPlayer and VideoPlayer (e.g. tick timer, changeState function) should be moved into AbstractPlayer. - Files may be opened by multiple instances of MediaObject at at time. For example, the musicplayer example app uses one instance to read file metadata, and one for the actual playback. In order to avoid KErrInUse errors from the file server, files must be opened with an EShare* flag and passed around by handle. At present this is done in a slightly hacky way (i.e. AbstractPlayer::setSource is renamed to setFileSource). - The pointer held by MediaObject::m_player must be checked for nullness in many of the public API calls. This could be made cleaner by implementing a stub derivation of AbstractPlayer, which returns sensible default values. Note that, if functionality such as tick timer handling is going to be pushed upwards from AudioPlayer / VideoPlayer, we should add an intermediate class to the hierarchy so that the overhead of constructing DummyPlayer objects is minimised. At present, media type (audio / video) is only recognised from file streams - this needs to be extended to include HTTP streaming aswell.
* Commit patch by Gareth.Frans Englich2009-08-121-1/+2
| | | | | The patch originally contained all changed done to MMF Phonon, but this commit contains the changes only Gareth did.
* Work.Frans Englich2009-07-181-1/+2
|
* Adjust comment field.Frans Englich2009-07-031-1/+1
|
* Pouring.Frans Englich2009-07-031-4/+12
|
* Pouring.Frans Englich2009-07-021-0/+101