summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/audiocapture/audiocaptureprobecontrol.cpp2
-rw-r--r--src/plugins/audiocapture/audiocaptureprobecontrol.h2
-rw-r--r--src/plugins/audiocapture/audiocaptureservice.cpp2
-rw-r--r--src/plugins/audiocapture/audiocaptureservice.h2
-rw-r--r--src/plugins/audiocapture/audiocaptureserviceplugin.cpp2
-rw-r--r--src/plugins/audiocapture/audiocaptureserviceplugin.h2
-rw-r--r--src/plugins/audiocapture/audiocapturesession.cpp2
-rw-r--r--src/plugins/audiocapture/audiocapturesession.h2
-rw-r--r--src/plugins/audiocapture/audiocontainercontrol.cpp2
-rw-r--r--src/plugins/audiocapture/audiocontainercontrol.h2
-rw-r--r--src/plugins/audiocapture/audioencodercontrol.cpp2
-rw-r--r--src/plugins/audiocapture/audioencodercontrol.h2
-rw-r--r--src/plugins/audiocapture/audioinputselector.cpp2
-rw-r--r--src/plugins/audiocapture/audioinputselector.h2
-rw-r--r--src/plugins/audiocapture/audiomediarecordercontrol.cpp2
-rw-r--r--src/plugins/audiocapture/audiomediarecordercontrol.h2
-rw-r--r--src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.h2
-rw-r--r--src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfcameracontrol.h2
-rw-r--r--src/plugins/avfoundation/camera/avfcameracontrol.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfcameradebug.h2
-rw-r--r--src/plugins/avfoundation/camera/avfcamerametadatacontrol.h2
-rw-r--r--src/plugins/avfoundation/camera/avfcamerametadatacontrol.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfcameraservice.h2
-rw-r--r--src/plugins/avfoundation/camera/avfcameraservice.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfcameraserviceplugin.h2
-rw-r--r--src/plugins/avfoundation/camera/avfcameraserviceplugin.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfcamerasession.h2
-rw-r--r--src/plugins/avfoundation/camera/avfcamerasession.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfimagecapturecontrol.h2
-rw-r--r--src/plugins/avfoundation/camera/avfimagecapturecontrol.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfmediarecordercontrol.h2
-rw-r--r--src/plugins/avfoundation/camera/avfmediarecordercontrol.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfstoragelocation.h2
-rw-r--r--src/plugins/avfoundation/camera/avfstoragelocation.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfvideodevicecontrol.h2
-rw-r--r--src/plugins/avfoundation/camera/avfvideodevicecontrol.mm2
-rw-r--r--src/plugins/avfoundation/camera/avfvideorenderercontrol.h2
-rw-r--r--src/plugins/avfoundation/camera/avfvideorenderercontrol.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfdisplaylink.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfdisplaylink.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm10
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideooutput.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideooutput.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideowidget.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideowidget.mm2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.h2
-rw-r--r--src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.mm4
-rw-r--r--src/plugins/avfoundation/mediaplayer/mediaplayer.pro2
-rw-r--r--src/plugins/blackberry/mediaplayer/bbmediaplayercontrol.cpp11
-rw-r--r--src/plugins/blackberry/mediaplayer/bbmetadata.cpp10
-rw-r--r--src/plugins/blackberry/mediaplayer/bbmetadata.h3
-rw-r--r--src/plugins/directshow/camera/camera.pri2
-rw-r--r--src/plugins/directshow/camera/directshowglobal.h2
-rw-r--r--src/plugins/directshow/camera/dscameracontrol.cpp2
-rw-r--r--src/plugins/directshow/camera/dscameracontrol.h2
-rw-r--r--src/plugins/directshow/camera/dscameraservice.cpp2
-rw-r--r--src/plugins/directshow/camera/dscameraservice.h2
-rw-r--r--src/plugins/directshow/camera/dscamerasession.cpp2
-rw-r--r--src/plugins/directshow/camera/dscamerasession.h2
-rw-r--r--src/plugins/directshow/camera/dsimagecapturecontrol.cpp2
-rw-r--r--src/plugins/directshow/camera/dsimagecapturecontrol.h2
-rw-r--r--src/plugins/directshow/camera/dsvideodevicecontrol.cpp2
-rw-r--r--src/plugins/directshow/camera/dsvideodevicecontrol.h2
-rw-r--r--src/plugins/directshow/camera/dsvideorenderer.cpp2
-rw-r--r--src/plugins/directshow/camera/dsvideorenderer.h2
-rw-r--r--src/plugins/directshow/camera/dsvideowidgetcontrol.cpp2
-rw-r--r--src/plugins/directshow/camera/dsvideowidgetcontrol.h2
-rw-r--r--src/plugins/directshow/directshow.pro2
-rw-r--r--src/plugins/directshow/dsserviceplugin.cpp2
-rw-r--r--src/plugins/directshow/dsserviceplugin.h2
-rw-r--r--src/plugins/directshow/player/directshowaudioendpointcontrol.cpp2
-rw-r--r--src/plugins/directshow/player/directshowaudioendpointcontrol.h2
-rw-r--r--src/plugins/directshow/player/directshoweventloop.cpp2
-rw-r--r--src/plugins/directshow/player/directshoweventloop.h2
-rw-r--r--src/plugins/directshow/player/directshowglobal.h2
-rw-r--r--src/plugins/directshow/player/directshowioreader.cpp2
-rw-r--r--src/plugins/directshow/player/directshowioreader.h2
-rw-r--r--src/plugins/directshow/player/directshowiosource.cpp2
-rw-r--r--src/plugins/directshow/player/directshowiosource.h2
-rw-r--r--src/plugins/directshow/player/directshowmediatype.cpp38
-rw-r--r--src/plugins/directshow/player/directshowmediatype.h5
-rw-r--r--src/plugins/directshow/player/directshowmediatypelist.cpp2
-rw-r--r--src/plugins/directshow/player/directshowmediatypelist.h2
-rw-r--r--src/plugins/directshow/player/directshowmetadatacontrol.cpp2
-rw-r--r--src/plugins/directshow/player/directshowmetadatacontrol.h2
-rw-r--r--src/plugins/directshow/player/directshowpinenum.cpp2
-rw-r--r--src/plugins/directshow/player/directshowpinenum.h2
-rw-r--r--src/plugins/directshow/player/directshowplayercontrol.cpp2
-rw-r--r--src/plugins/directshow/player/directshowplayercontrol.h2
-rw-r--r--src/plugins/directshow/player/directshowplayerservice.cpp2
-rw-r--r--src/plugins/directshow/player/directshowplayerservice.h2
-rw-r--r--src/plugins/directshow/player/directshowsamplescheduler.cpp2
-rw-r--r--src/plugins/directshow/player/directshowsamplescheduler.h2
-rw-r--r--src/plugins/directshow/player/directshowvideorenderercontrol.cpp2
-rw-r--r--src/plugins/directshow/player/directshowvideorenderercontrol.h2
-rw-r--r--src/plugins/directshow/player/mediasamplevideobuffer.cpp2
-rw-r--r--src/plugins/directshow/player/mediasamplevideobuffer.h2
-rw-r--r--src/plugins/directshow/player/player.pri2
-rw-r--r--src/plugins/directshow/player/videosurfacefilter.cpp2
-rw-r--r--src/plugins/directshow/player/videosurfacefilter.h2
-rw-r--r--src/plugins/directshow/player/vmr9videowindowcontrol.cpp2
-rw-r--r--src/plugins/directshow/player/vmr9videowindowcontrol.h2
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp2
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.h2
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.cpp2
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.h2
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp2
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.h2
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.cpp2
-rw-r--r--src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinaudioencoder.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincapturedestination.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincapturedestination.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincontainer.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincontainer.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincontrol.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabincontrol.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinexposure.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinexposure.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinflash.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinflash.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinfocus.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinfocus.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinimagecapture.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinimageencoder.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinimageencoder.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinimageprocessing.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinlocks.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinlocks.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinmetadata.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinmetadata.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinrecorder.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinrecorder.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinresourcepolicy.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinservice.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinservice.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinserviceplugin.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinsession.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinsession.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinvideoencoder.h2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp2
-rw-r--r--src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h2
-rw-r--r--src/plugins/gstreamer/common.pri4
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreameraudioencode.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerimageencode.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerimageencode.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.h2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp2
-rw-r--r--src/plugins/gstreamer/mediacapture/qgstreamervideoencode.h2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.h2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.h2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.h2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h2
-rw-r--r--src/plugins/m3u/qm3uhandler.cpp2
-rw-r--r--src/plugins/m3u/qm3uhandler.h2
-rw-r--r--src/plugins/plugins.pro2
-rw-r--r--src/plugins/pulseaudio/qaudiodeviceinfo_pulse.cpp2
-rw-r--r--src/plugins/pulseaudio/qaudiodeviceinfo_pulse.h2
-rw-r--r--src/plugins/pulseaudio/qaudioinput_pulse.cpp2
-rw-r--r--src/plugins/pulseaudio/qaudioinput_pulse.h2
-rw-r--r--src/plugins/pulseaudio/qaudiooutput_pulse.cpp2
-rw-r--r--src/plugins/pulseaudio/qaudiooutput_pulse.h2
-rw-r--r--src/plugins/pulseaudio/qpulseaudioengine.cpp2
-rw-r--r--src/plugins/pulseaudio/qpulseaudioengine.h2
-rw-r--r--src/plugins/pulseaudio/qpulseaudioplugin.cpp2
-rw-r--r--src/plugins/pulseaudio/qpulseaudioplugin.h2
-rw-r--r--src/plugins/pulseaudio/qpulsehelpers.cpp2
-rw-r--r--src/plugins/pulseaudio/qpulsehelpers.h2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playercontrol.h2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playercontrol.mm2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playermetadata.h2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playermetadata.mm2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playerservice.h2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playerservice.mm2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playersession.h2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playersession.mm2
-rw-r--r--src/plugins/qt7/qcvdisplaylink.h2
-rw-r--r--src/plugins/qt7/qcvdisplaylink.mm2
-rw-r--r--src/plugins/qt7/qt7.pro6
-rw-r--r--src/plugins/qt7/qt7backend.h2
-rw-r--r--src/plugins/qt7/qt7backend.mm2
-rw-r--r--src/plugins/qt7/qt7ciimagevideobuffer.h2
-rw-r--r--src/plugins/qt7/qt7ciimagevideobuffer.mm2
-rw-r--r--src/plugins/qt7/qt7movierenderer.h2
-rw-r--r--src/plugins/qt7/qt7movierenderer.mm2
-rw-r--r--src/plugins/qt7/qt7movievideowidget.h2
-rw-r--r--src/plugins/qt7/qt7movievideowidget.mm2
-rw-r--r--src/plugins/qt7/qt7movieviewoutput.h2
-rw-r--r--src/plugins/qt7/qt7movieviewoutput.mm2
-rw-r--r--src/plugins/qt7/qt7movieviewrenderer.h2
-rw-r--r--src/plugins/qt7/qt7movieviewrenderer.mm2
-rw-r--r--src/plugins/qt7/qt7serviceplugin.h2
-rw-r--r--src/plugins/qt7/qt7serviceplugin.mm2
-rw-r--r--src/plugins/qt7/qt7videooutput.h2
-rw-r--r--src/plugins/qt7/qt7videooutput.mm2
-rw-r--r--src/plugins/v4l/radio/v4lradiocontrol.cpp2
-rw-r--r--src/plugins/v4l/radio/v4lradiocontrol.h2
-rw-r--r--src/plugins/v4l/radio/v4lradioservice.cpp2
-rw-r--r--src/plugins/v4l/radio/v4lradioservice.h2
-rw-r--r--src/plugins/v4l/v4lserviceplugin.cpp2
-rw-r--r--src/plugins/v4l/v4lserviceplugin.h2
-rw-r--r--src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp2
-rw-r--r--src/plugins/wmf/decoder/mfaudiodecodercontrol.h2
-rw-r--r--src/plugins/wmf/decoder/mfdecoderservice.cpp2
-rw-r--r--src/plugins/wmf/decoder/mfdecoderservice.h2
-rw-r--r--src/plugins/wmf/decoder/mfdecodersourcereader.cpp2
-rw-r--r--src/plugins/wmf/decoder/mfdecodersourcereader.h2
-rw-r--r--src/plugins/wmf/evrcustompresenter.cpp2052
-rw-r--r--src/plugins/wmf/evrcustompresenter.h333
-rw-r--r--src/plugins/wmf/evrd3dpresentengine.cpp580
-rw-r--r--src/plugins/wmf/evrd3dpresentengine.h130
-rw-r--r--src/plugins/wmf/mfactivate.cpp89
-rw-r--r--src/plugins/wmf/mfactivate.h216
-rw-r--r--src/plugins/wmf/mfglobal.cpp124
-rw-r--r--src/plugins/wmf/mfglobal.h157
-rw-r--r--src/plugins/wmf/mfstream.cpp2
-rw-r--r--src/plugins/wmf/mfstream.h2
-rw-r--r--src/plugins/wmf/mftvideo.cpp68
-rw-r--r--src/plugins/wmf/mftvideo.h7
-rw-r--r--src/plugins/wmf/player/evr9videowindowcontrol.cpp7
-rw-r--r--src/plugins/wmf/player/evr9videowindowcontrol.h3
-rw-r--r--src/plugins/wmf/player/mfaudioendpointcontrol.cpp2
-rw-r--r--src/plugins/wmf/player/mfaudioendpointcontrol.h2
-rw-r--r--src/plugins/wmf/player/mfaudioprobecontrol.cpp2
-rw-r--r--src/plugins/wmf/player/mfaudioprobecontrol.h2
-rw-r--r--src/plugins/wmf/player/mfmetadatacontrol.cpp223
-rw-r--r--src/plugins/wmf/player/mfmetadatacontrol.h2
-rw-r--r--src/plugins/wmf/player/mfplayercontrol.cpp2
-rw-r--r--src/plugins/wmf/player/mfplayercontrol.h2
-rw-r--r--src/plugins/wmf/player/mfplayerservice.cpp13
-rw-r--r--src/plugins/wmf/player/mfplayerservice.h2
-rw-r--r--src/plugins/wmf/player/mfplayersession.cpp400
-rw-r--r--src/plugins/wmf/player/mfplayersession.h5
-rw-r--r--src/plugins/wmf/player/mfvideoprobecontrol.cpp2
-rw-r--r--src/plugins/wmf/player/mfvideoprobecontrol.h2
-rw-r--r--src/plugins/wmf/player/mfvideorenderercontrol.cpp138
-rw-r--r--src/plugins/wmf/player/mfvideorenderercontrol.h15
-rw-r--r--src/plugins/wmf/player/player.pri2
-rw-r--r--src/plugins/wmf/samplegrabber.cpp2
-rw-r--r--src/plugins/wmf/samplegrabber.h2
-rw-r--r--src/plugins/wmf/sourceresolver.cpp2
-rw-r--r--src/plugins/wmf/sourceresolver.h2
-rw-r--r--src/plugins/wmf/wmf.pro24
-rw-r--r--src/plugins/wmf/wmfserviceplugin.cpp2
-rw-r--r--src/plugins/wmf/wmfserviceplugin.h2
295 files changed, 4735 insertions, 474 deletions
diff --git a/src/plugins/audiocapture/audiocaptureprobecontrol.cpp b/src/plugins/audiocapture/audiocaptureprobecontrol.cpp
index 41715da49..38f263be9 100644
--- a/src/plugins/audiocapture/audiocaptureprobecontrol.cpp
+++ b/src/plugins/audiocapture/audiocaptureprobecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocaptureprobecontrol.h b/src/plugins/audiocapture/audiocaptureprobecontrol.h
index f67de5747..64d31601a 100644
--- a/src/plugins/audiocapture/audiocaptureprobecontrol.h
+++ b/src/plugins/audiocapture/audiocaptureprobecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocaptureservice.cpp b/src/plugins/audiocapture/audiocaptureservice.cpp
index 09278b435..fa9045646 100644
--- a/src/plugins/audiocapture/audiocaptureservice.cpp
+++ b/src/plugins/audiocapture/audiocaptureservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocaptureservice.h b/src/plugins/audiocapture/audiocaptureservice.h
index c8a195cfc..2c1e81642 100644
--- a/src/plugins/audiocapture/audiocaptureservice.h
+++ b/src/plugins/audiocapture/audiocaptureservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocaptureserviceplugin.cpp b/src/plugins/audiocapture/audiocaptureserviceplugin.cpp
index 2c492dd04..eafe18b8e 100644
--- a/src/plugins/audiocapture/audiocaptureserviceplugin.cpp
+++ b/src/plugins/audiocapture/audiocaptureserviceplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocaptureserviceplugin.h b/src/plugins/audiocapture/audiocaptureserviceplugin.h
index 1d4262092..eba64a3a7 100644
--- a/src/plugins/audiocapture/audiocaptureserviceplugin.h
+++ b/src/plugins/audiocapture/audiocaptureserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocapturesession.cpp b/src/plugins/audiocapture/audiocapturesession.cpp
index 2b4030654..e242b4c3b 100644
--- a/src/plugins/audiocapture/audiocapturesession.cpp
+++ b/src/plugins/audiocapture/audiocapturesession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocapturesession.h b/src/plugins/audiocapture/audiocapturesession.h
index 7ddfa543b..a6b7fa369 100644
--- a/src/plugins/audiocapture/audiocapturesession.h
+++ b/src/plugins/audiocapture/audiocapturesession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocontainercontrol.cpp b/src/plugins/audiocapture/audiocontainercontrol.cpp
index cb8a8177c..fec190e96 100644
--- a/src/plugins/audiocapture/audiocontainercontrol.cpp
+++ b/src/plugins/audiocapture/audiocontainercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiocontainercontrol.h b/src/plugins/audiocapture/audiocontainercontrol.h
index e05fa9bc3..18a335702 100644
--- a/src/plugins/audiocapture/audiocontainercontrol.h
+++ b/src/plugins/audiocapture/audiocontainercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audioencodercontrol.cpp b/src/plugins/audiocapture/audioencodercontrol.cpp
index c9906af8e..09890f45c 100644
--- a/src/plugins/audiocapture/audioencodercontrol.cpp
+++ b/src/plugins/audiocapture/audioencodercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audioencodercontrol.h b/src/plugins/audiocapture/audioencodercontrol.h
index 522193043..c27c9a45e 100644
--- a/src/plugins/audiocapture/audioencodercontrol.h
+++ b/src/plugins/audiocapture/audioencodercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audioinputselector.cpp b/src/plugins/audiocapture/audioinputselector.cpp
index 1ddc7fbd9..e246b38d5 100644
--- a/src/plugins/audiocapture/audioinputselector.cpp
+++ b/src/plugins/audiocapture/audioinputselector.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audioinputselector.h b/src/plugins/audiocapture/audioinputselector.h
index 3a07d756f..7a1b6419d 100644
--- a/src/plugins/audiocapture/audioinputselector.h
+++ b/src/plugins/audiocapture/audioinputselector.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiomediarecordercontrol.cpp b/src/plugins/audiocapture/audiomediarecordercontrol.cpp
index bf06fa98a..c2b590fb3 100644
--- a/src/plugins/audiocapture/audiomediarecordercontrol.cpp
+++ b/src/plugins/audiocapture/audiomediarecordercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/audiocapture/audiomediarecordercontrol.h b/src/plugins/audiocapture/audiomediarecordercontrol.h
index f7deb0dd6..9f029e28e 100644
--- a/src/plugins/audiocapture/audiomediarecordercontrol.h
+++ b/src/plugins/audiocapture/audiomediarecordercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.h b/src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.h
index 67013d79d..debb9fa3e 100644
--- a/src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.h
+++ b/src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.mm b/src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.mm
index 301df2495..6c6df5164 100644
--- a/src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.mm
+++ b/src/plugins/avfoundation/camera/avfaudioinputselectorcontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcameracontrol.h b/src/plugins/avfoundation/camera/avfcameracontrol.h
index 03c5c086b..c17454992 100644
--- a/src/plugins/avfoundation/camera/avfcameracontrol.h
+++ b/src/plugins/avfoundation/camera/avfcameracontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcameracontrol.mm b/src/plugins/avfoundation/camera/avfcameracontrol.mm
index b26a72f1d..e3727b1e7 100644
--- a/src/plugins/avfoundation/camera/avfcameracontrol.mm
+++ b/src/plugins/avfoundation/camera/avfcameracontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcameradebug.h b/src/plugins/avfoundation/camera/avfcameradebug.h
index 33bcef8c2..8c255b6f6 100644
--- a/src/plugins/avfoundation/camera/avfcameradebug.h
+++ b/src/plugins/avfoundation/camera/avfcameradebug.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcamerametadatacontrol.h b/src/plugins/avfoundation/camera/avfcamerametadatacontrol.h
index bce028d8c..abe48b717 100644
--- a/src/plugins/avfoundation/camera/avfcamerametadatacontrol.h
+++ b/src/plugins/avfoundation/camera/avfcamerametadatacontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcamerametadatacontrol.mm b/src/plugins/avfoundation/camera/avfcamerametadatacontrol.mm
index 644109659..520e48c3e 100644
--- a/src/plugins/avfoundation/camera/avfcamerametadatacontrol.mm
+++ b/src/plugins/avfoundation/camera/avfcamerametadatacontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcameraservice.h b/src/plugins/avfoundation/camera/avfcameraservice.h
index 6ae00abca..e619c44b3 100644
--- a/src/plugins/avfoundation/camera/avfcameraservice.h
+++ b/src/plugins/avfoundation/camera/avfcameraservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcameraservice.mm b/src/plugins/avfoundation/camera/avfcameraservice.mm
index 1dd789594..094f1b402 100644
--- a/src/plugins/avfoundation/camera/avfcameraservice.mm
+++ b/src/plugins/avfoundation/camera/avfcameraservice.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcameraserviceplugin.h b/src/plugins/avfoundation/camera/avfcameraserviceplugin.h
index 1763b8268..34130ffcb 100644
--- a/src/plugins/avfoundation/camera/avfcameraserviceplugin.h
+++ b/src/plugins/avfoundation/camera/avfcameraserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcameraserviceplugin.mm b/src/plugins/avfoundation/camera/avfcameraserviceplugin.mm
index 44c7cbf28..19e4e7975 100644
--- a/src/plugins/avfoundation/camera/avfcameraserviceplugin.mm
+++ b/src/plugins/avfoundation/camera/avfcameraserviceplugin.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcamerasession.h b/src/plugins/avfoundation/camera/avfcamerasession.h
index 86b8a2352..48681aae7 100644
--- a/src/plugins/avfoundation/camera/avfcamerasession.h
+++ b/src/plugins/avfoundation/camera/avfcamerasession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfcamerasession.mm b/src/plugins/avfoundation/camera/avfcamerasession.mm
index 8a95488f3..5f1385a7e 100644
--- a/src/plugins/avfoundation/camera/avfcamerasession.mm
+++ b/src/plugins/avfoundation/camera/avfcamerasession.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfimagecapturecontrol.h b/src/plugins/avfoundation/camera/avfimagecapturecontrol.h
index c81bab22e..1b555493e 100644
--- a/src/plugins/avfoundation/camera/avfimagecapturecontrol.h
+++ b/src/plugins/avfoundation/camera/avfimagecapturecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfimagecapturecontrol.mm b/src/plugins/avfoundation/camera/avfimagecapturecontrol.mm
index 306010ce3..2da2f1834 100644
--- a/src/plugins/avfoundation/camera/avfimagecapturecontrol.mm
+++ b/src/plugins/avfoundation/camera/avfimagecapturecontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfmediarecordercontrol.h b/src/plugins/avfoundation/camera/avfmediarecordercontrol.h
index cecc00ccc..da9384e63 100644
--- a/src/plugins/avfoundation/camera/avfmediarecordercontrol.h
+++ b/src/plugins/avfoundation/camera/avfmediarecordercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm b/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
index c1be6a072..4e82ada1b 100644
--- a/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
+++ b/src/plugins/avfoundation/camera/avfmediarecordercontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfstoragelocation.h b/src/plugins/avfoundation/camera/avfstoragelocation.h
index d73ce60fc..1aae26de6 100644
--- a/src/plugins/avfoundation/camera/avfstoragelocation.h
+++ b/src/plugins/avfoundation/camera/avfstoragelocation.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfstoragelocation.mm b/src/plugins/avfoundation/camera/avfstoragelocation.mm
index c81775a48..d94e4b2fc 100644
--- a/src/plugins/avfoundation/camera/avfstoragelocation.mm
+++ b/src/plugins/avfoundation/camera/avfstoragelocation.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfvideodevicecontrol.h b/src/plugins/avfoundation/camera/avfvideodevicecontrol.h
index bd5b6ad94..2fc376e27 100644
--- a/src/plugins/avfoundation/camera/avfvideodevicecontrol.h
+++ b/src/plugins/avfoundation/camera/avfvideodevicecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfvideodevicecontrol.mm b/src/plugins/avfoundation/camera/avfvideodevicecontrol.mm
index e2f663ac7..3c8e39c0e 100644
--- a/src/plugins/avfoundation/camera/avfvideodevicecontrol.mm
+++ b/src/plugins/avfoundation/camera/avfvideodevicecontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfvideorenderercontrol.h b/src/plugins/avfoundation/camera/avfvideorenderercontrol.h
index b72bcd6dd..57978c05a 100644
--- a/src/plugins/avfoundation/camera/avfvideorenderercontrol.h
+++ b/src/plugins/avfoundation/camera/avfvideorenderercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/camera/avfvideorenderercontrol.mm b/src/plugins/avfoundation/camera/avfvideorenderercontrol.mm
index d32cf7274..6efa3cbf8 100644
--- a/src/plugins/avfoundation/camera/avfvideorenderercontrol.mm
+++ b/src/plugins/avfoundation/camera/avfvideorenderercontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfdisplaylink.h b/src/plugins/avfoundation/mediaplayer/avfdisplaylink.h
index d83f3447d..eb099e4b5 100644
--- a/src/plugins/avfoundation/mediaplayer/avfdisplaylink.h
+++ b/src/plugins/avfoundation/mediaplayer/avfdisplaylink.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfdisplaylink.mm b/src/plugins/avfoundation/mediaplayer/avfdisplaylink.mm
index 59fb3355f..b3f9b690d 100644
--- a/src/plugins/avfoundation/mediaplayer/avfdisplaylink.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfdisplaylink.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.h b/src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.h
index 641e200c3..f03046593 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.h
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.mm
index c6c114fd0..e7f85ebcf 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayercontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.h b/src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.h
index 2a717ed85..82a169504 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.h
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.mm
index 7e7d88fb2..01d325cf4 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayermetadatacontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.h b/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.h
index ec9666918..86b11d4e2 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.h
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm
index 3b780e3d5..b916f47d4 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayerservice.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h b/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h
index 69b28c88d..512f2652d 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm
index 2d577fb20..4d4fe9330 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayerserviceplugin.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h
index 3b70395f2..8c0db289a 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm
index 3fb935457..54c65fdd4 100644
--- a/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfmediaplayersession.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
@@ -257,8 +257,8 @@ static void *AVFMediaPlayerSessionObserverCurrentItemObservationContext = &AVFMe
NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];
if ([tracks count]) {
AVAssetTrack *videoTrack = [tracks objectAtIndex:0];
- m_playerLayer.anchorPoint = NSMakePoint(0.0f, 0.0f);
- m_playerLayer.bounds = NSMakeRect(0.0f, 0.0f, videoTrack.naturalSize.width, videoTrack.naturalSize.height);
+ m_playerLayer.anchorPoint = CGPointMake(0.0f, 0.0f);
+ m_playerLayer.bounds = CGRectMake(0.0f, 0.0f, videoTrack.naturalSize.width, videoTrack.naturalSize.height);
}
}
@@ -368,8 +368,8 @@ static void *AVFMediaPlayerSessionObserverCurrentItemObservationContext = &AVFMe
NSArray *tracks = [asset tracksWithMediaType:AVMediaTypeVideo];
if ([tracks count]) {
AVAssetTrack *videoTrack = [tracks objectAtIndex:0];
- m_playerLayer.anchorPoint = NSMakePoint(0.0f, 0.0f);
- m_playerLayer.bounds = NSMakeRect(0.0f, 0.0f, videoTrack.naturalSize.width, videoTrack.naturalSize.height);
+ m_playerLayer.anchorPoint = CGPointMake(0.0f, 0.0f);
+ m_playerLayer.bounds = CGRectMake(0.0f, 0.0f, videoTrack.naturalSize.width, videoTrack.naturalSize.height);
}
}
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.h b/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.h
index 01c39c013..5b52e8e53 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.h
+++ b/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.mm b/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.mm
index 294ea32e3..210dd568b 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfvideoframerenderer.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideooutput.h b/src/plugins/avfoundation/mediaplayer/avfvideooutput.h
index 1d9eb2188..00302912e 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideooutput.h
+++ b/src/plugins/avfoundation/mediaplayer/avfvideooutput.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideooutput.mm b/src/plugins/avfoundation/mediaplayer/avfvideooutput.mm
index 1055169f9..3726d1674 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideooutput.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfvideooutput.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.h b/src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.h
index adee57858..caf18eac0 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.h
+++ b/src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.mm b/src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.mm
index 289675d76..7fa7172e2 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfvideorenderercontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideowidget.h b/src/plugins/avfoundation/mediaplayer/avfvideowidget.h
index 57b1fe96b..460d5305e 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideowidget.h
+++ b/src/plugins/avfoundation/mediaplayer/avfvideowidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideowidget.mm b/src/plugins/avfoundation/mediaplayer/avfvideowidget.mm
index a6a2f4236..518a6bcea 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideowidget.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfvideowidget.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.h b/src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.h
index d27da77d3..5230d7569 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.h
+++ b/src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.mm b/src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.mm
index b8cd7821a..f50117d81 100644
--- a/src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.mm
+++ b/src/plugins/avfoundation/mediaplayer/avfvideowidgetcontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
@@ -207,7 +207,7 @@ void AVFVideoWidgetControl::updateVideoFrame(const CVTimeStamp &ts)
void AVFVideoWidgetControl::setupVideoOutput()
{
- NSRect layerBounds = [(AVPlayerLayer*)m_playerLayer bounds];
+ CGRect layerBounds = [(AVPlayerLayer*)m_playerLayer bounds];
m_nativeSize = QSize(layerBounds.size.width, layerBounds.size.height);
m_videoWidget->setNativeSize(m_nativeSize);
diff --git a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro
index d1957d5f3..a61c62d01 100644
--- a/src/plugins/avfoundation/mediaplayer/mediaplayer.pro
+++ b/src/plugins/avfoundation/mediaplayer/mediaplayer.pro
@@ -37,7 +37,7 @@ OBJECTIVE_SOURCES += \
avfvideoframerenderer.mm \
avfvideooutput.mm
-!isEmpty(QT.widgets.name) {
+qtHaveModule(widgets) {
QT += multimediawidgets-private opengl
HEADERS += \
avfvideowidgetcontrol.h \
diff --git a/src/plugins/blackberry/mediaplayer/bbmediaplayercontrol.cpp b/src/plugins/blackberry/mediaplayer/bbmediaplayercontrol.cpp
index 5998603d5..d664336d3 100644
--- a/src/plugins/blackberry/mediaplayer/bbmediaplayercontrol.cpp
+++ b/src/plugins/blackberry/mediaplayer/bbmediaplayercontrol.cpp
@@ -305,8 +305,10 @@ void BbMediaPlayerControl::setPositionInternal(qint64 position)
if (!m_context)
return;
- if (mmr_seek(m_context, QString::number(position).toLatin1()) != 0)
- emitMmError("Seeking failed");
+ if (m_metaData.isSeekable()) {
+ if (mmr_seek(m_context, QString::number(position).toLatin1()) != 0)
+ emitMmError("Seeking failed");
+ }
}
void BbMediaPlayerControl::setMediaStatus(QMediaPlayer::MediaStatus status)
@@ -385,9 +387,7 @@ bool BbMediaPlayerControl::isVideoAvailable() const
bool BbMediaPlayerControl::isSeekable() const
{
- // We can currently not get that information from the mmrenderer API. Just pretend we can seek,
- // it will fail at runtime if we can not.
- return true;
+ return m_metaData.isSeekable();
}
QMediaTimeRange BbMediaPlayerControl::availablePlaybackRanges() const
@@ -605,6 +605,7 @@ void BbMediaPlayerControl::updateMetaData()
emit audioAvailableChanged(m_metaData.hasAudio());
emit videoAvailableChanged(m_metaData.hasVideo());
emit availablePlaybackRangesChanged(availablePlaybackRanges());
+ emit seekableChanged(m_metaData.isSeekable());
}
void BbMediaPlayerControl::emitMmError(const QString &msg)
diff --git a/src/plugins/blackberry/mediaplayer/bbmetadata.cpp b/src/plugins/blackberry/mediaplayer/bbmetadata.cpp
index 38bb0c80b..680833e85 100644
--- a/src/plugins/blackberry/mediaplayer/bbmetadata.cpp
+++ b/src/plugins/blackberry/mediaplayer/bbmetadata.cpp
@@ -66,6 +66,7 @@ static const char * heightKey = "md_video_height";
static const char * mediaTypeKey = "md_title_mediatype";
static const char * pixelWidthKey = "md_video_pixel_height";
static const char * pixelHeightKey = "md_video_pixel_width";
+static const char * seekableKey = "md_title_seekable";
static const int mediaTypeAudioFlag = 4;
static const int mediaTypeVideoFlag = 2;
@@ -113,6 +114,8 @@ bool BbMetaData::parse(const QString &contextName)
m_pixelHeight = value.toFloat();
else if (key == titleKey)
m_title = value;
+ else if (key == seekableKey)
+ m_seekable = !(value == QLatin1String("0"));
else if (key == artistKey)
m_artist = value;
else if (key == commentKey)
@@ -143,7 +146,7 @@ void BbMetaData::clear()
m_mediaType = -1;
m_pixelWidth = 1;
m_pixelHeight = 1;
-
+ m_seekable = true;
m_title.clear();
m_artist.clear();
m_comment.clear();
@@ -203,6 +206,11 @@ QString BbMetaData::title() const
return m_title;
}
+bool BbMetaData::isSeekable() const
+{
+ return m_seekable;
+}
+
QString BbMetaData::artist() const
{
return m_artist;
diff --git a/src/plugins/blackberry/mediaplayer/bbmetadata.h b/src/plugins/blackberry/mediaplayer/bbmetadata.h
index 3bb323a4d..f4b742296 100644
--- a/src/plugins/blackberry/mediaplayer/bbmetadata.h
+++ b/src/plugins/blackberry/mediaplayer/bbmetadata.h
@@ -61,6 +61,7 @@ public:
int width() const;
bool hasVideo() const;
bool hasAudio() const;
+ bool isSeekable() const;
QString title() const;
QString artist() const;
@@ -81,7 +82,7 @@ private:
int m_mediaType;
float m_pixelWidth;
float m_pixelHeight;
-
+ bool m_seekable;
QString m_title;
QString m_artist;
QString m_comment;
diff --git a/src/plugins/directshow/camera/camera.pri b/src/plugins/directshow/camera/camera.pri
index 91111bee0..7081abd37 100644
--- a/src/plugins/directshow/camera/camera.pri
+++ b/src/plugins/directshow/camera/camera.pri
@@ -23,7 +23,7 @@ SOURCES += \
$$PWD/dsimagecapturecontrol.cpp \
$$PWD/dscamerasession.cpp
-!isEmpty(QT.widgets.name) {
+qtHaveModule(widgets) {
HEADERS += $$PWD/dsvideowidgetcontrol.h
SOURCES += $$PWD/dsvideowidgetcontrol.cpp
}
diff --git a/src/plugins/directshow/camera/directshowglobal.h b/src/plugins/directshow/camera/directshowglobal.h
index 9abd7ddad..aea9c9d03 100644
--- a/src/plugins/directshow/camera/directshowglobal.h
+++ b/src/plugins/directshow/camera/directshowglobal.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dscameracontrol.cpp b/src/plugins/directshow/camera/dscameracontrol.cpp
index 363ee7450..07035f5dd 100644
--- a/src/plugins/directshow/camera/dscameracontrol.cpp
+++ b/src/plugins/directshow/camera/dscameracontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dscameracontrol.h b/src/plugins/directshow/camera/dscameracontrol.h
index 216ac744c..5c7661643 100644
--- a/src/plugins/directshow/camera/dscameracontrol.h
+++ b/src/plugins/directshow/camera/dscameracontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dscameraservice.cpp b/src/plugins/directshow/camera/dscameraservice.cpp
index 8d5d67d93..2c6ea0e94 100644
--- a/src/plugins/directshow/camera/dscameraservice.cpp
+++ b/src/plugins/directshow/camera/dscameraservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dscameraservice.h b/src/plugins/directshow/camera/dscameraservice.h
index 31c35c6d1..e39ea0adc 100644
--- a/src/plugins/directshow/camera/dscameraservice.h
+++ b/src/plugins/directshow/camera/dscameraservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dscamerasession.cpp b/src/plugins/directshow/camera/dscamerasession.cpp
index 0b3a4d551..f921dac20 100644
--- a/src/plugins/directshow/camera/dscamerasession.cpp
+++ b/src/plugins/directshow/camera/dscamerasession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dscamerasession.h b/src/plugins/directshow/camera/dscamerasession.h
index 4a659196d..db0038813 100644
--- a/src/plugins/directshow/camera/dscamerasession.h
+++ b/src/plugins/directshow/camera/dscamerasession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dsimagecapturecontrol.cpp b/src/plugins/directshow/camera/dsimagecapturecontrol.cpp
index 51055aa4f..f1332235f 100644
--- a/src/plugins/directshow/camera/dsimagecapturecontrol.cpp
+++ b/src/plugins/directshow/camera/dsimagecapturecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dsimagecapturecontrol.h b/src/plugins/directshow/camera/dsimagecapturecontrol.h
index e15186c81..e39539191 100644
--- a/src/plugins/directshow/camera/dsimagecapturecontrol.h
+++ b/src/plugins/directshow/camera/dsimagecapturecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
index 7c33d130d..0f639bdce 100644
--- a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
+++ b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dsvideodevicecontrol.h b/src/plugins/directshow/camera/dsvideodevicecontrol.h
index 74635ddb2..11ee550bc 100644
--- a/src/plugins/directshow/camera/dsvideodevicecontrol.h
+++ b/src/plugins/directshow/camera/dsvideodevicecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dsvideorenderer.cpp b/src/plugins/directshow/camera/dsvideorenderer.cpp
index 72524eabb..a74835114 100644
--- a/src/plugins/directshow/camera/dsvideorenderer.cpp
+++ b/src/plugins/directshow/camera/dsvideorenderer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dsvideorenderer.h b/src/plugins/directshow/camera/dsvideorenderer.h
index 518384917..3621cc5a5 100644
--- a/src/plugins/directshow/camera/dsvideorenderer.h
+++ b/src/plugins/directshow/camera/dsvideorenderer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dsvideowidgetcontrol.cpp b/src/plugins/directshow/camera/dsvideowidgetcontrol.cpp
index d94b68eb4..fde9f554e 100644
--- a/src/plugins/directshow/camera/dsvideowidgetcontrol.cpp
+++ b/src/plugins/directshow/camera/dsvideowidgetcontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/camera/dsvideowidgetcontrol.h b/src/plugins/directshow/camera/dsvideowidgetcontrol.h
index 16207d3f6..ac40fbd7c 100644
--- a/src/plugins/directshow/camera/dsvideowidgetcontrol.h
+++ b/src/plugins/directshow/camera/dsvideowidgetcontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/directshow.pro b/src/plugins/directshow/directshow.pro
index 496769890..95f78ed81 100644
--- a/src/plugins/directshow/directshow.pro
+++ b/src/plugins/directshow/directshow.pro
@@ -11,7 +11,7 @@ SOURCES += dsserviceplugin.cpp
!config_wmsdk: DEFINES += QT_NO_WMSDK
-!isEmpty(QT.widgets.name) {
+qtHaveModule(widgets) {
QT += multimediawidgets
DEFINES += HAVE_WIDGETS
}
diff --git a/src/plugins/directshow/dsserviceplugin.cpp b/src/plugins/directshow/dsserviceplugin.cpp
index 32e6a6e3b..dca7430af 100644
--- a/src/plugins/directshow/dsserviceplugin.cpp
+++ b/src/plugins/directshow/dsserviceplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/dsserviceplugin.h b/src/plugins/directshow/dsserviceplugin.h
index a157f7a59..f3f89d7cd 100644
--- a/src/plugins/directshow/dsserviceplugin.h
+++ b/src/plugins/directshow/dsserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp b/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp
index 9d3811a86..1cf13b5a7 100644
--- a/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp
+++ b/src/plugins/directshow/player/directshowaudioendpointcontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowaudioendpointcontrol.h b/src/plugins/directshow/player/directshowaudioendpointcontrol.h
index b3d87174a..c293d79fc 100644
--- a/src/plugins/directshow/player/directshowaudioendpointcontrol.h
+++ b/src/plugins/directshow/player/directshowaudioendpointcontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshoweventloop.cpp b/src/plugins/directshow/player/directshoweventloop.cpp
index 52b388e43..74f210b9a 100644
--- a/src/plugins/directshow/player/directshoweventloop.cpp
+++ b/src/plugins/directshow/player/directshoweventloop.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshoweventloop.h b/src/plugins/directshow/player/directshoweventloop.h
index 00ec03800..075b06acd 100644
--- a/src/plugins/directshow/player/directshoweventloop.h
+++ b/src/plugins/directshow/player/directshoweventloop.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowglobal.h b/src/plugins/directshow/player/directshowglobal.h
index 4c0056ce8..b604a8d0e 100644
--- a/src/plugins/directshow/player/directshowglobal.h
+++ b/src/plugins/directshow/player/directshowglobal.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowioreader.cpp b/src/plugins/directshow/player/directshowioreader.cpp
index 54e7af0af..c0ea4ebbd 100644
--- a/src/plugins/directshow/player/directshowioreader.cpp
+++ b/src/plugins/directshow/player/directshowioreader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowioreader.h b/src/plugins/directshow/player/directshowioreader.h
index 8e0cab02f..370e7b3d3 100644
--- a/src/plugins/directshow/player/directshowioreader.h
+++ b/src/plugins/directshow/player/directshowioreader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowiosource.cpp b/src/plugins/directshow/player/directshowiosource.cpp
index 9ed3aa22c..f382b3b9c 100644
--- a/src/plugins/directshow/player/directshowiosource.cpp
+++ b/src/plugins/directshow/player/directshowiosource.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowiosource.h b/src/plugins/directshow/player/directshowiosource.h
index f1d5ba6ac..036fa8cc6 100644
--- a/src/plugins/directshow/player/directshowiosource.h
+++ b/src/plugins/directshow/player/directshowiosource.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowmediatype.cpp b/src/plugins/directshow/player/directshowmediatype.cpp
index 858d0ace7..7b3a3bc35 100644
--- a/src/plugins/directshow/player/directshowmediatype.cpp
+++ b/src/plugins/directshow/player/directshowmediatype.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
@@ -127,9 +127,7 @@ QVideoSurfaceFormat DirectShowMediaType::formatFromType(const AM_MEDIA_TYPE &typ
if (header->AvgTimePerFrame > 0)
format.setFrameRate(10000 /header->AvgTimePerFrame);
- format.setScanLineDirection(header->bmiHeader.biHeight < 0
- ? QVideoSurfaceFormat::TopToBottom
- : QVideoSurfaceFormat::BottomToTop);
+ format.setScanLineDirection(scanLineDirection(format.pixelFormat(), header->bmiHeader));
return format;
} else if (IsEqualGUID(type.formattype, FORMAT_VideoInfo2)) {
@@ -142,9 +140,7 @@ QVideoSurfaceFormat DirectShowMediaType::formatFromType(const AM_MEDIA_TYPE &typ
if (header->AvgTimePerFrame > 0)
format.setFrameRate(10000 / header->AvgTimePerFrame);
- format.setScanLineDirection(header->bmiHeader.biHeight < 0
- ? QVideoSurfaceFormat::TopToBottom
- : QVideoSurfaceFormat::BottomToTop);
+ format.setScanLineDirection(scanLineDirection(format.pixelFormat(), header->bmiHeader));
return format;
}
@@ -183,3 +179,31 @@ int DirectShowMediaType::bytesPerLine(const QVideoSurfaceFormat &format)
return 0;
}
}
+
+QVideoSurfaceFormat::Direction DirectShowMediaType::scanLineDirection(QVideoFrame::PixelFormat pixelFormat, const BITMAPINFOHEADER &bmiHeader)
+{
+ /* MSDN http://msdn.microsoft.com/en-us/library/windows/desktop/dd318229(v=vs.85).aspx */
+ /* For uncompressed RGB bitmaps:
+ * if biHeight is positive, the bitmap is a bottom-up DIB with the origin at the lower left corner.
+ * If biHeight is negative, the bitmap is a top-down DIB with the origin at the upper left corner.
+ *
+ * For YUV bitmaps:
+ * the bitmap is always top-down, regardless of the sign of biHeight.
+ * Decoders should offer YUV formats with postive biHeight, but for backward compatibility they should accept YUV formats with either positive or negative biHeight.
+ *
+ * For compressed formats:
+ * biHeight must be positive, regardless of image orientation.
+ */
+ switch (pixelFormat)
+ {
+ case QVideoFrame::Format_RGB32:
+ case QVideoFrame::Format_BGR24:
+ case QVideoFrame::Format_RGB565:
+ case QVideoFrame::Format_RGB555:
+ return bmiHeader.biHeight < 0
+ ? QVideoSurfaceFormat::TopToBottom
+ : QVideoSurfaceFormat::BottomToTop;
+ default:
+ return QVideoSurfaceFormat::TopToBottom;
+ }
+}
diff --git a/src/plugins/directshow/player/directshowmediatype.h b/src/plugins/directshow/player/directshowmediatype.h
index 44e79c062..3808d1c74 100644
--- a/src/plugins/directshow/player/directshowmediatype.h
+++ b/src/plugins/directshow/player/directshowmediatype.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
@@ -69,6 +69,9 @@ public:
static QVideoSurfaceFormat formatFromType(const AM_MEDIA_TYPE &type);
static int bytesPerLine(const QVideoSurfaceFormat &format);
+
+private:
+ static QVideoSurfaceFormat::Direction scanLineDirection(QVideoFrame::PixelFormat pixelFormat, const BITMAPINFOHEADER &bmiHeader);
};
#endif
diff --git a/src/plugins/directshow/player/directshowmediatypelist.cpp b/src/plugins/directshow/player/directshowmediatypelist.cpp
index 75a12c40a..1a6298e2b 100644
--- a/src/plugins/directshow/player/directshowmediatypelist.cpp
+++ b/src/plugins/directshow/player/directshowmediatypelist.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowmediatypelist.h b/src/plugins/directshow/player/directshowmediatypelist.h
index a0de81ec7..c567a92f5 100644
--- a/src/plugins/directshow/player/directshowmediatypelist.h
+++ b/src/plugins/directshow/player/directshowmediatypelist.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowmetadatacontrol.cpp b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
index 19da90ea6..f4bbe16a7 100644
--- a/src/plugins/directshow/player/directshowmetadatacontrol.cpp
+++ b/src/plugins/directshow/player/directshowmetadatacontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowmetadatacontrol.h b/src/plugins/directshow/player/directshowmetadatacontrol.h
index 3f06a47b4..fb740ee1c 100644
--- a/src/plugins/directshow/player/directshowmetadatacontrol.h
+++ b/src/plugins/directshow/player/directshowmetadatacontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowpinenum.cpp b/src/plugins/directshow/player/directshowpinenum.cpp
index a82cd62fd..5441c01f9 100644
--- a/src/plugins/directshow/player/directshowpinenum.cpp
+++ b/src/plugins/directshow/player/directshowpinenum.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowpinenum.h b/src/plugins/directshow/player/directshowpinenum.h
index 5b6e67ff9..6b0957ce8 100644
--- a/src/plugins/directshow/player/directshowpinenum.h
+++ b/src/plugins/directshow/player/directshowpinenum.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowplayercontrol.cpp b/src/plugins/directshow/player/directshowplayercontrol.cpp
index d2486fba9..553ccb43b 100644
--- a/src/plugins/directshow/player/directshowplayercontrol.cpp
+++ b/src/plugins/directshow/player/directshowplayercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowplayercontrol.h b/src/plugins/directshow/player/directshowplayercontrol.h
index f07456678..175937169 100644
--- a/src/plugins/directshow/player/directshowplayercontrol.h
+++ b/src/plugins/directshow/player/directshowplayercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowplayerservice.cpp b/src/plugins/directshow/player/directshowplayerservice.cpp
index 94f439452..d89ed7bdb 100644
--- a/src/plugins/directshow/player/directshowplayerservice.cpp
+++ b/src/plugins/directshow/player/directshowplayerservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowplayerservice.h b/src/plugins/directshow/player/directshowplayerservice.h
index 6fee9ad6a..482673003 100644
--- a/src/plugins/directshow/player/directshowplayerservice.h
+++ b/src/plugins/directshow/player/directshowplayerservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowsamplescheduler.cpp b/src/plugins/directshow/player/directshowsamplescheduler.cpp
index f6baaa612..36aefa049 100644
--- a/src/plugins/directshow/player/directshowsamplescheduler.cpp
+++ b/src/plugins/directshow/player/directshowsamplescheduler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowsamplescheduler.h b/src/plugins/directshow/player/directshowsamplescheduler.h
index b417a9758..88b3a4401 100644
--- a/src/plugins/directshow/player/directshowsamplescheduler.h
+++ b/src/plugins/directshow/player/directshowsamplescheduler.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowvideorenderercontrol.cpp b/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
index e85a86dba..a3606cc43 100644
--- a/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
+++ b/src/plugins/directshow/player/directshowvideorenderercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/directshowvideorenderercontrol.h b/src/plugins/directshow/player/directshowvideorenderercontrol.h
index 4f109e282..ab2ae0344 100644
--- a/src/plugins/directshow/player/directshowvideorenderercontrol.h
+++ b/src/plugins/directshow/player/directshowvideorenderercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/mediasamplevideobuffer.cpp b/src/plugins/directshow/player/mediasamplevideobuffer.cpp
index 1348d7bb5..2daf1c80a 100644
--- a/src/plugins/directshow/player/mediasamplevideobuffer.cpp
+++ b/src/plugins/directshow/player/mediasamplevideobuffer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/mediasamplevideobuffer.h b/src/plugins/directshow/player/mediasamplevideobuffer.h
index 473fd52a4..869143212 100644
--- a/src/plugins/directshow/player/mediasamplevideobuffer.h
+++ b/src/plugins/directshow/player/mediasamplevideobuffer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/player.pri b/src/plugins/directshow/player/player.pri
index 3a3048ac2..e9675c2c9 100644
--- a/src/plugins/directshow/player/player.pri
+++ b/src/plugins/directshow/player/player.pri
@@ -35,7 +35,7 @@ SOURCES += \
$$PWD/mediasamplevideobuffer.cpp \
$$PWD/videosurfacefilter.cpp
-!isEmpty(QT.widgets.name):!simulator {
+qtHaveModule(widgets):!simulator {
HEADERS += \
$$PWD/vmr9videowindowcontrol.h
diff --git a/src/plugins/directshow/player/videosurfacefilter.cpp b/src/plugins/directshow/player/videosurfacefilter.cpp
index d6e48d866..b8a775bb7 100644
--- a/src/plugins/directshow/player/videosurfacefilter.cpp
+++ b/src/plugins/directshow/player/videosurfacefilter.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/videosurfacefilter.h b/src/plugins/directshow/player/videosurfacefilter.h
index 9db6dbe91..693e1464b 100644
--- a/src/plugins/directshow/player/videosurfacefilter.h
+++ b/src/plugins/directshow/player/videosurfacefilter.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/vmr9videowindowcontrol.cpp b/src/plugins/directshow/player/vmr9videowindowcontrol.cpp
index 8b87dba1d..6d8072032 100644
--- a/src/plugins/directshow/player/vmr9videowindowcontrol.cpp
+++ b/src/plugins/directshow/player/vmr9videowindowcontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/directshow/player/vmr9videowindowcontrol.h b/src/plugins/directshow/player/vmr9videowindowcontrol.h
index 88db999ca..129307b2a 100644
--- a/src/plugins/directshow/player/vmr9videowindowcontrol.h
+++ b/src/plugins/directshow/player/vmr9videowindowcontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp
index f558352bc..8537f7425 100644
--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp
+++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.h b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.h
index 68446e7fd..07fafd9ea 100644
--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.h
+++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.cpp
index eda936f33..582590ab8 100644
--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.cpp
+++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.h b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.h
index ff0f21427..f649f92f2 100644
--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.h
+++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp
index 9837bf7bd..d34c10e10 100644
--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp
+++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.h b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.h
index 98a56b579..2c56ccf29 100644
--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.h
+++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecoderserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.cpp b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.cpp
index 7f9fd595d..5bcf1aa54 100644
--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.cpp
+++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.h b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.h
index 5d30d25a4..5ee76a0e2 100644
--- a/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.h
+++ b/src/plugins/gstreamer/audiodecoder/qgstreameraudiodecodersession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp b/src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp
index 604682cfa..78750f03d 100644
--- a/src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinaudioencoder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinaudioencoder.h b/src/plugins/gstreamer/camerabin/camerabinaudioencoder.h
index 919d3bada..00fd7e412 100644
--- a/src/plugins/gstreamer/camerabin/camerabinaudioencoder.h
+++ b/src/plugins/gstreamer/camerabin/camerabinaudioencoder.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp b/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp
index 75cd6d368..45ff6a895 100644
--- a/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h b/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h
index 28b7c9798..b078fa608 100644
--- a/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h
+++ b/src/plugins/gstreamer/camerabin/camerabincapturebufferformat.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabincapturedestination.cpp b/src/plugins/gstreamer/camerabin/camerabincapturedestination.cpp
index 32e3ee62d..029bf4de5 100644
--- a/src/plugins/gstreamer/camerabin/camerabincapturedestination.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabincapturedestination.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabincapturedestination.h b/src/plugins/gstreamer/camerabin/camerabincapturedestination.h
index 769dca677..7efe447b9 100644
--- a/src/plugins/gstreamer/camerabin/camerabincapturedestination.h
+++ b/src/plugins/gstreamer/camerabin/camerabincapturedestination.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabincontainer.cpp b/src/plugins/gstreamer/camerabin/camerabincontainer.cpp
index 7bab0e2f7..4c2a3bda9 100644
--- a/src/plugins/gstreamer/camerabin/camerabincontainer.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabincontainer.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabincontainer.h b/src/plugins/gstreamer/camerabin/camerabincontainer.h
index c5e2a824b..24dc9b53b 100644
--- a/src/plugins/gstreamer/camerabin/camerabincontainer.h
+++ b/src/plugins/gstreamer/camerabin/camerabincontainer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabincontrol.cpp b/src/plugins/gstreamer/camerabin/camerabincontrol.cpp
index 56b60e1a9..202f7a223 100644
--- a/src/plugins/gstreamer/camerabin/camerabincontrol.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabincontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabincontrol.h b/src/plugins/gstreamer/camerabin/camerabincontrol.h
index 7a92eb888..821bee3eb 100644
--- a/src/plugins/gstreamer/camerabin/camerabincontrol.h
+++ b/src/plugins/gstreamer/camerabin/camerabincontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinexposure.cpp b/src/plugins/gstreamer/camerabin/camerabinexposure.cpp
index 7d02ce061..92507d614 100644
--- a/src/plugins/gstreamer/camerabin/camerabinexposure.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinexposure.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinexposure.h b/src/plugins/gstreamer/camerabin/camerabinexposure.h
index 9825ddb87..fc92cf712 100644
--- a/src/plugins/gstreamer/camerabin/camerabinexposure.h
+++ b/src/plugins/gstreamer/camerabin/camerabinexposure.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinflash.cpp b/src/plugins/gstreamer/camerabin/camerabinflash.cpp
index 9c0978193..9c1fb8869 100644
--- a/src/plugins/gstreamer/camerabin/camerabinflash.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinflash.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinflash.h b/src/plugins/gstreamer/camerabin/camerabinflash.h
index 3eb061c05..d94b4a87c 100644
--- a/src/plugins/gstreamer/camerabin/camerabinflash.h
+++ b/src/plugins/gstreamer/camerabin/camerabinflash.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinfocus.cpp b/src/plugins/gstreamer/camerabin/camerabinfocus.cpp
index c8b7f06d6..60fb84260 100644
--- a/src/plugins/gstreamer/camerabin/camerabinfocus.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinfocus.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinfocus.h b/src/plugins/gstreamer/camerabin/camerabinfocus.h
index 36782e4f4..3057a71c3 100644
--- a/src/plugins/gstreamer/camerabin/camerabinfocus.h
+++ b/src/plugins/gstreamer/camerabin/camerabinfocus.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp b/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp
index 1d4c20914..0fca0c523 100644
--- a/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinimagecapture.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinimagecapture.h b/src/plugins/gstreamer/camerabin/camerabinimagecapture.h
index d403216c8..0ad0a8c76 100644
--- a/src/plugins/gstreamer/camerabin/camerabinimagecapture.h
+++ b/src/plugins/gstreamer/camerabin/camerabinimagecapture.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinimageencoder.cpp b/src/plugins/gstreamer/camerabin/camerabinimageencoder.cpp
index ea7c8adef..827698a51 100644
--- a/src/plugins/gstreamer/camerabin/camerabinimageencoder.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinimageencoder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinimageencoder.h b/src/plugins/gstreamer/camerabin/camerabinimageencoder.h
index 11ee2e319..ac68e57f1 100644
--- a/src/plugins/gstreamer/camerabin/camerabinimageencoder.h
+++ b/src/plugins/gstreamer/camerabin/camerabinimageencoder.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp b/src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp
index 131b49c9a..a09ff9b7e 100644
--- a/src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinimageprocessing.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinimageprocessing.h b/src/plugins/gstreamer/camerabin/camerabinimageprocessing.h
index f9cdb3b48..c3e1dbb01 100644
--- a/src/plugins/gstreamer/camerabin/camerabinimageprocessing.h
+++ b/src/plugins/gstreamer/camerabin/camerabinimageprocessing.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinlocks.cpp b/src/plugins/gstreamer/camerabin/camerabinlocks.cpp
index c6cfcecc6..464fa8043 100644
--- a/src/plugins/gstreamer/camerabin/camerabinlocks.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinlocks.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinlocks.h b/src/plugins/gstreamer/camerabin/camerabinlocks.h
index 1a0a0fb38..80023aa70 100644
--- a/src/plugins/gstreamer/camerabin/camerabinlocks.h
+++ b/src/plugins/gstreamer/camerabin/camerabinlocks.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinmetadata.cpp b/src/plugins/gstreamer/camerabin/camerabinmetadata.cpp
index 9e160f940..788233c6b 100644
--- a/src/plugins/gstreamer/camerabin/camerabinmetadata.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinmetadata.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinmetadata.h b/src/plugins/gstreamer/camerabin/camerabinmetadata.h
index 8fba6564b..0993f802b 100644
--- a/src/plugins/gstreamer/camerabin/camerabinmetadata.h
+++ b/src/plugins/gstreamer/camerabin/camerabinmetadata.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinrecorder.cpp b/src/plugins/gstreamer/camerabin/camerabinrecorder.cpp
index 2a74e88f6..e45f187c8 100644
--- a/src/plugins/gstreamer/camerabin/camerabinrecorder.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinrecorder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinrecorder.h b/src/plugins/gstreamer/camerabin/camerabinrecorder.h
index 114bfed84..2f8fe5d11 100644
--- a/src/plugins/gstreamer/camerabin/camerabinrecorder.h
+++ b/src/plugins/gstreamer/camerabin/camerabinrecorder.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp
index 013e1fb40..71f2d5170 100644
--- a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.h b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.h
index 6d7affcb9..31700958d 100644
--- a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.h
+++ b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.cpp b/src/plugins/gstreamer/camerabin/camerabinservice.cpp
index 141811329..f2bfc2869 100644
--- a/src/plugins/gstreamer/camerabin/camerabinservice.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.h b/src/plugins/gstreamer/camerabin/camerabinservice.h
index b963132eb..0136f2170 100644
--- a/src/plugins/gstreamer/camerabin/camerabinservice.h
+++ b/src/plugins/gstreamer/camerabin/camerabinservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp
index e7f939b9a..4d530d66f 100644
--- a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h
index cde78164d..f0aea0b3a 100644
--- a/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h
+++ b/src/plugins/gstreamer/camerabin/camerabinserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp
index d4d1c18d2..57dc9cc47 100644
--- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.h b/src/plugins/gstreamer/camerabin/camerabinsession.h
index 08ad5cac2..db1dfe0b6 100644
--- a/src/plugins/gstreamer/camerabin/camerabinsession.h
+++ b/src/plugins/gstreamer/camerabin/camerabinsession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp b/src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp
index 4937475d0..47a61c9a3 100644
--- a/src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinvideoencoder.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabinvideoencoder.h b/src/plugins/gstreamer/camerabin/camerabinvideoencoder.h
index a8038cfe8..74496a106 100644
--- a/src/plugins/gstreamer/camerabin/camerabinvideoencoder.h
+++ b/src/plugins/gstreamer/camerabin/camerabinvideoencoder.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp b/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp
index 80a659248..c49539df3 100644
--- a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h b/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h
index 29ec1f2bb..9719f5707 100644
--- a/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h
+++ b/src/plugins/gstreamer/camerabin/camerabuttonlistener_meego.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/common.pri b/src/plugins/gstreamer/common.pri
index c9a3fb661..91086576f 100644
--- a/src/plugins/gstreamer/common.pri
+++ b/src/plugins/gstreamer/common.pri
@@ -2,7 +2,7 @@
QT += multimedia-private network
CONFIG += no_private_qt_headers_warning
-!isEmpty(QT.widgets.name) {
+qtHaveModule(widgets) {
QT += widgets multimediawidgets-private
DEFINES += HAVE_WIDGETS
}
@@ -26,7 +26,7 @@ config_resourcepolicy {
PKGCONFIG += libresourceqt1
}
-config_xvideo:!isEmpty(QT.widgets.name): {
+config_xvideo:qtHaveModule(widgets) {
DEFINES += HAVE_XVIDEO
LIBS += -lXv -lX11 -lXext
}
diff --git a/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp b/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp
index b1189e7e3..88c86b3b5 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.h b/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.h
index c67421f8e..dee920110 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreameraudioencode.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp
index 1086bdfc3..f17f0e2d8 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.h b/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.h
index 51b348432..b33adf261 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercameracontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp
index 3c1e11563..dd3d6a4fb 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.h b/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.h
index 3d025aa5c..58edaff6b 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturemetadatacontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp
index a6569631e..4f351dfe9 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h
index bae941ec8..02144091b 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp
index ea0304ddf..dbb7649f4 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h
index 0e1aacafc..3003cbbcc 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercaptureserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp
index 0ae2f7f28..d7473327f 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h
index 34d9d1362..51b2d237e 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamercapturesession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp
index 4fd32ace4..a1904eff8 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.h b/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.h
index dcbf217ad..9a343e224 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerimagecapturecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerimageencode.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerimageencode.cpp
index 2f35d2a35..14fe5a07e 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerimageencode.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerimageencode.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerimageencode.h b/src/plugins/gstreamer/mediacapture/qgstreamerimageencode.h
index fbbe74fda..33cf0c513 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerimageencode.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerimageencode.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.cpp
index e851f4047..81e0bd7c6 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.h b/src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.h
index fe82fd641..90dc67257 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamermediacontainercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
index 162924443..f08ba3286 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.h b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.h
index 840337a88..b6413a53c 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerrecordercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp b/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp
index 3d8b9aaff..b618ab997 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.h b/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.h
index ae4d58399..65da00ab2 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamerv4l2input.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp b/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp
index 100848d2e..73112491f 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp
+++ b/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.h b/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.h
index d2159ef54..ae6cc2435 100644
--- a/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.h
+++ b/src/plugins/gstreamer/mediacapture/qgstreamervideoencode.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.cpp
index d9019e5d8..3c908ecda 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.h b/src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.h
index 380fc7959..010738eea 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.h
+++ b/src/plugins/gstreamer/mediaplayer/qgstreameravailabilitycontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
index 622142645..841c13ff6 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.h b/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.h
index 2c55da489..e36c127ad 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.h
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamermetadataprovider.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
index 4b7308180..e028e6d7a 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.h b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.h
index 095ea23f1..f2461c4fb 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.h
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
index 3fbdac358..9b2ec1c58 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h
index e53944505..5b78c7904 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp
index 72c4a4c7a..b2ad24899 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h
index 796c98c2c..95c308f55 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
index b1ccb4f10..36db67054 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h
index 1b440f646..94a84e5dd 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp
index 60a567db5..bc02fa3b7 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h b/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h
index d0c36e780..c8f11f827 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerstreamscontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/m3u/qm3uhandler.cpp b/src/plugins/m3u/qm3uhandler.cpp
index 2d3c728a6..6dd3fae3d 100644
--- a/src/plugins/m3u/qm3uhandler.cpp
+++ b/src/plugins/m3u/qm3uhandler.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/m3u/qm3uhandler.h b/src/plugins/m3u/qm3uhandler.h
index d3ea19915..74fca8816 100644
--- a/src/plugins/m3u/qm3uhandler.h
+++ b/src/plugins/m3u/qm3uhandler.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index ecc6a55d5..24708e0bc 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -1,6 +1,6 @@
######################################################################
#
-# QtMultimedia
+# Qt Multimedia
#
######################################################################
diff --git a/src/plugins/pulseaudio/qaudiodeviceinfo_pulse.cpp b/src/plugins/pulseaudio/qaudiodeviceinfo_pulse.cpp
index 757890dcc..f74b1d294 100644
--- a/src/plugins/pulseaudio/qaudiodeviceinfo_pulse.cpp
+++ b/src/plugins/pulseaudio/qaudiodeviceinfo_pulse.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qaudiodeviceinfo_pulse.h b/src/plugins/pulseaudio/qaudiodeviceinfo_pulse.h
index f7b6339c2..614bc5573 100644
--- a/src/plugins/pulseaudio/qaudiodeviceinfo_pulse.h
+++ b/src/plugins/pulseaudio/qaudiodeviceinfo_pulse.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qaudioinput_pulse.cpp b/src/plugins/pulseaudio/qaudioinput_pulse.cpp
index ac006daed..83075beda 100644
--- a/src/plugins/pulseaudio/qaudioinput_pulse.cpp
+++ b/src/plugins/pulseaudio/qaudioinput_pulse.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qaudioinput_pulse.h b/src/plugins/pulseaudio/qaudioinput_pulse.h
index 719d70ca5..4c1881e67 100644
--- a/src/plugins/pulseaudio/qaudioinput_pulse.h
+++ b/src/plugins/pulseaudio/qaudioinput_pulse.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qaudiooutput_pulse.cpp b/src/plugins/pulseaudio/qaudiooutput_pulse.cpp
index 810dd9770..5dbfa3e46 100644
--- a/src/plugins/pulseaudio/qaudiooutput_pulse.cpp
+++ b/src/plugins/pulseaudio/qaudiooutput_pulse.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qaudiooutput_pulse.h b/src/plugins/pulseaudio/qaudiooutput_pulse.h
index 99fac10eb..5954b8975 100644
--- a/src/plugins/pulseaudio/qaudiooutput_pulse.h
+++ b/src/plugins/pulseaudio/qaudiooutput_pulse.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qpulseaudioengine.cpp b/src/plugins/pulseaudio/qpulseaudioengine.cpp
index e63672dc4..b7a3e66b7 100644
--- a/src/plugins/pulseaudio/qpulseaudioengine.cpp
+++ b/src/plugins/pulseaudio/qpulseaudioengine.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qpulseaudioengine.h b/src/plugins/pulseaudio/qpulseaudioengine.h
index dfad7eeed..1c6c2aaf4 100644
--- a/src/plugins/pulseaudio/qpulseaudioengine.h
+++ b/src/plugins/pulseaudio/qpulseaudioengine.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qpulseaudioplugin.cpp b/src/plugins/pulseaudio/qpulseaudioplugin.cpp
index b0aa2ecef..677aaae0e 100644
--- a/src/plugins/pulseaudio/qpulseaudioplugin.cpp
+++ b/src/plugins/pulseaudio/qpulseaudioplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qpulseaudioplugin.h b/src/plugins/pulseaudio/qpulseaudioplugin.h
index a1482354c..255a6f330 100644
--- a/src/plugins/pulseaudio/qpulseaudioplugin.h
+++ b/src/plugins/pulseaudio/qpulseaudioplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qpulsehelpers.cpp b/src/plugins/pulseaudio/qpulsehelpers.cpp
index ce1f302e3..316347b2f 100644
--- a/src/plugins/pulseaudio/qpulsehelpers.cpp
+++ b/src/plugins/pulseaudio/qpulsehelpers.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/pulseaudio/qpulsehelpers.h b/src/plugins/pulseaudio/qpulsehelpers.h
index 5e5b2de7b..5487848e8 100644
--- a/src/plugins/pulseaudio/qpulsehelpers.h
+++ b/src/plugins/pulseaudio/qpulsehelpers.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/mediaplayer/qt7playercontrol.h b/src/plugins/qt7/mediaplayer/qt7playercontrol.h
index 16073b5a3..9854710d5 100644
--- a/src/plugins/qt7/mediaplayer/qt7playercontrol.h
+++ b/src/plugins/qt7/mediaplayer/qt7playercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/mediaplayer/qt7playercontrol.mm b/src/plugins/qt7/mediaplayer/qt7playercontrol.mm
index 7462ee4f4..c987f6952 100644
--- a/src/plugins/qt7/mediaplayer/qt7playercontrol.mm
+++ b/src/plugins/qt7/mediaplayer/qt7playercontrol.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/mediaplayer/qt7playermetadata.h b/src/plugins/qt7/mediaplayer/qt7playermetadata.h
index 066adf25b..d51c00579 100644
--- a/src/plugins/qt7/mediaplayer/qt7playermetadata.h
+++ b/src/plugins/qt7/mediaplayer/qt7playermetadata.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/mediaplayer/qt7playermetadata.mm b/src/plugins/qt7/mediaplayer/qt7playermetadata.mm
index 7217b4395..18e2f920e 100644
--- a/src/plugins/qt7/mediaplayer/qt7playermetadata.mm
+++ b/src/plugins/qt7/mediaplayer/qt7playermetadata.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/mediaplayer/qt7playerservice.h b/src/plugins/qt7/mediaplayer/qt7playerservice.h
index ae9cc11bf..02c538dad 100644
--- a/src/plugins/qt7/mediaplayer/qt7playerservice.h
+++ b/src/plugins/qt7/mediaplayer/qt7playerservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/mediaplayer/qt7playerservice.mm b/src/plugins/qt7/mediaplayer/qt7playerservice.mm
index 1a3d0911e..46be5475f 100644
--- a/src/plugins/qt7/mediaplayer/qt7playerservice.mm
+++ b/src/plugins/qt7/mediaplayer/qt7playerservice.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/mediaplayer/qt7playersession.h b/src/plugins/qt7/mediaplayer/qt7playersession.h
index d59e420d4..66e986254 100644
--- a/src/plugins/qt7/mediaplayer/qt7playersession.h
+++ b/src/plugins/qt7/mediaplayer/qt7playersession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/mediaplayer/qt7playersession.mm b/src/plugins/qt7/mediaplayer/qt7playersession.mm
index b53026208..4ec015cbf 100644
--- a/src/plugins/qt7/mediaplayer/qt7playersession.mm
+++ b/src/plugins/qt7/mediaplayer/qt7playersession.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qcvdisplaylink.h b/src/plugins/qt7/qcvdisplaylink.h
index 153f4526a..2d4809c49 100644
--- a/src/plugins/qt7/qcvdisplaylink.h
+++ b/src/plugins/qt7/qcvdisplaylink.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qcvdisplaylink.mm b/src/plugins/qt7/qcvdisplaylink.mm
index c063bfcb2..890955492 100644
--- a/src/plugins/qt7/qcvdisplaylink.mm
+++ b/src/plugins/qt7/qcvdisplaylink.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7.pro b/src/plugins/qt7/qt7.pro
index ae87bd44a..b23eba40a 100644
--- a/src/plugins/qt7/qt7.pro
+++ b/src/plugins/qt7/qt7.pro
@@ -3,7 +3,7 @@ CONFIG += no_keywords
TARGET = qqt7engine
QT += multimedia-private network
-!isEmpty(QT.widgets.name) {
+qtHaveModule(widgets) {
QT += multimediawidgets-private widgets
}
@@ -23,7 +23,7 @@ LIBS += -framework AppKit -framework AudioUnit \
# QUICKTIME_C_API_AVAILABLE is true only on i386
# so make sure to link QuickTime
-contains(QMAKE_HOST.arch, i386) {
+contains(QT_ARCH, i386) {
LIBS += -framework QuickTime
}
@@ -50,7 +50,7 @@ OBJECTIVE_SOURCES += \
qt7ciimagevideobuffer.mm \
qcvdisplaylink.mm
- !isEmpty(QT.widgets.name) {
+ qtHaveModule(widgets) {
HEADERS += \
qt7movieviewrenderer.h \
qt7movievideowidget.h
diff --git a/src/plugins/qt7/qt7backend.h b/src/plugins/qt7/qt7backend.h
index aa6db593b..39bb9533e 100644
--- a/src/plugins/qt7/qt7backend.h
+++ b/src/plugins/qt7/qt7backend.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7backend.mm b/src/plugins/qt7/qt7backend.mm
index 8c286931a..136220cef 100644
--- a/src/plugins/qt7/qt7backend.mm
+++ b/src/plugins/qt7/qt7backend.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7ciimagevideobuffer.h b/src/plugins/qt7/qt7ciimagevideobuffer.h
index 3462e1100..75c61df66 100644
--- a/src/plugins/qt7/qt7ciimagevideobuffer.h
+++ b/src/plugins/qt7/qt7ciimagevideobuffer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7ciimagevideobuffer.mm b/src/plugins/qt7/qt7ciimagevideobuffer.mm
index 666763eff..adb1a689d 100644
--- a/src/plugins/qt7/qt7ciimagevideobuffer.mm
+++ b/src/plugins/qt7/qt7ciimagevideobuffer.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7movierenderer.h b/src/plugins/qt7/qt7movierenderer.h
index e189663af..aed39ad9a 100644
--- a/src/plugins/qt7/qt7movierenderer.h
+++ b/src/plugins/qt7/qt7movierenderer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7movierenderer.mm b/src/plugins/qt7/qt7movierenderer.mm
index a55c44b18..9110b821e 100644
--- a/src/plugins/qt7/qt7movierenderer.mm
+++ b/src/plugins/qt7/qt7movierenderer.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7movievideowidget.h b/src/plugins/qt7/qt7movievideowidget.h
index 5fcf43e95..fd0c3d075 100644
--- a/src/plugins/qt7/qt7movievideowidget.h
+++ b/src/plugins/qt7/qt7movievideowidget.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7movievideowidget.mm b/src/plugins/qt7/qt7movievideowidget.mm
index 423765b2c..11f2ad32c 100644
--- a/src/plugins/qt7/qt7movievideowidget.mm
+++ b/src/plugins/qt7/qt7movievideowidget.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7movieviewoutput.h b/src/plugins/qt7/qt7movieviewoutput.h
index 7dc38115b..ea3d248f8 100644
--- a/src/plugins/qt7/qt7movieviewoutput.h
+++ b/src/plugins/qt7/qt7movieviewoutput.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7movieviewoutput.mm b/src/plugins/qt7/qt7movieviewoutput.mm
index a65fd24ef..c6a2bbafe 100644
--- a/src/plugins/qt7/qt7movieviewoutput.mm
+++ b/src/plugins/qt7/qt7movieviewoutput.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7movieviewrenderer.h b/src/plugins/qt7/qt7movieviewrenderer.h
index 00b658b30..8af5fbd1a 100644
--- a/src/plugins/qt7/qt7movieviewrenderer.h
+++ b/src/plugins/qt7/qt7movieviewrenderer.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7movieviewrenderer.mm b/src/plugins/qt7/qt7movieviewrenderer.mm
index 8578eb365..0e1571f92 100644
--- a/src/plugins/qt7/qt7movieviewrenderer.mm
+++ b/src/plugins/qt7/qt7movieviewrenderer.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7serviceplugin.h b/src/plugins/qt7/qt7serviceplugin.h
index 4e5258b49..27475ee96 100644
--- a/src/plugins/qt7/qt7serviceplugin.h
+++ b/src/plugins/qt7/qt7serviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7serviceplugin.mm b/src/plugins/qt7/qt7serviceplugin.mm
index 9c10cc3cf..731f278a1 100644
--- a/src/plugins/qt7/qt7serviceplugin.mm
+++ b/src/plugins/qt7/qt7serviceplugin.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7videooutput.h b/src/plugins/qt7/qt7videooutput.h
index a715b8388..104289c5c 100644
--- a/src/plugins/qt7/qt7videooutput.h
+++ b/src/plugins/qt7/qt7videooutput.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/qt7/qt7videooutput.mm b/src/plugins/qt7/qt7videooutput.mm
index 9267003f5..6c657c279 100644
--- a/src/plugins/qt7/qt7videooutput.mm
+++ b/src/plugins/qt7/qt7videooutput.mm
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/v4l/radio/v4lradiocontrol.cpp b/src/plugins/v4l/radio/v4lradiocontrol.cpp
index 4dc85bbab..416a772ae 100644
--- a/src/plugins/v4l/radio/v4lradiocontrol.cpp
+++ b/src/plugins/v4l/radio/v4lradiocontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/v4l/radio/v4lradiocontrol.h b/src/plugins/v4l/radio/v4lradiocontrol.h
index f8d79fc3e..815f7f892 100644
--- a/src/plugins/v4l/radio/v4lradiocontrol.h
+++ b/src/plugins/v4l/radio/v4lradiocontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/v4l/radio/v4lradioservice.cpp b/src/plugins/v4l/radio/v4lradioservice.cpp
index 3fab5d66f..85b57bd01 100644
--- a/src/plugins/v4l/radio/v4lradioservice.cpp
+++ b/src/plugins/v4l/radio/v4lradioservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/v4l/radio/v4lradioservice.h b/src/plugins/v4l/radio/v4lradioservice.h
index ba7a8172a..f84928f44 100644
--- a/src/plugins/v4l/radio/v4lradioservice.h
+++ b/src/plugins/v4l/radio/v4lradioservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/v4l/v4lserviceplugin.cpp b/src/plugins/v4l/v4lserviceplugin.cpp
index 907e5b799..f6c60c544 100644
--- a/src/plugins/v4l/v4lserviceplugin.cpp
+++ b/src/plugins/v4l/v4lserviceplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/v4l/v4lserviceplugin.h b/src/plugins/v4l/v4lserviceplugin.h
index c813a8ff5..c368afefb 100644
--- a/src/plugins/v4l/v4lserviceplugin.h
+++ b/src/plugins/v4l/v4lserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp b/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp
index a0d1a4697..4de9dde0d 100644
--- a/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp
+++ b/src/plugins/wmf/decoder/mfaudiodecodercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/decoder/mfaudiodecodercontrol.h b/src/plugins/wmf/decoder/mfaudiodecodercontrol.h
index a87e5178d..b347a9bd4 100644
--- a/src/plugins/wmf/decoder/mfaudiodecodercontrol.h
+++ b/src/plugins/wmf/decoder/mfaudiodecodercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/decoder/mfdecoderservice.cpp b/src/plugins/wmf/decoder/mfdecoderservice.cpp
index 76f686a22..9a06eed81 100644
--- a/src/plugins/wmf/decoder/mfdecoderservice.cpp
+++ b/src/plugins/wmf/decoder/mfdecoderservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/decoder/mfdecoderservice.h b/src/plugins/wmf/decoder/mfdecoderservice.h
index bf14fc6c2..beba7d034 100644
--- a/src/plugins/wmf/decoder/mfdecoderservice.h
+++ b/src/plugins/wmf/decoder/mfdecoderservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/decoder/mfdecodersourcereader.cpp b/src/plugins/wmf/decoder/mfdecodersourcereader.cpp
index 7f82b1ebc..0aa2cafb8 100644
--- a/src/plugins/wmf/decoder/mfdecodersourcereader.cpp
+++ b/src/plugins/wmf/decoder/mfdecodersourcereader.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/decoder/mfdecodersourcereader.h b/src/plugins/wmf/decoder/mfdecodersourcereader.h
index fae1762fb..c932ef4af 100644
--- a/src/plugins/wmf/decoder/mfdecodersourcereader.h
+++ b/src/plugins/wmf/decoder/mfdecodersourcereader.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/evrcustompresenter.cpp b/src/plugins/wmf/evrcustompresenter.cpp
new file mode 100644
index 000000000..eb73e6720
--- /dev/null
+++ b/src/plugins/wmf/evrcustompresenter.cpp
@@ -0,0 +1,2052 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "evrcustompresenter.h"
+
+#include "mfglobal.h"
+#include "evrd3dpresentengine.h"
+
+#include <QtCore/qmutex.h>
+#include <QtCore/qvarlengtharray.h>
+#include <QtCore/qrect.h>
+#include <qabstractvideosurface.h>
+#include <qthread.h>
+#include <qcoreapplication.h>
+#include <QtCore/qdebug.h>
+#include <d3d9.h>
+#include <dshow.h>
+
+QT_USE_NAMESPACE
+
+const static MFRatio g_DefaultFrameRate = { 30, 1 };
+static const DWORD SCHEDULER_TIMEOUT = 5000;
+static const MFTIME ONE_SECOND = 10000000;
+static const LONG ONE_MSEC = 1000;
+
+// Function declarations.
+static HRESULT setDesiredSampleTime(IMFSample *sample, const LONGLONG& hnsSampleTime, const LONGLONG& hnsDuration);
+static HRESULT clearDesiredSampleTime(IMFSample *sample);
+static HRESULT setMixerSourceRect(IMFTransform *mixer, const MFVideoNormalizedRect& nrcSource);
+static DWORD getFourCCFromPixelFormat(QVideoFrame::PixelFormat pixelFormat);
+static QVideoFrame::PixelFormat pixelFormatFromMediaType(IMFMediaType *type);
+
+static inline LONG MFTimeToMsec(const LONGLONG& time)
+{
+ return (LONG)(time / (ONE_SECOND / ONE_MSEC));
+}
+
+
+Scheduler::Scheduler()
+ : m_CB(NULL)
+ , m_clock(NULL)
+ , m_threadID(0)
+ , m_schedulerThread(0)
+ , m_threadReadyEvent(0)
+ , m_flushEvent(0)
+ , m_playbackRate(1.0f)
+ , m_lastSampleTime(0)
+ , m_perFrameInterval(0)
+ , m_perFrame_1_4th(0)
+{
+}
+
+Scheduler::~Scheduler()
+{
+ qt_wmf_safeRelease(&m_clock);
+ for (int i = 0; i < m_scheduledSamples.size(); ++i)
+ m_scheduledSamples[i]->Release();
+ m_scheduledSamples.clear();
+}
+
+void Scheduler::setFrameRate(const MFRatio& fps)
+{
+ UINT64 AvgTimePerFrame = 0;
+
+ // Convert to a duration.
+ MFFrameRateToAverageTimePerFrame(fps.Numerator, fps.Denominator, &AvgTimePerFrame);
+
+ m_perFrameInterval = (MFTIME)AvgTimePerFrame;
+
+ // Calculate 1/4th of this value, because we use it frequently.
+ m_perFrame_1_4th = m_perFrameInterval / 4;
+}
+
+HRESULT Scheduler::startScheduler(IMFClock *clock)
+{
+ if (m_schedulerThread)
+ return E_UNEXPECTED;
+
+ HRESULT hr = S_OK;
+ DWORD dwID = 0;
+
+ qt_wmf_copyComPointer(m_clock, clock);
+
+ // Set a high the timer resolution (ie, short timer period).
+ timeBeginPeriod(1);
+
+ // Create an event to wait for the thread to start.
+ m_threadReadyEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (!m_threadReadyEvent) {
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ goto done;
+ }
+
+ // Create an event to wait for flush commands to complete.
+ m_flushEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (!m_flushEvent) {
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ goto done;
+ }
+
+ // Create the scheduler thread.
+ m_schedulerThread = CreateThread(NULL, 0, schedulerThreadProc, (LPVOID)this, 0, &dwID);
+ if (!m_schedulerThread) {
+ hr = HRESULT_FROM_WIN32(GetLastError());
+ goto done;
+ }
+
+ HANDLE hObjects[] = { m_threadReadyEvent, m_schedulerThread };
+ DWORD dwWait = 0;
+
+ // Wait for the thread to signal the "thread ready" event.
+ dwWait = WaitForMultipleObjects(2, hObjects, FALSE, INFINITE); // Wait for EITHER of these handles.
+ if (WAIT_OBJECT_0 != dwWait) {
+ // The thread terminated early for some reason. This is an error condition.
+ CloseHandle(m_schedulerThread);
+ m_schedulerThread = NULL;
+
+ hr = E_UNEXPECTED;
+ goto done;
+ }
+
+ m_threadID = dwID;
+
+done:
+ // Regardless success/failure, we are done using the "thread ready" event.
+ if (m_threadReadyEvent) {
+ CloseHandle(m_threadReadyEvent);
+ m_threadReadyEvent = NULL;
+ }
+ return hr;
+}
+
+HRESULT Scheduler::stopScheduler()
+{
+ if (!m_schedulerThread)
+ return S_OK;
+
+ // Ask the scheduler thread to exit.
+ PostThreadMessage(m_threadID, Terminate, 0, 0);
+
+ // Wait for the thread to exit.
+ WaitForSingleObject(m_schedulerThread, INFINITE);
+
+ // Close handles.
+ CloseHandle(m_schedulerThread);
+ m_schedulerThread = NULL;
+
+ CloseHandle(m_flushEvent);
+ m_flushEvent = NULL;
+
+ // Discard samples.
+ m_mutex.lock();
+ for (int i = 0; i < m_scheduledSamples.size(); ++i)
+ m_scheduledSamples[i]->Release();
+ m_scheduledSamples.clear();
+ m_mutex.unlock();
+
+ // Restore the timer resolution.
+ timeEndPeriod(1);
+
+ return S_OK;
+}
+
+HRESULT Scheduler::flush()
+{
+ if (m_schedulerThread) {
+ // Ask the scheduler thread to flush.
+ PostThreadMessage(m_threadID, Flush, 0 , 0);
+
+ // Wait for the scheduler thread to signal the flush event,
+ // OR for the thread to terminate.
+ HANDLE objects[] = { m_flushEvent, m_schedulerThread };
+
+ WaitForMultipleObjects(ARRAYSIZE(objects), objects, FALSE, SCHEDULER_TIMEOUT);
+ }
+
+ return S_OK;
+}
+
+HRESULT Scheduler::scheduleSample(IMFSample *sample, bool presentNow)
+{
+ if (!m_CB)
+ return MF_E_NOT_INITIALIZED;
+
+ if (!m_schedulerThread)
+ return MF_E_NOT_INITIALIZED;
+
+ HRESULT hr = S_OK;
+ DWORD dwExitCode = 0;
+
+ GetExitCodeThread(m_schedulerThread, &dwExitCode);
+ if (dwExitCode != STILL_ACTIVE)
+ return E_FAIL;
+
+ if (presentNow || !m_clock) {
+ // Present the sample immediately.
+ sample->AddRef();
+ QMetaObject::invokeMethod(m_CB,
+ "presentSample",
+ Qt::QueuedConnection,
+ Q_ARG(void*, sample),
+ Q_ARG(qint64, 0));
+ } else {
+ // Queue the sample and ask the scheduler thread to wake up.
+ m_mutex.lock();
+ sample->AddRef();
+ m_scheduledSamples.enqueue(sample);
+ m_mutex.unlock();
+
+ if (SUCCEEDED(hr))
+ PostThreadMessage(m_threadID, Schedule, 0, 0);
+ }
+
+ return hr;
+}
+
+HRESULT Scheduler::processSamplesInQueue(LONG *nextSleep)
+{
+ HRESULT hr = S_OK;
+ LONG wait = 0;
+ IMFSample *sample = NULL;
+
+ // Process samples until the queue is empty or until the wait time > 0.
+ while (!m_scheduledSamples.isEmpty()) {
+ m_mutex.lock();
+ sample = m_scheduledSamples.dequeue();
+ m_mutex.unlock();
+
+ // Process the next sample in the queue. If the sample is not ready
+ // for presentation. the value returned in wait is > 0, which
+ // means the scheduler should sleep for that amount of time.
+
+ hr = processSample(sample, &wait);
+ qt_wmf_safeRelease(&sample);
+
+ if (FAILED(hr) || wait > 0)
+ break;
+ }
+
+ // If the wait time is zero, it means we stopped because the queue is
+ // empty (or an error occurred). Set the wait time to infinite; this will
+ // make the scheduler thread sleep until it gets another thread message.
+ if (wait == 0)
+ wait = INFINITE;
+
+ *nextSleep = wait;
+ return hr;
+}
+
+HRESULT Scheduler::processSample(IMFSample *sample, LONG *pNextSleep)
+{
+ HRESULT hr = S_OK;
+
+ LONGLONG hnsPresentationTime = 0;
+ LONGLONG hnsTimeNow = 0;
+ MFTIME hnsSystemTime = 0;
+
+ bool presentNow = true;
+ LONG nextSleep = 0;
+
+ if (m_clock) {
+ // Get the sample's time stamp. It is valid for a sample to
+ // have no time stamp.
+ hr = sample->GetSampleTime(&hnsPresentationTime);
+
+ // Get the clock time. (But if the sample does not have a time stamp,
+ // we don't need the clock time.)
+ if (SUCCEEDED(hr))
+ hr = m_clock->GetCorrelatedTime(0, &hnsTimeNow, &hnsSystemTime);
+
+ // Calculate the time until the sample's presentation time.
+ // A negative value means the sample is late.
+ LONGLONG hnsDelta = hnsPresentationTime - hnsTimeNow;
+ if (m_playbackRate < 0) {
+ // For reverse playback, the clock runs backward. Therefore, the
+ // delta is reversed.
+ hnsDelta = - hnsDelta;
+ }
+
+ if (hnsDelta < - m_perFrame_1_4th) {
+ // This sample is late.
+ presentNow = true;
+ } else if (hnsDelta > (3 * m_perFrame_1_4th)) {
+ // This sample is still too early. Go to sleep.
+ nextSleep = MFTimeToMsec(hnsDelta - (3 * m_perFrame_1_4th));
+
+ // Adjust the sleep time for the clock rate. (The presentation clock runs
+ // at m_fRate, but sleeping uses the system clock.)
+ if (m_playbackRate != 0)
+ nextSleep = (LONG)(nextSleep / fabsf(m_playbackRate));
+
+ // Don't present yet.
+ presentNow = false;
+ }
+ }
+
+ if (presentNow) {
+ sample->AddRef();
+ QMetaObject::invokeMethod(m_CB,
+ "presentSample",
+ Qt::QueuedConnection,
+ Q_ARG(void*, sample),
+ Q_ARG(qint64, hnsPresentationTime));
+ } else {
+ // The sample is not ready yet. Return it to the queue.
+ m_mutex.lock();
+ sample->AddRef();
+ m_scheduledSamples.prepend(sample);
+ m_mutex.unlock();
+ }
+
+ *pNextSleep = nextSleep;
+
+ return hr;
+}
+
+DWORD WINAPI Scheduler::schedulerThreadProc(LPVOID parameter)
+{
+ Scheduler* scheduler = reinterpret_cast<Scheduler*>(parameter);
+ if (!scheduler)
+ return -1;
+ return scheduler->schedulerThreadProcPrivate();
+}
+
+DWORD Scheduler::schedulerThreadProcPrivate()
+{
+ HRESULT hr = S_OK;
+ MSG msg;
+ LONG wait = INFINITE;
+ bool exitThread = false;
+
+ // Force the system to create a message queue for this thread.
+ // (See MSDN documentation for PostThreadMessage.)
+ PeekMessage(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE);
+
+ // Signal to the scheduler that the thread is ready.
+ SetEvent(m_threadReadyEvent);
+
+ while (!exitThread) {
+ // Wait for a thread message OR until the wait time expires.
+ DWORD result = MsgWaitForMultipleObjects(0, NULL, FALSE, wait, QS_POSTMESSAGE);
+
+ if (result == WAIT_TIMEOUT) {
+ // If we timed out, then process the samples in the queue
+ hr = processSamplesInQueue(&wait);
+ if (FAILED(hr))
+ exitThread = true;
+ }
+
+ while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) {
+ bool processSamples = true;
+
+ switch (msg.message) {
+ case Terminate:
+ exitThread = true;
+ break;
+ case Flush:
+ // Flushing: Clear the sample queue and set the event.
+ m_mutex.lock();
+ for (int i = 0; i < m_scheduledSamples.size(); ++i)
+ m_scheduledSamples[i]->Release();
+ m_scheduledSamples.clear();
+ m_mutex.unlock();
+ wait = INFINITE;
+ SetEvent(m_flushEvent);
+ break;
+ case Schedule:
+ // Process as many samples as we can.
+ if (processSamples) {
+ hr = processSamplesInQueue(&wait);
+ if (FAILED(hr))
+ exitThread = true;
+ processSamples = (wait != INFINITE);
+ }
+ break;
+ }
+ }
+
+ }
+
+ return (SUCCEEDED(hr) ? 0 : 1);
+}
+
+
+SamplePool::SamplePool()
+ : m_initialized(false)
+ , m_pending(0)
+{
+}
+
+SamplePool::~SamplePool()
+{
+ clear();
+}
+
+HRESULT SamplePool::getSample(IMFSample **sample)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_initialized)
+ return MF_E_NOT_INITIALIZED;
+
+ if (m_videoSampleQueue.isEmpty())
+ return MF_E_SAMPLEALLOCATOR_EMPTY;
+
+ // Get a sample from the allocated queue.
+
+ // It doesn't matter if we pull them from the head or tail of the list,
+ // but when we get it back, we want to re-insert it onto the opposite end.
+ // (see ReturnSample)
+
+ IMFSample *taken = m_videoSampleQueue.takeFirst();
+
+ m_pending++;
+
+ // Give the sample to the caller.
+ *sample = taken;
+ (*sample)->AddRef();
+
+ taken->Release();
+
+ return S_OK;
+}
+
+HRESULT SamplePool::returnSample(IMFSample *sample)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_initialized)
+ return MF_E_NOT_INITIALIZED;
+
+ m_videoSampleQueue.append(sample);
+ sample->AddRef();
+
+ m_pending--;
+
+ return S_OK;
+}
+
+BOOL SamplePool::areSamplesPending()
+{
+ QMutexLocker locker(&m_mutex);
+
+ bool ret = false;
+
+ if (!m_initialized)
+ ret = false;
+ else
+ ret = (m_pending > 0);
+
+ return ret;
+}
+
+HRESULT SamplePool::initialize(QList<IMFSample*> &samples)
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_initialized)
+ return MF_E_INVALIDREQUEST;
+
+ IMFSample *sample = NULL;
+
+ // Move these samples into our allocated queue.
+ for (int i = 0; i < samples.size(); ++i) {
+ sample = samples.at(i);
+ sample->AddRef();
+ m_videoSampleQueue.append(sample);
+ }
+
+ m_initialized = true;
+
+ for (int i = 0; i < samples.size(); ++i)
+ samples[i]->Release();
+ samples.clear();
+ return S_OK;
+}
+
+HRESULT SamplePool::clear()
+{
+ QMutexLocker locker(&m_mutex);
+
+ for (int i = 0; i < m_videoSampleQueue.size(); ++i)
+ m_videoSampleQueue[i]->Release();
+ m_videoSampleQueue.clear();
+ m_initialized = false;
+ m_pending = 0;
+
+ return S_OK;
+}
+
+
+EVRCustomPresenter::EVRCustomPresenter()
+ : QObject()
+ , m_sampleFreeCB(this, &EVRCustomPresenter::onSampleFree)
+ , m_refCount(1)
+ , m_renderState(RenderShutdown)
+ , m_mutex(QMutex::Recursive)
+ , m_tokenCounter(0)
+ , m_sampleNotify(false)
+ , m_repaint(false)
+ , m_prerolled(false)
+ , m_endStreaming(false)
+ , m_playbackRate(1.0f)
+ , m_D3DPresentEngine(0)
+ , m_clock(0)
+ , m_mixer(0)
+ , m_mediaEventSink(0)
+ , m_mediaType(0)
+ , m_surface(0)
+{
+ // Initial source rectangle = (0,0,1,1)
+ m_sourceRect.top = 0;
+ m_sourceRect.left = 0;
+ m_sourceRect.bottom = 1;
+ m_sourceRect.right = 1;
+
+ m_D3DPresentEngine = new D3DPresentEngine;
+ m_scheduler.setCallback(m_D3DPresentEngine);
+}
+
+EVRCustomPresenter::~EVRCustomPresenter()
+{
+ qt_wmf_safeRelease(&m_clock);
+ qt_wmf_safeRelease(&m_mixer);
+ qt_wmf_safeRelease(&m_mediaEventSink);
+ qt_wmf_safeRelease(&m_mediaType);
+
+ m_D3DPresentEngine->deleteLater();
+}
+
+HRESULT EVRCustomPresenter::QueryInterface(REFIID riid, void ** ppvObject)
+{
+ if (!ppvObject)
+ return E_POINTER;
+ if (riid == IID_IMFGetService) {
+ *ppvObject = static_cast<IMFGetService*>(this);
+ } else if (riid == IID_IMFTopologyServiceLookupClient) {
+ *ppvObject = static_cast<IMFTopologyServiceLookupClient*>(this);
+ } else if (riid == IID_IMFVideoDeviceID) {
+ *ppvObject = static_cast<IMFVideoDeviceID*>(this);
+ } else if (riid == IID_IMFVideoPresenter) {
+ *ppvObject = static_cast<IMFVideoPresenter*>(this);
+ } else if (riid == IID_IMFRateSupport) {
+ *ppvObject = static_cast<IMFRateSupport*>(this);
+ } else if (riid == IID_IUnknown) {
+ *ppvObject = static_cast<IUnknown*>(static_cast<IMFGetService*>(this));
+ } else if (riid == IID_IMFClockStateSink) {
+ *ppvObject = static_cast<IMFClockStateSink*>(this);
+ } else {
+ *ppvObject = NULL;
+ return E_NOINTERFACE;
+ }
+ AddRef();
+ return S_OK;
+}
+
+ULONG EVRCustomPresenter::AddRef()
+{
+ return InterlockedIncrement(&m_refCount);
+}
+
+ULONG EVRCustomPresenter::Release()
+{
+ ULONG uCount = InterlockedDecrement(&m_refCount);
+ if (uCount == 0)
+ delete this;
+ return uCount;
+}
+
+HRESULT EVRCustomPresenter::GetService(REFGUID guidService, REFIID riid, LPVOID *ppvObject)
+{
+ HRESULT hr = S_OK;
+
+ if (!ppvObject)
+ return E_POINTER;
+
+ // The only service GUID that we support is MR_VIDEO_RENDER_SERVICE.
+ if (guidService != MR_VIDEO_RENDER_SERVICE)
+ return MF_E_UNSUPPORTED_SERVICE;
+
+ // First try to get the service interface from the D3DPresentEngine object.
+ hr = m_D3DPresentEngine->getService(guidService, riid, ppvObject);
+ if (FAILED(hr))
+ // Next, check if this object supports the interface.
+ hr = QueryInterface(riid, ppvObject);
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::GetDeviceID(IID* deviceID)
+{
+ if (!deviceID)
+ return E_POINTER;
+
+ *deviceID = IID_IDirect3DDevice9;
+
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::InitServicePointers(IMFTopologyServiceLookup *lookup)
+{
+ if (!lookup)
+ return E_POINTER;
+
+ HRESULT hr = S_OK;
+ DWORD objectCount = 0;
+
+ QMutexLocker locker(&m_mutex);
+
+ // Do not allow initializing when playing or paused.
+ if (isActive())
+ return MF_E_INVALIDREQUEST;
+
+ qt_wmf_safeRelease(&m_clock);
+ qt_wmf_safeRelease(&m_mixer);
+ qt_wmf_safeRelease(&m_mediaEventSink);
+
+ // Ask for the clock. Optional, because the EVR might not have a clock.
+ objectCount = 1;
+
+ lookup->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0,
+ MR_VIDEO_RENDER_SERVICE, IID_PPV_ARGS(&m_clock),
+ &objectCount
+ );
+
+ // Ask for the mixer. (Required.)
+ objectCount = 1;
+
+ hr = lookup->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0,
+ MR_VIDEO_MIXER_SERVICE, IID_PPV_ARGS(&m_mixer),
+ &objectCount
+ );
+
+ if (FAILED(hr))
+ return hr;
+
+ // Make sure that we can work with this mixer.
+ hr = configureMixer(m_mixer);
+ if (FAILED(hr))
+ return hr;
+
+ // Ask for the EVR's event-sink interface. (Required.)
+ objectCount = 1;
+
+ hr = lookup->LookupService(MF_SERVICE_LOOKUP_GLOBAL, 0,
+ MR_VIDEO_RENDER_SERVICE, IID_PPV_ARGS(&m_mediaEventSink),
+ &objectCount
+ );
+
+ if (SUCCEEDED(hr))
+ m_renderState = RenderStopped;
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::ReleaseServicePointers()
+{
+ // Enter the shut-down state.
+ m_mutex.lock();
+
+ m_renderState = RenderShutdown;
+
+ m_mutex.unlock();
+
+ // Flush any samples that were scheduled.
+ flush();
+
+ // Clear the media type and release related resources.
+ setMediaType(NULL);
+
+ // Release all services that were acquired from InitServicePointers.
+ qt_wmf_safeRelease(&m_clock);
+ qt_wmf_safeRelease(&m_mixer);
+ qt_wmf_safeRelease(&m_mediaEventSink);
+
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::ProcessMessage(MFVP_MESSAGE_TYPE message, ULONG_PTR param)
+{
+ HRESULT hr = S_OK;
+
+ QMutexLocker locker(&m_mutex);
+
+ hr = checkShutdown();
+ if (FAILED(hr))
+ return hr;
+
+ switch (message) {
+ // Flush all pending samples.
+ case MFVP_MESSAGE_FLUSH:
+ hr = flush();
+ break;
+
+ // Renegotiate the media type with the mixer.
+ case MFVP_MESSAGE_INVALIDATEMEDIATYPE:
+ hr = renegotiateMediaType();
+ break;
+
+ // The mixer received a new input sample.
+ case MFVP_MESSAGE_PROCESSINPUTNOTIFY:
+ hr = processInputNotify();
+ break;
+
+ // Streaming is about to start.
+ case MFVP_MESSAGE_BEGINSTREAMING:
+ hr = beginStreaming();
+ break;
+
+ // Streaming has ended. (The EVR has stopped.)
+ case MFVP_MESSAGE_ENDSTREAMING:
+ hr = endStreaming();
+ break;
+
+ // All input streams have ended.
+ case MFVP_MESSAGE_ENDOFSTREAM:
+ // Set the EOS flag.
+ m_endStreaming = true;
+ // Check if it's time to send the EC_COMPLETE event to the EVR.
+ hr = checkEndOfStream();
+ break;
+
+ // Frame-stepping is starting.
+ case MFVP_MESSAGE_STEP:
+ hr = prepareFrameStep(DWORD(param));
+ break;
+
+ // Cancels frame-stepping.
+ case MFVP_MESSAGE_CANCELSTEP:
+ hr = cancelFrameStep();
+ break;
+
+ default:
+ hr = E_INVALIDARG; // Unknown message. This case should never occur.
+ break;
+ }
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::GetCurrentMediaType(IMFVideoMediaType **mediaType)
+{
+ HRESULT hr = S_OK;
+
+ if (!mediaType)
+ return E_POINTER;
+
+ *mediaType = NULL;
+
+ QMutexLocker locker(&m_mutex);
+
+ hr = checkShutdown();
+ if (FAILED(hr))
+ return hr;
+
+ if (!m_mediaType)
+ return MF_E_NOT_INITIALIZED;
+
+ return m_mediaType->QueryInterface(IID_PPV_ARGS(mediaType));
+}
+
+HRESULT EVRCustomPresenter::OnClockStart(MFTIME, LONGLONG clockStartOffset)
+{
+ QMutexLocker locker(&m_mutex);
+
+ // We cannot start after shutdown.
+ HRESULT hr = checkShutdown();
+ if (FAILED(hr))
+ return hr;
+
+ // Check if the clock is already active (not stopped).
+ if (isActive()) {
+ m_renderState = RenderStarted;
+
+ // If the clock position changes while the clock is active, it
+ // is a seek request. We need to flush all pending samples.
+ if (clockStartOffset != PRESENTATION_CURRENT_POSITION)
+ flush();
+ } else {
+ m_renderState = RenderStarted;
+
+ // The clock has started from the stopped state.
+
+ // Possibly we are in the middle of frame-stepping OR have samples waiting
+ // in the frame-step queue. Deal with these two cases first:
+ hr = startFrameStep();
+ if (FAILED(hr))
+ return hr;
+ }
+
+ // Start the video surface in the main thread
+ if (thread() == QThread::currentThread())
+ startSurface();
+ else
+ QMetaObject::invokeMethod(this, "startSurface", Qt::QueuedConnection);
+
+ // Now try to get new output samples from the mixer.
+ processOutputLoop();
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::OnClockRestart(MFTIME)
+{
+ QMutexLocker locker(&m_mutex);
+
+ HRESULT hr = checkShutdown();
+ if (FAILED(hr))
+ return hr;
+
+ // The EVR calls OnClockRestart only while paused.
+
+ m_renderState = RenderStarted;
+
+ // Possibly we are in the middle of frame-stepping OR we have samples waiting
+ // in the frame-step queue. Deal with these two cases first:
+ hr = startFrameStep();
+ if (FAILED(hr))
+ return hr;
+
+ // Now resume the presentation loop.
+ processOutputLoop();
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::OnClockStop(MFTIME)
+{
+ QMutexLocker locker(&m_mutex);
+
+ HRESULT hr = checkShutdown();
+ if (FAILED(hr))
+ return hr;
+
+ if (m_renderState != RenderStopped) {
+ m_renderState = RenderStopped;
+ flush();
+
+ // If we are in the middle of frame-stepping, cancel it now.
+ if (m_frameStep.state != FrameStepNone)
+ cancelFrameStep();
+ }
+
+ // Stop the video surface in the main thread
+ if (thread() == QThread::currentThread())
+ stopSurface();
+ else
+ QMetaObject::invokeMethod(this, "stopSurface", Qt::QueuedConnection);
+
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::OnClockPause(MFTIME)
+{
+ QMutexLocker locker(&m_mutex);
+
+ // We cannot pause the clock after shutdown.
+ HRESULT hr = checkShutdown();
+
+ if (SUCCEEDED(hr))
+ m_renderState = RenderPaused;
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::OnClockSetRate(MFTIME, float rate)
+{
+ // Note:
+ // The presenter reports its maximum rate through the IMFRateSupport interface.
+ // Here, we assume that the EVR honors the maximum rate.
+
+ QMutexLocker locker(&m_mutex);
+
+ HRESULT hr = checkShutdown();
+ if (FAILED(hr))
+ return hr;
+
+ // If the rate is changing from zero (scrubbing) to non-zero, cancel the
+ // frame-step operation.
+ if ((m_playbackRate == 0.0f) && (rate != 0.0f)) {
+ cancelFrameStep();
+ for (int i = 0; i < m_frameStep.samples.size(); ++i)
+ m_frameStep.samples[i]->Release();
+ m_frameStep.samples.clear();
+ }
+
+ m_playbackRate = rate;
+
+ // Tell the scheduler about the new rate.
+ m_scheduler.setClockRate(rate);
+
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::GetSlowestRate(MFRATE_DIRECTION, BOOL, float *rate)
+{
+ if (!rate)
+ return E_POINTER;
+
+ QMutexLocker locker(&m_mutex);
+
+ HRESULT hr = checkShutdown();
+
+ if (SUCCEEDED(hr)) {
+ // There is no minimum playback rate, so the minimum is zero.
+ *rate = 0;
+ }
+
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::GetFastestRate(MFRATE_DIRECTION direction, BOOL thin, float *rate)
+{
+ if (!rate)
+ return E_POINTER;
+
+ QMutexLocker locker(&m_mutex);
+
+ float maxRate = 0.0f;
+
+ HRESULT hr = checkShutdown();
+ if (FAILED(hr))
+ return hr;
+
+ // Get the maximum *forward* rate.
+ maxRate = getMaxRate(thin);
+
+ // For reverse playback, it's the negative of maxRate.
+ if (direction == MFRATE_REVERSE)
+ maxRate = -maxRate;
+
+ *rate = maxRate;
+
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::IsRateSupported(BOOL thin, float rate, float *nearestSupportedRate)
+{
+ QMutexLocker locker(&m_mutex);
+
+ float maxRate = 0.0f;
+ float nearestRate = rate; // If we support rate, that is the nearest.
+
+ HRESULT hr = checkShutdown();
+ if (FAILED(hr))
+ return hr;
+
+ // Find the maximum forward rate.
+ // Note: We have no minimum rate (that is, we support anything down to 0).
+ maxRate = getMaxRate(thin);
+
+ if (fabsf(rate) > maxRate) {
+ // The (absolute) requested rate exceeds the maximum rate.
+ hr = MF_E_UNSUPPORTED_RATE;
+
+ // The nearest supported rate is maxRate.
+ nearestRate = maxRate;
+ if (rate < 0) {
+ // Negative for reverse playback.
+ nearestRate = -nearestRate;
+ }
+ }
+
+ // Return the nearest supported rate.
+ if (nearestSupportedRate)
+ *nearestSupportedRate = nearestRate;
+
+ return hr;
+}
+
+void EVRCustomPresenter::supportedFormatsChanged()
+{
+ QMutexLocker locker(&m_mutex);
+
+ m_supportedGLFormats.clear();
+ if (!m_surface)
+ return;
+
+ QList<QVideoFrame::PixelFormat> formats = m_surface->supportedPixelFormats(QAbstractVideoBuffer::GLTextureHandle);
+ for (int i = 0; i < formats.size(); ++i) {
+ DWORD fourCC = getFourCCFromPixelFormat(formats.at(i));
+ if (fourCC)
+ m_supportedGLFormats.append(fourCC);
+ }
+}
+
+void EVRCustomPresenter::setSurface(QAbstractVideoSurface *surface)
+{
+ m_mutex.lock();
+
+ m_surface = surface;
+
+ if (m_D3DPresentEngine)
+ m_D3DPresentEngine->setSurface(surface);
+
+ m_mutex.unlock();
+
+ supportedFormatsChanged();
+}
+
+HRESULT EVRCustomPresenter::configureMixer(IMFTransform *mixer)
+{
+ // Set the zoom rectangle (ie, the source clipping rectangle).
+ return setMixerSourceRect(mixer, m_sourceRect);
+}
+
+HRESULT EVRCustomPresenter::renegotiateMediaType()
+{
+ HRESULT hr = S_OK;
+ bool foundMediaType = false;
+
+ IMFMediaType *mixerType = NULL;
+ IMFMediaType *optimalType = NULL;
+
+ if (!m_mixer)
+ return MF_E_INVALIDREQUEST;
+
+ // Loop through all of the mixer's proposed output types.
+ DWORD typeIndex = 0;
+ while (!foundMediaType && (hr != MF_E_NO_MORE_TYPES)) {
+ qt_wmf_safeRelease(&mixerType);
+ qt_wmf_safeRelease(&optimalType);
+
+ // Step 1. Get the next media type supported by mixer.
+ hr = m_mixer->GetOutputAvailableType(0, typeIndex++, &mixerType);
+ if (FAILED(hr))
+ break;
+
+ // From now on, if anything in this loop fails, try the next type,
+ // until we succeed or the mixer runs out of types.
+
+ // Step 2. Check if we support this media type.
+ if (SUCCEEDED(hr))
+ hr = isMediaTypeSupported(mixerType);
+
+ // Step 3. Adjust the mixer's type to match our requirements.
+ if (SUCCEEDED(hr))
+ hr = createOptimalVideoType(mixerType, &optimalType);
+
+ // Step 4. Check if the mixer will accept this media type.
+ if (SUCCEEDED(hr))
+ hr = m_mixer->SetOutputType(0, optimalType, MFT_SET_TYPE_TEST_ONLY);
+
+ // Step 5. Try to set the media type on ourselves.
+ if (SUCCEEDED(hr))
+ hr = setMediaType(optimalType);
+
+ // Step 6. Set output media type on mixer.
+ if (SUCCEEDED(hr)) {
+ hr = m_mixer->SetOutputType(0, optimalType, 0);
+
+ // If something went wrong, clear the media type.
+ if (FAILED(hr))
+ setMediaType(NULL);
+ }
+
+ if (SUCCEEDED(hr))
+ foundMediaType = true;
+ }
+
+ qt_wmf_safeRelease(&mixerType);
+ qt_wmf_safeRelease(&optimalType);
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::flush()
+{
+ m_prerolled = false;
+
+ // The scheduler might have samples that are waiting for
+ // their presentation time. Tell the scheduler to flush.
+
+ // This call blocks until the scheduler threads discards all scheduled samples.
+ m_scheduler.flush();
+
+ // Flush the frame-step queue.
+ for (int i = 0; i < m_frameStep.samples.size(); ++i)
+ m_frameStep.samples[i]->Release();
+ m_frameStep.samples.clear();
+
+ if (m_renderState == RenderStopped) {
+ // Repaint with black.
+ QMetaObject::invokeMethod(m_D3DPresentEngine,
+ "presentSample",
+ Qt::QueuedConnection,
+ Q_ARG(void*, 0),
+ Q_ARG(qint64, 0));
+ }
+
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::processInputNotify()
+{
+ HRESULT hr = S_OK;
+
+ // Set the flag that says the mixer has a new sample.
+ m_sampleNotify = true;
+
+ if (!m_mediaType) {
+ // We don't have a valid media type yet.
+ hr = MF_E_TRANSFORM_TYPE_NOT_SET;
+ } else {
+ // Try to process an output sample.
+ processOutputLoop();
+ }
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::beginStreaming()
+{
+ HRESULT hr = S_OK;
+
+ // Start the scheduler thread.
+ hr = m_scheduler.startScheduler(m_clock);
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::endStreaming()
+{
+ HRESULT hr = S_OK;
+
+ // Stop the scheduler thread.
+ hr = m_scheduler.stopScheduler();
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::checkEndOfStream()
+{
+ if (!m_endStreaming) {
+ // The EVR did not send the MFVP_MESSAGE_ENDOFSTREAM message.
+ return S_OK;
+ }
+
+ if (m_sampleNotify) {
+ // The mixer still has input.
+ return S_OK;
+ }
+
+ if (m_samplePool.areSamplesPending()) {
+ // Samples are still scheduled for rendering.
+ return S_OK;
+ }
+
+ // Everything is complete. Now we can tell the EVR that we are done.
+ notifyEvent(EC_COMPLETE, (LONG_PTR)S_OK, 0);
+ m_endStreaming = false;
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::prepareFrameStep(DWORD steps)
+{
+ HRESULT hr = S_OK;
+
+ // Cache the step count.
+ m_frameStep.steps += steps;
+
+ // Set the frame-step state.
+ m_frameStep.state = FrameStepWaitingStart;
+
+ // If the clock is are already running, we can start frame-stepping now.
+ // Otherwise, we will start when the clock starts.
+ if (m_renderState == RenderStarted)
+ hr = startFrameStep();
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::startFrameStep()
+{
+ HRESULT hr = S_OK;
+ IMFSample *sample = NULL;
+
+ if (m_frameStep.state == FrameStepWaitingStart) {
+ // We have a frame-step request, and are waiting for the clock to start.
+ // Set the state to "pending," which means we are waiting for samples.
+ m_frameStep.state = FrameStepPending;
+
+ // If the frame-step queue already has samples, process them now.
+ while (!m_frameStep.samples.isEmpty() && (m_frameStep.state == FrameStepPending)) {
+ sample = m_frameStep.samples.takeFirst();
+
+ hr = deliverFrameStepSample(sample);
+ if (FAILED(hr))
+ goto done;
+
+ qt_wmf_safeRelease(&sample);
+
+ // We break from this loop when:
+ // (a) the frame-step queue is empty, or
+ // (b) the frame-step operation is complete.
+ }
+ } else if (m_frameStep.state == FrameStepNone) {
+ // We are not frame stepping. Therefore, if the frame-step queue has samples,
+ // we need to process them normally.
+ while (!m_frameStep.samples.isEmpty()) {
+ sample = m_frameStep.samples.takeFirst();
+
+ hr = deliverSample(sample, false);
+ if (FAILED(hr))
+ goto done;
+
+ qt_wmf_safeRelease(&sample);
+ }
+ }
+
+done:
+ qt_wmf_safeRelease(&sample);
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::completeFrameStep(IMFSample *sample)
+{
+ HRESULT hr = S_OK;
+ MFTIME sampleTime = 0;
+ MFTIME systemTime = 0;
+
+ // Update our state.
+ m_frameStep.state = FrameStepComplete;
+ m_frameStep.sampleNoRef = NULL;
+
+ // Notify the EVR that the frame-step is complete.
+ notifyEvent(EC_STEP_COMPLETE, FALSE, 0); // FALSE = completed (not cancelled)
+
+ // If we are scrubbing (rate == 0), also send the "scrub time" event.
+ if (isScrubbing()) {
+ // Get the time stamp from the sample.
+ hr = sample->GetSampleTime(&sampleTime);
+ if (FAILED(hr)) {
+ // No time stamp. Use the current presentation time.
+ if (m_clock)
+ m_clock->GetCorrelatedTime(0, &sampleTime, &systemTime);
+
+ hr = S_OK; // (Not an error condition.)
+ }
+
+ notifyEvent(EC_SCRUB_TIME, DWORD(sampleTime), DWORD(((sampleTime) >> 32) & 0xffffffff));
+ }
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::cancelFrameStep()
+{
+ FrameStepState oldState = m_frameStep.state;
+
+ m_frameStep.state = FrameStepNone;
+ m_frameStep.steps = 0;
+ m_frameStep.sampleNoRef = NULL;
+ // Don't clear the frame-step queue yet, because we might frame step again.
+
+ if (oldState > FrameStepNone && oldState < FrameStepComplete) {
+ // We were in the middle of frame-stepping when it was cancelled.
+ // Notify the EVR.
+ notifyEvent(EC_STEP_COMPLETE, TRUE, 0); // TRUE = cancelled
+ }
+ return S_OK;
+}
+
+HRESULT EVRCustomPresenter::createOptimalVideoType(IMFMediaType *proposedType, IMFMediaType **optimalType)
+{
+ HRESULT hr = S_OK;
+
+ RECT rcOutput;
+ ZeroMemory(&rcOutput, sizeof(rcOutput));
+
+ MFVideoArea displayArea;
+ ZeroMemory(&displayArea, sizeof(displayArea));
+
+ IMFMediaType *mtOptimal = NULL;
+
+ // Clone the proposed type.
+
+ hr = MFCreateMediaType(&mtOptimal);
+ if (FAILED(hr))
+ goto done;
+
+ hr = proposedType->CopyAllItems(mtOptimal);
+ if (FAILED(hr))
+ goto done;
+
+ // Modify the new type.
+
+ // Set the pixel aspect ratio (PAR) to 1:1 (see assumption #1, above)
+ hr = MFSetAttributeRatio(mtOptimal, MF_MT_PIXEL_ASPECT_RATIO, 1, 1);
+ if (FAILED(hr))
+ goto done;
+
+ UINT64 size;
+ hr = proposedType->GetUINT64(MF_MT_FRAME_SIZE, &size);
+ int width = int(HI32(size));
+ int height = int(LO32(size));
+ rcOutput.left = 0;
+ rcOutput.top = 0;
+ rcOutput.right = width;
+ rcOutput.bottom = height;
+
+ // Set the geometric aperture, and disable pan/scan.
+ displayArea = qt_wmf_makeMFArea(0, 0, rcOutput.right, rcOutput.bottom);
+
+ hr = mtOptimal->SetUINT32(MF_MT_PAN_SCAN_ENABLED, FALSE);
+ if (FAILED(hr))
+ goto done;
+
+ hr = mtOptimal->SetBlob(MF_MT_GEOMETRIC_APERTURE, (UINT8*)&displayArea, sizeof(displayArea));
+ if (FAILED(hr))
+ goto done;
+
+ // Set the pan/scan aperture and the minimum display aperture. We don't care
+ // about them per se, but the mixer will reject the type if these exceed the
+ // frame dimentions.
+ hr = mtOptimal->SetBlob(MF_MT_PAN_SCAN_APERTURE, (UINT8*)&displayArea, sizeof(displayArea));
+ if (FAILED(hr))
+ goto done;
+
+ hr = mtOptimal->SetBlob(MF_MT_MINIMUM_DISPLAY_APERTURE, (UINT8*)&displayArea, sizeof(displayArea));
+ if (FAILED(hr))
+ goto done;
+
+ // Return the pointer to the caller.
+ *optimalType = mtOptimal;
+ (*optimalType)->AddRef();
+
+done:
+ qt_wmf_safeRelease(&mtOptimal);
+ return hr;
+
+}
+
+HRESULT EVRCustomPresenter::setMediaType(IMFMediaType *mediaType)
+{
+ // Note: mediaType can be NULL (to clear the type)
+
+ // Clearing the media type is allowed in any state (including shutdown).
+ if (!mediaType) {
+ qt_wmf_safeRelease(&m_mediaType);
+ releaseResources();
+ m_D3DPresentEngine->setSurfaceFormat(QVideoSurfaceFormat());
+ return S_OK;
+ }
+
+ MFRatio fps = { 0, 0 };
+ QList<IMFSample*> sampleQueue;
+
+ IMFSample *sample = NULL;
+
+ QVideoSurfaceFormat surfaceFormat;
+
+ // Cannot set the media type after shutdown.
+ HRESULT hr = checkShutdown();
+ if (FAILED(hr))
+ goto done;
+
+ // Check if the new type is actually different.
+ // Note: This function safely handles NULL input parameters.
+ if (qt_wmf_areMediaTypesEqual(m_mediaType, mediaType))
+ goto done; // Nothing more to do.
+
+ // We're really changing the type. First get rid of the old type.
+ qt_wmf_safeRelease(&m_mediaType);
+ releaseResources();
+
+ // Initialize the presenter engine with the new media type.
+ // The presenter engine allocates the samples.
+
+ hr = m_D3DPresentEngine->createVideoSamples(mediaType, sampleQueue);
+ if (FAILED(hr))
+ goto done;
+
+ // Mark each sample with our token counter. If this batch of samples becomes
+ // invalid, we increment the counter, so that we know they should be discarded.
+ for (int i = 0; i < sampleQueue.size(); ++i) {
+ sample = sampleQueue.at(i);
+
+ hr = sample->SetUINT32(MFSamplePresenter_SampleCounter, m_tokenCounter);
+ if (FAILED(hr))
+ goto done;
+ }
+
+ // Add the samples to the sample pool.
+ hr = m_samplePool.initialize(sampleQueue);
+ if (FAILED(hr))
+ goto done;
+
+ // Set the frame rate on the scheduler.
+ if (SUCCEEDED(qt_wmf_getFrameRate(mediaType, &fps)) && (fps.Numerator != 0) && (fps.Denominator != 0)) {
+ m_scheduler.setFrameRate(fps);
+ } else {
+ // NOTE: The mixer's proposed type might not have a frame rate, in which case
+ // we'll use an arbitrary default. (Although it's unlikely the video source
+ // does not have a frame rate.)
+ m_scheduler.setFrameRate(g_DefaultFrameRate);
+ }
+
+ // Store the media type.
+ m_mediaType = mediaType;
+ m_mediaType->AddRef();
+
+ // Create the surface format
+ UINT64 size;
+ hr = m_mediaType->GetUINT64(MF_MT_FRAME_SIZE, &size);
+ int width = int(HI32(size));
+ int height = int(LO32(size));
+ surfaceFormat = QVideoSurfaceFormat(QSize(width, height),
+ pixelFormatFromMediaType(m_mediaType),
+ QAbstractVideoBuffer::GLTextureHandle);
+ m_D3DPresentEngine->setSurfaceFormat(surfaceFormat);
+
+done:
+ if (FAILED(hr))
+ releaseResources();
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::isMediaTypeSupported(IMFMediaType *proposed)
+{
+ D3DFORMAT d3dFormat = D3DFMT_UNKNOWN;
+ BOOL compressed = FALSE;
+ MFVideoInterlaceMode interlaceMode = MFVideoInterlace_Unknown;
+ MFVideoArea videoCropArea;
+ UINT32 width = 0, height = 0;
+
+ // Validate the format.
+ HRESULT hr = qt_wmf_getFourCC(proposed, (DWORD*)&d3dFormat);
+ if (FAILED(hr))
+ return hr;
+
+ // Only accept pixel formats supported by the video surface
+ if (!m_supportedGLFormats.contains((DWORD)d3dFormat))
+ return MF_E_INVALIDMEDIATYPE;
+
+ // Reject compressed media types.
+ hr = proposed->IsCompressedFormat(&compressed);
+ if (FAILED(hr))
+ return hr;
+
+ if (compressed)
+ return MF_E_INVALIDMEDIATYPE;
+
+ // The D3DPresentEngine checks whether the format can be used as
+ // the back-buffer format for the swap chains.
+ hr = m_D3DPresentEngine->checkFormat(d3dFormat);
+ if (FAILED(hr))
+ return hr;
+
+ // Reject interlaced formats.
+ hr = proposed->GetUINT32(MF_MT_INTERLACE_MODE, (UINT32*)&interlaceMode);
+ if (FAILED(hr))
+ return hr;
+
+ if (interlaceMode != MFVideoInterlace_Progressive)
+ return MF_E_INVALIDMEDIATYPE;
+
+ hr = MFGetAttributeSize(proposed, MF_MT_FRAME_SIZE, &width, &height);
+ if (FAILED(hr))
+ return hr;
+
+ // Validate the various apertures (cropping regions) against the frame size.
+ // Any of these apertures may be unspecified in the media type, in which case
+ // we ignore it. We just want to reject invalid apertures.
+
+ if (SUCCEEDED(proposed->GetBlob(MF_MT_PAN_SCAN_APERTURE, (UINT8*)&videoCropArea, sizeof(videoCropArea), NULL)))
+ hr = qt_wmf_validateVideoArea(videoCropArea, width, height);
+
+ if (SUCCEEDED(proposed->GetBlob(MF_MT_GEOMETRIC_APERTURE, (UINT8*)&videoCropArea, sizeof(videoCropArea), NULL)))
+ hr = qt_wmf_validateVideoArea(videoCropArea, width, height);
+
+ if (SUCCEEDED(proposed->GetBlob(MF_MT_MINIMUM_DISPLAY_APERTURE, (UINT8*)&videoCropArea, sizeof(videoCropArea), NULL)))
+ hr = qt_wmf_validateVideoArea(videoCropArea, width, height);
+
+ return hr;
+}
+
+void EVRCustomPresenter::processOutputLoop()
+{
+ HRESULT hr = S_OK;
+
+ // Process as many samples as possible.
+ while (hr == S_OK) {
+ // If the mixer doesn't have a new input sample, break from the loop.
+ if (!m_sampleNotify) {
+ hr = MF_E_TRANSFORM_NEED_MORE_INPUT;
+ break;
+ }
+
+ // Try to process a sample.
+ hr = processOutput();
+
+ // NOTE: ProcessOutput can return S_FALSE to indicate it did not
+ // process a sample. If so, break out of the loop.
+ }
+
+ if (hr == MF_E_TRANSFORM_NEED_MORE_INPUT) {
+ // The mixer has run out of input data. Check for end-of-stream.
+ checkEndOfStream();
+ }
+}
+
+HRESULT EVRCustomPresenter::processOutput()
+{
+ HRESULT hr = S_OK;
+ DWORD status = 0;
+ LONGLONG mixerStartTime = 0, mixerEndTime = 0;
+ MFTIME systemTime = 0;
+ BOOL repaint = m_repaint; // Temporarily store this state flag.
+
+ MFT_OUTPUT_DATA_BUFFER dataBuffer;
+ ZeroMemory(&dataBuffer, sizeof(dataBuffer));
+
+ IMFSample *sample = NULL;
+
+ // If the clock is not running, we present the first sample,
+ // and then don't present any more until the clock starts.
+
+ if ((m_renderState != RenderStarted) && !m_repaint && m_prerolled)
+ return S_FALSE;
+
+ // Make sure we have a pointer to the mixer.
+ if (!m_mixer)
+ return MF_E_INVALIDREQUEST;
+
+ // Try to get a free sample from the video sample pool.
+ hr = m_samplePool.getSample(&sample);
+ if (hr == MF_E_SAMPLEALLOCATOR_EMPTY) {
+ // No free samples. Try again when a sample is released.
+ return S_FALSE;
+ } else if (FAILED(hr)) {
+ return hr;
+ }
+
+ // From now on, we have a valid video sample pointer, where the mixer will
+ // write the video data.
+
+ if (m_repaint) {
+ // Repaint request. Ask the mixer for the most recent sample.
+ setDesiredSampleTime(sample, m_scheduler.lastSampleTime(), m_scheduler.frameDuration());
+
+ m_repaint = false; // OK to clear this flag now.
+ } else {
+ // Not a repaint request. Clear the desired sample time; the mixer will
+ // give us the next frame in the stream.
+ clearDesiredSampleTime(sample);
+
+ if (m_clock) {
+ // Latency: Record the starting time for ProcessOutput.
+ m_clock->GetCorrelatedTime(0, &mixerStartTime, &systemTime);
+ }
+ }
+
+ // Now we are ready to get an output sample from the mixer.
+ dataBuffer.dwStreamID = 0;
+ dataBuffer.pSample = sample;
+ dataBuffer.dwStatus = 0;
+
+ hr = m_mixer->ProcessOutput(0, 1, &dataBuffer, &status);
+
+ if (FAILED(hr)) {
+ // Return the sample to the pool.
+ HRESULT hr2 = m_samplePool.returnSample(sample);
+ if (FAILED(hr2)) {
+ hr = hr2;
+ goto done;
+ }
+ // Handle some known error codes from ProcessOutput.
+ if (hr == MF_E_TRANSFORM_TYPE_NOT_SET) {
+ // The mixer's format is not set. Negotiate a new format.
+ hr = renegotiateMediaType();
+ } else if (hr == MF_E_TRANSFORM_STREAM_CHANGE) {
+ // There was a dynamic media type change. Clear our media type.
+ setMediaType(NULL);
+ } else if (hr == MF_E_TRANSFORM_NEED_MORE_INPUT) {
+ // The mixer needs more input.
+ // We have to wait for the mixer to get more input.
+ m_sampleNotify = false;
+ }
+ } else {
+ // We got an output sample from the mixer.
+
+ if (m_clock && !repaint) {
+ // Latency: Record the ending time for the ProcessOutput operation,
+ // and notify the EVR of the latency.
+
+ m_clock->GetCorrelatedTime(0, &mixerEndTime, &systemTime);
+
+ LONGLONG latencyTime = mixerEndTime - mixerStartTime;
+ notifyEvent(EC_PROCESSING_LATENCY, (LONG_PTR)&latencyTime, 0);
+ }
+
+ // Set up notification for when the sample is released.
+ hr = trackSample(sample);
+ if (FAILED(hr))
+ goto done;
+
+ // Schedule the sample.
+ if ((m_frameStep.state == FrameStepNone) || repaint) {
+ hr = deliverSample(sample, repaint);
+ if (FAILED(hr))
+ goto done;
+ } else {
+ // We are frame-stepping (and this is not a repaint request).
+ hr = deliverFrameStepSample(sample);
+ if (FAILED(hr))
+ goto done;
+ }
+
+ m_prerolled = true; // We have presented at least one sample now.
+ }
+
+done:
+ qt_wmf_safeRelease(&sample);
+
+ // Important: Release any events returned from the ProcessOutput method.
+ qt_wmf_safeRelease(&dataBuffer.pEvents);
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::deliverSample(IMFSample *sample, bool repaint)
+{
+ // If we are not actively playing, OR we are scrubbing (rate = 0) OR this is a
+ // repaint request, then we need to present the sample immediately. Otherwise,
+ // schedule it normally.
+
+ bool presentNow = ((m_renderState != RenderStarted) || isScrubbing() || repaint);
+
+ HRESULT hr = m_scheduler.scheduleSample(sample, presentNow);
+
+ if (FAILED(hr)) {
+ // Notify the EVR that we have failed during streaming. The EVR will notify the
+ // pipeline.
+
+ notifyEvent(EC_ERRORABORT, hr, 0);
+ }
+
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::deliverFrameStepSample(IMFSample *sample)
+{
+ HRESULT hr = S_OK;
+ IUnknown *unk = NULL;
+
+ // For rate 0, discard any sample that ends earlier than the clock time.
+ if (isScrubbing() && m_clock && qt_wmf_isSampleTimePassed(m_clock, sample)) {
+ // Discard this sample.
+ } else if (m_frameStep.state >= FrameStepScheduled) {
+ // A frame was already submitted. Put this sample on the frame-step queue,
+ // in case we are asked to step to the next frame. If frame-stepping is
+ // cancelled, this sample will be processed normally.
+ sample->AddRef();
+ m_frameStep.samples.append(sample);
+ } else {
+ // We're ready to frame-step.
+
+ // Decrement the number of steps.
+ if (m_frameStep.steps > 0)
+ m_frameStep.steps--;
+
+ if (m_frameStep.steps > 0) {
+ // This is not the last step. Discard this sample.
+ } else if (m_frameStep.state == FrameStepWaitingStart) {
+ // This is the right frame, but the clock hasn't started yet. Put the
+ // sample on the frame-step queue. When the clock starts, the sample
+ // will be processed.
+ sample->AddRef();
+ m_frameStep.samples.append(sample);
+ } else {
+ // This is the right frame *and* the clock has started. Deliver this sample.
+ hr = deliverSample(sample, false);
+ if (FAILED(hr))
+ goto done;
+
+ // Query for IUnknown so that we can identify the sample later.
+ // Per COM rules, an object always returns the same pointer when QI'ed for IUnknown.
+ hr = sample->QueryInterface(IID_PPV_ARGS(&unk));
+ if (FAILED(hr))
+ goto done;
+
+ m_frameStep.sampleNoRef = (DWORD_PTR)unk; // No add-ref.
+
+ // NOTE: We do not AddRef the IUnknown pointer, because that would prevent the
+ // sample from invoking the OnSampleFree callback after the sample is presented.
+ // We use this IUnknown pointer purely to identify the sample later; we never
+ // attempt to dereference the pointer.
+
+ m_frameStep.state = FrameStepScheduled;
+ }
+ }
+done:
+ qt_wmf_safeRelease(&unk);
+ return hr;
+}
+
+HRESULT EVRCustomPresenter::trackSample(IMFSample *sample)
+{
+ IMFTrackedSample *tracked = NULL;
+
+ HRESULT hr = sample->QueryInterface(IID_PPV_ARGS(&tracked));
+
+ if (SUCCEEDED(hr))
+ hr = tracked->SetAllocator(&m_sampleFreeCB, NULL);
+
+ qt_wmf_safeRelease(&tracked);
+ return hr;
+}
+
+void EVRCustomPresenter::releaseResources()
+{
+ // Increment the token counter to indicate that all existing video samples
+ // are "stale." As these samples get released, we'll dispose of them.
+ //
+ // Note: The token counter is required because the samples are shared
+ // between more than one thread, and they are returned to the presenter
+ // through an asynchronous callback (onSampleFree). Without the token, we
+ // might accidentally re-use a stale sample after the ReleaseResources
+ // method returns.
+
+ m_tokenCounter++;
+
+ flush();
+
+ m_samplePool.clear();
+
+ m_D3DPresentEngine->releaseResources();
+}
+
+HRESULT EVRCustomPresenter::onSampleFree(IMFAsyncResult *result)
+{
+ IUnknown *object = NULL;
+ IMFSample *sample = NULL;
+ IUnknown *unk = NULL;
+
+ // Get the sample from the async result object.
+ HRESULT hr = result->GetObject(&object);
+ if (FAILED(hr))
+ goto done;
+
+ hr = object->QueryInterface(IID_PPV_ARGS(&sample));
+ if (FAILED(hr))
+ goto done;
+
+ // If this sample was submitted for a frame-step, the frame step operation
+ // is complete.
+
+ if (m_frameStep.state == FrameStepScheduled) {
+ // Query the sample for IUnknown and compare it to our cached value.
+ hr = sample->QueryInterface(IID_PPV_ARGS(&unk));
+ if (FAILED(hr))
+ goto done;
+
+ if (m_frameStep.sampleNoRef == (DWORD_PTR)unk) {
+ // Notify the EVR.
+ hr = completeFrameStep(sample);
+ if (FAILED(hr))
+ goto done;
+ }
+
+ // Note: Although object is also an IUnknown pointer, it is not
+ // guaranteed to be the exact pointer value returned through
+ // QueryInterface. Therefore, the second QueryInterface call is
+ // required.
+ }
+
+ m_mutex.lock();
+
+ UINT32 token = MFGetAttributeUINT32(sample, MFSamplePresenter_SampleCounter, (UINT32)-1);
+
+ if (token == m_tokenCounter) {
+ // Return the sample to the sample pool.
+ hr = m_samplePool.returnSample(sample);
+ if (SUCCEEDED(hr)) {
+ // A free sample is available. Process more data if possible.
+ processOutputLoop();
+ }
+ }
+
+ m_mutex.unlock();
+
+done:
+ if (FAILED(hr))
+ notifyEvent(EC_ERRORABORT, hr, 0);
+ qt_wmf_safeRelease(&object);
+ qt_wmf_safeRelease(&sample);
+ qt_wmf_safeRelease(&unk);
+ return hr;
+}
+
+void EVRCustomPresenter::startSurface()
+{
+ if (m_D3DPresentEngine)
+ m_D3DPresentEngine->start();
+}
+
+void EVRCustomPresenter::stopSurface()
+{
+ if (m_D3DPresentEngine)
+ m_D3DPresentEngine->stop();
+}
+
+float EVRCustomPresenter::getMaxRate(bool thin)
+{
+ // Non-thinned:
+ // If we have a valid frame rate and a monitor refresh rate, the maximum
+ // playback rate is equal to the refresh rate. Otherwise, the maximum rate
+ // is unbounded (FLT_MAX).
+
+ // Thinned: The maximum rate is unbounded.
+
+ float maxRate = FLT_MAX;
+ MFRatio fps = { 0, 0 };
+ UINT monitorRateHz = 0;
+
+ if (!thin && m_mediaType) {
+ qt_wmf_getFrameRate(m_mediaType, &fps);
+ monitorRateHz = m_D3DPresentEngine->refreshRate();
+
+ if (fps.Denominator && fps.Numerator && monitorRateHz) {
+ // Max Rate = Refresh Rate / Frame Rate
+ maxRate = (float)MulDiv(monitorRateHz, fps.Denominator, fps.Numerator);
+ }
+ }
+
+ return maxRate;
+}
+
+HRESULT setDesiredSampleTime(IMFSample *sample, const LONGLONG &sampleTime, const LONGLONG &duration)
+{
+ if (!sample)
+ return E_POINTER;
+
+ HRESULT hr = S_OK;
+ IMFDesiredSample *desired = NULL;
+
+ hr = sample->QueryInterface(IID_PPV_ARGS(&desired));
+ if (SUCCEEDED(hr))
+ desired->SetDesiredSampleTimeAndDuration(sampleTime, duration);
+
+ qt_wmf_safeRelease(&desired);
+ return hr;
+}
+
+HRESULT clearDesiredSampleTime(IMFSample *sample)
+{
+ if (!sample)
+ return E_POINTER;
+
+ HRESULT hr = S_OK;
+
+ IMFDesiredSample *desired = NULL;
+ IUnknown *unkSwapChain = NULL;
+
+ // We store some custom attributes on the sample, so we need to cache them
+ // and reset them.
+ //
+ // This works around the fact that IMFDesiredSample::Clear() removes all of the
+ // attributes from the sample.
+
+ UINT32 counter = MFGetAttributeUINT32(sample, MFSamplePresenter_SampleCounter, (UINT32)-1);
+
+ sample->GetUnknown(MFSamplePresenter_SampleSwapChain, IID_IUnknown, (void**)&unkSwapChain);
+
+ hr = sample->QueryInterface(IID_PPV_ARGS(&desired));
+ if (SUCCEEDED(hr)) {
+ desired->Clear();
+
+ hr = sample->SetUINT32(MFSamplePresenter_SampleCounter, counter);
+ if (FAILED(hr))
+ goto done;
+
+ if (unkSwapChain) {
+ hr = sample->SetUnknown(MFSamplePresenter_SampleSwapChain, unkSwapChain);
+ if (FAILED(hr))
+ goto done;
+ }
+ }
+
+done:
+ qt_wmf_safeRelease(&unkSwapChain);
+ qt_wmf_safeRelease(&desired);
+ return hr;
+}
+
+HRESULT setMixerSourceRect(IMFTransform *mixer, const MFVideoNormalizedRect &sourceRect)
+{
+ if (!mixer)
+ return E_POINTER;
+
+ IMFAttributes *attributes = NULL;
+
+ HRESULT hr = mixer->GetAttributes(&attributes);
+ if (SUCCEEDED(hr)) {
+ hr = attributes->SetBlob(VIDEO_ZOOM_RECT, (const UINT8*)&sourceRect, sizeof(sourceRect));
+ attributes->Release();
+ }
+ return hr;
+}
+
+DWORD getFourCCFromPixelFormat(QVideoFrame::PixelFormat pixelFormat)
+{
+ DWORD fourCC = 0;
+ switch (pixelFormat) {
+ case QVideoFrame::Format_ARGB32:
+ case QVideoFrame::Format_ARGB32_Premultiplied:
+ fourCC = MFVideoFormat_ARGB32.Data1;
+ break;
+ case QVideoFrame::Format_RGB32:
+ fourCC = MFVideoFormat_RGB32.Data1;
+ break;
+ case QVideoFrame::Format_RGB24:
+ fourCC = MFVideoFormat_RGB24.Data1;
+ break;
+ case QVideoFrame::Format_RGB565:
+ fourCC = MFVideoFormat_RGB565.Data1;
+ break;
+ case QVideoFrame::Format_RGB555:
+ fourCC = MFVideoFormat_RGB555.Data1;
+ break;
+ case QVideoFrame::Format_AYUV444:
+ case QVideoFrame::Format_AYUV444_Premultiplied:
+ fourCC = MFVideoFormat_AYUV.Data1;
+ break;
+ case QVideoFrame::Format_YUV420P:
+ fourCC = MFVideoFormat_I420.Data1;
+ break;
+ case QVideoFrame::Format_UYVY:
+ fourCC = MFVideoFormat_UYVY.Data1;
+ break;
+ case QVideoFrame::Format_YV12:
+ fourCC = MFVideoFormat_YV12.Data1;
+ break;
+ case QVideoFrame::Format_NV12:
+ fourCC = MFVideoFormat_NV12.Data1;
+ break;
+ default:
+ break;
+ }
+ return fourCC;
+}
+
+static QVideoFrame::PixelFormat pixelFormatFromMediaType(IMFMediaType *type)
+{
+ GUID majorType;
+ if (FAILED(type->GetMajorType(&majorType)))
+ return QVideoFrame::Format_Invalid;
+ if (majorType != MFMediaType_Video)
+ return QVideoFrame::Format_Invalid;
+
+ GUID subType;
+ if (FAILED(type->GetGUID(MF_MT_SUBTYPE, &subType)))
+ return QVideoFrame::Format_Invalid;
+
+ if (subType == MFVideoFormat_RGB32)
+ return QVideoFrame::Format_RGB32;
+
+ return QVideoFrame::Format_Invalid;
+}
+
+
+EVRCustomPresenterActivate::EVRCustomPresenterActivate()
+ : MFAbstractActivate()
+ , m_presenter(0)
+ , m_surface(0)
+{ }
+
+HRESULT EVRCustomPresenterActivate::ActivateObject(REFIID riid, void **ppv)
+{
+ if (!ppv)
+ return E_INVALIDARG;
+ QMutexLocker locker(&m_mutex);
+ if (!m_presenter) {
+ m_presenter = new EVRCustomPresenter;
+ if (m_surface)
+ m_presenter->setSurface(m_surface);
+ }
+ return m_presenter->QueryInterface(riid, ppv);
+}
+
+HRESULT EVRCustomPresenterActivate::ShutdownObject()
+{
+ // The presenter does not implement IMFShutdown so
+ // this function is the same as DetachObject()
+ return DetachObject();
+}
+
+HRESULT EVRCustomPresenterActivate::DetachObject()
+{
+ QMutexLocker locker(&m_mutex);
+ if (m_presenter) {
+ m_presenter->Release();
+ m_presenter = 0;
+ }
+ return S_OK;
+}
+
+void EVRCustomPresenterActivate::setSurface(QAbstractVideoSurface *surface)
+{
+ QMutexLocker locker(&m_mutex);
+ if (m_surface == surface)
+ return;
+
+ m_surface = surface;
+
+ if (m_presenter)
+ m_presenter->setSurface(surface);
+}
+
+void EVRCustomPresenterActivate::supportedFormatsChanged()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (m_presenter)
+ m_presenter->supportedFormatsChanged();
+}
diff --git a/src/plugins/wmf/evrcustompresenter.h b/src/plugins/wmf/evrcustompresenter.h
new file mode 100644
index 000000000..519e9a7b4
--- /dev/null
+++ b/src/plugins/wmf/evrcustompresenter.h
@@ -0,0 +1,333 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EVRCUSTOMPRESENTER_H
+#define EVRCUSTOMPRESENTER_H
+
+#include <QObject>
+#include <qmutex.h>
+#include <qqueue.h>
+#include <evr.h>
+#include "mfactivate.h"
+
+QT_BEGIN_NAMESPACE
+
+class D3DPresentEngine;
+class QAbstractVideoSurface;
+
+class Scheduler
+{
+public:
+ enum ScheduleEvent
+ {
+ Terminate = WM_USER,
+ Schedule = WM_USER + 1,
+ Flush = WM_USER + 2
+ };
+
+ Scheduler();
+ ~Scheduler();
+
+ void setCallback(QObject *cb) {
+ m_CB = cb;
+ }
+
+ void setFrameRate(const MFRatio &fps);
+ void setClockRate(float rate) { m_playbackRate = rate; }
+
+ const LONGLONG &lastSampleTime() const { return m_lastSampleTime; }
+ const LONGLONG &frameDuration() const { return m_perFrameInterval; }
+
+ HRESULT startScheduler(IMFClock *clock);
+ HRESULT stopScheduler();
+
+ HRESULT scheduleSample(IMFSample *sample, bool presentNow);
+ HRESULT processSamplesInQueue(LONG *nextSleep);
+ HRESULT processSample(IMFSample *sample, LONG *nextSleep);
+ HRESULT flush();
+
+ // ThreadProc for the scheduler thread.
+ static DWORD WINAPI schedulerThreadProc(LPVOID parameter);
+
+private:
+ DWORD schedulerThreadProcPrivate();
+
+ QQueue<IMFSample*> m_scheduledSamples; // Samples waiting to be presented.
+
+ IMFClock *m_clock; // Presentation clock. Can be NULL.
+ QObject *m_CB; // Weak reference; do not delete.
+
+ DWORD m_threadID;
+ HANDLE m_schedulerThread;
+ HANDLE m_threadReadyEvent;
+ HANDLE m_flushEvent;
+
+ float m_playbackRate;
+ MFTIME m_perFrameInterval; // Duration of each frame.
+ LONGLONG m_perFrame_1_4th; // 1/4th of the frame duration.
+ MFTIME m_lastSampleTime; // Most recent sample time.
+
+ QMutex m_mutex;
+};
+
+class SamplePool
+{
+public:
+ SamplePool();
+ ~SamplePool();
+
+ HRESULT initialize(QList<IMFSample*> &samples);
+ HRESULT clear();
+
+ HRESULT getSample(IMFSample **sample);
+ HRESULT returnSample(IMFSample *sample);
+ BOOL areSamplesPending();
+
+private:
+ QMutex m_mutex;
+ QList<IMFSample*> m_videoSampleQueue;
+ bool m_initialized;
+ DWORD m_pending;
+};
+
+class EVRCustomPresenter
+ : public QObject
+ , public IMFVideoDeviceID
+ , public IMFVideoPresenter // Inherits IMFClockStateSink
+ , public IMFRateSupport
+ , public IMFGetService
+ , public IMFTopologyServiceLookupClient
+{
+ Q_OBJECT
+
+public:
+ // Defines the state of the presenter.
+ enum RenderState
+ {
+ RenderStarted = 1,
+ RenderStopped,
+ RenderPaused,
+ RenderShutdown // Initial state.
+ };
+
+ // Defines the presenter's state with respect to frame-stepping.
+ enum FrameStepState
+ {
+ FrameStepNone, // Not frame stepping.
+ FrameStepWaitingStart, // Frame stepping, but the clock is not started.
+ FrameStepPending, // Clock is started. Waiting for samples.
+ FrameStepScheduled, // Submitted a sample for rendering.
+ FrameStepComplete // Sample was rendered.
+ };
+
+ EVRCustomPresenter();
+ ~EVRCustomPresenter();
+
+ // IUnknown methods
+ STDMETHODIMP QueryInterface(REFIID riid, void ** ppv);
+ STDMETHODIMP_(ULONG) AddRef();
+ STDMETHODIMP_(ULONG) Release();
+
+ // IMFGetService methods
+ STDMETHODIMP GetService(REFGUID guidService, REFIID riid, LPVOID *ppvObject);
+
+ // IMFVideoPresenter methods
+ STDMETHODIMP ProcessMessage(MFVP_MESSAGE_TYPE message, ULONG_PTR param);
+ STDMETHODIMP GetCurrentMediaType(IMFVideoMediaType** mediaType);
+
+ // IMFClockStateSink methods
+ STDMETHODIMP OnClockStart(MFTIME systemTime, LONGLONG clockStartOffset);
+ STDMETHODIMP OnClockStop(MFTIME systemTime);
+ STDMETHODIMP OnClockPause(MFTIME systemTime);
+ STDMETHODIMP OnClockRestart(MFTIME systemTime);
+ STDMETHODIMP OnClockSetRate(MFTIME systemTime, float rate);
+
+ // IMFRateSupport methods
+ STDMETHODIMP GetSlowestRate(MFRATE_DIRECTION direction, BOOL thin, float *rate);
+ STDMETHODIMP GetFastestRate(MFRATE_DIRECTION direction, BOOL thin, float *rate);
+ STDMETHODIMP IsRateSupported(BOOL thin, float rate, float *nearestSupportedRate);
+
+ // IMFVideoDeviceID methods
+ STDMETHODIMP GetDeviceID(IID* deviceID);
+
+ // IMFTopologyServiceLookupClient methods
+ STDMETHODIMP InitServicePointers(IMFTopologyServiceLookup *lookup);
+ STDMETHODIMP ReleaseServicePointers();
+
+ void supportedFormatsChanged();
+ void setSurface(QAbstractVideoSurface *surface);
+
+private Q_SLOTS:
+ void startSurface();
+ void stopSurface();
+
+private:
+ HRESULT checkShutdown() const
+ {
+ if (m_renderState == RenderShutdown)
+ return MF_E_SHUTDOWN;
+ else
+ return S_OK;
+ }
+
+ // The "active" state is started or paused.
+ inline bool isActive() const
+ {
+ return ((m_renderState == RenderStarted) || (m_renderState == RenderPaused));
+ }
+
+ // Scrubbing occurs when the frame rate is 0.
+ inline bool isScrubbing() const { return m_playbackRate == 0.0f; }
+
+ // Send an event to the EVR through its IMediaEventSink interface.
+ void notifyEvent(long eventCode, LONG_PTR param1, LONG_PTR param2)
+ {
+ if (m_mediaEventSink)
+ m_mediaEventSink->Notify(eventCode, param1, param2);
+ }
+
+ float getMaxRate(bool thin);
+
+ // Mixer operations
+ HRESULT configureMixer(IMFTransform *mixer);
+
+ // Formats
+ HRESULT createOptimalVideoType(IMFMediaType* proposed, IMFMediaType **optimal);
+ HRESULT setMediaType(IMFMediaType *mediaType);
+ HRESULT isMediaTypeSupported(IMFMediaType *mediaType);
+
+ // Message handlers
+ HRESULT flush();
+ HRESULT renegotiateMediaType();
+ HRESULT processInputNotify();
+ HRESULT beginStreaming();
+ HRESULT endStreaming();
+ HRESULT checkEndOfStream();
+
+ // Managing samples
+ void processOutputLoop();
+ HRESULT processOutput();
+ HRESULT deliverSample(IMFSample *sample, bool repaint);
+ HRESULT trackSample(IMFSample *sample);
+ void releaseResources();
+
+ // Frame-stepping
+ HRESULT prepareFrameStep(DWORD steps);
+ HRESULT startFrameStep();
+ HRESULT deliverFrameStepSample(IMFSample *sample);
+ HRESULT completeFrameStep(IMFSample *sample);
+ HRESULT cancelFrameStep();
+
+ // Callback when a video sample is released.
+ HRESULT onSampleFree(IMFAsyncResult *result);
+ AsyncCallback<EVRCustomPresenter> m_sampleFreeCB;
+
+ // Holds information related to frame-stepping.
+ struct FrameStep
+ {
+ FrameStep()
+ : state(FrameStepNone)
+ , steps(0)
+ , sampleNoRef(NULL)
+ {
+ }
+
+ FrameStepState state;
+ QList<IMFSample*> samples;
+ DWORD steps;
+ DWORD_PTR sampleNoRef;
+ };
+
+ long m_refCount;
+
+ RenderState m_renderState;
+ FrameStep m_frameStep;
+
+ QMutex m_mutex;
+
+ // Samples and scheduling
+ Scheduler m_scheduler; // Manages scheduling of samples.
+ SamplePool m_samplePool; // Pool of allocated samples.
+ DWORD m_tokenCounter; // Counter. Incremented whenever we create new samples.
+
+ // Rendering state
+ bool m_sampleNotify; // Did the mixer signal it has an input sample?
+ bool m_repaint; // Do we need to repaint the last sample?
+ bool m_prerolled; // Have we presented at least one sample?
+ bool m_endStreaming; // Did we reach the end of the stream (EOS)?
+
+ MFVideoNormalizedRect m_sourceRect;
+ float m_playbackRate;
+
+ D3DPresentEngine *m_D3DPresentEngine; // Rendering engine. (Never null if the constructor succeeds.)
+
+ IMFClock *m_clock; // The EVR's clock.
+ IMFTransform *m_mixer; // The EVR's mixer.
+ IMediaEventSink *m_mediaEventSink; // The EVR's event-sink interface.
+ IMFMediaType *m_mediaType; // Output media type
+
+ QAbstractVideoSurface *m_surface;
+ QList<DWORD> m_supportedGLFormats;
+};
+
+class EVRCustomPresenterActivate : public MFAbstractActivate
+{
+public:
+ EVRCustomPresenterActivate();
+ ~EVRCustomPresenterActivate()
+ { }
+
+ STDMETHODIMP ActivateObject(REFIID riid, void **ppv);
+ STDMETHODIMP ShutdownObject();
+ STDMETHODIMP DetachObject();
+
+ void setSurface(QAbstractVideoSurface *surface);
+ void supportedFormatsChanged();
+
+private:
+ EVRCustomPresenter *m_presenter;
+ QAbstractVideoSurface *m_surface;
+ QMutex m_mutex;
+};
+
+QT_END_NAMESPACE
+
+#endif // EVRCUSTOMPRESENTER_H
diff --git a/src/plugins/wmf/evrd3dpresentengine.cpp b/src/plugins/wmf/evrd3dpresentengine.cpp
new file mode 100644
index 000000000..c67b5d448
--- /dev/null
+++ b/src/plugins/wmf/evrd3dpresentengine.cpp
@@ -0,0 +1,580 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "evrd3dpresentengine.h"
+
+#include "mfglobal.h"
+
+#include <qtgui/qguiapplication.h>
+#include <qpa/qplatformnativeinterface.h>
+#include <qtgui/qopenglcontext.h>
+#include <qabstractvideobuffer.h>
+#include <QAbstractVideoSurface>
+#include <qvideoframe.h>
+#include <QDebug>
+#include <qopenglcontext.h>
+#include <qwindow.h>
+
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
+#include <GLES2/gl2.h>
+#include <d3d9.h>
+#include <dxva2api.h>
+#include <WinUser.h>
+#include <evr.h>
+
+QT_USE_NAMESPACE
+
+static const DWORD PRESENTER_BUFFER_COUNT = 3;
+
+class TextureVideoBuffer : public QAbstractVideoBuffer
+{
+public:
+ TextureVideoBuffer(GLuint textureId)
+ : QAbstractVideoBuffer(GLTextureHandle)
+ , m_textureId(textureId)
+ {}
+
+ ~TextureVideoBuffer() {}
+
+ MapMode mapMode() const { return NotMapped; }
+ uchar *map(MapMode, int*, int*) { return 0; }
+ void unmap() {}
+
+ QVariant handle() const
+ {
+ return QVariant::fromValue<unsigned int>(m_textureId);
+ }
+
+private:
+ GLuint m_textureId;
+};
+
+
+D3DPresentEngine::D3DPresentEngine()
+ : QObject()
+ , m_mutex(QMutex::Recursive)
+ , m_deviceResetToken(0)
+ , m_D3D9(0)
+ , m_device(0)
+ , m_deviceManager(0)
+ , m_surface(0)
+ , m_glContext(0)
+ , m_offscreenSurface(0)
+ , m_eglDisplay(0)
+ , m_eglConfig(0)
+ , m_eglSurface(0)
+ , m_glTexture(0)
+ , m_texture(0)
+{
+ ZeroMemory(&m_displayMode, sizeof(m_displayMode));
+
+ HRESULT hr = initializeD3D();
+
+ if (SUCCEEDED(hr)) {
+ hr = createD3DDevice();
+ if (FAILED(hr))
+ qWarning("Failed to create D3D device");
+ } else {
+ qWarning("Failed to initialize D3D");
+ }
+}
+
+D3DPresentEngine::~D3DPresentEngine()
+{
+ qt_wmf_safeRelease(&m_texture);
+ qt_wmf_safeRelease(&m_device);
+ qt_wmf_safeRelease(&m_deviceManager);
+ qt_wmf_safeRelease(&m_D3D9);
+
+ if (m_eglSurface) {
+ eglReleaseTexImage(m_eglDisplay, m_eglSurface, EGL_BACK_BUFFER);
+ eglDestroySurface(m_eglDisplay, m_eglSurface);
+ m_eglSurface = NULL;
+ }
+ if (m_glTexture)
+ glDeleteTextures(1, &m_glTexture);
+
+ delete m_glContext;
+ delete m_offscreenSurface;
+}
+
+void D3DPresentEngine::start()
+{
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_surfaceFormat.isValid())
+ return;
+
+ if (!m_texture)
+ createOffscreenTexture();
+
+ if (m_surface && !m_surface->isActive())
+ m_surface->start(m_surfaceFormat);
+}
+
+void D3DPresentEngine::stop()
+{
+ QMutexLocker locker(&m_mutex);
+ if (m_surface && m_surface->isActive())
+ m_surface->stop();
+}
+
+HRESULT D3DPresentEngine::getService(REFGUID, REFIID riid, void** ppv)
+{
+ HRESULT hr = S_OK;
+
+ if (riid == __uuidof(IDirect3DDeviceManager9)) {
+ if (m_deviceManager == NULL) {
+ hr = MF_E_UNSUPPORTED_SERVICE;
+ } else {
+ *ppv = m_deviceManager;
+ m_deviceManager->AddRef();
+ }
+ } else {
+ hr = MF_E_UNSUPPORTED_SERVICE;
+ }
+
+ return hr;
+}
+
+HRESULT D3DPresentEngine::checkFormat(D3DFORMAT format)
+{
+ HRESULT hr = S_OK;
+
+ UINT uAdapter = D3DADAPTER_DEFAULT;
+ D3DDEVTYPE type = D3DDEVTYPE_HAL;
+
+ D3DDISPLAYMODE mode;
+ D3DDEVICE_CREATION_PARAMETERS params;
+
+ // Our shared D3D/EGL surface only supports RGB32,
+ // reject all other formats
+ if (format != D3DFMT_X8R8G8B8)
+ return MF_E_INVALIDMEDIATYPE;
+
+ if (m_device) {
+ hr = m_device->GetCreationParameters(&params);
+ if (FAILED(hr))
+ return hr;
+
+ uAdapter = params.AdapterOrdinal;
+ type = params.DeviceType;
+ }
+
+ hr = m_D3D9->GetAdapterDisplayMode(uAdapter, &mode);
+ if (FAILED(hr))
+ return hr;
+
+ return m_D3D9->CheckDeviceType(uAdapter, type, mode.Format, format, TRUE);
+}
+
+HRESULT D3DPresentEngine::createVideoSamples(IMFMediaType *format, QList<IMFSample*> &videoSampleQueue)
+{
+ if (!format)
+ return MF_E_UNEXPECTED;
+
+ HRESULT hr = S_OK;
+ D3DPRESENT_PARAMETERS pp;
+
+ IDirect3DSwapChain9 *swapChain = NULL;
+ IMFSample *videoSample = NULL;
+
+ QMutexLocker locker(&m_mutex);
+
+ releaseResources();
+
+ // Get the swap chain parameters from the media type.
+ hr = getSwapChainPresentParameters(format, &pp);
+ if (FAILED(hr))
+ goto done;
+
+ // Create the video samples.
+ for (int i = 0; i < PRESENTER_BUFFER_COUNT; i++) {
+ // Create a new swap chain.
+ hr = m_device->CreateAdditionalSwapChain(&pp, &swapChain);
+ if (FAILED(hr))
+ goto done;
+
+ // Create the video sample from the swap chain.
+ hr = createD3DSample(swapChain, &videoSample);
+ if (FAILED(hr))
+ goto done;
+
+ // Add it to the list.
+ videoSample->AddRef();
+ videoSampleQueue.append(videoSample);
+
+ // Set the swap chain pointer as a custom attribute on the sample. This keeps
+ // a reference count on the swap chain, so that the swap chain is kept alive
+ // for the duration of the sample's lifetime.
+ hr = videoSample->SetUnknown(MFSamplePresenter_SampleSwapChain, swapChain);
+ if (FAILED(hr))
+ goto done;
+
+ qt_wmf_safeRelease(&videoSample);
+ qt_wmf_safeRelease(&swapChain);
+ }
+
+done:
+ if (FAILED(hr))
+ releaseResources();
+
+ qt_wmf_safeRelease(&swapChain);
+ qt_wmf_safeRelease(&videoSample);
+ return hr;
+}
+
+void D3DPresentEngine::releaseResources()
+{
+}
+
+void D3DPresentEngine::presentSample(void *opaque, qint64)
+{
+ HRESULT hr = S_OK;
+
+ IMFSample *sample = reinterpret_cast<IMFSample*>(opaque);
+ IMFMediaBuffer* buffer = NULL;
+ IDirect3DSurface9* surface = NULL;
+
+ if (sample) {
+ // Get the buffer from the sample.
+ hr = sample->GetBufferByIndex(0, &buffer);
+ if (FAILED(hr))
+ goto done;
+
+ // Get the surface from the buffer.
+ hr = MFGetService(buffer, MR_BUFFER_SERVICE, IID_PPV_ARGS(&surface));
+ if (FAILED(hr))
+ goto done;
+ }
+
+ if (surface && updateTexture(surface)) {
+ m_surface->present(QVideoFrame(new TextureVideoBuffer(m_glTexture),
+ m_surfaceFormat.frameSize(),
+ m_surfaceFormat.pixelFormat()));
+ }
+
+done:
+ qt_wmf_safeRelease(&surface);
+ qt_wmf_safeRelease(&buffer);
+ qt_wmf_safeRelease(&sample);
+}
+
+void D3DPresentEngine::setSurface(QAbstractVideoSurface *surface)
+{
+ QMutexLocker locker(&m_mutex);
+ m_surface = surface;
+}
+
+void D3DPresentEngine::setSurfaceFormat(const QVideoSurfaceFormat &format)
+{
+ QMutexLocker locker(&m_mutex);
+ m_surfaceFormat = format;
+}
+
+void D3DPresentEngine::createOffscreenTexture()
+{
+ // First, check if we have a context on this thread
+ QOpenGLContext *currentContext = QOpenGLContext::currentContext();
+
+ if (!currentContext) {
+ //Create OpenGL context and set share context from surface
+ QOpenGLContext *shareContext = qobject_cast<QOpenGLContext*>(m_surface->property("GLContext").value<QObject*>());
+ if (!shareContext)
+ return;
+
+ m_offscreenSurface = new QWindow;
+ m_offscreenSurface->setSurfaceType(QWindow::OpenGLSurface);
+ //Needs geometry to be a valid surface, but size is not important
+ m_offscreenSurface->setGeometry(-1, -1, 1, 1);
+ m_offscreenSurface->create();
+
+ m_glContext = new QOpenGLContext;
+ m_glContext->setFormat(m_offscreenSurface->requestedFormat());
+ m_glContext->setShareContext(shareContext);
+
+ if (!m_glContext->create()) {
+ delete m_glContext;
+ delete m_offscreenSurface;
+ m_glContext = 0;
+ m_offscreenSurface = 0;
+ return;
+ }
+
+ currentContext = m_glContext;
+ }
+
+ if (m_glContext)
+ m_glContext->makeCurrent(m_offscreenSurface);
+
+ QPlatformNativeInterface *nativeInterface = QGuiApplication::platformNativeInterface();
+ m_eglDisplay = static_cast<EGLDisplay*>(
+ nativeInterface->nativeResourceForContext("eglDisplay", currentContext));
+ m_eglConfig = static_cast<EGLDisplay*>(
+ nativeInterface->nativeResourceForContext("eglConfig", currentContext));
+
+ glGenTextures(1, &m_glTexture);
+
+
+ int w = m_surfaceFormat.frameWidth();
+ int h = m_surfaceFormat.frameHeight();
+
+ EGLint attribs[] = {
+ EGL_WIDTH, w,
+ EGL_HEIGHT, h,
+ EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGB,
+ EGL_TEXTURE_TARGET, EGL_TEXTURE_2D,
+ EGL_NONE
+ };
+
+ EGLSurface pbuffer = eglCreatePbufferSurface(m_eglDisplay, m_eglConfig, attribs);
+
+ HANDLE share_handle = 0;
+ PFNEGLQUERYSURFACEPOINTERANGLEPROC eglQuerySurfacePointerANGLE =
+ reinterpret_cast<PFNEGLQUERYSURFACEPOINTERANGLEPROC>(eglGetProcAddress("eglQuerySurfacePointerANGLE"));
+ eglQuerySurfacePointerANGLE(
+ m_eglDisplay,
+ pbuffer,
+ EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE, &share_handle);
+
+
+ m_device->CreateTexture(w, h, 1,
+ D3DUSAGE_RENDERTARGET,
+ D3DFMT_X8R8G8B8,
+ D3DPOOL_DEFAULT,
+ &m_texture,
+ &share_handle);
+
+ m_eglSurface = pbuffer;
+
+ if (m_glContext)
+ m_glContext->doneCurrent();
+}
+
+bool D3DPresentEngine::updateTexture(IDirect3DSurface9 *src)
+{
+ if (!m_texture)
+ return false;
+
+ if (m_glContext)
+ m_glContext->makeCurrent(m_offscreenSurface);
+
+ glBindTexture(GL_TEXTURE_2D, m_glTexture);
+
+ IDirect3DSurface9 *dest = NULL;
+
+ // Copy the sample surface to the shared D3D/EGL surface
+ HRESULT hr = m_texture->GetSurfaceLevel(0, &dest);
+ if (FAILED(hr))
+ goto done;
+
+ hr = m_device->StretchRect(src, NULL, dest, NULL, D3DTEXF_NONE);
+ if (FAILED(hr))
+ qWarning("Failed to copy D3D surface");
+
+ if (hr == S_OK)
+ eglBindTexImage(m_eglDisplay, m_eglSurface, EGL_BACK_BUFFER);
+
+done:
+ qt_wmf_safeRelease(&dest);
+
+ if (m_glContext)
+ m_glContext->doneCurrent();
+
+ return SUCCEEDED(hr);
+}
+
+HRESULT D3DPresentEngine::initializeD3D()
+{
+ HRESULT hr = Direct3DCreate9Ex(D3D_SDK_VERSION, &m_D3D9);
+
+ if (SUCCEEDED(hr))
+ hr = DXVA2CreateDirect3DDeviceManager9(&m_deviceResetToken, &m_deviceManager);
+
+ return hr;
+}
+
+HRESULT D3DPresentEngine::createD3DDevice()
+{
+ HRESULT hr = S_OK;
+ HWND hwnd = NULL;
+ UINT uAdapterID = D3DADAPTER_DEFAULT;
+ DWORD vp = 0;
+
+ D3DCAPS9 ddCaps;
+ ZeroMemory(&ddCaps, sizeof(ddCaps));
+
+ IDirect3DDevice9Ex* device = NULL;
+
+ // Hold the lock because we might be discarding an existing device.
+ QMutexLocker locker(&m_mutex);
+
+ if (!m_D3D9 || !m_deviceManager)
+ return MF_E_NOT_INITIALIZED;
+
+ hwnd = ::GetShellWindow();
+
+ // Note: The presenter creates additional swap chains to present the
+ // video frames. Therefore, it does not use the device's implicit
+ // swap chain, so the size of the back buffer here is 1 x 1.
+
+ D3DPRESENT_PARAMETERS pp;
+ ZeroMemory(&pp, sizeof(pp));
+
+ pp.BackBufferWidth = 1;
+ pp.BackBufferHeight = 1;
+ pp.BackBufferFormat = D3DFMT_UNKNOWN;
+ pp.BackBufferCount = 1;
+ pp.Windowed = TRUE;
+ pp.SwapEffect = D3DSWAPEFFECT_DISCARD;
+ pp.BackBufferFormat = D3DFMT_UNKNOWN;
+ pp.hDeviceWindow = hwnd;
+ pp.Flags = D3DPRESENTFLAG_VIDEO;
+ pp.PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
+
+ hr = m_D3D9->GetDeviceCaps(uAdapterID, D3DDEVTYPE_HAL, &ddCaps);
+ if (FAILED(hr))
+ goto done;
+
+ if (ddCaps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT)
+ vp = D3DCREATE_HARDWARE_VERTEXPROCESSING;
+ else
+ vp = D3DCREATE_SOFTWARE_VERTEXPROCESSING;
+
+ hr = m_D3D9->CreateDeviceEx(
+ uAdapterID,
+ D3DDEVTYPE_HAL,
+ pp.hDeviceWindow,
+ vp | D3DCREATE_NOWINDOWCHANGES | D3DCREATE_MULTITHREADED | D3DCREATE_FPU_PRESERVE,
+ &pp,
+ NULL,
+ &device
+ );
+ if (FAILED(hr))
+ goto done;
+
+ hr = m_D3D9->GetAdapterDisplayMode(uAdapterID, &m_displayMode);
+ if (FAILED(hr))
+ goto done;
+
+ hr = m_deviceManager->ResetDevice(device, m_deviceResetToken);
+ if (FAILED(hr))
+ goto done;
+
+ qt_wmf_safeRelease(&m_device);
+
+ m_device = device;
+ m_device->AddRef();
+
+done:
+ qt_wmf_safeRelease(&device);
+ return hr;
+}
+
+HRESULT D3DPresentEngine::createD3DSample(IDirect3DSwapChain9 *swapChain, IMFSample **videoSample)
+{
+ D3DCOLOR clrBlack = D3DCOLOR_ARGB(0xFF, 0x00, 0x00, 0x00);
+
+ IDirect3DSurface9* surface = NULL;
+ IMFSample* sample = NULL;
+
+ // Get the back buffer surface.
+ HRESULT hr = swapChain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &surface);
+ if (FAILED(hr))
+ goto done;
+
+ // Fill it with black.
+ hr = m_device->ColorFill(surface, NULL, clrBlack);
+ if (FAILED(hr))
+ goto done;
+
+ hr = MFCreateVideoSampleFromSurface(surface, &sample);
+ if (FAILED(hr))
+ goto done;
+
+ *videoSample = sample;
+ (*videoSample)->AddRef();
+
+done:
+ qt_wmf_safeRelease(&surface);
+ qt_wmf_safeRelease(&sample);
+ return hr;
+}
+
+HRESULT D3DPresentEngine::getSwapChainPresentParameters(IMFMediaType *type, D3DPRESENT_PARAMETERS* pp)
+{
+ ZeroMemory(pp, sizeof(D3DPRESENT_PARAMETERS));
+
+ // Get some information about the video format.
+
+ UINT32 width = 0, height = 0;
+
+ HRESULT hr = MFGetAttributeSize(type, MF_MT_FRAME_SIZE, &width, &height);
+ if (FAILED(hr))
+ return hr;
+
+ DWORD d3dFormat = 0;
+
+ hr = qt_wmf_getFourCC(type, &d3dFormat);
+ if (FAILED(hr))
+ return hr;
+
+ ZeroMemory(pp, sizeof(D3DPRESENT_PARAMETERS));
+ pp->BackBufferWidth = width;
+ pp->BackBufferHeight = height;
+ pp->Windowed = TRUE;
+ pp->SwapEffect = D3DSWAPEFFECT_DISCARD;
+ pp->BackBufferFormat = (D3DFORMAT)d3dFormat;
+ pp->hDeviceWindow = ::GetShellWindow();
+ pp->Flags = D3DPRESENTFLAG_VIDEO;
+ pp->PresentationInterval = D3DPRESENT_INTERVAL_DEFAULT;
+
+ D3DDEVICE_CREATION_PARAMETERS params;
+ hr = m_device->GetCreationParameters(&params);
+ if (FAILED(hr))
+ return hr;
+
+ if (params.DeviceType != D3DDEVTYPE_HAL)
+ pp->Flags |= D3DPRESENTFLAG_LOCKABLE_BACKBUFFER;
+
+ return S_OK;
+}
diff --git a/src/plugins/wmf/evrd3dpresentengine.h b/src/plugins/wmf/evrd3dpresentengine.h
new file mode 100644
index 000000000..87b3e9606
--- /dev/null
+++ b/src/plugins/wmf/evrd3dpresentengine.h
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef EVRD3DPRESENTENGINE_H
+#define EVRD3DPRESENTENGINE_H
+
+#include <QObject>
+#include <EGL/egl.h>
+#include <QMutex>
+#include <d3d9types.h>
+#include <QVideoSurfaceFormat>
+
+struct IDirect3D9Ex;
+struct IDirect3DDevice9;
+struct IDirect3DDevice9Ex;
+struct IDirect3DDeviceManager9;
+struct IDirect3DSurface9;
+struct IDirect3DTexture9;
+struct IMFSample;
+struct IMFMediaType;
+struct IDirect3DSwapChain9;
+
+// Randomly generated GUIDs
+static const GUID MFSamplePresenter_SampleCounter =
+{ 0xb0bb83cc, 0xf10f, 0x4e2e, { 0xaa, 0x2b, 0x29, 0xea, 0x5e, 0x92, 0xef, 0x85 } };
+
+static const GUID MFSamplePresenter_SampleSwapChain =
+{ 0xad885bd1, 0x7def, 0x414a, { 0xb5, 0xb0, 0xd3, 0xd2, 0x63, 0xd6, 0xe9, 0x6d } };
+
+QT_BEGIN_NAMESPACE
+
+class QAbstractVideoSurface;
+class QOpenGLContext;
+
+class D3DPresentEngine : public QObject
+{
+ Q_OBJECT
+public:
+ D3DPresentEngine();
+ virtual ~D3DPresentEngine();
+
+ void start();
+ void stop();
+
+ HRESULT getService(REFGUID guidService, REFIID riid, void** ppv);
+ HRESULT checkFormat(D3DFORMAT format);
+
+ HRESULT createVideoSamples(IMFMediaType *format, QList<IMFSample*>& videoSampleQueue);
+ void releaseResources();
+
+ UINT refreshRate() const { return m_displayMode.RefreshRate; }
+
+ void setSurface(QAbstractVideoSurface *surface);
+ void setSurfaceFormat(const QVideoSurfaceFormat &format);
+
+ void createOffscreenTexture();
+ bool updateTexture(IDirect3DSurface9 *src);
+
+public Q_SLOTS:
+ void presentSample(void* sample, qint64 llTarget);
+
+private:
+ HRESULT initializeD3D();
+ HRESULT getSwapChainPresentParameters(IMFMediaType *type, D3DPRESENT_PARAMETERS *pp);
+ HRESULT createD3DDevice();
+ HRESULT createD3DSample(IDirect3DSwapChain9 *swapChain, IMFSample **videoSample);
+
+ QMutex m_mutex;
+
+ UINT m_deviceResetToken;
+ D3DDISPLAYMODE m_displayMode;
+
+ IDirect3D9Ex *m_D3D9;
+ IDirect3DDevice9Ex *m_device;
+ IDirect3DDeviceManager9 *m_deviceManager;
+
+ QVideoSurfaceFormat m_surfaceFormat;
+ QAbstractVideoSurface *m_surface;
+
+ QOpenGLContext *m_glContext;
+ QWindow *m_offscreenSurface;
+
+ EGLDisplay *m_eglDisplay;
+ EGLConfig *m_eglConfig;
+ EGLSurface m_eglSurface;
+ unsigned int m_glTexture;
+ IDirect3DTexture9 *m_texture;
+};
+
+QT_END_NAMESPACE
+
+#endif // EVRD3DPRESENTENGINE_H
diff --git a/src/plugins/wmf/mfactivate.cpp b/src/plugins/wmf/mfactivate.cpp
new file mode 100644
index 000000000..cf64adc80
--- /dev/null
+++ b/src/plugins/wmf/mfactivate.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mfactivate.h"
+
+#include <mfapi.h>
+
+MFAbstractActivate::MFAbstractActivate()
+ : m_attributes(0)
+ , m_cRef(1)
+{
+ MFCreateAttributes(&m_attributes, 0);
+}
+
+MFAbstractActivate::~MFAbstractActivate()
+{
+ if (m_attributes)
+ m_attributes->Release();
+}
+
+
+HRESULT MFAbstractActivate::QueryInterface(REFIID riid, LPVOID *ppvObject)
+{
+ if (!ppvObject)
+ return E_POINTER;
+ if (riid == IID_IMFActivate) {
+ *ppvObject = static_cast<IMFActivate*>(this);
+ } else if (riid == IID_IMFAttributes) {
+ *ppvObject = static_cast<IMFAttributes*>(this);
+ } else if (riid == IID_IUnknown) {
+ *ppvObject = static_cast<IUnknown*>(static_cast<IMFActivate*>(this));
+ } else {
+ *ppvObject = NULL;
+ return E_NOINTERFACE;
+ }
+ AddRef();
+ return S_OK;
+}
+
+ULONG MFAbstractActivate::AddRef(void)
+{
+ return InterlockedIncrement(&m_cRef);
+}
+
+ULONG MFAbstractActivate::Release(void)
+{
+ ULONG cRef = InterlockedDecrement(&m_cRef);
+ if (cRef == 0)
+ delete this;
+ return m_cRef;
+}
diff --git a/src/plugins/wmf/mfactivate.h b/src/plugins/wmf/mfactivate.h
new file mode 100644
index 000000000..e02139049
--- /dev/null
+++ b/src/plugins/wmf/mfactivate.h
@@ -0,0 +1,216 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MFACTIVATE_H
+#define MFACTIVATE_H
+
+#include "mfglobal.h"
+
+#include <mfidl.h>
+
+class MFAbstractActivate : public IMFActivate
+{
+public:
+ explicit MFAbstractActivate();
+ virtual ~MFAbstractActivate();
+
+ //from IUnknown
+ STDMETHODIMP QueryInterface(REFIID riid, LPVOID *ppvObject);
+ STDMETHODIMP_(ULONG) AddRef(void);
+ STDMETHODIMP_(ULONG) Release(void);
+
+ //from IMFAttributes
+ STDMETHODIMP GetItem(REFGUID guidKey, PROPVARIANT *pValue)
+ {
+ return m_attributes->GetItem(guidKey, pValue);
+ }
+
+ STDMETHODIMP GetItemType(REFGUID guidKey, MF_ATTRIBUTE_TYPE *pType)
+ {
+ return m_attributes->GetItemType(guidKey, pType);
+ }
+
+ STDMETHODIMP CompareItem(REFGUID guidKey, REFPROPVARIANT Value, BOOL *pbResult)
+ {
+ return m_attributes->CompareItem(guidKey, Value, pbResult);
+ }
+
+ STDMETHODIMP Compare(IMFAttributes *pTheirs, MF_ATTRIBUTES_MATCH_TYPE MatchType, BOOL *pbResult)
+ {
+ return m_attributes->Compare(pTheirs, MatchType, pbResult);
+ }
+
+ STDMETHODIMP GetUINT32(REFGUID guidKey, UINT32 *punValue)
+ {
+ return m_attributes->GetUINT32(guidKey, punValue);
+ }
+
+ STDMETHODIMP GetUINT64(REFGUID guidKey, UINT64 *punValue)
+ {
+ return m_attributes->GetUINT64(guidKey, punValue);
+ }
+
+ STDMETHODIMP GetDouble(REFGUID guidKey, double *pfValue)
+ {
+ return m_attributes->GetDouble(guidKey, pfValue);
+ }
+
+ STDMETHODIMP GetGUID(REFGUID guidKey, GUID *pguidValue)
+ {
+ return m_attributes->GetGUID(guidKey, pguidValue);
+ }
+
+ STDMETHODIMP GetStringLength(REFGUID guidKey, UINT32 *pcchLength)
+ {
+ return m_attributes->GetStringLength(guidKey, pcchLength);
+ }
+
+ STDMETHODIMP GetString(REFGUID guidKey, LPWSTR pwszValue, UINT32 cchBufSize, UINT32 *pcchLength)
+ {
+ return m_attributes->GetString(guidKey, pwszValue, cchBufSize, pcchLength);
+ }
+
+ STDMETHODIMP GetAllocatedString(REFGUID guidKey, LPWSTR *ppwszValue, UINT32 *pcchLength)
+ {
+ return m_attributes->GetAllocatedString(guidKey, ppwszValue, pcchLength);
+ }
+
+ STDMETHODIMP GetBlobSize(REFGUID guidKey, UINT32 *pcbBlobSize)
+ {
+ return m_attributes->GetBlobSize(guidKey, pcbBlobSize);
+ }
+
+ STDMETHODIMP GetBlob(REFGUID guidKey, UINT8 *pBuf, UINT32 cbBufSize, UINT32 *pcbBlobSize)
+ {
+ return m_attributes->GetBlob(guidKey, pBuf, cbBufSize, pcbBlobSize);
+ }
+
+ STDMETHODIMP GetAllocatedBlob(REFGUID guidKey, UINT8 **ppBuf, UINT32 *pcbSize)
+ {
+ return m_attributes->GetAllocatedBlob(guidKey, ppBuf, pcbSize);
+ }
+
+ STDMETHODIMP GetUnknown(REFGUID guidKey, REFIID riid, LPVOID *ppv)
+ {
+ return m_attributes->GetUnknown(guidKey, riid, ppv);
+ }
+
+ STDMETHODIMP SetItem(REFGUID guidKey, REFPROPVARIANT Value)
+ {
+ return m_attributes->SetItem(guidKey, Value);
+ }
+
+ STDMETHODIMP DeleteItem(REFGUID guidKey)
+ {
+ return m_attributes->DeleteItem(guidKey);
+ }
+
+ STDMETHODIMP DeleteAllItems()
+ {
+ return m_attributes->DeleteAllItems();
+ }
+
+ STDMETHODIMP SetUINT32(REFGUID guidKey, UINT32 unValue)
+ {
+ return m_attributes->SetUINT32(guidKey, unValue);
+ }
+
+ STDMETHODIMP SetUINT64(REFGUID guidKey, UINT64 unValue)
+ {
+ return m_attributes->SetUINT64(guidKey, unValue);
+ }
+
+ STDMETHODIMP SetDouble(REFGUID guidKey, double fValue)
+ {
+ return m_attributes->SetDouble(guidKey, fValue);
+ }
+
+ STDMETHODIMP SetGUID(REFGUID guidKey, REFGUID guidValue)
+ {
+ return m_attributes->SetGUID(guidKey, guidValue);
+ }
+
+ STDMETHODIMP SetString(REFGUID guidKey, LPCWSTR wszValue)
+ {
+ return m_attributes->SetString(guidKey, wszValue);
+ }
+
+ STDMETHODIMP SetBlob(REFGUID guidKey, const UINT8 *pBuf, UINT32 cbBufSize)
+ {
+ return m_attributes->SetBlob(guidKey, pBuf, cbBufSize);
+ }
+
+ STDMETHODIMP SetUnknown(REFGUID guidKey, IUnknown *pUnknown)
+ {
+ return m_attributes->SetUnknown(guidKey, pUnknown);
+ }
+
+ STDMETHODIMP LockStore()
+ {
+ return m_attributes->LockStore();
+ }
+
+ STDMETHODIMP UnlockStore()
+ {
+ return m_attributes->UnlockStore();
+ }
+
+ STDMETHODIMP GetCount(UINT32 *pcItems)
+ {
+ return m_attributes->GetCount(pcItems);
+ }
+
+ STDMETHODIMP GetItemByIndex(UINT32 unIndex, GUID *pguidKey, PROPVARIANT *pValue)
+ {
+ return m_attributes->GetItemByIndex(unIndex, pguidKey, pValue);
+ }
+
+ STDMETHODIMP CopyAllItems(IMFAttributes *pDest)
+ {
+ return m_attributes->CopyAllItems(pDest);
+ }
+
+private:
+ IMFAttributes *m_attributes;
+ ULONG m_cRef;
+};
+
+#endif // MFACTIVATE_H
diff --git a/src/plugins/wmf/mfglobal.cpp b/src/plugins/wmf/mfglobal.cpp
new file mode 100644
index 000000000..b9b609635
--- /dev/null
+++ b/src/plugins/wmf/mfglobal.cpp
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "mfglobal.h"
+
+HRESULT qt_wmf_getFourCC(IMFMediaType *type, DWORD *fourCC)
+{
+ if (!fourCC)
+ return E_POINTER;
+
+ HRESULT hr = S_OK;
+ GUID guidSubType = GUID_NULL;
+
+ if (SUCCEEDED(hr))
+ hr = type->GetGUID(MF_MT_SUBTYPE, &guidSubType);
+
+ if (SUCCEEDED(hr))
+ *fourCC = guidSubType.Data1;
+
+ return hr;
+}
+
+MFRatio qt_wmf_getPixelAspectRatio(IMFMediaType *type)
+{
+ MFRatio ratio = { 0, 0 };
+ HRESULT hr = S_OK;
+
+ hr = MFGetAttributeRatio(type, MF_MT_PIXEL_ASPECT_RATIO, (UINT32*)&ratio.Numerator, (UINT32*)&ratio.Denominator);
+ if (FAILED(hr)) {
+ ratio.Numerator = 1;
+ ratio.Denominator = 1;
+ }
+ return ratio;
+}
+
+bool qt_wmf_areMediaTypesEqual(IMFMediaType *type1, IMFMediaType *type2)
+{
+ if (!type1 && !type2)
+ return true;
+ else if (!type1 || !type2)
+ return false;
+
+ DWORD dwFlags = 0;
+ HRESULT hr = type1->IsEqual(type2, &dwFlags);
+
+ return (hr == S_OK);
+}
+
+HRESULT qt_wmf_validateVideoArea(const MFVideoArea& area, UINT32 width, UINT32 height)
+{
+ float fOffsetX = qt_wmf_MFOffsetToFloat(area.OffsetX);
+ float fOffsetY = qt_wmf_MFOffsetToFloat(area.OffsetY);
+
+ if ( ((LONG)fOffsetX + area.Area.cx > (LONG)width) ||
+ ((LONG)fOffsetY + area.Area.cy > (LONG)height) )
+ return MF_E_INVALIDMEDIATYPE;
+ else
+ return S_OK;
+}
+
+bool qt_wmf_isSampleTimePassed(IMFClock *clock, IMFSample *sample)
+{
+ if (!sample || !clock)
+ return false;
+
+ HRESULT hr = S_OK;
+ MFTIME hnsTimeNow = 0;
+ MFTIME hnsSystemTime = 0;
+ MFTIME hnsSampleStart = 0;
+ MFTIME hnsSampleDuration = 0;
+
+ hr = clock->GetCorrelatedTime(0, &hnsTimeNow, &hnsSystemTime);
+
+ if (SUCCEEDED(hr))
+ hr = sample->GetSampleTime(&hnsSampleStart);
+
+ if (SUCCEEDED(hr))
+ hr = sample->GetSampleDuration(&hnsSampleDuration);
+
+ if (SUCCEEDED(hr)) {
+ if (hnsSampleStart + hnsSampleDuration < hnsTimeNow)
+ return true;
+ }
+
+ return false;
+}
diff --git a/src/plugins/wmf/mfglobal.h b/src/plugins/wmf/mfglobal.h
new file mode 100644
index 000000000..9ab24e370
--- /dev/null
+++ b/src/plugins/wmf/mfglobal.h
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** 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 Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef MFGLOBAL_H
+#define MFGLOBAL_H
+
+#include <mfapi.h>
+#include <mfidl.h>
+#include <Mferror.h>
+
+
+template<class T>
+class AsyncCallback : public IMFAsyncCallback
+{
+public:
+ typedef HRESULT (T::*InvokeFn)(IMFAsyncResult *asyncResult);
+
+ AsyncCallback(T *parent, InvokeFn fn) : m_parent(parent), m_invokeFn(fn)
+ {
+ }
+
+ // IUnknown
+ STDMETHODIMP QueryInterface(REFIID iid, void** ppv)
+ {
+ if (!ppv)
+ return E_POINTER;
+
+ if (iid == __uuidof(IUnknown)) {
+ *ppv = static_cast<IUnknown*>(static_cast<IMFAsyncCallback*>(this));
+ } else if (iid == __uuidof(IMFAsyncCallback)) {
+ *ppv = static_cast<IMFAsyncCallback*>(this);
+ } else {
+ *ppv = NULL;
+ return E_NOINTERFACE;
+ }
+ AddRef();
+ return S_OK;
+ }
+
+ STDMETHODIMP_(ULONG) AddRef() {
+ // Delegate to parent class.
+ return m_parent->AddRef();
+ }
+ STDMETHODIMP_(ULONG) Release() {
+ // Delegate to parent class.
+ return m_parent->Release();
+ }
+
+
+ // IMFAsyncCallback methods
+ STDMETHODIMP GetParameters(DWORD*, DWORD*)
+ {
+ // Implementation of this method is optional.
+ return E_NOTIMPL;
+ }
+
+ STDMETHODIMP Invoke(IMFAsyncResult* asyncResult)
+ {
+ return (m_parent->*m_invokeFn)(asyncResult);
+ }
+
+ T *m_parent;
+ InvokeFn m_invokeFn;
+};
+
+template <class T> void qt_wmf_safeRelease(T **ppT)
+{
+ if (*ppT) {
+ (*ppT)->Release();
+ *ppT = NULL;
+ }
+}
+
+template <class T>
+void qt_wmf_copyComPointer(T* &dest, T *src)
+{
+ if (dest)
+ dest->Release();
+ dest = src;
+ if (dest)
+ dest->AddRef();
+}
+
+HRESULT qt_wmf_getFourCC(IMFMediaType *type, DWORD *fourCC);
+MFRatio qt_wmf_getPixelAspectRatio(IMFMediaType *type);
+bool qt_wmf_areMediaTypesEqual(IMFMediaType *type1, IMFMediaType *type2);
+HRESULT qt_wmf_validateVideoArea(const MFVideoArea& area, UINT32 width, UINT32 height);
+bool qt_wmf_isSampleTimePassed(IMFClock *clock, IMFSample *sample);
+
+inline float qt_wmf_MFOffsetToFloat(const MFOffset& offset)
+{
+ return offset.value + (float(offset.fract) / 65536);
+}
+
+inline MFOffset qt_wmf_makeMFOffset(float v)
+{
+ MFOffset offset;
+ offset.value = short(v);
+ offset.fract = WORD(65536 * (v-offset.value));
+ return offset;
+}
+
+inline MFVideoArea qt_wmf_makeMFArea(float x, float y, DWORD width, DWORD height)
+{
+ MFVideoArea area;
+ area.OffsetX = qt_wmf_makeMFOffset(x);
+ area.OffsetY = qt_wmf_makeMFOffset(y);
+ area.Area.cx = width;
+ area.Area.cy = height;
+ return area;
+}
+
+inline HRESULT qt_wmf_getFrameRate(IMFMediaType *pType, MFRatio *pRatio)
+{
+ return MFGetAttributeRatio(pType, MF_MT_FRAME_RATE, (UINT32*)&pRatio->Numerator, (UINT32*)&pRatio->Denominator);
+}
+
+
+#endif // MFGLOBAL_H
diff --git a/src/plugins/wmf/mfstream.cpp b/src/plugins/wmf/mfstream.cpp
index e800a8f80..39fc2bd37 100644
--- a/src/plugins/wmf/mfstream.cpp
+++ b/src/plugins/wmf/mfstream.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/mfstream.h b/src/plugins/wmf/mfstream.h
index 83e59adb7..d5ac4fb0b 100644
--- a/src/plugins/wmf/mfstream.h
+++ b/src/plugins/wmf/mfstream.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/mftvideo.cpp b/src/plugins/wmf/mftvideo.cpp
index f13ae3e2e..acec88d6b 100644
--- a/src/plugins/wmf/mftvideo.cpp
+++ b/src/plugins/wmf/mftvideo.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
@@ -47,6 +47,7 @@
#include <uuids.h>
#include <InitGuid.h>
#include <d3d9.h>
+#include <qdebug.h>
// This MFT sends all samples it processes to connected video probes.
// Sample is sent to probes in ProcessInput.
@@ -70,6 +71,9 @@ MFTransform::~MFTransform()
if (m_outputType)
m_outputType->Release();
+
+ for (int i = 0; i < m_mediaTypes.size(); ++i)
+ m_mediaTypes[i]->Release();
}
void MFTransform::addProbe(MFVideoProbeControl *probe)
@@ -88,6 +92,14 @@ void MFTransform::removeProbe(MFVideoProbeControl *probe)
m_videoProbes.removeOne(probe);
}
+void MFTransform::addSupportedMediaType(IMFMediaType *type)
+{
+ if (!type)
+ return;
+ QMutexLocker locker(&m_mutex);
+ m_mediaTypes.append(type);
+}
+
STDMETHODIMP MFTransform::QueryInterface(REFIID riid, void** ppv)
{
if (!ppv)
@@ -151,6 +163,8 @@ STDMETHODIMP MFTransform::GetStreamIDs(DWORD dwInputIDArraySize, DWORD *pdwInput
STDMETHODIMP MFTransform::GetInputStreamInfo(DWORD dwInputStreamID, MFT_INPUT_STREAM_INFO *pStreamInfo)
{
+ QMutexLocker locker(&m_mutex);
+
if (dwInputStreamID > 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -167,6 +181,8 @@ STDMETHODIMP MFTransform::GetInputStreamInfo(DWORD dwInputStreamID, MFT_INPUT_ST
STDMETHODIMP MFTransform::GetOutputStreamInfo(DWORD dwOutputStreamID, MFT_OUTPUT_STREAM_INFO *pStreamInfo)
{
+ QMutexLocker locker(&m_mutex);
+
if (dwOutputStreamID > 0)
return MF_E_INVALIDSTREAMNUMBER;
@@ -243,16 +259,27 @@ STDMETHODIMP MFTransform::SetInputType(DWORD dwInputStreamID, IMFMediaType *pTyp
QMutexLocker locker(&m_mutex);
+ if (m_sample)
+ return MF_E_TRANSFORM_CANNOT_CHANGE_MEDIATYPE_WHILE_PROCESSING;
+
+ if (!isMediaTypeSupported(pType))
+ return MF_E_INVALIDMEDIATYPE;
+
DWORD flags = 0;
- if (m_outputType && m_outputType->IsEqual(pType, &flags) != S_OK) {
+ if (pType && !m_inputType && m_outputType && m_outputType->IsEqual(pType, &flags) != S_OK)
return MF_E_INVALIDMEDIATYPE;
- }
if (dwFlags == MFT_SET_TYPE_TEST_ONLY)
return pType ? S_OK : E_POINTER;
- if (m_inputType)
+ if (m_inputType) {
m_inputType->Release();
+ // Input type has changed, discard output type (if it's set) so it's reset later on
+ if (m_outputType && m_outputType->IsEqual(pType, &flags) != S_OK) {
+ m_outputType->Release();
+ m_outputType = 0;
+ }
+ }
m_inputType = pType;
@@ -269,16 +296,27 @@ STDMETHODIMP MFTransform::SetOutputType(DWORD dwOutputStreamID, IMFMediaType *pT
QMutexLocker locker(&m_mutex);
+ if (m_sample)
+ return MF_E_TRANSFORM_CANNOT_CHANGE_MEDIATYPE_WHILE_PROCESSING;
+
+ if (!isMediaTypeSupported(pType))
+ return MF_E_INVALIDMEDIATYPE;
+
DWORD flags = 0;
- if (m_inputType && m_inputType->IsEqual(pType, &flags) != S_OK) {
+ if (pType && !m_outputType && m_inputType && m_inputType->IsEqual(pType, &flags) != S_OK)
return MF_E_INVALIDMEDIATYPE;
- }
if (dwFlags == MFT_SET_TYPE_TEST_ONLY)
return pType ? S_OK : E_POINTER;
- if (m_outputType)
+ if (m_outputType) {
m_outputType->Release();
+ // Output type has changed, discard input type (if it's set) so it's reset later on
+ if (m_inputType && m_inputType->IsEqual(pType, &flags) != S_OK) {
+ m_inputType->Release();
+ m_inputType = 0;
+ }
+ }
m_outputType = pType;
@@ -645,3 +683,19 @@ QByteArray MFTransform::dataFromBuffer(IMFMediaBuffer *buffer, int height, int *
return array;
}
+
+bool MFTransform::isMediaTypeSupported(IMFMediaType *type)
+{
+ // if the list is empty, it supports all formats
+ if (!type || m_mediaTypes.isEmpty())
+ return true;
+
+ for (int i = 0; i < m_mediaTypes.size(); ++i) {
+ DWORD flags = 0;
+ m_mediaTypes.at(i)->IsEqual(type, &flags);
+ if (flags & MF_MEDIATYPE_EQUAL_FORMAT_TYPES)
+ return true;
+ }
+
+ return false;
+}
diff --git a/src/plugins/wmf/mftvideo.h b/src/plugins/wmf/mftvideo.h
index 45520c819..87979ee5e 100644
--- a/src/plugins/wmf/mftvideo.h
+++ b/src/plugins/wmf/mftvideo.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
@@ -61,6 +61,8 @@ public:
void addProbe(MFVideoProbeControl* probe);
void removeProbe(MFVideoProbeControl* probe);
+ void addSupportedMediaType(IMFMediaType *type);
+
// IUnknown methods
STDMETHODIMP QueryInterface(REFIID iid, void** ppv);
STDMETHODIMP_(ULONG) AddRef();
@@ -97,6 +99,7 @@ private:
static QVideoSurfaceFormat videoFormatForMFMediaType(IMFMediaType *mediaType, int *bytesPerLine);
QVideoFrame makeVideoFrame();
QByteArray dataFromBuffer(IMFMediaBuffer *buffer, int height, int *bytesPerLine);
+ bool isMediaTypeSupported(IMFMediaType *type);
long m_cRef;
IMFMediaType *m_inputType;
@@ -104,6 +107,8 @@ private:
IMFSample *m_sample;
QMutex m_mutex;
+ QList<IMFMediaType*> m_mediaTypes;
+
QList<MFVideoProbeControl*> m_videoProbes;
QMutex m_videoProbeMutex;
diff --git a/src/plugins/wmf/player/evr9videowindowcontrol.cpp b/src/plugins/wmf/player/evr9videowindowcontrol.cpp
index 7f1c71332..5cafb8848 100644
--- a/src/plugins/wmf/player/evr9videowindowcontrol.cpp
+++ b/src/plugins/wmf/player/evr9videowindowcontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -85,6 +85,11 @@ void Evr9VideoWindowControl::clear()
m_currentActivate = NULL;
}
+void Evr9VideoWindowControl::releaseActivate()
+{
+ clear();
+}
+
WId Evr9VideoWindowControl::winId() const
{
return m_windowId;
diff --git a/src/plugins/wmf/player/evr9videowindowcontrol.h b/src/plugins/wmf/player/evr9videowindowcontrol.h
index ea4bae56d..9963f7882 100644
--- a/src/plugins/wmf/player/evr9videowindowcontrol.h
+++ b/src/plugins/wmf/player/evr9videowindowcontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -86,6 +86,7 @@ public:
void setSaturation(int saturation);
IMFActivate* createActivate();
+ void releaseActivate();
void setProcAmpValues();
diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp
index 7639f4f9e..39fc41c5f 100644
--- a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp
+++ b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.h b/src/plugins/wmf/player/mfaudioendpointcontrol.h
index 53c6657cb..8be1d1c78 100644
--- a/src/plugins/wmf/player/mfaudioendpointcontrol.h
+++ b/src/plugins/wmf/player/mfaudioendpointcontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/player/mfaudioprobecontrol.cpp b/src/plugins/wmf/player/mfaudioprobecontrol.cpp
index 0c477f357..e89b0e393 100644
--- a/src/plugins/wmf/player/mfaudioprobecontrol.cpp
+++ b/src/plugins/wmf/player/mfaudioprobecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/player/mfaudioprobecontrol.h b/src/plugins/wmf/player/mfaudioprobecontrol.h
index 1b82eaa76..9db79f7bf 100644
--- a/src/plugins/wmf/player/mfaudioprobecontrol.h
+++ b/src/plugins/wmf/player/mfaudioprobecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/player/mfmetadatacontrol.cpp b/src/plugins/wmf/player/mfmetadatacontrol.cpp
index 18c6a4204..f27370ed2 100644
--- a/src/plugins/wmf/player/mfmetadatacontrol.cpp
+++ b/src/plugins/wmf/player/mfmetadatacontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -39,12 +39,95 @@
**
****************************************************************************/
+#include <qdatetime.h>
+#include <qimage.h>
+
#include "mfmetadatacontrol.h"
#include "mfplayerservice.h"
#include "Propkey.h"
//#define DEBUG_MEDIAFOUNDATION
+static QString nameForGUID(GUID guid)
+{
+ // Audio formats
+ if (guid == MFAudioFormat_AAC)
+ return QStringLiteral("MPEG AAC Audio");
+ else if (guid == MFAudioFormat_ADTS)
+ return QStringLiteral("MPEG ADTS AAC Audio");
+ else if (guid == MFAudioFormat_Dolby_AC3_SPDIF)
+ return QStringLiteral("Dolby AC-3 SPDIF");
+ else if (guid == MFAudioFormat_DRM)
+ return QStringLiteral("DRM");
+ else if (guid == MFAudioFormat_DTS)
+ return QStringLiteral("Digital Theater Systems Audio (DTS)");
+ else if (guid == MFAudioFormat_Float)
+ return QStringLiteral("IEEE Float Audio");
+ else if (guid == MFAudioFormat_MP3)
+ return QStringLiteral("MPEG Audio Layer-3 (MP3)");
+ else if (guid == MFAudioFormat_MPEG)
+ return QStringLiteral("MPEG-1 Audio");
+ else if (guid == MFAudioFormat_MSP1)
+ return QStringLiteral("Windows Media Audio Voice");
+ else if (guid == MFAudioFormat_PCM)
+ return QStringLiteral("Uncompressed PCM Audio");
+ else if (guid == MFAudioFormat_WMASPDIF)
+ return QStringLiteral("Windows Media Audio 9 SPDIF");
+ else if (guid == MFAudioFormat_WMAudioV8)
+ return QStringLiteral("Windows Media Audio 8 (WMA2)");
+ else if (guid == MFAudioFormat_WMAudioV9)
+ return QStringLiteral("Windows Media Audio 9 (WMA3");
+ else if (guid == MFAudioFormat_WMAudio_Lossless)
+ return QStringLiteral("Windows Media Audio 9 Lossless");
+
+ // Video formats
+ if (guid == MFVideoFormat_DV25)
+ return QStringLiteral("DVCPRO 25 (DV25)");
+ else if (guid == MFVideoFormat_DV50)
+ return QStringLiteral("DVCPRO 50 (DV50)");
+ else if (guid == MFVideoFormat_DVC)
+ return QStringLiteral("DVC/DV Video");
+ else if (guid == MFVideoFormat_DVH1)
+ return QStringLiteral("DVCPRO 100 (DVH1)");
+ else if (guid == MFVideoFormat_DVHD)
+ return QStringLiteral("HD-DVCR (DVHD)");
+ else if (guid == MFVideoFormat_DVSD)
+ return QStringLiteral("SDL-DVCR (DVSD)");
+ else if (guid == MFVideoFormat_DVSL)
+ return QStringLiteral("SD-DVCR (DVSL)");
+ else if (guid == MFVideoFormat_H264)
+ return QStringLiteral("H.264 Video");
+ else if (guid == MFVideoFormat_M4S2)
+ return QStringLiteral("MPEG-4 part 2 Video (M4S2)");
+ else if (guid == MFVideoFormat_MJPG)
+ return QStringLiteral("Motion JPEG (MJPG)");
+ else if (guid == MFVideoFormat_MP43)
+ return QStringLiteral("Microsoft MPEG 4 version 3 (MP43)");
+ else if (guid == MFVideoFormat_MP4S)
+ return QStringLiteral("ISO MPEG 4 version 1 (MP4S)");
+ else if (guid == MFVideoFormat_MP4V)
+ return QStringLiteral("MPEG-4 part 2 Video (MP4V)");
+ else if (guid == MFVideoFormat_MPEG2)
+ return QStringLiteral("MPEG-2 Video");
+ else if (guid == MFVideoFormat_MPG1)
+ return QStringLiteral("MPEG-1 Video");
+ else if (guid == MFVideoFormat_MSS1)
+ return QStringLiteral("Windows Media Screen 1 (MSS1)");
+ else if (guid == MFVideoFormat_MSS2)
+ return QStringLiteral("Windows Media Video 9 Screen (MSS2)");
+ else if (guid == MFVideoFormat_WMV1)
+ return QStringLiteral("Windows Media Video 7 (WMV1)");
+ else if (guid == MFVideoFormat_WMV2)
+ return QStringLiteral("Windows Media Video 8 (WMV2)");
+ else if (guid == MFVideoFormat_WMV3)
+ return QStringLiteral("Windows Media Video 9 (WMV3)");
+ else if (guid == MFVideoFormat_WVC1)
+ return QStringLiteral("Windows Media Video VC1 (WVC1)");
+
+ else
+ return QStringLiteral("Unknown codec");
+}
+
MFMetaDataControl::MFMetaDataControl(QObject *parent)
: QMetaDataReaderControl(parent)
, m_metaData(0)
@@ -83,9 +166,46 @@ QVariant MFMetaDataControl::metaData(const QString &key) const
else if (m_metaData)
hr = m_metaData->GetProperty(reinterpret_cast<LPCWSTR>(m_commonNames[index].utf16()), &var);
- if (SUCCEEDED(hr))
+ if (SUCCEEDED(hr)) {
value = convertValue(var);
+ // some metadata needs to be reformatted
+ if (value.isValid() && m_content) {
+ if (key == QMediaMetaData::MediaType) {
+ QString v = value.toString();
+ if (v == QLatin1String("{D1607DBC-E323-4BE2-86A1-48A42A28441E}"))
+ value = QStringLiteral("Music");
+ else if (v == QLatin1String("{DB9830BD-3AB3-4FAB-8A37-1A995F7FF74B}"))
+ value = QStringLiteral("Video");
+ else if (v == QLatin1String("{01CD0F29-DA4E-4157-897B-6275D50C4F11}"))
+ value = QStringLiteral("Audio");
+ else if (v == QLatin1String("{FCF24A76-9A57-4036-990D-E35DD8B244E1}"))
+ value = QStringLiteral("Other");
+ } else if (key == QMediaMetaData::Duration) {
+ // duration is provided in 100-nanosecond units, convert to milliseconds
+ value = (value.toLongLong() + 10000) / 10000;
+ } else if (key == QMediaMetaData::AudioCodec || key == QMediaMetaData::VideoCodec) {
+ GUID guid;
+ if (SUCCEEDED(CLSIDFromString((const WCHAR*)value.toString().utf16(), &guid)))
+ value = nameForGUID(guid);
+ } else if (key == QMediaMetaData::Resolution) {
+ QSize res;
+ res.setHeight(value.toUInt());
+ if (m_content && SUCCEEDED(m_content->GetValue(PKEY_Video_FrameWidth, &var)))
+ res.setWidth(convertValue(var).toUInt());
+ value = res;
+ } else if (key == QMediaMetaData::PixelAspectRatio) {
+ QSize aspectRatio;
+ aspectRatio.setWidth(value.toUInt());
+ if (m_content && SUCCEEDED(m_content->GetValue(PKEY_Video_VerticalAspectRatio, &var)))
+ aspectRatio.setHeight(convertValue(var).toUInt());
+ value = aspectRatio;
+ } else if (key == QMediaMetaData::VideoFrameRate) {
+ value = value.toReal() / 1000.f;
+ }
+ }
+ }
+
PropVariantClear(&var);
return value;
}
@@ -93,9 +213,6 @@ QVariant MFMetaDataControl::metaData(const QString &key) const
QVariant MFMetaDataControl::convertValue(const PROPVARIANT& var) const
{
QVariant value;
- //form MSDN: http://msdn.microsoft.com/en-us/library/ff384862%28v=VS.85%29.aspx
- //it seems that those 4 types are enough for media foundation metadata
- //add more later if necessary
switch (var.vt) {
case VT_LPWSTR:
value = QString::fromUtf16(reinterpret_cast<const ushort*>(var.pwszVal));
@@ -109,6 +226,33 @@ QVariant MFMetaDataControl::convertValue(const PROPVARIANT& var) const
case VT_BOOL:
value = bool(var.boolVal);
break;
+ case VT_FILETIME:
+ SYSTEMTIME sysDate;
+ if (!FileTimeToSystemTime(&var.filetime, &sysDate))
+ break;
+ value = QDate(sysDate.wYear, sysDate.wMonth, sysDate.wDay);
+ break;
+ case VT_STREAM:
+ {
+ STATSTG stat;
+ if (FAILED(var.pStream->Stat(&stat, STATFLAG_NONAME)))
+ break;
+ void *data = malloc(stat.cbSize.QuadPart);
+ ULONG read = 0;
+ if (FAILED(var.pStream->Read(data, stat.cbSize.QuadPart, &read))) {
+ free(data);
+ break;
+ }
+ value = QImage::fromData((const uchar*)data, read);
+ free(data);
+ }
+ break;
+ case VT_VECTOR | VT_LPWSTR:
+ QStringList vList;
+ for (ULONG i = 0; i < var.calpwstr.cElems; ++i)
+ vList.append(QString::fromUtf16(reinterpret_cast<const ushort*>(var.calpwstr.pElems[i])));
+ value = vList;
+ break;
}
return value;
}
@@ -147,13 +291,80 @@ void MFMetaDataControl::updateSource(IMFPresentationDescriptor* sourcePD, IMFMed
m_availableMetaDatas.push_back(QMediaMetaData::Author);
} else if (key == PKEY_Title) {
m_availableMetaDatas.push_back(QMediaMetaData::Title);
+ } else if (key == PKEY_Media_SubTitle) {
+ m_availableMetaDatas.push_back(QMediaMetaData::SubTitle);
} else if (key == PKEY_ParentalRating) {
m_availableMetaDatas.push_back(QMediaMetaData::ParentalRating);
} else if (key == PKEY_Comment) {
m_availableMetaDatas.push_back(QMediaMetaData::Description);
} else if (key == PKEY_Copyright) {
m_availableMetaDatas.push_back(QMediaMetaData::Copyright);
- //TODO: add more common keys
+ } else if (key == PKEY_Comment) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Comment);
+ } else if (key == PKEY_Media_ProviderStyle) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Genre);
+ } else if (key == PKEY_Media_Year) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Year);
+ } else if (key == PKEY_Media_DateEncoded) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Date);
+ } else if (key == PKEY_Rating) {
+ m_availableMetaDatas.push_back(QMediaMetaData::UserRating);
+ } else if (key == PKEY_Keywords) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Keywords);
+ } else if (key == PKEY_Language) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Language);
+ } else if (key == PKEY_Media_Publisher) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Publisher);
+ } else if (key == PKEY_Media_ClassPrimaryID) {
+ m_availableMetaDatas.push_back(QMediaMetaData::MediaType);
+ } else if (key == PKEY_Media_Duration) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Duration);
+ } else if (key == PKEY_Audio_EncodingBitrate) {
+ m_availableMetaDatas.push_back(QMediaMetaData::AudioBitRate);
+ } else if (key == PKEY_Audio_Format) {
+ m_availableMetaDatas.push_back(QMediaMetaData::AudioCodec);
+ } else if (key == PKEY_Media_AverageLevel) {
+ m_availableMetaDatas.push_back(QMediaMetaData::AverageLevel);
+ } else if (key == PKEY_Audio_ChannelCount) {
+ m_availableMetaDatas.push_back(QMediaMetaData::ChannelCount);
+ } else if (key == PKEY_Audio_PeakValue) {
+ m_availableMetaDatas.push_back(QMediaMetaData::PeakValue);
+ } else if (key == PKEY_Audio_SampleRate) {
+ m_availableMetaDatas.push_back(QMediaMetaData::SampleRate);
+ } else if (key == PKEY_Music_AlbumTitle) {
+ m_availableMetaDatas.push_back(QMediaMetaData::AlbumTitle);
+ } else if (key == PKEY_Music_AlbumArtist) {
+ m_availableMetaDatas.push_back(QMediaMetaData::AlbumArtist);
+ } else if (key == PKEY_Music_Artist) {
+ m_availableMetaDatas.push_back(QMediaMetaData::ContributingArtist);
+ } else if (key == PKEY_Music_Composer) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Composer);
+ } else if (key == PKEY_Music_Conductor) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Conductor);
+ } else if (key == PKEY_Music_Lyrics) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Lyrics);
+ } else if (key == PKEY_Music_Mood) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Mood);
+ } else if (key == PKEY_Music_TrackNumber) {
+ m_availableMetaDatas.push_back(QMediaMetaData::TrackNumber);
+ } else if (key == PKEY_Music_Genre) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Genre);
+ } else if (key == PKEY_ThumbnailStream) {
+ m_availableMetaDatas.push_back(QMediaMetaData::ThumbnailImage);
+ } else if (key == PKEY_Video_FrameHeight) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Resolution);
+ } else if (key == PKEY_Video_HorizontalAspectRatio) {
+ m_availableMetaDatas.push_back(QMediaMetaData::PixelAspectRatio);
+ } else if (key == PKEY_Video_FrameRate) {
+ m_availableMetaDatas.push_back(QMediaMetaData::VideoFrameRate);
+ } else if (key == PKEY_Video_EncodingBitrate) {
+ m_availableMetaDatas.push_back(QMediaMetaData::VideoBitRate);
+ } else if (key == PKEY_Video_Compression) {
+ m_availableMetaDatas.push_back(QMediaMetaData::VideoCodec);
+ } else if (key == PKEY_Video_Director) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Director);
+ } else if (key == PKEY_Media_Writer) {
+ m_availableMetaDatas.push_back(QMediaMetaData::Writer);
} else {
common = false;
//TODO: add more extended keys
diff --git a/src/plugins/wmf/player/mfmetadatacontrol.h b/src/plugins/wmf/player/mfmetadatacontrol.h
index 38ee8bad0..f3955f570 100644
--- a/src/plugins/wmf/player/mfmetadatacontrol.h
+++ b/src/plugins/wmf/player/mfmetadatacontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/player/mfplayercontrol.cpp b/src/plugins/wmf/player/mfplayercontrol.cpp
index bdd28fc94..68ffa7b6f 100644
--- a/src/plugins/wmf/player/mfplayercontrol.cpp
+++ b/src/plugins/wmf/player/mfplayercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/player/mfplayercontrol.h b/src/plugins/wmf/player/mfplayercontrol.h
index d0625ffc0..3a841c62d 100644
--- a/src/plugins/wmf/player/mfplayercontrol.h
+++ b/src/plugins/wmf/player/mfplayercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/player/mfplayerservice.cpp b/src/plugins/wmf/player/mfplayerservice.cpp
index 5bda9f983..92025a79b 100644
--- a/src/plugins/wmf/player/mfplayerservice.cpp
+++ b/src/plugins/wmf/player/mfplayerservice.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -116,12 +116,11 @@ QMediaControl* MFPlayerService::requestControl(const char *name)
}
return 0;
} else if (qstrcmp(name,QMediaVideoProbeControl_iid) == 0) {
- // FIXME!! Disabled in Qt 5.0 because it is unstable
-// if (m_session) {
-// MFVideoProbeControl *probe = new MFVideoProbeControl(this);
-// m_session->addProbe(probe);
-// return probe;
-// }
+ if (m_session) {
+ MFVideoProbeControl *probe = new MFVideoProbeControl(this);
+ m_session->addProbe(probe);
+ return probe;
+ }
return 0;
}
diff --git a/src/plugins/wmf/player/mfplayerservice.h b/src/plugins/wmf/player/mfplayerservice.h
index 827702c3b..0d39edc16 100644
--- a/src/plugins/wmf/player/mfplayerservice.h
+++ b/src/plugins/wmf/player/mfplayerservice.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp
index d9ff0e7cb..c52498f63 100644
--- a/src/plugins/wmf/player/mfplayersession.cpp
+++ b/src/plugins/wmf/player/mfplayersession.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -65,6 +65,7 @@
#include "sourceresolver.h"
#include "samplegrabber.h"
#include "mftvideo.h"
+#include <wmcodecdsp.h>
//#define DEBUG_MEDIAFOUNDATION
//#define TEST_STREAMING
@@ -436,7 +437,6 @@ MFPlayerSession::MFPlayerSession(MFPlayerService *playerService)
m_request.rate = 1.0f;
m_audioSampleGrabber = new AudioSampleGrabberCallback;
- m_videoProbeMFT = new MFTransform;
}
void MFPlayerSession::close()
@@ -472,6 +472,18 @@ void MFPlayerSession::close()
m_sourceResolver->Release();
m_sourceResolver = 0;
}
+ if (m_videoProbeMFT) {
+ m_videoProbeMFT->Release();
+ m_videoProbeMFT = 0;
+ }
+
+ if (m_playerService->videoRendererControl()) {
+ m_playerService->videoRendererControl()->releaseActivate();
+#ifndef Q_WS_SIMULATOR
+ } else if (m_playerService->videoWindowControl()) {
+ m_playerService->videoWindowControl()->releaseActivate();
+#endif
+ }
if (m_session)
m_session->Release();
@@ -493,18 +505,26 @@ void MFPlayerSession::removeProbe(MFAudioProbeControl *probe)
void MFPlayerSession::addProbe(MFVideoProbeControl* probe)
{
- m_videoProbeMFT->addProbe(probe);
+ if (m_videoProbes.contains(probe))
+ return;
+
+ m_videoProbes.append(probe);
+
+ if (m_videoProbeMFT)
+ m_videoProbeMFT->addProbe(probe);
}
void MFPlayerSession::removeProbe(MFVideoProbeControl* probe)
{
- m_videoProbeMFT->removeProbe(probe);
+ m_videoProbes.removeOne(probe);
+
+ if (m_videoProbeMFT)
+ m_videoProbeMFT->removeProbe(probe);
}
MFPlayerSession::~MFPlayerSession()
{
m_audioSampleGrabber->Release();
- m_videoProbeMFT->Release();
}
@@ -985,76 +1005,105 @@ IMFTopology *MFPlayerSession::insertMFT(IMFTopology *topology, TOPOID outputNode
if (FAILED(MFCreateTopoLoader(&topoLoader)))
break;
- if (FAILED(topoLoader->Load(topology, &resolvedTopology, NULL)))
- break;
+ if (FAILED(topoLoader->Load(topology, &resolvedTopology, NULL))) {
+ // Topology could not be resolved, adding ourselves a color converter
+ // to the topology might solve the problem
+ insertColorConverter(topology, outputNodeId);
+ if (FAILED(topoLoader->Load(topology, &resolvedTopology, NULL)))
+ break;
+ }
-// FIXME!! VideoProbe disabled in Qt 5.0 because it is unstable.
-// Commented out the following code to skip inserting the transform node
-// getting the video frames.
+ if (insertResizer(resolvedTopology))
+ isNewTopology = true;
// Get all output nodes and search for video output node.
-// if (FAILED(resolvedTopology->GetOutputNodeCollection(&outputNodes)))
-// break;
+ if (FAILED(resolvedTopology->GetOutputNodeCollection(&outputNodes)))
+ break;
-// DWORD elementCount = 0;
-// if (FAILED(outputNodes->GetElementCount(&elementCount)))
-// break;
+ DWORD elementCount = 0;
+ if (FAILED(outputNodes->GetElementCount(&elementCount)))
+ break;
-// for (DWORD n = 0; n < elementCount; n++) {
-// IUnknown *element = 0;
-// IMFTopologyNode *node = 0;
-// IMFTopologyNode *inputNode = 0;
-// IMFTopologyNode *mftNode = 0;
+ for (DWORD n = 0; n < elementCount; n++) {
+ IUnknown *element = 0;
+ IMFTopologyNode *node = 0;
+ IUnknown *outputObject = 0;
+ IMFMediaTypeHandler *videoSink = 0;
+ IMFTopologyNode *inputNode = 0;
+ IMFTopologyNode *mftNode = 0;
+ bool mftAdded = false;
-// do {
-// if (FAILED(outputNodes->GetElement(n, &element)))
-// break;
+ do {
+ if (FAILED(outputNodes->GetElement(n, &element)))
+ break;
-// if (FAILED(element->QueryInterface(IID_IMFTopologyNode, (void**)&node)))
-// break;
+ if (FAILED(element->QueryInterface(IID_IMFTopologyNode, (void**)&node)))
+ break;
-// TOPOID id;
-// if (FAILED(node->GetTopoNodeID(&id)))
-// break;
+ TOPOID id;
+ if (FAILED(node->GetTopoNodeID(&id)))
+ break;
-// if (id != outputNodeId)
-// break;
+ if (id != outputNodeId)
+ break;
-// // Insert MFT between the output node and the node connected to it.
-// DWORD outputIndex = 0;
-// if (FAILED(node->GetInput(0, &inputNode, &outputIndex)))
-// break;
+ // Use output supported media types for the MFT
+ if (FAILED(node->GetObject(&outputObject)))
+ break;
-// if (FAILED(MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &mftNode)))
-// break;
+ if (FAILED(outputObject->QueryInterface(IID_IMFMediaTypeHandler, (void**)&videoSink)))
+ break;
-// if (FAILED(mftNode->SetObject(m_videoProbeMFT)))
-// break;
+ DWORD mtCount;
+ if (FAILED(videoSink->GetMediaTypeCount(&mtCount)))
+ break;
-// if (FAILED(resolvedTopology->AddNode(mftNode)))
-// break;
+ for (DWORD i = 0; i < mtCount; ++i) {
+ IMFMediaType *type = 0;
+ if (SUCCEEDED(videoSink->GetMediaTypeByIndex(i, &type)))
+ m_videoProbeMFT->addSupportedMediaType(type);
+ }
+
+ // Insert MFT between the output node and the node connected to it.
+ DWORD outputIndex = 0;
+ if (FAILED(node->GetInput(0, &inputNode, &outputIndex)))
+ break;
+
+ if (FAILED(MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &mftNode)))
+ break;
+
+ if (FAILED(mftNode->SetObject(m_videoProbeMFT)))
+ break;
-// if (FAILED(inputNode->ConnectOutput(0, mftNode, 0)))
-// break;
+ if (FAILED(resolvedTopology->AddNode(mftNode)))
+ break;
-// if (FAILED(mftNode->ConnectOutput(0, node, 0)))
-// break;
+ if (FAILED(inputNode->ConnectOutput(0, mftNode, 0)))
+ break;
-// isNewTopology = true;
-// } while (false);
+ if (FAILED(mftNode->ConnectOutput(0, node, 0)))
+ break;
-// if (mftNode)
-// mftNode->Release();
-// if (inputNode)
-// inputNode->Release();
-// if (node)
-// node->Release();
-// if (element)
-// element->Release();
+ mftAdded = true;
+ isNewTopology = true;
+ } while (false);
-// if (isNewTopology)
-// break;
-// }
+ if (mftNode)
+ mftNode->Release();
+ if (inputNode)
+ inputNode->Release();
+ if (node)
+ node->Release();
+ if (element)
+ element->Release();
+ if (videoSink)
+ videoSink->Release();
+ if (outputObject)
+ outputObject->Release();
+
+ if (mftAdded)
+ break;
+ }
} while (false);
if (outputNodes)
@@ -1074,6 +1123,177 @@ IMFTopology *MFPlayerSession::insertMFT(IMFTopology *topology, TOPOID outputNode
return topology;
}
+// This method checks if the topology contains a color converter transform (CColorConvertDMO),
+// if it does it inserts a resizer transform (CResizerDMO) to handle dynamic frame size change
+// of the video stream.
+// Returns true if it inserted a resizer
+bool MFPlayerSession::insertResizer(IMFTopology *topology)
+{
+ bool inserted = false;
+ WORD elementCount = 0;
+ IMFTopologyNode *node = 0;
+ IUnknown *object = 0;
+ IWMColorConvProps *colorConv = 0;
+ IMFTransform *resizer = 0;
+ IMFTopologyNode *resizerNode = 0;
+ IMFTopologyNode *inputNode = 0;
+
+ HRESULT hr = topology->GetNodeCount(&elementCount);
+ if (FAILED(hr))
+ return false;
+
+ for (WORD i = 0; i < elementCount; ++i) {
+ if (node) {
+ node->Release();
+ node = 0;
+ }
+ if (object) {
+ object->Release();
+ object = 0;
+ }
+
+ if (FAILED(topology->GetNode(i, &node)))
+ break;
+
+ MF_TOPOLOGY_TYPE nodeType;
+ if (FAILED(node->GetNodeType(&nodeType)))
+ break;
+
+ if (nodeType != MF_TOPOLOGY_TRANSFORM_NODE)
+ continue;
+
+ if (FAILED(node->GetObject(&object)))
+ break;
+
+ if (FAILED(object->QueryInterface(&colorConv)))
+ continue;
+
+ if (FAILED(CoCreateInstance(CLSID_CResizerDMO, NULL, CLSCTX_INPROC_SERVER, IID_IMFTransform, (void**)&resizer)))
+ break;
+
+ if (FAILED(MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &resizerNode)))
+ break;
+
+ if (FAILED(resizerNode->SetObject(resizer)))
+ break;
+
+ if (FAILED(topology->AddNode(resizerNode)))
+ break;
+
+ DWORD outputIndex = 0;
+ if (FAILED(node->GetInput(0, &inputNode, &outputIndex))) {
+ topology->RemoveNode(resizerNode);
+ break;
+ }
+
+ if (FAILED(inputNode->ConnectOutput(0, resizerNode, 0))) {
+ topology->RemoveNode(resizerNode);
+ break;
+ }
+
+ if (FAILED(resizerNode->ConnectOutput(0, node, 0))) {
+ inputNode->ConnectOutput(0, node, 0);
+ topology->RemoveNode(resizerNode);
+ break;
+ }
+
+ inserted = true;
+ break;
+ }
+
+ if (node)
+ node->Release();
+ if (object)
+ object->Release();
+ if (colorConv)
+ colorConv->Release();
+ if (resizer)
+ resizer->Release();
+ if (resizerNode)
+ resizerNode->Release();
+ if (inputNode)
+ inputNode->Release();
+
+ return inserted;
+}
+
+// This method inserts a color converter (CColorConvertDMO) in the topology,
+// typically to convert to RGB format.
+// Usually this converter is automatically inserted when the topology is resolved but
+// for some reason it fails to do so in some cases, we then do it ourselves.
+void MFPlayerSession::insertColorConverter(IMFTopology *topology, TOPOID outputNodeId)
+{
+ IMFCollection *outputNodes = 0;
+
+ if (FAILED(topology->GetOutputNodeCollection(&outputNodes)))
+ return;
+
+ DWORD elementCount = 0;
+ if (FAILED(outputNodes->GetElementCount(&elementCount)))
+ goto done;
+
+ for (DWORD n = 0; n < elementCount; n++) {
+ IUnknown *element = 0;
+ IMFTopologyNode *node = 0;
+ IMFTopologyNode *inputNode = 0;
+ IMFTopologyNode *mftNode = 0;
+ IMFTransform *converter = 0;
+
+ do {
+ if (FAILED(outputNodes->GetElement(n, &element)))
+ break;
+
+ if (FAILED(element->QueryInterface(IID_IMFTopologyNode, (void**)&node)))
+ break;
+
+ TOPOID id;
+ if (FAILED(node->GetTopoNodeID(&id)))
+ break;
+
+ if (id != outputNodeId)
+ break;
+
+ DWORD outputIndex = 0;
+ if (FAILED(node->GetInput(0, &inputNode, &outputIndex)))
+ break;
+
+ if (FAILED(MFCreateTopologyNode(MF_TOPOLOGY_TRANSFORM_NODE, &mftNode)))
+ break;
+
+ if (FAILED(CoCreateInstance(CLSID_CColorConvertDMO, NULL, CLSCTX_INPROC_SERVER, IID_IMFTransform, (void**)&converter)))
+ break;
+
+ if (FAILED(mftNode->SetObject(converter)))
+ break;
+
+ if (FAILED(topology->AddNode(mftNode)))
+ break;
+
+ if (FAILED(inputNode->ConnectOutput(0, mftNode, 0)))
+ break;
+
+ if (FAILED(mftNode->ConnectOutput(0, node, 0)))
+ break;
+
+ } while (false);
+
+ if (mftNode)
+ mftNode->Release();
+ if (inputNode)
+ inputNode->Release();
+ if (node)
+ node->Release();
+ if (element)
+ element->Release();
+ if (converter)
+ converter->Release();
+ }
+
+done:
+ if (outputNodes)
+ outputNodes->Release();
+}
+
void MFPlayerSession::stop(bool immediate)
{
#ifdef DEBUG_MEDIAFOUNDATION
@@ -1181,6 +1401,10 @@ void MFPlayerSession::createSession()
QObject::connect(m_sourceResolver, SIGNAL(mediaSourceReady()), this, SLOT(handleMediaSourceReady()));
QObject::connect(m_sourceResolver, SIGNAL(error(long)), this, SLOT(handleSourceError(long)));
+ m_videoProbeMFT = new MFTransform;
+ for (int i = 0; i < m_videoProbes.size(); ++i)
+ m_videoProbeMFT->addProbe(m_videoProbes.at(i));
+
Q_ASSERT(m_session == NULL);
HRESULT hr = MFCreateMediaSession(NULL, &m_session);
if (FAILED(hr)) {
@@ -1334,29 +1558,41 @@ void MFPlayerSession::commitRateChange(qreal rate, BOOL isThin)
// Negative <-> zero: Stopped
// Postive <-> zero: Paused or stopped
if ((rate > 0 && m_state.rate <= 0) || (rate < 0 && m_state.rate >= 0)) {
- // Transition to stopped.
if (cmdNow == CmdStart) {
// Get the current clock position. This will be the restart time.
m_presentationClock->GetCorrelatedTime(0, &hnsClockTime, &hnsSystemTime);
Q_ASSERT(hnsSystemTime != 0);
- // Stop and set the rate
- stop();
+ // We need to stop only when dealing with negative rates
+ if (rate >= 0 && m_state.rate >= 0)
+ pause();
+ else
+ stop();
- //Cache Request: Restart from stop.
- m_request.setCommand(CmdSeekResume);
+ // If we deal with negative rates, we stopped the session and consequently
+ // reset the position to zero. We then need to resume to the current position.
+ m_request.setCommand(rate < 0 || m_state.rate < 0 ? CmdSeekResume : CmdStart);
m_request.start = hnsClockTime / 10000;
} else if (cmdNow == CmdPause) {
- // The current state is paused.
- // For this rate change, the session must be stopped. However, the
- // session cannot transition back from stopped to paused.
- // Therefore, this rate transition is not supported while paused.
if (rate < 0 || m_state.rate < 0) {
+ // The current state is paused.
+ // For this rate change, the session must be stopped. However, the
+ // session cannot transition back from stopped to paused.
+ // Therefore, this rate transition is not supported while paused.
qWarning() << "Unable to change rate from positive to negative or vice versa in paused state";
return;
}
+
+ // This happens when resuming playback after scrubbing in pause mode.
+ // This transition requires the session to be paused. Even though our
+ // internal state is set to paused, the session might not be so we need
+ // to enforce it
+ if (rate > 0 && m_state.rate == 0) {
+ m_state.setCommand(CmdNone);
+ pause();
+ }
}
- } else if (rate == 0 && m_state.rate != 0) {
+ } else if (rate == 0 && m_state.rate > 0) {
if (cmdNow != CmdPause) {
// Transition to paused.
// This transisition requires the paused state.
@@ -1366,6 +1602,15 @@ void MFPlayerSession::commitRateChange(qreal rate, BOOL isThin)
// Request: Switch back to current state.
m_request.setCommand(cmdNow);
}
+ } else if (rate == 0 && m_state.rate < 0) {
+ // Changing rate from negative to zero requires to stop the session
+ m_presentationClock->GetCorrelatedTime(0, &hnsClockTime, &hnsSystemTime);
+
+ stop();
+
+ // Resumte to the current position (stop() will reset the position to 0)
+ m_request.setCommand(CmdSeekResume);
+ m_request.start = hnsClockTime / 10000;
}
// Set the rate.
@@ -1569,7 +1814,9 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
break;
case MESourceUnknown:
changeStatus(QMediaPlayer::InvalidMedia);
+ break;
case MEError:
+ changeStatus(QMediaPlayer::UnknownMediaStatus);
qWarning() << "handleSessionEvent: serious error = " << hrStatus;
emit error(QMediaPlayer::ResourceError, tr("Media session serious error."), true);
break;
@@ -1590,8 +1837,7 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
updatePendingCommands(CmdStart);
break;
case MESessionStarted:
- if (!m_scrubbing)
- updatePendingCommands(CmdStart);
+ 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)
@@ -1605,10 +1851,10 @@ void MFPlayerSession::handleSessionEvent(IMFMediaEvent *sessionEvent)
m_varStart.vt = VT_I8;
m_varStart.hVal.QuadPart = 0;
- //only change to loadedMedia when not loading a new media source
- if (m_status != QMediaPlayer::LoadingMedia) {
+ // Reset to Loaded status unless we are loading a new media
+ // or if the media is buffered (to avoid restarting the video surface)
+ if (m_status != QMediaPlayer::LoadingMedia && m_status != QMediaPlayer::BufferedMedia)
changeStatus(QMediaPlayer::LoadedMedia);
- }
}
updatePendingCommands(CmdStop);
break;
@@ -1751,15 +1997,7 @@ void MFPlayerSession::updatePendingCommands(Command command)
// The current pending command has completed.
if (m_pendingState == SeekPending && m_state.prevCmd == CmdPause) {
m_pendingState = NoPending;
- //if we have pending seek request,
- //then we just keep current state to paused and continue the seek request,
- //otherwise we will restore to pause state
- if (m_request.command == CmdSeek) {
- m_state.setCommand(CmdPause);
- } else {
- pause();
- return;
- }
+ m_state.setCommand(CmdPause);
}
m_pendingState = NoPending;
diff --git a/src/plugins/wmf/player/mfplayersession.h b/src/plugins/wmf/player/mfplayersession.h
index b8b6f085e..e7f8dcffa 100644
--- a/src/plugins/wmf/player/mfplayersession.h
+++ b/src/plugins/wmf/player/mfplayersession.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -231,7 +231,10 @@ private:
IMFTopologyNode *m_audioSampleGrabberNode;
IMFTopology *insertMFT(IMFTopology *topology, TOPOID outputNodeId);
+ bool insertResizer(IMFTopology *topology);
+ void insertColorConverter(IMFTopology *topology, TOPOID outputNodeId);
MFTransform *m_videoProbeMFT;
+ QList<MFVideoProbeControl*> m_videoProbes;
};
diff --git a/src/plugins/wmf/player/mfvideoprobecontrol.cpp b/src/plugins/wmf/player/mfvideoprobecontrol.cpp
index 3db169fba..85d5de1ec 100644
--- a/src/plugins/wmf/player/mfvideoprobecontrol.cpp
+++ b/src/plugins/wmf/player/mfvideoprobecontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/player/mfvideoprobecontrol.h b/src/plugins/wmf/player/mfvideoprobecontrol.h
index 4980004bc..fa2f06dc2 100644
--- a/src/plugins/wmf/player/mfvideoprobecontrol.h
+++ b/src/plugins/wmf/player/mfvideoprobecontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.cpp b/src/plugins/wmf/player/mfvideorenderercontrol.cpp
index c3c5c1ae4..6baa3716e 100644
--- a/src/plugins/wmf/player/mfvideorenderercontrol.cpp
+++ b/src/plugins/wmf/player/mfvideorenderercontrol.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -40,7 +40,10 @@
****************************************************************************/
#include "mfvideorenderercontrol.h"
-#include <mferror.h>
+#include "mfglobal.h"
+#ifdef QT_OPENGL_ES_2_ANGLE
+#include "evrcustompresenter.h"
+#endif
#include <qabstractvideosurface.h>
#include <qvideosurfaceformat.h>
#include <qtcore/qtimer.h>
@@ -114,67 +117,6 @@ namespace
MapMode m_mapMode;
};
- template<class T>
- class AsyncCallback : public IMFAsyncCallback
- {
- public:
- typedef HRESULT (T::*InvokeFn)(IMFAsyncResult *pAsyncResult);
-
- AsyncCallback(T *pParent, InvokeFn fn) : m_pParent(pParent), m_pInvokeFn(fn)
- {
- }
-
- // IUnknown
- STDMETHODIMP QueryInterface(REFIID iid, void** ppv)
- {
- if (!ppv)
- {
- return E_POINTER;
- }
- if (iid == __uuidof(IUnknown))
- {
- *ppv = static_cast<IUnknown*>(static_cast<IMFAsyncCallback*>(this));
- }
- else if (iid == __uuidof(IMFAsyncCallback))
- {
- *ppv = static_cast<IMFAsyncCallback*>(this);
- }
- else
- {
- *ppv = NULL;
- return E_NOINTERFACE;
- }
- AddRef();
- return S_OK;
- }
- STDMETHODIMP_(ULONG) AddRef()
- {
- // Delegate to parent class.
- return m_pParent->AddRef();
- }
- STDMETHODIMP_(ULONG) Release()
- {
- // Delegate to parent class.
- return m_pParent->Release();
- }
-
- // IMFAsyncCallback methods
- STDMETHODIMP GetParameters(DWORD*, DWORD*)
- {
- // Implementation of this method is optional.
- return E_NOTIMPL;
- }
-
- STDMETHODIMP Invoke(IMFAsyncResult* pAsyncResult)
- {
- return (m_pParent->*m_pInvokeFn)(pAsyncResult);
- }
-
- T *m_pParent;
- InvokeFn m_pInvokeFn;
- };
-
-
// Custom interface for handling IMFStreamSink::PlaceMarker calls asynchronously.
MIDL_INTERFACE("a3ff32de-1031-438a-8b47-82f8acda59b7")
IMarker : public IUnknown
@@ -318,6 +260,7 @@ namespace
, m_prerollTargetTime(0)
, m_startTime(0)
, m_rendererControl(rendererControl)
+ , m_rate(1.f)
{
m_sink = parent;
@@ -1780,6 +1723,7 @@ namespace
, m_sink(0)
, m_rendererControl(rendererControl)
, m_attributes(0)
+ , m_surface(0)
{
MFCreateAttributes(&m_attributes, 0);
m_sink = new MediaSink(rendererControl);
@@ -2132,6 +2076,9 @@ MFVideoRendererControl::MFVideoRendererControl(QObject *parent)
, m_surface(0)
, m_currentActivate(0)
, m_callback(0)
+#ifdef QT_OPENGL_ES_2_ANGLE
+ , m_presenterActivate(0)
+#endif
{
}
@@ -2142,6 +2089,17 @@ MFVideoRendererControl::~MFVideoRendererControl()
void MFVideoRendererControl::clear()
{
+ if (m_surface)
+ m_surface->stop();
+
+#ifdef QT_OPENGL_ES_2_ANGLE
+ if (m_presenterActivate) {
+ m_presenterActivate->ShutdownObject();
+ m_presenterActivate->Release();
+ m_presenterActivate = NULL;
+ }
+#endif
+
if (m_currentActivate) {
m_currentActivate->ShutdownObject();
m_currentActivate->Release();
@@ -2149,6 +2107,11 @@ void MFVideoRendererControl::clear()
m_currentActivate = NULL;
}
+void MFVideoRendererControl::releaseActivate()
+{
+ clear();
+}
+
QAbstractVideoSurface *MFVideoRendererControl::surface() const
{
return m_surface;
@@ -2164,12 +2127,22 @@ void MFVideoRendererControl::setSurface(QAbstractVideoSurface *surface)
connect(m_surface, SIGNAL(supportedFormatsChanged()), this, SLOT(supportedFormatsChanged()));
}
+#ifdef QT_OPENGL_ES_2_ANGLE
+ if (m_presenterActivate)
+ m_presenterActivate->setSurface(m_surface);
+ else
+#endif
if (m_currentActivate)
static_cast<VideoRendererActivate*>(m_currentActivate)->setSurface(m_surface);
}
void MFVideoRendererControl::customEvent(QEvent *event)
{
+#ifdef QT_OPENGL_ES_2_ANGLE
+ if (m_presenterActivate)
+ return;
+#endif
+
if (!m_currentActivate)
return;
@@ -2183,36 +2156,59 @@ void MFVideoRendererControl::customEvent(QEvent *event)
present();
return;
}
- QChildEvent *childEvent = dynamic_cast<QChildEvent*>(event);
- if (!childEvent) {
+ if (event->type() >= MediaStream::StartSurface) {
+ QChildEvent *childEvent = static_cast<QChildEvent*>(event);
+ static_cast<MediaStream*>(childEvent->child())->customEvent(event);
+ } else {
QObject::customEvent(event);
- return;
}
- static_cast<MediaStream*>(childEvent->child())->customEvent(event);
}
void MFVideoRendererControl::supportedFormatsChanged()
{
+#ifdef QT_OPENGL_ES_2_ANGLE
+ if (m_presenterActivate)
+ m_presenterActivate->supportedFormatsChanged();
+ else
+#endif
if (m_currentActivate)
static_cast<VideoRendererActivate*>(m_currentActivate)->supportedFormatsChanged();
}
void MFVideoRendererControl::present()
{
+#ifdef QT_OPENGL_ES_2_ANGLE
+ if (m_presenterActivate)
+ return;
+#endif
+
if (m_currentActivate)
static_cast<VideoRendererActivate*>(m_currentActivate)->present();
}
IMFActivate* MFVideoRendererControl::createActivate()
{
+ Q_ASSERT(m_surface);
+
clear();
- m_currentActivate = new VideoRendererActivate(this);
- if (m_surface) {
- setSurface(m_surface);
- supportedFormatsChanged();
+#ifdef QT_OPENGL_ES_2_ANGLE
+ // We can use the EVR with our custom presenter only if the surface supports OpenGL
+ // texture handles
+ if (!m_surface->supportedPixelFormats(QAbstractVideoBuffer::GLTextureHandle).isEmpty()) {
+ // Create the EVR media sink, but replace the presenter with our own
+ if (SUCCEEDED(MFCreateVideoRendererActivate(::GetShellWindow(), &m_currentActivate))) {
+ m_presenterActivate = new EVRCustomPresenterActivate;
+ m_currentActivate->SetUnknown(MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE, m_presenterActivate);
+ }
}
+ if (!m_currentActivate)
+#endif
+ m_currentActivate = new VideoRendererActivate(this);
+
+ setSurface(m_surface);
+
return m_currentActivate;
}
diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.h b/src/plugins/wmf/player/mfvideorenderercontrol.h
index ba04e73b7..d796ce36d 100644
--- a/src/plugins/wmf/player/mfvideorenderercontrol.h
+++ b/src/plugins/wmf/player/mfvideorenderercontrol.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Mobility Components.
@@ -46,6 +46,14 @@
#include <mfapi.h>
#include <mfidl.h>
+QT_BEGIN_NAMESPACE
+
+#ifdef QT_OPENGL_ES_2_ANGLE
+class EVRCustomPresenterActivate;
+#endif
+
+QT_END_NAMESPACE
+
QT_USE_NAMESPACE
class MFVideoRendererControl : public QVideoRendererControl
@@ -59,6 +67,7 @@ public:
void setSurface(QAbstractVideoSurface *surface);
IMFActivate* createActivate();
+ void releaseActivate();
protected:
void customEvent(QEvent *event);
@@ -73,6 +82,10 @@ private:
QAbstractVideoSurface *m_surface;
IMFActivate *m_currentActivate;
IMFSampleGrabberSinkCallback *m_callback;
+
+#ifdef QT_OPENGL_ES_2_ANGLE
+ EVRCustomPresenterActivate *m_presenterActivate;
+#endif
};
#endif
diff --git a/src/plugins/wmf/player/player.pri b/src/plugins/wmf/player/player.pri
index ac8dc9f05..a72708b3f 100644
--- a/src/plugins/wmf/player/player.pri
+++ b/src/plugins/wmf/player/player.pri
@@ -24,7 +24,7 @@ SOURCES += \
$$PWD/mfaudioprobecontrol.cpp \
$$PWD/mfvideoprobecontrol.cpp
-!isEmpty(QT.widgets.name):!simulator {
+qtHaveModule(widgets):!simulator {
HEADERS += $$PWD/evr9videowindowcontrol.h
SOURCES += $$PWD/evr9videowindowcontrol.cpp
}
diff --git a/src/plugins/wmf/samplegrabber.cpp b/src/plugins/wmf/samplegrabber.cpp
index fe2411d1a..e4ead5397 100644
--- a/src/plugins/wmf/samplegrabber.cpp
+++ b/src/plugins/wmf/samplegrabber.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/samplegrabber.h b/src/plugins/wmf/samplegrabber.h
index 6957524df..7a5c2260b 100644
--- a/src/plugins/wmf/samplegrabber.h
+++ b/src/plugins/wmf/samplegrabber.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/sourceresolver.cpp b/src/plugins/wmf/sourceresolver.cpp
index 9abe65845..275fced96 100644
--- a/src/plugins/wmf/sourceresolver.cpp
+++ b/src/plugins/wmf/sourceresolver.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/sourceresolver.h b/src/plugins/wmf/sourceresolver.h
index 283973ab1..10aafcad9 100644
--- a/src/plugins/wmf/sourceresolver.h
+++ b/src/plugins/wmf/sourceresolver.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/wmf.pro b/src/plugins/wmf/wmf.pro
index fcd2a3268..a26f319bc 100644
--- a/src/plugins/wmf/wmf.pro
+++ b/src/plugins/wmf/wmf.pro
@@ -1,6 +1,6 @@
TARGET = wmfengine
QT += multimedia-private network
-!isEmpty(QT.widgets.name) {
+qtHaveModule(widgets) {
QT += multimediawidgets-private
DEFINES += HAVE_WIDGETS
}
@@ -16,14 +16,32 @@ HEADERS += \
mfstream.h \
sourceresolver.h \
samplegrabber.h \
- mftvideo.h
+ mftvideo.h \
+ mfglobal.h \
+ mfactivate.h
SOURCES += \
wmfserviceplugin.cpp \
mfstream.cpp \
sourceresolver.cpp \
samplegrabber.cpp \
- mftvideo.cpp
+ mftvideo.cpp \
+ mfactivate.cpp \
+ mfglobal.cpp
+
+contains(QT_CONFIG, angle) {
+ LIBS += -ld3d9 -ldxva2 -lwinmm -levr
+ QT += gui-private
+
+ HEADERS += \
+ evrcustompresenter.h \
+ evrd3dpresentengine.h
+
+ SOURCES += \
+ evrcustompresenter.cpp \
+ evrd3dpresentengine.cpp
+}
+
include (player/player.pri)
include (decoder/decoder.pri)
diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp
index 8cff66f30..0978069c9 100644
--- a/src/plugins/wmf/wmfserviceplugin.cpp
+++ b/src/plugins/wmf/wmfserviceplugin.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.
diff --git a/src/plugins/wmf/wmfserviceplugin.h b/src/plugins/wmf/wmfserviceplugin.h
index 25d8f82d3..bc2e6ff54 100644
--- a/src/plugins/wmf/wmfserviceplugin.h
+++ b/src/plugins/wmf/wmfserviceplugin.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
+** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of the Qt Toolkit.