summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon
Commit message (Collapse)AuthorAgeFilesLines
* Removed compiler warningsGareth Stockwell2010-06-026-2/+14
| | | | | | Emitted when building with MetroWerks x86 toolchain. Reviewed-by: trustme
* Phonon QT7 backend; Don't release string after unsuccessful ↵Justin McPherson2010-05-121-1/+0
| | | | | | AudioDeviceGetProperty(). Reviewed-by:Andrew den Exter
* Fixed incorrect runtime platform version check in Phonon MMF backendGareth Stockwell2010-04-301-1/+1
| | | | | | | | | | | | | In S60 3.2, CMdaAudioPlayerUtility::SetVolume(TInt) was changed from having a void return type to returning TInt. The code in the Phonon MMF backend which calls this function uses a runtime platform version check to ensure that only on S60 3.2 and above is the return value from SetVolume treated as valid. This check was previously testing for the wrong platform version (5.0 rather than 3.2). Reviewed-by: Shane Kearns
* Phonon MMF: fixed crash during opening of video clipGareth Stockwell2010-04-152-57/+58
| | | | | | | | | | | | | | | | | | | | | | | A crash was observed during opening a video clip, and was traced to dereferencing a null m_player pointer in DsaVideoPlayer::handleParametersChanged(), which is called during construction, but before createPlayer() has been called. This was reproducible using the following sequence: 1. Launch qmediaplayer 2. Play an audio clip 3. Open a video clip However, the following sequence worked as expected: 1. Launch qmediaplayer 2. Play a video clip 3. Play an audio clip 4. Play a video clip ... It is not clear which commit introduced this defect. Reviewed-by: Frans Englich
* Phonon MMF: ensure initial volume is appliedGareth Stockwell2010-04-151-3/+2
| | | | | | | | A recent change meant that, if the user set a volume level before loading a clip into the MediaObject, that initial volume level was not applied to the audio output. Reviewed-by: Frans Englich
* Phonon MMF: fix state changes emitted during playlist handlingGareth Stockwell2010-04-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | This change is required by the testPlayBeforeFinish step in tst_mediaobject. This test starts playback of one track, then calls MediaObject::setCurrentSource() followed by MediaObject::play(). The step checks that the following stateChanged() signals are emitted by the MediaObject: 1. StoppedState (optionally) 2. LoadingState 3. BufferingState or PlayingState The state changes emitted by the Phonon MMF backend were: 1. PlayingState -> StoppedState 2. LoadingState -> PlayingState This patch fixes the discontinuity in state changes which occurred while processing a playlist. Reviewed-by: Frans Englich
* Phonon MMF: calling pause() when in StoppedState triggers stateChanged()Gareth Stockwell2010-04-156-29/+71
| | | | | | | | Previously, the MMF backend simply swallowed a call to pause() when in StoppedState. However, the stopToPause step in tst_mediaobject requires the backend to emit a stateChanged signal when this happens. Reviewed-by: Frans Englich
* Phonon MMF: change to PausedState, not StoppedState when finishedGareth Stockwell2010-04-151-1/+1
| | | | | | | This behaviour is required by the testPauseOnFinish step in tst_mediaobject. Reviewed-by: Frans Englich
* Phonon MMF: Suppress intermediate stateChanged() signalGareth Stockwell2010-04-152-8/+16
| | | | | | | | | | | | If MediaObject::play() is called while the object is in LoadingState, playback will start once loading is completed. Previously, the Symbian backend at this point emitted two stateChanged signals - first to StoppedState and then to PlayingState. The testPlayOnFinish step in tst_mediaobject requires that only one state change occurs: directly from LoadingState to PlayingState. Reviewed-by: Frans Englich
* Phonon MMF: Emit tick() signalGareth Stockwell2010-04-151-0/+1
| | | | | | | Fixes testTickSignal step in tst_mediaobject. Task-number: QTBUG-9339 Reviewed-by: Frans Englich
* Phonon MMF: Emit prefinishMarkReached(), finished() signalsGareth Stockwell2010-04-153-2/+18
| | | | | | | Fixes testPrefinishMark step in tst_mediaobject. Task-number: QTBUG-9339 Reviewed-by: Frans Englich
* Phonon MMF: Removed compiler warningGareth Stockwell2010-04-151-1/+1
| | | | Reviewed-by: Frans Englich
* Phonon MMF: fixed typo in trace statementGareth Stockwell2010-04-141-1/+1
| | | | | | | This builds under RVCT 2.2 (although obviously the debug output will contain garbage), but causes a compiler error with RVCT 4. Reviewed-by: trustme
* Ensure Phonon MMF backend emits aboutToFinishGareth Stockwell2010-03-312-5/+10
| | | | | | | | | | | | | | | | It seems that, after a call to CMdaAudioPlayerUtility::SetPosition, the reported position values are slightly lower than they should be. This, combined with the fact that the backend emitted aboutToFinish from its timer tick slot, means that the aboutToFinish signal is sometimes not emitted at the end of an audio clip, if the position has been advanced by seeking during playback. This patch adds a check in the implementation of the MMdaAudioPlayerCallback::MapcPlayComplete callback - if, at this point, aboutToFinish has not been emitted, it is emitted now. Task-number: QTBUG-9368 Reviewed-by: trustme
* Remove compiler warningGareth Stockwell2010-03-311-1/+1
| | | | | | | RVCT complains that a non-POD type (VideoParameters) is passed through the TRACE_ENTRY ellipsis, when building in debug mode. Reviewed-by: trustme
* Added additional logging to Phonon MMF backendGareth Stockwell2010-03-304-3/+44
| | | | | | | | | | | | | | | | In addition to dumping the widget tree which contains the VideoOutput widget, the backend now also dumps the widget tree from the application's active window. This is to allow debugging of problems which stem from the fact that the VideoOutput widget subtree root is not the application's main window. In addition to dumping the Qt widget tree, the backend now also requests the window server to dump the entire window tree. Together, these changes allow easier debugging of video visibility- related problems. Reviewed-by: trustme
* Fixed crash in Phonon MMF backend during application shutdownGareth Stockwell2010-03-291-1/+7
| | | | | | | | | | | | | During application shutdown, DsaVideoPlayer::handleVideoWindowChanged is called. At this point, the application's main window has been closed and therefore QApplication::activeWindow() returns 0. This leads to a crash. This patch ensures that a null return value from QApplication::activeWindow(), and the resulting zero value of DsaVideoPlayer::m_window, are handled gracefully. Reviewed-by: Frans Englich
* Added support for video surfaces to Phonon MMF backendGareth Stockwell2010-03-1828-1163/+1982
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Symbian^3 introduces a new compositing graphics subsystem in which non-UI content such as video is provided by client applications via graphics surfaces. This patch modifies the video playback part of the Phonon MMF backend so that, on devices which use the new graphics architecture (NGA), video is rendered to a surface. On devices which use the legacy graphics architecture, the existing video rendering path, which uses Direct Screen Access (DSA) is maintained. On NGA devices, video playback applications do not deal with surfaces directly; instead, they use a new MMF client API called CVideoPlayerUtility2. The implementation of this API takes care of creating a graphics surface, registering it with the window manager, and directing the output of the video decoder into this surface. CVideoPlayerUtility2 inherits from the legacy video playback API, CVideoPlayerUtility, deprecating certain functions and adding new ones. The main changes involved in modifying CVideoPlayerUtility client code to instead use CVideoPlayerUtility2 are: 1. CVideoPlayerUtility requires a window handle to be provided at object construction time. The CVideoPlayerUtility2 constructor does not take a window handle; it is provided by the client later via the SetDisplayWindowL function. 2. CVideoPlayerUtility requires the client to provide an absolute screen rectangle at construction time, and then to call SetDisplayWindowL whenever this rectangle changes due to either window repositioning or resizing. CVideoPlayerUtility2 requires the client to provide a display rectangle which is relative to the display window. This rectangle must be updated via SetVideoExtentL / SetWindowClipRectL when the window is resized, but no update is required when the window is repositioned - the compositing window system takes care of repositioning the video content on the screen. 3. CVideoPlayerUtility requires the client to paint transparent black into the region of the window in which video will be displayed. CVideoPlayerUtility2 does not require the client to paint the video window. In order to accomodate these differences, the existing VideoPlayer and VideoOutput classes are replaced with AbstractVideoPlayer and AbstractVideoOutput respectively. These abstract base classes encapsulate functionality which is common between the DSA and surface rendering client code. Because CVideoPlayerUtility2 inherits from CVideoPlayerUtility, AbstractVideoPlayer is able to hold a pointer to CVideoPlayerUtility, via which it controls functionality which is not affected by the details of the rendering path, such as play/pause/stop, seek and metadata access. The three areas of divergence listed above are encapsulated in the derived classes DsaVideoOutput/SurfaceVideoOutput and DsaVideoPlayer/ SurfaceVideoPlayer. Of the three, (1) and (3) are fairly straightforward. For DSA video playback, the need to respond to changes in video widget absolute screen position in (2) necessitated the AncestorMoveMonitor class, which installs an event filter on each ancestor of the video widget. This class is not required for surface video playback and is therefore removed from the surface-rendering code path. Selection of either the DSA- or surface-rendering code path is done at qmake time, via the exists(...) check introduced in mmf.pro. This checks for existence of the header in which CVideoPlayerUtility2 is defined; if this file is found, surface rendering is selected, otherwise the DSA rendering version of the backend is built. Note that this approach is not completely robust, since it is possible for an environment to include the videoplayer2.h header and yet be configured to use the legacy graphics subsystem. This could be dealt with by instead performing the check for surface support at configuration time, building and executing a small Symbian program which will return different output according to which of the two graphics subsystems is in use. Task-number: QTBUG-8919 Reviewed-by: Frans Englich
* Merge branch 'mmfphonon' into 4.6Frans Englich2010-03-101-10/+12
|\
| * Fix SDP files are not supported.Frans Englich2010-03-101-10/+12
| | | | | | | | | | | | | | The Phonon glue code rejected SDPs based on the MIME type for SDPs. Task-number: QTBUG-8702 Reviewed-by: Gareth Stockwell
* | Merge remote branch 'origin/4.6' into 4.6Paul Olav Tvete2010-02-051-31/+22
|\ \ | | | | | | | | | | | | Conflicts: dist/changes-4.6.2
| * | I10n: Use 'real' Linguist comments in Phonon::EnvironmentalReverbFriedemann Kleint2010-02-041-31/+22
| | | | | | | | | | | | Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | | Merge remote branch 'staging/4.6' into 4.6Samuel Rødal2010-02-041-0/+3
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Manual resolve of conflict in changes-4.6.2 in staging-2. Conflicts: dist/changes-4.6.2
| * | fix crash in Phonon::DS9 backendJoerg Bornemann2010-02-011-0/+3
| | | | | | | | | | | | | | | | | | | | | When using a VideoWidget in a QGraphicsProxyWidget, then Phonon::DS9 crashed, if the VideoWidget didn't have a MediaSource. Reviewed-by: Thierry
* | | Added descriptions of translatable strings for Phonon MMF reverb effectGareth Stockwell2010-02-031-1/+21
| | | | | | | | | | | | Reviewed-by: trustme
* | | Corrected namespace for Phonon::MMF translatable error stringsGareth Stockwell2010-02-031-1/+1
|/ / | | | | | | | | | | Error strings are now part of the Phonon::MMF namespace. Reviewed-by: trustme
* | Workaround for compiler error with MWCC (Symbian emulator)Shane Kearns2010-01-188-12/+12
|/ | | | | | | Recent changes to phonon and syncqt cause problems with the default search path for #include with this compiler. Reviewed-by: Gareth Stockwell
* Added enable/disable parameter to each effect in Phonon MMF backendGareth Stockwell2010-01-1112-68/+74
| | | | | Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Simplified error handling for audio effectsGareth Stockwell2010-01-1112-31/+33
| | | | | Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Implemented stereo widening effect in Phonon MMF backendGareth Stockwell2010-01-113-1/+161
| | | | | Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Implemented reverb effect in Phonon MMF backendGareth Stockwell2010-01-115-2/+283
| | | | | Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Implemented loudness effect in Phonon MMF backendGareth Stockwell2010-01-113-0/+146
| | | | | Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Implemented bass boost in Phonon MMF backendGareth Stockwell2010-01-115-11/+42
| | | | | Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Refactored AbstractAudioEffect to reduce redundancy in derived classesGareth Stockwell2010-01-116-41/+37
| | | | | Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Removed unnecessary check in Phonon MMF backendGareth Stockwell2010-01-111-5/+3
| | | | | | | | This pointer is guaranteed not to be null by the check in AbstractAudioEffect::setParameterValue. Task-number: QTBUG-4659 Reviewed-by: trustme
* Added a macro to reduce boilerplate code in Phonon MMF backendGareth Stockwell2010-01-115-17/+35
| | | | | Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Removed dependency of EffectFactory on native effect headersGareth Stockwell2010-01-116-60/+48
| | | | | | | | | | | | | | | By refactoring the static capabilities / parameters interface exposed by AbstractAudioEffect-derived classes to the EffectFactory, the latter's implementation no longer needs access to the headers for native effect classes. Previously, during the initialization phase, the EffectFactory tried to create an instance of each native effect class, in order to determine whether that effect is supported. This is now done inside the backend class for each effect, thereby improving encapsulation. Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Delayed creation of audio effect object until audio is initializedGareth Stockwell2010-01-118-23/+63
| | | | | | | | | | | | | | | | | | When applying effects to an audio stream, we must ensure that the MMF utility API (CMdaAudioPlayerUtility or CVideoPlayerUtility) instance has loaded a controller before calling attempting to create a CAudioEffect- derived object. If the controller has not been loaded, construction of the effect object will fail. Even if we mitigate against this, calling CAudioEffect::ApplyL() will only have an effect if there is a controller object - or more precisely, a DevSound instance - on which to apply the effect. This patch delays construction of the effect object until the MediaObject has transitioned out of the LoadingState, indicating that an underlying DevSound instance will have been created. Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Modified effect parameter handling to improve user experienceGareth Stockwell2010-01-118-23/+173
| | | | | | | | | | | | | | | | | | This change is to work around a limitation in the Phonon::EffectWidget class. This widget only displays sliders for parameters with numeric values if the variant type of the parameter is QReal and the range is exactly -1.0 to +1.0; otherwise, a spinbox is displayed. This is rather inconvenient for many effects, such as the audio equalizer, for which a slider is a much more natural UI control. The MMF backend therefore reports the type of numeric parameters to be QReal, and the range to be -1.0 to +1.0. Internally, the integer range for the parameter is stored. Changes to the parameter value are converted from the client-side, floating point representation to the internal, integer representation. Task-number: QTBUG-4659 Reviewed-by: Espen Riskedal
* Added comments to clarify usage of Phonon::EffectParameter APIGareth Stockwell2010-01-111-8/+9
| | | | | Task-number: QTBUG-4659 Reviewed-by: trustme
* Shortened description of audio equalizer bandsGareth Stockwell2010-01-111-1/+1
| | | | | | | | This improves the small-screen layout of the equalizer configuration dialog. Task-number: QTBUG-4659 Reviewed-by: trustme
* Implemented audio effects capability querying in Phonon MMF backendGareth Stockwell2010-01-0810-132/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Corrected parameter name ordering in internal Phonon MMF function signaturesGareth Stockwell2010-01-082-4/+4
| | | | | | | | Some instances of the changeState signal declaration had the newState and oldState parameters in the wrong order. While this has no effect on the behaviour of the code, it can be confusing to developers reading it. Reviewed-by: trustme
* Fixed typo in Phonon::EffectWidget implementationGareth Stockwell2010-01-081-1/+1
| | | | | Task-number: QTBUG-4659 Reviewed-by: trustme
* Fixed build breakage on S60 3.1 due to audio effects changesGareth Stockwell2010-01-086-31/+10
| | | | | | | | Removed calls to the video overload of the audio effect constructors, e.g. CAudioEqualizer::NewL(VideoPlayerUtility&) Task-number: QTBUG-7223 Reviewed-by: trustme
* Implemented node disconnection in Phonon MMF backendGareth Stockwell2009-12-0820-194/+348
| | | | | Task-number: QTBUG-4663 Reviewed-by: Frans Englich
* Removed dead code from Phonon MMF backendGareth Stockwell2009-12-081-12/+2
| | | | | | | | | The following source types are handled in MediaObject::createPlayer Invalid, Disc, Stream, Empty The code removed in this patch is therefore never executed. Reviewed-by: Frans Englich
* Re-emit prefinishMarkReached and aboutToFinish if rewound back past mark.Gareth Stockwell2009-12-082-2/+25
| | | | | Task-number: QTBUG-6214 Reviewed-by: Frans Englich
* Implemented support for playlist handling in Phonon MMF backendGareth Stockwell2009-12-0812-170/+129
| | | | | | | | | | The main changes are: 1. MediaObject emits prefinishMark at the appropriate instant 2. MediaObject emits aboutToFinish at the appropriate instant 3. MediaObject switches to next source when playback completes Task-number: QTBUG-6214 Reviewed-by: Frans Englich
* Changed call sequence of seeking in Phonon MMF backend, for streamingGareth Stockwell2009-12-082-19/+11
| | | | | | | | | | | | Modified the sequence of calls made to the MMF APIs when seeking during ongoing playback. This fixes a bug found during early testing of streaming playback, whereby playback would not resume following the seeking operation. This was due to an interaction between the pause / seek / play operations, and the buffering callbacks received from the MMF, which caused the backend to enter an incorrect state. Task-number: QTBUG-4660 Reviewed-by: Frans Englich