diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-04 13:22:16 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-04 13:24:12 +0100 |
commit | ec316b3b7973efa3f2d2af211b95bc8b45b42a50 (patch) | |
tree | b3f0445661ccddb4d11a6a90cf944400205edfd8 /src | |
parent | c2736c3a629d944818c44db9ad69beffb872bdd5 (diff) | |
parent | 6902c5d770bfa79522d4349215c0b582642c7594 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
sync.profile
Change-Id: I450b86e3d01498aca12fe11a28527a296f2cbc3f
Diffstat (limited to 'src')
66 files changed, 394 insertions, 380 deletions
diff --git a/src/gsttools/gsttools.pro b/src/gsttools/gsttools.pro index 8672b1a70..eb1041ca3 100644 --- a/src/gsttools/gsttools.pro +++ b/src/gsttools/gsttools.pro @@ -32,7 +32,6 @@ config_resourcepolicy { # Header files must go inside source directory of a module # to be installed by syncqt. INCLUDEPATH += ../multimedia/gsttools_headers/ -DEPENDPATH += ../multimedia/gsttools_headers/ VPATH += ../multimedia/gsttools_headers/ PRIVATE_HEADERS += \ diff --git a/src/imports/multimedia/plugins.qmltypes b/src/imports/multimedia/plugins.qmltypes index 1fe849962..b2970649f 100644 --- a/src/imports/multimedia/plugins.qmltypes +++ b/src/imports/multimedia/plugins.qmltypes @@ -2,6 +2,8 @@ import QtQuick.tooling 1.1 // This file describes the plugin-supplied types contained in the library. // It is used for QML tooling purposes only. +// +// This file was auto-generated with the command 'qmlplugindump -notrelocatable QtMultimedia 5.0'. Module { Component { @@ -80,65 +82,56 @@ Module { Property { name: "lockStatus"; type: "QCamera::LockStatus"; isReadonly: true } Signal { name: "stateChanged" - type: "void" Parameter { type: "QCamera::State" } } Signal { name: "captureModeChanged" - type: "void" Parameter { type: "QCamera::CaptureModes" } } Signal { name: "statusChanged" - type: "void" Parameter { type: "QCamera::Status" } } - Signal { name: "locked"; type: "void" } - Signal { name: "lockFailed"; type: "void" } + Signal { name: "locked" } + Signal { name: "lockFailed" } Signal { name: "lockStatusChanged" - type: "void" Parameter { type: "QCamera::LockStatus" } Parameter { type: "QCamera::LockChangeReason" } } Signal { name: "lockStatusChanged" - type: "void" Parameter { type: "QCamera::LockType" } Parameter { type: "QCamera::LockStatus" } Parameter { type: "QCamera::LockChangeReason" } } Signal { name: "error" - type: "void" Parameter { type: "QCamera::Error" } } Method { name: "setCaptureMode" - type: "void" Parameter { name: "mode"; type: "QCamera::CaptureModes" } } - Method { name: "load"; type: "void" } - Method { name: "unload"; type: "void" } - Method { name: "start"; type: "void" } - Method { name: "stop"; type: "void" } - Method { name: "searchAndLock"; type: "void" } - Method { name: "unlock"; type: "void" } + Method { name: "load" } + Method { name: "unload" } + Method { name: "start" } + Method { name: "stop" } + Method { name: "searchAndLock" } + Method { name: "unlock" } Method { name: "searchAndLock" - type: "void" Parameter { name: "locks"; type: "QCamera::LockTypes" } } Method { name: "unlock" - type: "void" Parameter { name: "locks"; type: "QCamera::LockTypes" } } } Component { name: "QDeclarativeAudio" prototype: "QObject" - exports: ["Audio 5.0", "MediaPlayer 5.0"] + exports: ["QtMultimedia/Audio 5.0", "QtMultimedia/MediaPlayer 5.0"] Enum { name: "Status" values: { @@ -194,12 +187,12 @@ Module { Property { name: "autoLoad"; type: "bool" } Property { name: "status"; type: "Status"; isReadonly: true } Property { name: "duration"; type: "int"; isReadonly: true } - Property { name: "position"; type: "int" } + Property { name: "position"; type: "int"; isReadonly: true } Property { name: "volume"; type: "double" } Property { name: "muted"; type: "bool" } Property { name: "hasAudio"; type: "bool"; isReadonly: true } Property { name: "hasVideo"; type: "bool"; isReadonly: true } - Property { name: "bufferProgress"; type: "int"; isReadonly: true } + Property { name: "bufferProgress"; type: "double"; isReadonly: true } Property { name: "seekable"; type: "bool"; isReadonly: true } Property { name: "playbackRate"; type: "double" } Property { name: "error"; type: "Error"; isReadonly: true } @@ -212,45 +205,31 @@ Module { } Property { name: "mediaObject"; type: "QObject"; isReadonly: true; isPointer: true } Property { name: "availability"; type: "Availability"; isReadonly: true } - Signal { name: "sourceChanged"; type: "void" } - Signal { name: "autoLoadChanged"; type: "void" } - Signal { name: "loopCountChanged"; type: "void" } - Signal { name: "playbackStateChanged"; type: "void" } - Signal { name: "autoPlayChanged"; type: "void" } - Signal { name: "paused"; type: "void" } - Signal { name: "stopped"; type: "void" } - Signal { name: "playing"; type: "void" } - Signal { name: "statusChanged"; type: "void" } - Signal { name: "durationChanged"; type: "void" } - Signal { name: "positionChanged"; type: "void" } - Signal { name: "volumeChanged"; type: "void" } - Signal { name: "mutedChanged"; type: "void" } - Signal { name: "hasAudioChanged"; type: "void" } - Signal { name: "hasVideoChanged"; type: "void" } - Signal { name: "bufferProgressChanged"; type: "void" } - Signal { name: "seekableChanged"; type: "void" } - Signal { name: "playbackRateChanged"; type: "void" } + Signal { name: "loopCountChanged" } + Signal { name: "paused" } + Signal { name: "stopped" } + Signal { name: "playing" } Signal { name: "availabilityChanged" - type: "void" Parameter { name: "availability"; type: "Availability" } } - Signal { name: "errorChanged"; type: "void" } Signal { name: "error" - type: "void" Parameter { name: "error"; type: "QDeclarativeAudio::Error" } Parameter { name: "errorString"; type: "string" } } - Signal { name: "mediaObjectChanged"; type: "void" } - Method { name: "play"; type: "void" } - Method { name: "pause"; type: "void" } - Method { name: "stop"; type: "void" } + Method { name: "play" } + Method { name: "pause" } + Method { name: "stop" } + Method { + name: "seek" + Parameter { name: "position"; type: "int" } + } } Component { name: "QDeclarativeCamera" prototype: "QObject" - exports: ["Camera 5.0"] + exports: ["QtMultimedia/Camera 5.0"] Enum { name: "CaptureMode" values: { @@ -414,118 +393,96 @@ Module { isReadonly: true isPointer: true } - Signal { name: "errorChanged"; type: "void" } + Signal { name: "errorChanged" } Signal { name: "error" - type: "void" Parameter { name: "errorCode"; type: "QDeclarativeCamera::Error" } Parameter { name: "errorString"; type: "string" } } - Signal { name: "captureModeChanged"; type: "void" } Signal { name: "cameraStateChanged" - type: "void" Parameter { type: "QDeclarativeCamera::State" } } - Signal { name: "cameraStatusChanged"; type: "void" } - Signal { name: "lockStatusChanged"; type: "void" } Signal { name: "opticalZoomChanged" - type: "void" Parameter { type: "double" } } Signal { name: "digitalZoomChanged" - type: "void" Parameter { type: "double" } } Signal { name: "maximumOpticalZoomChanged" - type: "void" Parameter { type: "double" } } Signal { name: "maximumDigitalZoomChanged" - type: "void" Parameter { type: "double" } } - Signal { name: "mediaObjectChanged"; type: "void" } Signal { name: "availabilityChanged" - type: "void" Parameter { name: "availability"; type: "Availability" } } Method { name: "setCaptureMode" - type: "void" Parameter { name: "mode"; type: "CaptureMode" } } - Method { name: "start"; type: "void" } - Method { name: "stop"; type: "void" } + Method { name: "start" } + Method { name: "stop" } Method { name: "setCameraState" - type: "void" Parameter { name: "state"; type: "State" } } - Method { name: "searchAndLock"; type: "void" } - Method { name: "unlock"; type: "void" } + Method { name: "searchAndLock" } + Method { name: "unlock" } Method { name: "setOpticalZoom" - type: "void" Parameter { type: "double" } } Method { name: "setDigitalZoom" - type: "void" Parameter { type: "double" } } } Component { name: "QDeclarativeCameraCapture" prototype: "QObject" - exports: ["CameraCapture 5.0"] + exports: ["QtMultimedia/CameraCapture 5.0"] Property { name: "ready"; type: "bool"; isReadonly: true } Property { name: "capturedImagePath"; type: "string"; isReadonly: true } Property { name: "resolution"; type: "QSize" } Property { name: "errorString"; type: "string"; isReadonly: true } Signal { name: "readyForCaptureChanged" - type: "void" Parameter { type: "bool" } } Signal { name: "imageExposed" - type: "void" Parameter { name: "requestId"; type: "int" } } Signal { name: "imageCaptured" - type: "void" Parameter { name: "requestId"; type: "int" } Parameter { name: "preview"; type: "string" } } Signal { name: "imageMetadataAvailable" - type: "void" Parameter { name: "requestId"; type: "int" } Parameter { name: "key"; type: "string" } Parameter { name: "value"; type: "QVariant" } } Signal { name: "imageSaved" - type: "void" Parameter { name: "requestId"; type: "int" } Parameter { name: "path"; type: "string" } } Signal { name: "captureFailed" - type: "void" Parameter { name: "requestId"; type: "int" } Parameter { name: "message"; type: "string" } } Signal { name: "resolutionChanged" - type: "void" Parameter { type: "QSize" } } Method { name: "capture"; type: "int" } @@ -534,15 +491,13 @@ Module { type: "int" Parameter { name: "location"; type: "string" } } - Method { name: "cancelCapture"; type: "void" } + Method { name: "cancelCapture" } Method { name: "setResolution" - type: "void" Parameter { name: "resolution"; type: "QSize" } } Method { name: "setMetadata" - type: "void" Parameter { name: "key"; type: "string" } Parameter { name: "value"; type: "QVariant" } } @@ -550,7 +505,7 @@ Module { Component { name: "QDeclarativeCameraExposure" prototype: "QObject" - exports: ["CameraExposure 5.0"] + exports: ["QtMultimedia/CameraExposure 5.0"] Property { name: "exposureCompensation"; type: "double" } Property { name: "iso"; type: "int"; isReadonly: true } Property { name: "shutterSpeed"; type: "double"; isReadonly: true } @@ -563,141 +518,117 @@ Module { Property { name: "meteringMode"; type: "QDeclarativeCamera::MeteringMode" } Signal { name: "isoSensitivityChanged" - type: "void" Parameter { type: "int" } } Signal { name: "apertureChanged" - type: "void" Parameter { type: "double" } } Signal { name: "shutterSpeedChanged" - type: "void" Parameter { type: "double" } } Signal { name: "manualIsoSensitivityChanged" - type: "void" Parameter { type: "int" } } Signal { name: "manualApertureChanged" - type: "void" Parameter { type: "double" } } Signal { name: "manualShutterSpeedChanged" - type: "void" Parameter { type: "double" } } Signal { name: "exposureCompensationChanged" - type: "void" Parameter { type: "double" } } Signal { name: "exposureModeChanged" - type: "void" Parameter { type: "QDeclarativeCamera::ExposureMode" } } Signal { name: "meteringModeChanged" - type: "void" Parameter { type: "QDeclarativeCamera::MeteringMode" } } Signal { name: "spotMeteringPointChanged" - type: "void" Parameter { type: "QPointF" } } Method { name: "setExposureMode" - type: "void" Parameter { type: "QDeclarativeCamera::ExposureMode" } } Method { name: "setExposureCompensation" - type: "void" Parameter { name: "ev"; type: "double" } } Method { name: "setManualAperture" - type: "void" Parameter { type: "double" } } Method { name: "setManualShutterSpeed" - type: "void" Parameter { type: "double" } } Method { name: "setManualIsoSensitivity" - type: "void" Parameter { name: "iso"; type: "int" } } - Method { name: "setAutoAperture"; type: "void" } - Method { name: "setAutoShutterSpeed"; type: "void" } - Method { name: "setAutoIsoSensitivity"; type: "void" } + Method { name: "setAutoAperture" } + Method { name: "setAutoShutterSpeed" } + Method { name: "setAutoIsoSensitivity" } } Component { name: "QDeclarativeCameraFlash" prototype: "QObject" - exports: ["CameraFlash 5.0"] + exports: ["QtMultimedia/CameraFlash 5.0"] Property { name: "ready"; type: "bool"; isReadonly: true } Property { name: "mode"; type: "int" } Signal { name: "flashReady" - type: "void" Parameter { name: "status"; type: "bool" } } Signal { name: "flashModeChanged" - type: "void" Parameter { type: "int" } } Method { name: "setFlashMode" - type: "void" Parameter { type: "int" } } } Component { name: "QDeclarativeCameraFocus" prototype: "QObject" - exports: ["CameraFocus 5.0"] + exports: ["QtMultimedia/CameraFocus 5.0"] Property { name: "focusMode"; type: "QDeclarativeCamera::FocusMode" } Property { name: "focusPointMode"; type: "QDeclarativeCamera::FocusPointMode" } Property { name: "customFocusPoint"; type: "QPointF" } Property { name: "focusZones"; type: "QObject"; isReadonly: true; isPointer: true } Signal { name: "focusModeChanged" - type: "void" Parameter { type: "QDeclarativeCamera::FocusMode" } } Signal { name: "focusPointModeChanged" - type: "void" Parameter { type: "QDeclarativeCamera::FocusPointMode" } } Signal { name: "customFocusPointChanged" - type: "void" Parameter { type: "QPointF" } } Method { name: "setFocusMode" - type: "void" Parameter { type: "QDeclarativeCamera::FocusMode" } } Method { name: "setFocusPointMode" - type: "void" Parameter { name: "mode"; type: "QDeclarativeCamera::FocusPointMode" } } Method { name: "setCustomFocusPoint" - type: "void" Parameter { name: "point"; type: "QPointF" } } Method { @@ -714,7 +645,7 @@ Module { Component { name: "QDeclarativeCameraImageProcessing" prototype: "QObject" - exports: ["CameraImageProcessing 5.0"] + exports: ["QtMultimedia/CameraImageProcessing 5.0"] Enum { name: "WhiteBalanceMode" values: { @@ -738,69 +669,57 @@ Module { Property { name: "denoisingLevel"; type: "double" } Signal { name: "whiteBalanceModeChanged" - type: "void" Parameter { type: "QDeclarativeCameraImageProcessing::WhiteBalanceMode" } } Signal { name: "manualWhiteBalanceChanged" - type: "void" Parameter { type: "double" } } Signal { name: "contrastChanged" - type: "void" Parameter { type: "double" } } Signal { name: "saturationChanged" - type: "void" Parameter { type: "double" } } Signal { name: "sharpeningLevelChanged" - type: "void" Parameter { type: "double" } } Signal { name: "denoisingLevelChanged" - type: "void" Parameter { type: "double" } } Method { name: "setWhiteBalanceMode" - type: "void" Parameter { name: "mode"; type: "QDeclarativeCameraImageProcessing::WhiteBalanceMode" } } Method { name: "setManualWhiteBalance" - type: "void" Parameter { name: "colorTemp"; type: "double" } } Method { name: "setContrast" - type: "void" Parameter { name: "value"; type: "double" } } Method { name: "setSaturation" - type: "void" Parameter { name: "value"; type: "double" } } Method { name: "setSharpeningLevel" - type: "void" Parameter { name: "value"; type: "double" } } Method { name: "setDenoisingLevel" - type: "void" Parameter { name: "value"; type: "double" } } } Component { name: "QDeclarativeCameraRecorder" prototype: "QObject" - exports: ["CameraRecorder 5.0"] + exports: ["QtMultimedia/CameraRecorder 5.0"] Enum { name: "RecorderState" values: { @@ -859,180 +778,146 @@ Module { Property { name: "errorCode"; type: "string"; isReadonly: true } Signal { name: "recorderStateChanged" - type: "void" Parameter { name: "state"; type: "QDeclarativeCameraRecorder::RecorderState" } } - Signal { name: "recorderStatusChanged"; type: "void" } Signal { name: "durationChanged" - type: "void" Parameter { name: "duration"; type: "qlonglong" } } Signal { name: "mutedChanged" - type: "void" Parameter { name: "muted"; type: "bool" } } Signal { name: "outputLocationChanged" - type: "void" Parameter { name: "location"; type: "string" } } Signal { name: "actualLocationChanged" - type: "void" Parameter { name: "location"; type: "string" } } Signal { name: "error" - type: "void" Parameter { name: "errorCode"; type: "QDeclarativeCameraRecorder::Error" } Parameter { name: "errorString"; type: "string" } } Signal { name: "metaDataChanged" - type: "void" Parameter { name: "key"; type: "string" } Parameter { name: "value"; type: "QVariant" } } Signal { name: "captureResolutionChanged" - type: "void" Parameter { type: "QSize" } } Signal { name: "audioCodecChanged" - type: "void" Parameter { name: "codec"; type: "string" } } Signal { name: "videoCodecChanged" - type: "void" Parameter { name: "codec"; type: "string" } } Signal { name: "mediaContainerChanged" - type: "void" Parameter { name: "container"; type: "string" } } Signal { name: "frameRateChanged" - type: "void" Parameter { name: "arg"; type: "double" } } Signal { name: "videoBitRateChanged" - type: "void" Parameter { name: "arg"; type: "int" } } Signal { name: "audioBitRateChanged" - type: "void" Parameter { name: "arg"; type: "int" } } Signal { name: "audioChannelsChanged" - type: "void" Parameter { name: "arg"; type: "int" } } Signal { name: "audioSampleRateChanged" - type: "void" Parameter { name: "arg"; type: "int" } } Signal { name: "audioEncodingModeChanged" - type: "void" Parameter { name: "encodingMode"; type: "EncodingMode" } } Signal { name: "videoEncodingModeChanged" - type: "void" Parameter { name: "encodingMode"; type: "EncodingMode" } } Method { name: "setOutputLocation" - type: "void" Parameter { name: "location"; type: "string" } } - Method { name: "record"; type: "void" } - Method { name: "stop"; type: "void" } + Method { name: "record" } + Method { name: "stop" } Method { name: "setRecorderState" - type: "void" Parameter { name: "state"; type: "QDeclarativeCameraRecorder::RecorderState" } } Method { name: "setMuted" - type: "void" Parameter { name: "muted"; type: "bool" } } Method { name: "setMetadata" - type: "void" Parameter { name: "key"; type: "string" } Parameter { name: "value"; type: "QVariant" } } Method { name: "setCaptureResolution" - type: "void" Parameter { name: "resolution"; type: "QSize" } } Method { name: "setAudioCodec" - type: "void" Parameter { name: "codec"; type: "string" } } Method { name: "setVideoCodec" - type: "void" Parameter { name: "codec"; type: "string" } } Method { name: "setMediaContainer" - type: "void" Parameter { name: "container"; type: "string" } } Method { name: "setFrameRate" - type: "void" Parameter { name: "frameRate"; type: "double" } } Method { name: "setVideoBitRate" - type: "void" Parameter { name: "rate"; type: "int" } } Method { name: "setAudioBitRate" - type: "void" Parameter { name: "rate"; type: "int" } } Method { name: "setAudioChannels" - type: "void" Parameter { name: "channels"; type: "int" } } Method { name: "setAudioSampleRate" - type: "void" Parameter { name: "rate"; type: "int" } } Method { name: "setVideoEncodingMode" - type: "void" Parameter { name: "encodingMode"; type: "EncodingMode" } } Method { name: "setAudioEncodingMode" - type: "void" Parameter { name: "encodingMode"; type: "EncodingMode" } } } Component { name: "QDeclarativeRadio" prototype: "QObject" - exports: ["Radio 5.0"] + exports: ["QtMultimedia/Radio 5.0"] Enum { name: "State" values: { @@ -1100,110 +985,92 @@ Module { Property { name: "radioData"; type: "QDeclarativeRadioData"; isReadonly: true; isPointer: true } Signal { name: "stateChanged" - type: "void" Parameter { name: "state"; type: "QDeclarativeRadio::State" } } Signal { name: "bandChanged" - type: "void" Parameter { name: "band"; type: "QDeclarativeRadio::Band" } } Signal { name: "frequencyChanged" - type: "void" Parameter { name: "frequency"; type: "int" } } Signal { name: "stereoStatusChanged" - type: "void" Parameter { name: "stereo"; type: "bool" } } Signal { name: "searchingChanged" - type: "void" Parameter { name: "searching"; type: "bool" } } Signal { name: "signalStrengthChanged" - type: "void" Parameter { name: "signalStrength"; type: "int" } } Signal { name: "volumeChanged" - type: "void" Parameter { name: "volume"; type: "int" } } Signal { name: "mutedChanged" - type: "void" Parameter { name: "muted"; type: "bool" } } Signal { name: "stationFound" - type: "void" Parameter { name: "frequency"; type: "int" } Parameter { name: "stationId"; type: "string" } } Signal { name: "antennaConnectedChanged" - type: "void" Parameter { name: "connectionStatus"; type: "bool" } } Signal { name: "availabilityChanged" - type: "void" Parameter { name: "availability"; type: "Availability" } } - Signal { name: "errorChanged"; type: "void" } + Signal { name: "errorChanged" } Signal { name: "error" - type: "void" Parameter { name: "errorCode"; type: "QDeclarativeRadio::Error" } } Method { name: "setBand" - type: "void" Parameter { name: "band"; type: "QDeclarativeRadio::Band" } } Method { name: "setFrequency" - type: "void" Parameter { name: "frequency"; type: "int" } } Method { name: "setStereoMode" - type: "void" Parameter { name: "stereoMode"; type: "QDeclarativeRadio::StereoMode" } } Method { name: "setVolume" - type: "void" Parameter { name: "volume"; type: "int" } } Method { name: "setMuted" - type: "void" Parameter { name: "muted"; type: "bool" } } - Method { name: "cancelScan"; type: "void" } - Method { name: "scanDown"; type: "void" } - Method { name: "scanUp"; type: "void" } - Method { name: "tuneUp"; type: "void" } - Method { name: "tuneDown"; type: "void" } + Method { name: "cancelScan" } + Method { name: "scanDown" } + Method { name: "scanUp" } + Method { name: "tuneUp" } + Method { name: "tuneDown" } Method { name: "searchAllStations" - type: "void" Parameter { name: "searchMode"; type: "QDeclarativeRadio::SearchMode" } } - Method { name: "searchAllStations"; type: "void" } - Method { name: "start"; type: "void" } - Method { name: "stop"; type: "void" } + Method { name: "searchAllStations" } + Method { name: "start" } + Method { name: "stop" } Method { name: "isAvailable"; type: "bool" } } Component { name: "QDeclarativeRadioData" prototype: "QObject" - exports: ["RadioData 5.0"] + exports: ["QtMultimedia/RadioData 5.0"] Enum { name: "Error" values: { @@ -1284,48 +1151,39 @@ Module { Property { name: "availability"; type: "Availability"; isReadonly: true } Signal { name: "stationIdChanged" - type: "void" Parameter { name: "stationId"; type: "string" } } Signal { name: "programTypeChanged" - type: "void" Parameter { name: "programType"; type: "QDeclarativeRadioData::ProgramType" } } Signal { name: "programTypeNameChanged" - type: "void" Parameter { name: "programTypeName"; type: "string" } } Signal { name: "stationNameChanged" - type: "void" Parameter { name: "stationName"; type: "string" } } Signal { name: "radioTextChanged" - type: "void" Parameter { name: "radioText"; type: "string" } } Signal { name: "alternativeFrequenciesEnabledChanged" - type: "void" Parameter { name: "enabled"; type: "bool" } } Signal { name: "availabilityChanged" - type: "void" Parameter { name: "availability"; type: "Availability" } } - Signal { name: "errorChanged"; type: "void" } + Signal { name: "errorChanged" } Signal { name: "error" - type: "void" Parameter { name: "errorCode"; type: "QDeclarativeRadioData::Error" } } Method { name: "setAlternativeFrequenciesEnabled" - type: "void" Parameter { name: "enabled"; type: "bool" } } Method { name: "isAvailable"; type: "bool" } @@ -1333,17 +1191,15 @@ Module { Component { name: "QDeclarativeTorch" prototype: "QObject" - exports: ["Torch 5.0"] + exports: ["QtMultimedia/Torch 5.0"] Property { name: "enabled"; type: "bool" } Property { name: "power"; type: "int" } - Signal { name: "enabledChanged"; type: "void" } - Signal { name: "powerChanged"; type: "void" } } Component { name: "QDeclarativeVideoOutput" defaultProperty: "data" prototype: "QQuickItem" - exports: ["VideoOutput 5.0"] + exports: ["QtMultimedia/VideoOutput 5.0"] Enum { name: "FillMode" values: { @@ -1357,15 +1213,10 @@ Module { Property { name: "orientation"; type: "int" } Property { name: "sourceRect"; type: "QRectF"; isReadonly: true } Property { name: "contentRect"; type: "QRectF"; isReadonly: true } - Signal { name: "sourceChanged"; type: "void" } Signal { name: "fillModeChanged" - type: "void" Parameter { type: "QDeclarativeVideoOutput::FillMode" } } - Signal { name: "orientationChanged"; type: "void" } - Signal { name: "sourceRectChanged"; type: "void" } - Signal { name: "contentRectChanged"; type: "void" } Method { name: "mapPointToItem" type: "QPointF" @@ -1413,36 +1264,31 @@ Module { Property { name: "notifyInterval"; type: "int" } Signal { name: "notifyIntervalChanged" - type: "void" Parameter { name: "milliSeconds"; type: "int" } } Signal { name: "metaDataAvailableChanged" - type: "void" Parameter { name: "available"; type: "bool" } } - Signal { name: "metaDataChanged"; type: "void" } + Signal { name: "metaDataChanged" } Signal { name: "metaDataChanged" - type: "void" Parameter { name: "key"; type: "string" } Parameter { name: "value"; type: "QVariant" } } Signal { name: "availabilityChanged" - type: "void" Parameter { name: "available"; type: "bool" } } Signal { name: "availabilityChanged" - type: "void" - Parameter { name: "error"; type: "QMultimedia::AvailabilityStatus" } + Parameter { name: "availability"; type: "QMultimedia::AvailabilityStatus" } } } Component { name: "QSoundEffect" prototype: "QObject" - exports: ["SoundEffect 5.0"] + exports: ["QtMultimedia/SoundEffect 5.0"] Enum { name: "Loop" values: { @@ -1466,16 +1312,9 @@ Module { Property { name: "playing"; type: "bool"; isReadonly: true } Property { name: "status"; type: "Status"; isReadonly: true } Property { name: "category"; type: "string" } - Signal { name: "sourceChanged"; type: "void" } - Signal { name: "loopCountChanged"; type: "void" } - Signal { name: "loopsRemainingChanged"; type: "void" } - Signal { name: "volumeChanged"; type: "void" } - Signal { name: "mutedChanged"; type: "void" } - Signal { name: "loadedChanged"; type: "void" } - Signal { name: "playingChanged"; type: "void" } - Signal { name: "statusChanged"; type: "void" } - Signal { name: "categoryChanged"; type: "void" } - Method { name: "play"; type: "void" } - Method { name: "stop"; type: "void" } + Signal { name: "loopCountChanged" } + Signal { name: "loadedChanged" } + Method { name: "play" } + Method { name: "stop" } } } diff --git a/src/multimedia/audio/qaudiosystemplugin.cpp b/src/multimedia/audio/qaudiosystemplugin.cpp index b6e4cdfa8..85fa855b1 100644 --- a/src/multimedia/audio/qaudiosystemplugin.cpp +++ b/src/multimedia/audio/qaudiosystemplugin.cpp @@ -95,7 +95,7 @@ QT_BEGIN_NAMESPACE /*! Construct a new audio plugin with \a parent. - This is invoked automatically by the Q_EXPORT_PLUGIN2() macro. + This is invoked automatically by the Q_PLUGIN_METADATA() macro. */ QAudioSystemPlugin::QAudioSystemPlugin(QObject* parent) : diff --git a/src/multimedia/audio/qsound.h b/src/multimedia/audio/qsound.h index cf799e5df..a4d5327e0 100644 --- a/src/multimedia/audio/qsound.h +++ b/src/multimedia/audio/qsound.h @@ -57,7 +57,7 @@ class Q_MULTIMEDIA_EXPORT QSound : public QObject public: enum Loop { - Infinite = -1, + Infinite = -1 }; static void play(const QString& filename); diff --git a/src/multimedia/doc/qtmultimedia.qdocconf b/src/multimedia/doc/qtmultimedia.qdocconf index a6c9576b7..3873bd25c 100644 --- a/src/multimedia/doc/qtmultimedia.qdocconf +++ b/src/multimedia/doc/qtmultimedia.qdocconf @@ -3,7 +3,7 @@ include($QT_INSTALL_DOCS/global/qt-module-defaults.qdocconf) project = qtmultimedia description = Qt Multimedia Documentation url = http://qt-project.org/doc/qtmultimedia -version = 5.0.0 +version = 5.0.1 # The following parameters are for creating a qhp file, the qhelpgenerator # program can convert the qhp file into a qch file which can be opened in @@ -30,6 +30,7 @@ qhp.qtmultimedia.subprojects.qmltypes.selectors = class fake:headerfile qhp.qtmultimedia.subprojects.qmltypes.sortPages = true exampledirs += ../../../examples \ + snippets headerdirs += ../.. diff --git a/src/multimedia/doc/src/snippets/multimedia-snippets/audio.cpp b/src/multimedia/doc/snippets/multimedia-snippets/audio.cpp index a39f1c7f4..a39f1c7f4 100644 --- a/src/multimedia/doc/src/snippets/multimedia-snippets/audio.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/audio.cpp diff --git a/src/multimedia/doc/src/snippets/multimedia-snippets/audiorecorder.cpp b/src/multimedia/doc/snippets/multimedia-snippets/audiorecorder.cpp index e0f136910..e0f136910 100644 --- a/src/multimedia/doc/src/snippets/multimedia-snippets/audiorecorder.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/audiorecorder.cpp diff --git a/src/multimedia/doc/src/snippets/multimedia-snippets/camera.cpp b/src/multimedia/doc/snippets/multimedia-snippets/camera.cpp index 757533be8..757533be8 100644 --- a/src/multimedia/doc/src/snippets/multimedia-snippets/camera.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/camera.cpp diff --git a/src/multimedia/doc/src/snippets/multimedia-snippets/media.cpp b/src/multimedia/doc/snippets/multimedia-snippets/media.cpp index 300ad392b..300ad392b 100644 --- a/src/multimedia/doc/src/snippets/multimedia-snippets/media.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/media.cpp diff --git a/src/multimedia/doc/src/snippets/multimedia-snippets/multimedia-snippets.pro b/src/multimedia/doc/snippets/multimedia-snippets/multimedia-snippets.pro index 9571b026e..9571b026e 100644 --- a/src/multimedia/doc/src/snippets/multimedia-snippets/multimedia-snippets.pro +++ b/src/multimedia/doc/snippets/multimedia-snippets/multimedia-snippets.pro diff --git a/src/multimedia/doc/src/snippets/multimedia-snippets/qsound.cpp b/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp index 1f7dad79f..1f7dad79f 100644 --- a/src/multimedia/doc/src/snippets/multimedia-snippets/qsound.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/qsound.cpp diff --git a/src/multimedia/doc/src/snippets/multimedia-snippets/soundeffect.qml b/src/multimedia/doc/snippets/multimedia-snippets/soundeffect.qml index 9b173a46b..9b173a46b 100644 --- a/src/multimedia/doc/src/snippets/multimedia-snippets/soundeffect.qml +++ b/src/multimedia/doc/snippets/multimedia-snippets/soundeffect.qml diff --git a/src/multimedia/doc/src/snippets/multimedia-snippets/video.cpp b/src/multimedia/doc/snippets/multimedia-snippets/video.cpp index 37dca0851..37dca0851 100644 --- a/src/multimedia/doc/src/snippets/multimedia-snippets/video.cpp +++ b/src/multimedia/doc/snippets/multimedia-snippets/video.cpp diff --git a/src/multimedia/doc/src/snippets/snippets.pro b/src/multimedia/doc/snippets/snippets.pro index 31a3a0992..31a3a0992 100644 --- a/src/multimedia/doc/src/snippets/snippets.pro +++ b/src/multimedia/doc/snippets/snippets.pro diff --git a/src/multimedia/doc/src/audiooverview.qdoc b/src/multimedia/doc/src/audiooverview.qdoc index 723afb71b..20c5342e8 100644 --- a/src/multimedia/doc/src/audiooverview.qdoc +++ b/src/multimedia/doc/src/audiooverview.qdoc @@ -50,16 +50,16 @@ may have installed. Here is how you play a local file using C++: - \snippet doc/src/snippets/multimedia-snippets/media.cpp Local playback + \snippet multimedia-snippets/media.cpp Local playback You can also put files (even remote URLs) into a playlist: - \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio playlist + \snippet multimedia-snippets/media.cpp Audio playlist \section2 Recording Audio to a File For recording audio to a file, the \l {QAudioRecorder} class allows you to compress audio data from an input device and record it. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder + \snippet multimedia-snippets/media.cpp Audio recorder \section2 Low Latency Sound Effects @@ -87,7 +87,7 @@ they may arrive at a slightly different time than the media pipeline processes them. Here's an example of installing a probe during recording: - \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio probe + \snippet multimedia-snippets/media.cpp Audio probe \section2 Low Level Audio Playback and Recording Qt Multimedia offers classes for raw access to audio input and output @@ -123,7 +123,7 @@ or from a QIODevice instances. Here's an example of decoding a local file: - \snippet doc/src/snippets/multimedia-snippets/audio.cpp Local audio decoding + \snippet multimedia-snippets/audio.cpp Local audio decoding Note: This API is preliminary at this time - the API may change or be removed before the final 5.0 release. diff --git a/src/multimedia/doc/src/cameraoverview.qdoc b/src/multimedia/doc/src/cameraoverview.qdoc index f6bf4f533..40c82a69a 100644 --- a/src/multimedia/doc/src/cameraoverview.qdoc +++ b/src/multimedia/doc/src/cameraoverview.qdoc @@ -118,14 +118,14 @@ In C++, your choice depends on whether you are using widgets, or QGraphicsView. The \l QVideoWidget class is used in the widgets case, and \l QGraphicsVideoItem is useful for QGraphicsView. - \snippet doc/src/snippets/multimedia-snippets/camera.cpp Camera overview viewfinder + \snippet multimedia-snippets/camera.cpp Camera overview viewfinder For advanced usage (like processing viewfinder frames as they come, to detect objects or patterns), you can also derive from \l QAbstractVideoSurface and set that as the viewfinder for the QCamera object. In this case you will need to render the viewfinder image yourself. - \snippet doc/src/snippets/multimedia-snippets/camera.cpp Camera overview surface + \snippet multimedia-snippets/camera.cpp Camera overview surface \section2 Still Images @@ -136,7 +136,7 @@ that things are in focus and the settings are not different from the viewfinder while the image capture occurs, capture the image, and finally unlock the camera ready for the next photo. - \snippet doc/src/snippets/multimedia-snippets/camera.cpp Camera overview capture + \snippet multimedia-snippets/camera.cpp Camera overview capture \section2 Movies @@ -146,7 +146,7 @@ video requires the use of a \l QMediaRecorder object. To record video we need to create a camera object as before but this time as well as creating a viewfinder, we will also initialize a media recorder object. - \snippet doc/src/snippets/multimedia-snippets/camera.cpp Camera overview movie + \snippet multimedia-snippets/camera.cpp Camera overview movie Signals from the \e mediaRecorder can be connected to slots to react to changes in the state of the recorder or error events. Recording itself diff --git a/src/multimedia/doc/src/examples/video-qml-paint-rate.qdocinc b/src/multimedia/doc/src/examples/video-qml-paint-rate.qdocinc new file mode 100644 index 000000000..860f14270 --- /dev/null +++ b/src/multimedia/doc/src/examples/video-qml-paint-rate.qdocinc @@ -0,0 +1,43 @@ +The QML painting rate is calculated by the FrequencyMonitor class, which +turns a stream of events (received via the notify() slot), into an +instantaneous and an averaged frequency: + +\quotefromfile multimedia/video/snippets/frequencymonitor/frequencymonitor.h +\skipto class FrequencyMonitor : public QObject +\printuntil Q_OBJECT +\skipto Q_PROPERTY(qreal instantaneousFrequency +\printuntil averageFrequencyChanged) +\skipto public +\printuntil : +\dots +\skipto static void qmlRegisterType +\printuntil ; +\skipto public slots +\printuntil notify(); +\skipto }; +\printline }; + +The FrequencyMonitor class is exposed to QML like this + +\quotefromfile multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.cpp +\skipto FrequencyMonitor::qmlRegisterType +\printuntil } + +and its data is displayed by defining a QML item called FrequencyItem, like this: + +\quotefromfile multimedia/video/snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml +\skipto import FrequencyMonitor +\printuntil id: root +\dots +\skipto function notify +\printuntil id: monitor +\skipto onAverageFrequencyChanged +\printuntil { +\skipto averageFrequencyText +\printuntil /^\}/ + +The result looks like this: + +\image video-qml-paint-rate.png + + diff --git a/src/multimedia/doc/src/images/video-qml-paint-rate.png b/src/multimedia/doc/src/images/video-qml-paint-rate.png Binary files differnew file mode 100644 index 000000000..1519ff64e --- /dev/null +++ b/src/multimedia/doc/src/images/video-qml-paint-rate.png diff --git a/src/multimedia/doc/src/multimedia.qdoc b/src/multimedia/doc/src/multimedia.qdoc index b5d967f61..5afa9f6a1 100644 --- a/src/multimedia/doc/src/multimedia.qdoc +++ b/src/multimedia/doc/src/multimedia.qdoc @@ -81,51 +81,54 @@ For some quick recipes for specific tasks, look at the overviews above and consu \row \li Playing a sound effect \li - \li \l SoundEffect + \li \li QSoundEffect \row \li Playing low latency audio - \li \l{audiooutput}, \l{spectrum} + \li \l{multimedia/audiooutput}{audioinput}, \l{multimedia/spectrum}{spectrum} \li \li QAudioOutput \row \li Playing encoded audio (MP3, AAC etc) - \li \l{player} + \li \l{multimediawidgets/player}{player} \li \l Audio, \l {MediaPlayer} \li QMediaPlayer \row \li Accessing raw audio input data - \li \l{spectrum}, \l audioinput + \li \l{multimedia/spectrum}{spectrum}, \l {multimedia/audioinput}{audioinput} \li \li QAudioInput \row \li Recording encoded audio data - \li \l audiorecorder + \li \l {multimedia/audiorecorder}{audiorecorder} \li \li QAudioRecorder \row \li Discovering raw audio devices - \li \l audiodevices + \li \l {multimedia/audiodevices}{audiodevices} \li \li QAudioDeviceInfo \row \li Video Playback - \li \l {player}, \l {video/qmlvideo}{qmlvideo}, \l{video/qmlvideofx}{qmlvideofx} + \li \l {multimediawidgets/player}{player}, + \l {multimedia/video/qmlvideo}{qmlvideo}, + \l{multimedia/video/qmlvideofx}{qmlvideofx} \li \l MediaPlayer, \l VideoOutput, \l Video \li QMediaPlayer, QVideoWidget, QGraphicsVideoItem \row \li Video Processing - \li \l {video/qmlvideofx}{qmlvideofx} + \li \l {multimedia/video/qmlvideofx}{qmlvideofx} \li \l {MediaPlayer}, \l VideoOutput \li QMediaPlayer, QAbstractVideoSurface, QVideoFrame \row \li Listening to the radio - \li \l declarative-radio + \li \l {multimedia/declarative-radio}{declarative-radio} \li \l Radio, \l RadioData \li QRadioTuner, QRadioData \row \li Accessing camera viewfinder - \li \l {Camera Example}{camera}, \l declarative-camera + \li \l {Camera Example}{camera}, + \l {multimediawidgets/declarative-camera}{declarative-camera} \li \l Camera, \l VideoOutput \li QCamera, QVideoWidget, QGraphicsVideoItem \row @@ -135,12 +138,12 @@ For some quick recipes for specific tasks, look at the overviews above and consu \li QCamera, QAbstractVideoSurface, QVideoFrame \row \li Capturing photos - \li \l {Camera Example}{camera}, \l declarative-camera + \li \l {Camera Example}{camera}, \l {multimediawidgets/declarative-camera}{declarative-camera} \li \l Camera \li QCamera, QCameraImageCapture \row \li Capturing movies - \li \l {Camera Example}{camera}, \l declarative-camera + \li \l {Camera Example}{camera}, \l {multimediawidgets/declarative-camera}{declarative-camera} \li \l Camera \li QCamera, QMediaRecorder \row diff --git a/src/multimedia/doc/src/qtmultimedia-examples.qdoc b/src/multimedia/doc/src/qtmultimedia-examples.qdoc new file mode 100644 index 000000000..4427e16f3 --- /dev/null +++ b/src/multimedia/doc/src/qtmultimedia-examples.qdoc @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \group multimedia_examples + \ingroup all-examples + \title Qt Multimedia Examples + \brief Demonstrates the multimedia functionality provided by Qt. + + The \l{Qt Multimedia} module provides low-level audio support on Linux, + Windows and Mac OS X. It also provides audio plugin API to allow developers + implement their own audio support for custom devices and platforms. +*/ diff --git a/src/multimedia/doc/src/qtmultimedia-index.qdoc b/src/multimedia/doc/src/qtmultimedia-index.qdoc index dcf438d51..e7838cfd8 100644 --- a/src/multimedia/doc/src/qtmultimedia-index.qdoc +++ b/src/multimedia/doc/src/qtmultimedia-index.qdoc @@ -128,23 +128,6 @@ \section2 Examples \list - \li QML - \list - \li \l{video/qmlvideo}{qmlvideo} - \li \l{video/qmlvideofx}{qmlvideofx} - \li \l{declarative-camera} - \li \l{declarative-radio} - \endlist - \li C++ - \list - \li \l{audiooutput} - \li \l{audioinput} - \li \l{audiorecorder} - \li \l{audiodevices} - \li \l{spectrum} - \li \l{AudioEngine Example}{Audio Engine} - \li \l{player} - \li \l{Camera Example} - \endlist + \li \l{Qt Multimedia Examples} \endlist */ diff --git a/src/multimedia/doc/src/videooverview.qdoc b/src/multimedia/doc/src/videooverview.qdoc index f0d8de05b..45ea87f09 100644 --- a/src/multimedia/doc/src/videooverview.qdoc +++ b/src/multimedia/doc/src/videooverview.qdoc @@ -47,10 +47,10 @@ You can use the \l QMediaPlayer class to decode a video file, and display it using \l QVideoWidget, \l QGraphicsVideoItem, or a custom class. Here's an example of using QVideoWidget: - \snippet doc/src/snippets/multimedia-snippets/video.cpp Video widget + \snippet multimedia-snippets/video.cpp Video widget And an example with QGraphicsVideoItem: - \snippet doc/src/snippets/multimedia-snippets/video.cpp Video graphics item + \snippet multimedia-snippets/video.cpp Video graphics item \section2 Playing Video in QML @@ -77,12 +77,12 @@ processing, while deriving a class from \l QAbstractVideoSurface allows you to receive these frames from \l QMediaPlayer and \l QCamera. -\snippet doc/src/snippets/multimedia-snippets/video.cpp Derived Surface +\snippet multimedia-snippets/video.cpp Derived Surface and with an instance of this surface, \c myVideoSurface, you can set the surface as the \l {QMediaPlayer::setVideoOutput()}{video output} for QMediaPlayer. -\snippet doc/src/snippets/multimedia-snippets/video.cpp Setting surface in player +\snippet multimedia-snippets/video.cpp Setting surface in player Several of the built-in Qt classes offer this functionality as well, so if you decode video in your application, you can present @@ -97,7 +97,7 @@ The following snippet shows a class that has a writable \c videoSurface property and receives frames through a public slot \c onNewVideoContentReceived(). These frames are then presented on the surface set in \c setVideoSurface(). -\snippet doc/src/snippets/multimedia-snippets/video.cpp Video producer +\snippet multimedia-snippets/video.cpp Video producer \section2 Recording Video You can use the \l QMediaRecorder class in conjunction with other @@ -116,7 +116,7 @@ the video frames using this class, and they may arrive at a slightly different time than they are being rendered. Here's an example of installing a video probe while recording the camera: - \snippet doc/src/snippets/multimedia-snippets/media.cpp Video probe + \snippet multimedia-snippets/media.cpp Video probe \section1 Examples diff --git a/src/multimedia/qmediacontrol.cpp b/src/multimedia/qmediacontrol.cpp index 5933ce430..13a66813c 100644 --- a/src/multimedia/qmediacontrol.cpp +++ b/src/multimedia/qmediacontrol.cpp @@ -68,14 +68,14 @@ QT_BEGIN_NAMESPACE the \l {QMediaService::requestControl()} member of QMediaService. If the service doesn't implement a control it will instead return a null pointer. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Request control + \snippet multimedia-snippets/media.cpp Request control Alternatively if the IId of the control has been declared using Q_MEDIA_DECLARE_CONTROL the template version of QMediaService::requestControl() can be used to request the service without explicitly passing the IId or using qobject_cast(). - \snippet doc/src/snippets/multimedia-snippets/media.cpp Request control templated + \snippet multimedia-snippets/media.cpp Request control templated Most application code will not interface directly with a media service's controls, instead the QMediaObject which owns the service acts as an @@ -95,7 +95,7 @@ QT_BEGIN_NAMESPACE be requested from QMediaService::requestControl() without explicitly passing the IId. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Request control templated + \snippet multimedia-snippets/media.cpp Request control templated \sa QMediaService::requestControl() */ diff --git a/src/multimedia/qmediaobject.cpp b/src/multimedia/qmediaobject.cpp index d1cafbf66..86f6a5dfc 100644 --- a/src/multimedia/qmediaobject.cpp +++ b/src/multimedia/qmediaobject.cpp @@ -423,7 +423,7 @@ void QMediaObject::setupControls() /*! \fn QMediaObject::availabilityChanged(QMultimedia::AvailabilityStatus availability) - Signal emitted when the availability of the service has changed to \a availabilty + Signal emitted when the availability of the service has changed to \a availability. */ diff --git a/src/multimedia/qmediaservice.cpp b/src/multimedia/qmediaservice.cpp index c21e1df5a..6e68e9d0a 100644 --- a/src/multimedia/qmediaservice.cpp +++ b/src/multimedia/qmediaservice.cpp @@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE A pointer to media service's QMediaControl implementation can be obtained by passing the control's interface name to the requestControl() function. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Request control + \snippet multimedia-snippets/media.cpp Request control Media objects can use services loaded dynamically from plug-ins or implemented statically within an applications. Plug-in based services diff --git a/src/multimedia/qmultimedia.cpp b/src/multimedia/qmultimedia.cpp index 15eda0b56..b9e09f7d7 100644 --- a/src/multimedia/qmultimedia.cpp +++ b/src/multimedia/qmultimedia.cpp @@ -98,10 +98,10 @@ namespace Enumerates Service status errors. - \value NoError The service is operating correctly. - \value ServiceMissingError There is no service available to provide the requested functionality. + \value Available The service is operating correctly. + \value ServiceMissing There is no service available to provide the requested functionality. \value ResourceError The service could not allocate resources required to function correctly. - \value BusyError The service must wait for access to necessary resources. + \value Busy The service must wait for access to necessary resources. */ QT_END_NAMESPACE diff --git a/src/multimedia/radio/qradiodata.cpp b/src/multimedia/radio/qradiodata.cpp index f6d380826..569224896 100644 --- a/src/multimedia/radio/qradiodata.cpp +++ b/src/multimedia/radio/qradiodata.cpp @@ -78,7 +78,7 @@ namespace You can get a QRadioData instance fromt the \l{QRadioTuner::radioData()}{radioData} property from a QRadioTuner instance. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Radio data setup + \snippet multimedia-snippets/media.cpp Radio data setup Alternatively, you can pass an instance of QRadioTuner to the constructor to QRadioData. diff --git a/src/multimedia/radio/qradiotuner.cpp b/src/multimedia/radio/qradiotuner.cpp index d9d9cb6bf..a0cbb5857 100644 --- a/src/multimedia/radio/qradiotuner.cpp +++ b/src/multimedia/radio/qradiotuner.cpp @@ -79,7 +79,7 @@ namespace You can control the systems analog radio device using this interface, for example: - \snippet doc/src/snippets/multimedia-snippets/media.cpp Radio tuner + \snippet multimedia-snippets/media.cpp Radio tuner The radio object will emit signals for any changes in state such as: bandChanged(), frequencyChanged(), stereoStatusChanged(), searchingChanged(), diff --git a/src/multimedia/recording/qaudiorecorder.cpp b/src/multimedia/recording/qaudiorecorder.cpp index 25225e5ed..71fd219c9 100644 --- a/src/multimedia/recording/qaudiorecorder.cpp +++ b/src/multimedia/recording/qaudiorecorder.cpp @@ -66,11 +66,11 @@ QT_BEGIN_NAMESPACE The QAudioRecorder class is a high level media recording class and contains the same functionality as \l QMediaRecorder. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder + \snippet multimedia-snippets/media.cpp Audio recorder In addition QAudioRecorder provides functionality for selecting the audio input. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio recorder inputs + \snippet multimedia-snippets/media.cpp Audio recorder inputs The \l {audiorecorder}{Audio Recorder} example shows how to use this class in more detail. diff --git a/src/multimedia/recording/qmediaencodersettings.cpp b/src/multimedia/recording/qmediaencodersettings.cpp index 8f8287f4c..1c0f53231 100644 --- a/src/multimedia/recording/qmediaencodersettings.cpp +++ b/src/multimedia/recording/qmediaencodersettings.cpp @@ -111,7 +111,7 @@ private: and then passing it to a QMediaRecorder instance using the QMediaRecorder::setEncodingSettings() function. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Audio encoder settings + \snippet multimedia-snippets/media.cpp Audio encoder settings \sa QMediaRecorder, QAudioEncoderSettingsControl */ @@ -425,7 +425,7 @@ private: and then passing it to a QMediaRecorder instance using the QMediaRecorder::setEncodingSettings() function. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Video encoder settings + \snippet multimedia-snippets/media.cpp Video encoder settings \sa QMediaRecorder, QVideoEncoderSettingsControl */ @@ -751,7 +751,7 @@ private: properties and then passing it to a QCameraImageCapture instance using the QCameraImageCapture::setImageSettings() function. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Image encoder settings + \snippet multimedia-snippets/media.cpp Image encoder settings \sa QImageEncoderControl */ diff --git a/src/multimedia/recording/qmediarecorder.cpp b/src/multimedia/recording/qmediarecorder.cpp index dd303a12b..79d70e442 100644 --- a/src/multimedia/recording/qmediarecorder.cpp +++ b/src/multimedia/recording/qmediarecorder.cpp @@ -75,7 +75,7 @@ QT_BEGIN_NAMESPACE intended to be used alone but for accessing the media recording functions of other media objects, like QRadioTuner, or QCamera. - \snippet doc/src/snippets/multimedia-snippets/media.cpp Media recorder + \snippet multimedia-snippets/media.cpp Media recorder \sa QAudioRecorder */ diff --git a/src/multimediawidgets/multimediawidgets.pro b/src/multimediawidgets/multimediawidgets.pro index 502c4ccda..d0638dd21 100644 --- a/src/multimediawidgets/multimediawidgets.pro +++ b/src/multimediawidgets/multimediawidgets.pro @@ -7,8 +7,6 @@ contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles2) { DEFINES += QT_NO_OPENGL } -CONFIG += no_private_qt_headers_warning - load(qt_module) PRIVATE_HEADERS += \ diff --git a/src/plugins/audiocapture/audiocapture.pro b/src/plugins/audiocapture/audiocapture.pro index f58f43eab..833e4b5fc 100644 --- a/src/plugins/audiocapture/audiocapture.pro +++ b/src/plugins/audiocapture/audiocapture.pro @@ -2,6 +2,7 @@ TARGET = qtmedia_audioengine QT += multimedia-private PLUGIN_TYPE=mediaservice +PLUGIN_CLASS_NAME = AudioCaptureServicePlugin load(qt_plugin) HEADERS += audioencodercontrol.h \ diff --git a/src/plugins/avfoundation/camera/camera.pro b/src/plugins/avfoundation/camera/camera.pro index 2eced1819..3c7511715 100644 --- a/src/plugins/avfoundation/camera/camera.pro +++ b/src/plugins/avfoundation/camera/camera.pro @@ -5,6 +5,7 @@ TARGET = qavfcamera QT += multimedia-private network PLUGIN_TYPE = mediaservice +PLUGIN_CLASS_NAME = AVFServicePlugin load(qt_plugin) LIBS += -framework AppKit -framework AudioUnit \ diff --git a/src/plugins/avfoundation/mediaplayer/avfvideowidget.mm b/src/plugins/avfoundation/mediaplayer/avfvideowidget.mm index 307539851..a6a2f4236 100644 --- a/src/plugins/avfoundation/mediaplayer/avfvideowidget.mm +++ b/src/plugins/avfoundation/mediaplayer/avfvideowidget.mm @@ -103,11 +103,11 @@ void AVFVideoWidget::paintGL() return; QRect targetRect = displayRect(); - int x1 = targetRect.left(); - int x2 = targetRect.right(); - int y1 = targetRect.bottom(); - int y2 = targetRect.top(); - int zValue = 0; + GLfloat x1 = targetRect.left(); + GLfloat x2 = targetRect.right(); + GLfloat y1 = targetRect.bottom(); + GLfloat y2 = targetRect.top(); + GLfloat zValue = 0; const GLfloat textureCoordinates[] = { 0, 0, diff --git a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro index 45a30acf2..d1957d5f3 100644 --- a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro +++ b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro @@ -8,6 +8,7 @@ TARGET = qavfmediaplayer QT += multimedia-private network PLUGIN_TYPE = mediaservice +PLUGIN_CLASS_NAME = AVFMediaPlayerServicePlugin load(qt_plugin) LIBS += -framework AVFoundation -framework CoreMedia diff --git a/src/plugins/blackberry/mediaservice/mediaservice.pro b/src/plugins/blackberry/mediaservice/mediaservice.pro index 9c658a57b..ffaed4816 100644 --- a/src/plugins/blackberry/mediaservice/mediaservice.pro +++ b/src/plugins/blackberry/mediaservice/mediaservice.pro @@ -1,8 +1,8 @@ TARGET = qtmedia_blackberry QT += multimedia-private gui-private -CONFIG += no_private_qt_headers_warning PLUGIN_TYPE=mediaservice +PLUGIN_CLASS_NAME = BbServicePlugin load(qt_plugin) LIBS += -lmmrndclient -lstrm -lscreen diff --git a/src/plugins/directshow/camera/camera.pri b/src/plugins/directshow/camera/camera.pri index b576a852f..91111bee0 100644 --- a/src/plugins/directshow/camera/camera.pri +++ b/src/plugins/directshow/camera/camera.pri @@ -28,5 +28,5 @@ SOURCES += \ SOURCES += $$PWD/dsvideowidgetcontrol.cpp } -*-msvc*:INCLUDEPATH += $(DXSDK_DIR)/include +*-msvc*:INCLUDEPATH += $$(DXSDK_DIR)/include LIBS += -lstrmiids -ldmoguids -luuid -lmsdmo -lole32 -loleaut32 diff --git a/src/plugins/directshow/camera/dscameraservice.cpp b/src/plugins/directshow/camera/dscameraservice.cpp index 6d2974160..fcbd1ef58 100644 --- a/src/plugins/directshow/camera/dscameraservice.cpp +++ b/src/plugins/directshow/camera/dscameraservice.cpp @@ -44,7 +44,7 @@ #if defined(HAVE_WIDGETS) #include <QtWidgets/qwidget.h> -#include <QVideoWidgetControl.h> +#include <QVideoWidgetControl> #endif #include "dscameraservice.h" diff --git a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp index 46865690f..7c33d130d 100644 --- a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp +++ b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp @@ -49,7 +49,7 @@ #include <dshow.h> #include <objbase.h> #include <initguid.h> -#include <Ocidl.h> +#include <ocidl.h> #include <string.h> extern const CLSID CLSID_VideoInputDeviceCategory; diff --git a/src/plugins/directshow/camera/dsvideowidgetcontrol.cpp b/src/plugins/directshow/camera/dsvideowidgetcontrol.cpp index 843719b8e..d7a913d7b 100644 --- a/src/plugins/directshow/camera/dsvideowidgetcontrol.cpp +++ b/src/plugins/directshow/camera/dsvideowidgetcontrol.cpp @@ -42,7 +42,7 @@ #include <QtCore/qcoreevent.h> #include <QtCore/qtimer.h> -#include "DSVideoWidgetControl.h" +#include "dsvideowidgetcontrol.h" #include "dscamerasession.h" QT_BEGIN_NAMESPACE diff --git a/src/plugins/directshow/camera/dsvideowidgetcontrol.h b/src/plugins/directshow/camera/dsvideowidgetcontrol.h index ac390c82b..9249c3178 100644 --- a/src/plugins/directshow/camera/dsvideowidgetcontrol.h +++ b/src/plugins/directshow/camera/dsvideowidgetcontrol.h @@ -49,7 +49,7 @@ #include <QtMultimedia/qvideosurfaceformat.h> #include <qvideowidgetcontrol.h> -#include "DsCameraControl.h" +#include "dscameracontrol.h" QT_BEGIN_HEADER diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro index 97f28342e..496769890 100644 --- a/src/plugins/directshow/directshow.pro +++ b/src/plugins/directshow/directshow.pro @@ -1,6 +1,7 @@ TARGET = dsengine PLUGIN_TYPE=mediaservice +PLUGIN_CLASS_NAME = DSServicePlugin load(qt_plugin) QT += multimedia diff --git a/src/plugins/gstreamer/audiodecoder/audiodecoder.pro b/src/plugins/gstreamer/audiodecoder/audiodecoder.pro index e559f7e02..8cd1d587e 100644 --- a/src/plugins/gstreamer/audiodecoder/audiodecoder.pro +++ b/src/plugins/gstreamer/audiodecoder/audiodecoder.pro @@ -1,6 +1,7 @@ TARGET = gstaudiodecoder PLUGIN_TYPE = mediaservice +PLUGIN_CLASS_NAME = QGstreamerAudioDecoderServicePlugin load(qt_plugin) include(../common.pri) diff --git a/src/plugins/gstreamer/camerabin/camerabin.pro b/src/plugins/gstreamer/camerabin/camerabin.pro index 5a2dde161..7f84fe54d 100644 --- a/src/plugins/gstreamer/camerabin/camerabin.pro +++ b/src/plugins/gstreamer/camerabin/camerabin.pro @@ -3,6 +3,7 @@ TARGET = gstcamerabin QT += multimedia-private PLUGIN_TYPE = mediaservice +PLUGIN_CLASS_NAME = CameraBinServicePlugin load(qt_plugin) include(../common.pri) diff --git a/src/plugins/gstreamer/mediacapture/mediacapture.pro b/src/plugins/gstreamer/mediacapture/mediacapture.pro index 9c6cc3c5a..e8d039f8d 100644 --- a/src/plugins/gstreamer/mediacapture/mediacapture.pro +++ b/src/plugins/gstreamer/mediacapture/mediacapture.pro @@ -1,6 +1,7 @@ TARGET = gstmediacapture PLUGIN_TYPE = mediaservice +PLUGIN_CLASS_NAME = QGstreamerCaptureServicePlugin load(qt_plugin) include(../common.pri) diff --git a/src/plugins/gstreamer/mediaplayer/mediaplayer.pro b/src/plugins/gstreamer/mediaplayer/mediaplayer.pro index 70e5c8d0b..2ca9377db 100644 --- a/src/plugins/gstreamer/mediaplayer/mediaplayer.pro +++ b/src/plugins/gstreamer/mediaplayer/mediaplayer.pro @@ -1,6 +1,7 @@ TARGET = gstmediaplayer PLUGIN_TYPE = mediaservice +PLUGIN_CLASS_NAME = QGstreamerPlayerServicePlugin load(qt_plugin) include(../common.pri) diff --git a/src/plugins/m3u/m3u.pro b/src/plugins/m3u/m3u.pro index 875e815c1..3897e2de8 100644 --- a/src/plugins/m3u/m3u.pro +++ b/src/plugins/m3u/m3u.pro @@ -2,6 +2,7 @@ TARGET = qtmultimedia_m3u QT += multimedia-private PLUGIN_TYPE=playlistformats +PLUGIN_CLASS_NAME = QM3uPlaylistPlugin load(qt_plugin) HEADERS += qm3uhandler.h diff --git a/src/plugins/pulseaudio/pulseaudio.pro b/src/plugins/pulseaudio/pulseaudio.pro index ac049dc21..e8ab9317c 100644 --- a/src/plugins/pulseaudio/pulseaudio.pro +++ b/src/plugins/pulseaudio/pulseaudio.pro @@ -2,6 +2,7 @@ TARGET = qtmedia_pulse QT += multimedia-private PLUGIN_TYPE = audio +PLUGIN_CLASS_NAME = QPulseAudioPlugin load(qt_plugin) CONFIG += link_pkgconfig diff --git a/src/plugins/qt7/qt7.pro b/src/plugins/qt7/qt7.pro index edc3ddde6..ae87bd44a 100644 --- a/src/plugins/qt7/qt7.pro +++ b/src/plugins/qt7/qt7.pro @@ -8,6 +8,7 @@ QT += multimedia-private network } PLUGIN_TYPE = mediaservice +PLUGIN_CLASS_NAME = QT7ServicePlugin load(qt_plugin) !simulator { diff --git a/src/plugins/qt7/qt7movierenderer.mm b/src/plugins/qt7/qt7movierenderer.mm index f1508294a..a55c44b18 100644 --- a/src/plugins/qt7/qt7movierenderer.mm +++ b/src/plugins/qt7/qt7movierenderer.mm @@ -55,7 +55,7 @@ #include <qabstractvideosurface.h> #include <qvideosurfaceformat.h> -#include <QtOpenGl/QGLContext> +#include <QtOpenGL/QGLContext> QT_USE_NAMESPACE diff --git a/src/plugins/qt7/qt7movieviewoutput.mm b/src/plugins/qt7/qt7movieviewoutput.mm index 9600872b3..a65fd24ef 100644 --- a/src/plugins/qt7/qt7movieviewoutput.mm +++ b/src/plugins/qt7/qt7movieviewoutput.mm @@ -39,7 +39,7 @@ ** ****************************************************************************/ -#import <QTKit/QTkit.h> +#import <QTKit/QTKit.h> #include "qt7backend.h" diff --git a/src/plugins/v4l/v4l.pro b/src/plugins/v4l/v4l.pro index 92c561947..c5e953538 100644 --- a/src/plugins/v4l/v4l.pro +++ b/src/plugins/v4l/v4l.pro @@ -2,6 +2,7 @@ TARGET = qtmedia_v4lengine QT += multimedia-private PLUGIN_TYPE = mediaservice +PLUGIN_CLASS_NAME = V4LServicePlugin load(qt_plugin) HEADERS += v4lserviceplugin.h diff --git a/src/plugins/wmf/player/evr9videowindowcontrol.cpp b/src/plugins/wmf/player/evr9videowindowcontrol.cpp index 0a50114dd..7f1c71332 100644 --- a/src/plugins/wmf/player/evr9videowindowcontrol.cpp +++ b/src/plugins/wmf/player/evr9videowindowcontrol.cpp @@ -57,27 +57,17 @@ Evr9VideoWindowControl::Evr9VideoWindowControl(QObject *parent) , m_currentActivate(0) , m_evrSink(0) , m_displayControl(0) + , m_processor(0) { - if (FAILED(MFCreateVideoRendererActivate(0, &m_currentActivate))) { - qWarning() << "Failed to create evr video renderer activate!"; - return; - } - if (FAILED(m_currentActivate->ActivateObject(IID_IMFMediaSink, (LPVOID*)(&m_evrSink)))) { - qWarning() << "Failed to activate evr media sink!"; - return; - } - if (FAILED(MFGetService(m_evrSink, MR_VIDEO_RENDER_SERVICE, IID_PPV_ARGS(&m_displayControl)))) { - qWarning() << "Failed to get display control from evr media sink!"; - return; - } - if (FAILED(MFGetService(m_evrSink, MR_VIDEO_MIXER_SERVICE, IID_PPV_ARGS(&m_processor)))) { - qWarning() << "Failed to get video processor from evr media sink!"; - return; - } } Evr9VideoWindowControl::~Evr9VideoWindowControl() { + clear(); +} + +void Evr9VideoWindowControl::clear() +{ if (m_processor) m_processor->Release(); if (m_displayControl) @@ -88,8 +78,12 @@ Evr9VideoWindowControl::~Evr9VideoWindowControl() m_currentActivate->ShutdownObject(); m_currentActivate->Release(); } -} + m_processor = NULL; + m_displayControl = NULL; + m_evrSink = NULL; + m_currentActivate = NULL; +} WId Evr9VideoWindowControl::winId() const { @@ -307,8 +301,32 @@ void Evr9VideoWindowControl::setSaturation(int saturation) emit saturationChanged(saturation); } -IMFActivate* Evr9VideoWindowControl::currentActivate() const +IMFActivate* Evr9VideoWindowControl::createActivate() { + clear(); + + if (FAILED(MFCreateVideoRendererActivate(0, &m_currentActivate))) { + qWarning() << "Failed to create evr video renderer activate!"; + return 0; + } + if (FAILED(m_currentActivate->ActivateObject(IID_IMFMediaSink, (LPVOID*)(&m_evrSink)))) { + qWarning() << "Failed to activate evr media sink!"; + return 0; + } + if (FAILED(MFGetService(m_evrSink, MR_VIDEO_RENDER_SERVICE, IID_PPV_ARGS(&m_displayControl)))) { + qWarning() << "Failed to get display control from evr media sink!"; + return 0; + } + if (FAILED(MFGetService(m_evrSink, MR_VIDEO_MIXER_SERVICE, IID_PPV_ARGS(&m_processor)))) { + qWarning() << "Failed to get video processor from evr media sink!"; + return 0; + } + + setWinId(m_windowId); + setDisplayRect(m_displayRect); + setAspectRatioMode(m_aspectRatioMode); + m_dirtyValues = DXVA2_ProcAmp_Brightness | DXVA2_ProcAmp_Contrast | DXVA2_ProcAmp_Hue | DXVA2_ProcAmp_Saturation; + return m_currentActivate; } diff --git a/src/plugins/wmf/player/evr9videowindowcontrol.h b/src/plugins/wmf/player/evr9videowindowcontrol.h index d64447fdb..ea4bae56d 100644 --- a/src/plugins/wmf/player/evr9videowindowcontrol.h +++ b/src/plugins/wmf/player/evr9videowindowcontrol.h @@ -85,10 +85,12 @@ public: int saturation() const; void setSaturation(int saturation); - IMFActivate* currentActivate() const; + IMFActivate* createActivate(); -private: void setProcAmpValues(); + +private: + void clear(); DXVA2_Fixed32 scaleProcAmpValue(DWORD prop, int value) const; WId m_windowId; diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp index 6d421fd06..7639f4f9e 100644 --- a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp +++ b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp @@ -46,17 +46,23 @@ MFAudioEndpointControl::MFAudioEndpointControl(QObject *parent) : QAudioOutputSelectorControl(parent) , m_currentActivate(0) { - updateEndpoints(); - setActiveOutput(m_defaultEndpoint); } MFAudioEndpointControl::~MFAudioEndpointControl() { + clear(); +} + +void MFAudioEndpointControl::clear() +{ + m_activeEndpoint.clear(); + foreach (LPWSTR wstrID, m_devices) CoTaskMemFree(wstrID); if (m_currentActivate) m_currentActivate->Release(); + m_currentActivate = NULL; } QList<QString> MFAudioEndpointControl::availableOutputs() const @@ -119,8 +125,13 @@ void MFAudioEndpointControl::setActiveOutput(const QString &name) m_activeEndpoint = name; } -IMFActivate* MFAudioEndpointControl::currentActivate() const +IMFActivate* MFAudioEndpointControl::createActivate() { + clear(); + + updateEndpoints(); + setActiveOutput(m_defaultEndpoint); + return m_currentActivate; } diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.h b/src/plugins/wmf/player/mfaudioendpointcontrol.h index 1e7fc58be..53c6657cb 100644 --- a/src/plugins/wmf/player/mfaudioendpointcontrol.h +++ b/src/plugins/wmf/player/mfaudioendpointcontrol.h @@ -68,9 +68,10 @@ public: void setActiveOutput(const QString& name); - IMFActivate* currentActivate() const; + IMFActivate* createActivate(); private: + void clear(); void updateEndpoints(); QString m_defaultEndpoint; diff --git a/src/plugins/wmf/player/mfplayerservice.cpp b/src/plugins/wmf/player/mfplayerservice.cpp index 2ca74ad3e..5bda9f983 100644 --- a/src/plugins/wmf/player/mfplayerservice.cpp +++ b/src/plugins/wmf/player/mfplayerservice.cpp @@ -71,6 +71,8 @@ MFPlayerService::MFPlayerService(QObject *parent) MFPlayerService::~MFPlayerService() { + m_session->close(); + #ifndef Q_WS_SIMULATOR if (m_videoWindowControl) delete m_videoWindowControl; @@ -79,7 +81,6 @@ MFPlayerService::~MFPlayerService() if (m_videoRendererControl) delete m_videoRendererControl; - m_session->close(); m_session->Release(); } diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp index e9c40567c..d9ff0e7cb 100644 --- a/src/plugins/wmf/player/mfplayersession.cpp +++ b/src/plugins/wmf/player/mfplayersession.cpp @@ -411,8 +411,9 @@ MFPlayerSession::MFPlayerSession(MFPlayerService *playerService) , m_volumeControl(0) , m_netsourceStatistics(0) , m_hCloseEvent(0) + , m_closing(false) , m_pendingRate(1) - , m_volume(1) + , m_volume(100) , m_muted(false) , m_status(QMediaPlayer::NoMedia) , m_scrubbing(false) @@ -422,10 +423,6 @@ MFPlayerSession::MFPlayerSession(MFPlayerService *playerService) , m_audioSampleGrabberNode(0) , m_videoProbeMFT(0) { - m_hCloseEvent = CreateEvent(NULL, FALSE, FALSE, NULL); - m_sourceResolver = new SourceResolver(); - QObject::connect(m_sourceResolver, SIGNAL(mediaSourceReady()), this, SLOT(handleMediaSourceReady())); - QObject::connect(m_sourceResolver, SIGNAL(error(long)), this, SLOT(handleSourceError(long))); QObject::connect(this, SIGNAL(sessionEvent(IMFMediaEvent *)), this, SLOT(handleSessionEvent(IMFMediaEvent *))); m_pendingState = NoPending; @@ -438,27 +435,31 @@ MFPlayerSession::MFPlayerSession(MFPlayerService *playerService) m_request.prevCmd = CmdNone; m_request.rate = 1.0f; - createSession(); - PropVariantInit(&m_varStart); - m_varStart.vt = VT_I8; - m_varStart.uhVal.QuadPart = 0; - m_audioSampleGrabber = new AudioSampleGrabberCallback; m_videoProbeMFT = new MFTransform; } void MFPlayerSession::close() { +#ifdef DEBUG_MEDIAFOUNDATION + qDebug() << "close"; +#endif + clear(); + if (!m_session) + return; + HRESULT hr = S_OK; if (m_session) { + m_closing = true; hr = m_session->Close(); if (SUCCEEDED(hr)) { - DWORD dwWaitResult = WaitForSingleObject(m_hCloseEvent, 5000); + DWORD dwWaitResult = WaitForSingleObject(m_hCloseEvent, 100); if (dwWaitResult == WAIT_TIMEOUT) { qWarning() << "session close time out!"; } } + m_closing = false; } if (SUCCEEDED(hr)) { @@ -475,7 +476,9 @@ void MFPlayerSession::close() if (m_session) m_session->Release(); m_session = 0; - CloseHandle(m_hCloseEvent); + if (m_hCloseEvent) + CloseHandle(m_hCloseEvent); + m_hCloseEvent = 0; } void MFPlayerSession::addProbe(MFAudioProbeControl *probe) @@ -522,6 +525,7 @@ void MFPlayerSession::load(const QMediaContent &media, QIODevice *stream) changeStatus(QMediaPlayer::InvalidMedia); emit error(QMediaPlayer::ResourceError, tr("Invalid stream source."), true); } else { + createSession(); changeStatus(QMediaPlayer::LoadingMedia); m_sourceResolver->load(resources, stream); } @@ -543,6 +547,10 @@ void MFPlayerSession::handleSourceError(long hr) case NS_E_SERVER_NOT_FOUND: errorString = tr("The specified server could not be found."); break; + case MF_E_UNSUPPORTED_BYTESTREAM_TYPE: + errorCode = QMediaPlayer::FormatError; + errorString = tr("Unsupported media type."); + break; default: errorString = tr("Failed to load source."); break; @@ -638,6 +646,7 @@ void MFPlayerSession::setupPlaybackTopology(IMFMediaSource *source, IMFPresentat break; } } + outputNode->Release(); } sourceNode->Release(); } @@ -703,14 +712,14 @@ IMFTopologyNode* MFPlayerSession::addOutputNode(IMFStreamDescriptor *streamDesc, IMFActivate *activate = NULL; if (MFMediaType_Audio == guidMajorType) { mediaType = Audio; - activate = m_playerService->audioEndpointControl()->currentActivate(); + activate = m_playerService->audioEndpointControl()->createActivate(); } else if (MFMediaType_Video == guidMajorType) { mediaType = Video; if (m_playerService->videoRendererControl()) { - activate = m_playerService->videoRendererControl()->currentActivate(); + activate = m_playerService->videoRendererControl()->createActivate(); #ifndef Q_WS_SIMULATOR } else if (m_playerService->videoWindowControl()) { - activate = m_playerService->videoWindowControl()->currentActivate(); + activate = m_playerService->videoWindowControl()->createActivate(); #endif } else { qWarning() << "no videoWindowControl or videoRendererControl, unable to add output node for video data"; @@ -1136,6 +1145,7 @@ void MFPlayerSession::pause() } else { if (m_state.command == CmdPause) return; + if (SUCCEEDED(m_session->Pause())) { m_state.setCommand(CmdPause); m_pendingState = CmdPending; @@ -1163,6 +1173,14 @@ QMediaPlayer::MediaStatus MFPlayerSession::status() const void MFPlayerSession::createSession() { + close(); + + m_hCloseEvent = CreateEvent(NULL, FALSE, FALSE, NULL); + + m_sourceResolver = new SourceResolver(); + QObject::connect(m_sourceResolver, SIGNAL(mediaSourceReady()), this, SLOT(handleMediaSourceReady())); + QObject::connect(m_sourceResolver, SIGNAL(error(long)), this, SLOT(handleSourceError(long))); + Q_ASSERT(m_session == NULL); HRESULT hr = MFCreateMediaSession(NULL, &m_session); if (FAILED(hr)) { @@ -1176,6 +1194,10 @@ void MFPlayerSession::createSession() changeStatus(QMediaPlayer::UnknownMediaStatus); emit error(QMediaPlayer::ResourceError, tr("Unable to pull session events."), false); } + + PropVariantInit(&m_varStart); + m_varStart.vt = VT_I8; + m_varStart.hVal.QuadPart = 0; } qint64 MFPlayerSession::position() @@ -1511,7 +1533,8 @@ HRESULT MFPlayerSession::Invoke(IMFAsyncResult *pResult) } } - emit sessionEvent(pEvent); + if (!m_closing) + emit sessionEvent(pEvent); return S_OK; } @@ -1569,6 +1592,13 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent) case MESessionStarted: if (!m_scrubbing) updatePendingCommands(CmdStart); +#ifndef Q_WS_SIMULATOR + // playback started, we can now set again the procAmpValues if they have been + // changed previously (these are lost when loading a new media) + if (m_playerService->videoWindowControl()) { + m_playerService->videoWindowControl()->setProcAmpValues(); + } +#endif break; case MESessionStopped: if (m_status != QMediaPlayer::EndOfMedia) { @@ -1595,6 +1625,37 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent) qDebug() << "MEReconnectEnd" << ((hrStatus == S_OK) ? "OK" : "Failed"); #endif break; + case MESessionTopologySet: + if (FAILED(hrStatus)) { + changeStatus(QMediaPlayer::InvalidMedia); + emit error(QMediaPlayer::FormatError, tr("Unsupported media, a codec is missing."), true); + } else { + if (m_audioSampleGrabberNode) { + IMFMediaType *mediaType = 0; + hr = MFGetTopoNodeCurrentType(m_audioSampleGrabberNode, 0, FALSE, &mediaType); + if (SUCCEEDED(hr)) { + m_audioSampleGrabber->setFormat(audioFormatForMFMediaType(mediaType)); + mediaType->Release(); + } + } + + if (SUCCEEDED(MFGetService(m_session, MR_POLICY_VOLUME_SERVICE, IID_PPV_ARGS(&m_volumeControl)))) { + m_volumeControl->SetMasterVolume(m_volume * 0.01f); + m_volumeControl->SetMute(m_muted); + } + + DWORD dwCharacteristics = 0; + m_sourceResolver->mediaSource()->GetCharacteristics(&dwCharacteristics); + emit seekableUpdate(MFMEDIASOURCE_CAN_SEEK & dwCharacteristics); + + // Topology is resolved and successfuly set, this happens only after loading a new media. + // Make sure we always start the media from the beginning + m_varStart.vt = VT_I8; + m_varStart.hVal.QuadPart = 0; + + changeStatus(QMediaPlayer::LoadedMedia); + } + break; } if (FAILED(hrStatus)) { @@ -1631,9 +1692,10 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent) if (m_volumeControl) { float currentVolume = 1; if (SUCCEEDED(m_volumeControl->GetMasterVolume(¤tVolume))) { - if (currentVolume != m_volume) { - m_volume = currentVolume; - emit volumeChanged(int(m_volume * 100)); + int scaledVolume = currentVolume * 100; + if (scaledVolume != m_volume) { + m_volume = scaledVolume; + emit volumeChanged(scaledVolume); } } BOOL currentMuted = FALSE; @@ -1645,26 +1707,6 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent) } } break; - case MESessionTopologySet: { - if (m_audioSampleGrabberNode) { - IMFMediaType *mediaType = 0; - hr = MFGetTopoNodeCurrentType(m_audioSampleGrabberNode, 0, FALSE, &mediaType); - if (SUCCEEDED(hr)) { - m_audioSampleGrabber->setFormat(audioFormatForMFMediaType(mediaType)); - mediaType->Release(); - } - } - - if (SUCCEEDED(MFGetService(m_session, MR_POLICY_VOLUME_SERVICE, IID_PPV_ARGS(&m_volumeControl)))) { - m_volumeControl->SetMasterVolume(m_volume); - m_volumeControl->SetMute(m_muted); - } - DWORD dwCharacteristics = 0; - m_sourceResolver->mediaSource()->GetCharacteristics(&dwCharacteristics); - emit seekableUpdate(MFMEDIASOURCE_CAN_SEEK & dwCharacteristics); - changeStatus(QMediaPlayer::LoadedMedia); - } - break; case MESessionTopologyStatus: { UINT32 status; if (SUCCEEDED(sessionEvent->GetUINT32(MF_EVENT_TOPOLOGY_STATUS, &status))) { diff --git a/src/plugins/wmf/player/mfplayersession.h b/src/plugins/wmf/player/mfplayersession.h index b050ad09f..b8b6f085e 100644 --- a/src/plugins/wmf/player/mfplayersession.h +++ b/src/plugins/wmf/player/mfplayersession.h @@ -178,6 +178,7 @@ private: SourceResolver *m_sourceResolver; HANDLE m_hCloseEvent; + bool m_closing; enum MediaType { diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.cpp b/src/plugins/wmf/player/mfvideorenderercontrol.cpp index 8d47b1aac..c3c5c1ae4 100644 --- a/src/plugins/wmf/player/mfvideorenderercontrol.cpp +++ b/src/plugins/wmf/player/mfvideorenderercontrol.cpp @@ -2130,17 +2130,23 @@ namespace MFVideoRendererControl::MFVideoRendererControl(QObject *parent) : QVideoRendererControl(parent) , m_surface(0) + , m_currentActivate(0) , m_callback(0) { - m_currentActivate = new VideoRendererActivate(this); } MFVideoRendererControl::~MFVideoRendererControl() { + clear(); +} + +void MFVideoRendererControl::clear() +{ if (m_currentActivate) { m_currentActivate->ShutdownObject(); m_currentActivate->Release(); } + m_currentActivate = NULL; } QAbstractVideoSurface *MFVideoRendererControl::surface() const @@ -2150,9 +2156,6 @@ QAbstractVideoSurface *MFVideoRendererControl::surface() const void MFVideoRendererControl::setSurface(QAbstractVideoSurface *surface) { - if (m_surface == surface) - return; - if (m_surface) disconnect(m_surface, SIGNAL(supportedFormatsChanged()), this, SLOT(supportedFormatsChanged())); m_surface = surface; @@ -2160,11 +2163,16 @@ void MFVideoRendererControl::setSurface(QAbstractVideoSurface *surface) if (m_surface) { connect(m_surface, SIGNAL(supportedFormatsChanged()), this, SLOT(supportedFormatsChanged())); } - static_cast<VideoRendererActivate*>(m_currentActivate)->setSurface(m_surface); + + if (m_currentActivate) + static_cast<VideoRendererActivate*>(m_currentActivate)->setSurface(m_surface); } void MFVideoRendererControl::customEvent(QEvent *event) { + if (!m_currentActivate) + return; + if (event->type() == MediaStream::PresentSurface) { MFTIME targetTime = static_cast<MediaStream::PresentEvent*>(event)->targetTime(); MFTIME currentTime = static_cast<VideoRendererActivate*>(m_currentActivate)->getTime(); @@ -2185,16 +2193,26 @@ void MFVideoRendererControl::customEvent(QEvent *event) void MFVideoRendererControl::supportedFormatsChanged() { - static_cast<VideoRendererActivate*>(m_currentActivate)->supportedFormatsChanged(); + if (m_currentActivate) + static_cast<VideoRendererActivate*>(m_currentActivate)->supportedFormatsChanged(); } void MFVideoRendererControl::present() { - static_cast<VideoRendererActivate*>(m_currentActivate)->present(); + if (m_currentActivate) + static_cast<VideoRendererActivate*>(m_currentActivate)->present(); } -IMFActivate* MFVideoRendererControl::currentActivate() const +IMFActivate* MFVideoRendererControl::createActivate() { + clear(); + + m_currentActivate = new VideoRendererActivate(this); + if (m_surface) { + setSurface(m_surface); + supportedFormatsChanged(); + } + return m_currentActivate; } diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.h b/src/plugins/wmf/player/mfvideorenderercontrol.h index 25adcf269..ba04e73b7 100644 --- a/src/plugins/wmf/player/mfvideorenderercontrol.h +++ b/src/plugins/wmf/player/mfvideorenderercontrol.h @@ -58,7 +58,7 @@ public: QAbstractVideoSurface *surface() const; void setSurface(QAbstractVideoSurface *surface); - IMFActivate* currentActivate() const; + IMFActivate* createActivate(); protected: void customEvent(QEvent *event); @@ -68,6 +68,8 @@ private Q_SLOTS: void present(); private: + void clear(); + QAbstractVideoSurface *m_surface; IMFActivate *m_currentActivate; IMFSampleGrabberSinkCallback *m_callback; diff --git a/src/plugins/wmf/sourceresolver.cpp b/src/plugins/wmf/sourceresolver.cpp index c5d99959a..9abe65845 100644 --- a/src/plugins/wmf/sourceresolver.cpp +++ b/src/plugins/wmf/sourceresolver.cpp @@ -108,6 +108,10 @@ STDMETHODIMP_(ULONG) SourceResolver::Release(void) HRESULT STDMETHODCALLTYPE SourceResolver::Invoke(IMFAsyncResult *pAsyncResult) { QMutexLocker locker(&m_mutex); + + if (!m_sourceResolver) + return S_OK; + MF_OBJECT_TYPE ObjectType = MF_OBJECT_INVALID; IUnknown* pSource = NULL; State *state = static_cast<State*>(pAsyncResult->GetStateNoAddRef()); diff --git a/src/plugins/wmf/wmf.pro b/src/plugins/wmf/wmf.pro index b9c2b4152..fcd2a3268 100644 --- a/src/plugins/wmf/wmf.pro +++ b/src/plugins/wmf/wmf.pro @@ -6,9 +6,9 @@ QT += multimedia-private network } PLUGIN_TYPE=mediaservice +PLUGIN_CLASS_NAME = WMFServicePlugin load(qt_plugin) -DEPENDPATH += . INCLUDEPATH += . HEADERS += \ diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp index 9d1a359db..8cff66f30 100644 --- a/src/plugins/wmf/wmfserviceplugin.cpp +++ b/src/plugins/wmf/wmfserviceplugin.cpp @@ -92,8 +92,8 @@ QMediaService* WMFServicePlugin::create(QString const& key) void WMFServicePlugin::release(QMediaService *service) { - releaseRefCount(); delete service; + releaseRefCount(); } QMediaServiceProviderHint::Features WMFServicePlugin::supportedFeatures( diff --git a/src/qtmultimediaquicktools/qtmultimediaquicktools.pro b/src/qtmultimediaquicktools/qtmultimediaquicktools.pro index 9a825fef2..da4d0dc1a 100644 --- a/src/qtmultimediaquicktools/qtmultimediaquicktools.pro +++ b/src/qtmultimediaquicktools/qtmultimediaquicktools.pro @@ -9,7 +9,6 @@ DEFINES += QT_BUILD_QTMM_QUICK_LIB # Header files must go inside source directory of a module # to be installed by syncqt. INCLUDEPATH += ../multimedia/qtmultimediaquicktools_headers/ -DEPENDPATH += ../multimedia/qtmultimediaquicktools_headers/ PRIVATE_HEADERS += \ ../multimedia/qtmultimediaquicktools_headers/qsgvideonode_p.h \ |