summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.tests/resourcepolicy/main.cpp50
-rw-r--r--config.tests/resourcepolicy/resourcepolicy.pro14
-rw-r--r--config.tests/wmf/main.cpp36
-rw-r--r--doc/src/camera.qdoc7
-rw-r--r--doc/src/multimedia.qdoc9
-rw-r--r--doc/src/snippets/multimedia-snippets/audiorecorder.cpp2
-rw-r--r--doc/src/snippets/multimedia-snippets/player.cpp2
-rw-r--r--examples/audiodevices/audiodevices.pro1
-rw-r--r--examples/audiodevices/main.cpp2
-rw-r--r--examples/audioinput/audioinput.pro1
-rw-r--r--examples/audioinput/main.cpp2
-rw-r--r--examples/audiooutput/audiooutput.pro1
-rw-r--r--examples/audiooutput/main.cpp2
-rw-r--r--examples/audiorecorder/audiorecorder.cpp2
-rw-r--r--examples/audiorecorder/audiorecorder.h2
-rw-r--r--examples/audiorecorder/audiorecorder.pro1
-rw-r--r--examples/audiorecorder/main.cpp2
-rw-r--r--examples/camera/camera.cpp2
-rw-r--r--examples/camera/camera.pro3
-rw-r--r--examples/camera/imagesettings.cpp2
-rw-r--r--examples/camera/imagesettings.h2
-rw-r--r--examples/camera/main.cpp2
-rw-r--r--examples/camera/videosettings.cpp2
-rw-r--r--examples/camera/videosettings.h2
-rw-r--r--examples/declarative-camera/declarative-camera.pro1
-rw-r--r--examples/declarative-camera/qmlcamera.cpp4
-rw-r--r--examples/declarative-radio/declarative-radio.pro10
-rw-r--r--examples/declarative-radio/declarative-radio.qrc6
-rw-r--r--examples/declarative-radio/main.cpp58
-rw-r--r--examples/declarative-radio/view.qml191
-rw-r--r--examples/examples.pro2
-rw-r--r--examples/player/main.cpp2
-rw-r--r--examples/player/player.cpp2
-rw-r--r--examples/player/player.h2
-rw-r--r--examples/player/player.pro2
-rw-r--r--examples/player/playercontrols.cpp10
-rw-r--r--examples/player/playercontrols.h2
-rw-r--r--examples/player/videowidget.cpp2
-rw-r--r--examples/radio/main.cpp2
-rw-r--r--examples/radio/radio.cpp7
-rw-r--r--examples/radio/radio.h2
-rw-r--r--examples/radio/radio.pro1
-rw-r--r--examples/slideshow/main.cpp2
-rw-r--r--examples/slideshow/slideshow.cpp2
-rw-r--r--examples/slideshow/slideshow.pro3
-rw-r--r--examples/spectrum/app/app.pro1
-rw-r--r--examples/spectrum/app/main.cpp2
-rw-r--r--examples/spectrum/spectrum.pro1
-rw-r--r--examples/videographicsitem/main.cpp2
-rw-r--r--examples/videographicsitem/videographicsitem.pro3
-rw-r--r--examples/videographicsitem/videoitem.cpp2
-rw-r--r--examples/videographicsitem/videoitem.h2
-rw-r--r--examples/videographicsitem/videoplayer.cpp2
-rw-r--r--examples/videographicsitem/videoplayer.h2
-rw-r--r--examples/videowidget/main.cpp2
-rw-r--r--examples/videowidget/videoplayer.cpp2
-rw-r--r--examples/videowidget/videoplayer.h2
-rw-r--r--examples/videowidget/videowidget.cpp2
-rw-r--r--examples/videowidget/videowidget.h2
-rw-r--r--examples/videowidget/videowidget.pro3
-rw-r--r--examples/videowidget/videowidgetsurface.cpp2
-rw-r--r--modules/qt_multimediakitwidgets.pri17
-rw-r--r--src/imports/multimedia/multimedia.cpp4
-rw-r--r--src/imports/multimedia/multimedia.pro5
-rw-r--r--src/imports/multimedia/qdeclarativebackgroundaudio.cpp137
-rw-r--r--src/imports/multimedia/qdeclarativebackgroundaudio_p.h97
-rw-r--r--src/imports/multimedia/qdeclarativemediabase.cpp14
-rw-r--r--src/imports/multimedia/qdeclarativemediabase_p.h2
-rw-r--r--src/imports/multimedia/qdeclarativeradio.cpp212
-rw-r--r--src/imports/multimedia/qdeclarativeradio_p.h175
-rw-r--r--src/imports/multimedia/qsgvideonode_i420.cpp7
-rw-r--r--src/imports/multimedia/qsgvideonode_rgb32.cpp5
-rw-r--r--src/multimediakit/audio/qaudio.h3
-rw-r--r--src/multimediakit/audio/qaudio_mac_p.h3
-rw-r--r--src/multimediakit/audio/qaudiodevicefactory_p.h3
-rw-r--r--src/multimediakit/audio/qaudiodeviceinfo.cpp2
-rw-r--r--src/multimediakit/audio/qaudiodeviceinfo.h3
-rw-r--r--src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h8
-rw-r--r--src/multimediakit/audio/qaudiodeviceinfo_mac_p.h3
-rw-r--r--src/multimediakit/audio/qaudiodeviceinfo_win32_p.h8
-rw-r--r--src/multimediakit/audio/qaudioformat.h3
-rw-r--r--src/multimediakit/audio/qaudioinput.cpp6
-rw-r--r--src/multimediakit/audio/qaudioinput.h3
-rw-r--r--src/multimediakit/audio/qaudioinput_alsa_p.h8
-rw-r--r--src/multimediakit/audio/qaudioinput_mac_p.h3
-rw-r--r--src/multimediakit/audio/qaudioinput_win32_p.h8
-rw-r--r--src/multimediakit/audio/qaudiooutput.cpp10
-rw-r--r--src/multimediakit/audio/qaudiooutput.h3
-rw-r--r--src/multimediakit/audio/qaudiooutput_alsa_p.h8
-rw-r--r--src/multimediakit/audio/qaudiooutput_mac_p.h3
-rw-r--r--src/multimediakit/audio/qaudiooutput_win32_p.h8
-rw-r--r--src/multimediakit/audio/qaudiopluginloader.cpp4
-rw-r--r--src/multimediakit/audio/qaudiopluginloader_p.h8
-rw-r--r--src/multimediakit/audio/qaudiosystem.h3
-rw-r--r--src/multimediakit/audio/qaudiosystemplugin.h3
-rw-r--r--src/multimediakit/effects/qsamplecache_p.cpp10
-rw-r--r--src/multimediakit/effects/qsamplecache_p.h3
-rw-r--r--src/multimediakit/effects/qsoundeffect_p.h3
-rw-r--r--src/multimediakit/effects/qsoundeffect_pulse_p.cpp2
-rw-r--r--src/multimediakit/effects/qsoundeffect_pulse_p.h3
-rw-r--r--src/multimediakit/effects/qsoundeffect_qmedia_p.h3
-rw-r--r--src/multimediakit/effects/qsoundeffect_qsound_p.cpp2
-rw-r--r--src/multimediakit/effects/qsoundeffect_qsound_p.h3
-rw-r--r--src/multimediakit/effects/qwavedecoder_p.h3
-rw-r--r--src/multimediakit/multimediakit.pro40
-rw-r--r--src/multimediakit/qaudiocapturesource.h8
-rw-r--r--src/multimediakit/qaudioencodercontrol.h8
-rw-r--r--src/multimediakit/qaudioendpointselector.cpp2
-rw-r--r--src/multimediakit/qaudioendpointselector.h8
-rw-r--r--src/multimediakit/qcamera.cpp18
-rw-r--r--src/multimediakit/qcamera.h7
-rw-r--r--src/multimediakit/qcameracapturebufferformatcontrol.h8
-rw-r--r--src/multimediakit/qcameracapturedestinationcontrol.h8
-rw-r--r--src/multimediakit/qcameracontrol.h8
-rw-r--r--src/multimediakit/qcameraexposure.h7
-rw-r--r--src/multimediakit/qcameraexposurecontrol.h8
-rw-r--r--src/multimediakit/qcameraflashcontrol.cpp2
-rw-r--r--src/multimediakit/qcameraflashcontrol.h8
-rw-r--r--src/multimediakit/qcamerafocus.h7
-rw-r--r--src/multimediakit/qcamerafocuscontrol.h8
-rw-r--r--src/multimediakit/qcameraimagecapture.h7
-rw-r--r--src/multimediakit/qcameraimagecapturecontrol.h8
-rw-r--r--src/multimediakit/qcameraimageprocessing.h7
-rw-r--r--src/multimediakit/qcameraimageprocessingcontrol.h7
-rw-r--r--src/multimediakit/qcameralockscontrol.h8
-rw-r--r--src/multimediakit/qimageencodercontrol.h8
-rw-r--r--src/multimediakit/qlocalmediaplaylistprovider.h8
-rw-r--r--src/multimediakit/qmediabackgroundplaybackcontrol.cpp149
-rw-r--r--src/multimediakit/qmediabackgroundplaybackcontrol.h83
-rw-r--r--src/multimediakit/qmediabindableinterface.h8
-rw-r--r--src/multimediakit/qmediacontainercontrol.h8
-rw-r--r--src/multimediakit/qmediacontent.h7
-rw-r--r--src/multimediakit/qmediacontrol.cpp2
-rw-r--r--src/multimediakit/qmediacontrol.h8
-rw-r--r--src/multimediakit/qmediacontrol_p.h8
-rw-r--r--src/multimediakit/qmediaencodersettings.h8
-rw-r--r--src/multimediakit/qmediaimageviewer.cpp13
-rw-r--r--src/multimediakit/qmediaimageviewer.h7
-rw-r--r--src/multimediakit/qmediaimageviewerservice.cpp2
-rw-r--r--src/multimediakit/qmediaimageviewerservice_p.h10
-rw-r--r--src/multimediakit/qmedianetworkaccesscontrol.h8
-rw-r--r--src/multimediakit/qmediaobject.cpp4
-rw-r--r--src/multimediakit/qmediaobject.h8
-rw-r--r--src/multimediakit/qmediaobject_p.h8
-rw-r--r--src/multimediakit/qmediaplayer.cpp13
-rw-r--r--src/multimediakit/qmediaplayer.h5
-rw-r--r--src/multimediakit/qmediaplayercontrol.h8
-rw-r--r--src/multimediakit/qmediaplaylist.h7
-rw-r--r--src/multimediakit/qmediaplaylist_p.h8
-rw-r--r--src/multimediakit/qmediaplaylistcontrol.h8
-rw-r--r--src/multimediakit/qmediaplaylistioplugin.h8
-rw-r--r--src/multimediakit/qmediaplaylistnavigator.h8
-rw-r--r--src/multimediakit/qmediaplaylistprovider.h8
-rw-r--r--src/multimediakit/qmediaplaylistprovider_p.h8
-rw-r--r--src/multimediakit/qmediaplaylistsourcecontrol.h8
-rw-r--r--src/multimediakit/qmediapluginloader_p.h8
-rw-r--r--src/multimediakit/qmediarecorder.h7
-rw-r--r--src/multimediakit/qmediarecordercontrol.h8
-rw-r--r--src/multimediakit/qmediaresource.h6
-rw-r--r--src/multimediakit/qmediaservice.h8
-rw-r--r--src/multimediakit/qmediaservice_p.h8
-rw-r--r--src/multimediakit/qmediaserviceprovider.cpp13
-rw-r--r--src/multimediakit/qmediaserviceprovider.h11
-rw-r--r--src/multimediakit/qmediaserviceproviderplugin.h8
-rw-r--r--src/multimediakit/qmediastreamscontrol.h7
-rw-r--r--src/multimediakit/qmediatimerange.h8
-rw-r--r--src/multimediakit/qmetadatareadercontrol.h8
-rw-r--r--src/multimediakit/qmetadatawritercontrol.h8
-rw-r--r--src/multimediakit/qradiotuner.h7
-rw-r--r--src/multimediakit/qradiotunercontrol.h10
-rw-r--r--src/multimediakit/qtmedianamespace.h8
-rw-r--r--src/multimediakit/qtmultimediakitdefs.h2
-rw-r--r--src/multimediakit/qvideodevicecontrol.h7
-rw-r--r--src/multimediakit/qvideoencodercontrol.h8
-rw-r--r--src/multimediakit/qvideorenderercontrol.h8
-rw-r--r--src/multimediakit/qvideosurfaceoutput_p.h8
-rw-r--r--src/multimediakit/video/qabstractvideobuffer.cpp6
-rw-r--r--src/multimediakit/video/qabstractvideobuffer.h3
-rw-r--r--src/multimediakit/video/qabstractvideobuffer_p.h8
-rw-r--r--src/multimediakit/video/qabstractvideosurface.cpp4
-rw-r--r--src/multimediakit/video/qabstractvideosurface.h3
-rw-r--r--src/multimediakit/video/qimagevideobuffer_p.h8
-rw-r--r--src/multimediakit/video/qmemoryvideobuffer_p.h8
-rw-r--r--src/multimediakit/video/qvideoframe.cpp17
-rw-r--r--src/multimediakit/video/qvideoframe.h2
-rw-r--r--src/multimediakit/video/qvideosurfaceformat.cpp3
-rw-r--r--src/multimediakit/video/qvideosurfaceformat.h3
-rw-r--r--src/multimediakitwidgets/multimediakitwidgets.pro68
-rw-r--r--src/multimediakitwidgets/qcameraviewfinder.cpp (renamed from src/multimediakit/qcameraviewfinder.cpp)2
-rw-r--r--src/multimediakitwidgets/qcameraviewfinder.h (renamed from src/multimediakit/qcameraviewfinder.h)8
-rw-r--r--src/multimediakitwidgets/qeglimagetexturesurface.cpp (renamed from src/multimediakit/qeglimagetexturesurface.cpp)2
-rw-r--r--src/multimediakitwidgets/qeglimagetexturesurface_p.h (renamed from src/multimediakit/qeglimagetexturesurface_p.h)10
-rw-r--r--src/multimediakitwidgets/qgraphicsvideoitem.cpp (renamed from src/multimediakit/qgraphicsvideoitem.cpp)0
-rw-r--r--src/multimediakitwidgets/qgraphicsvideoitem.h (renamed from src/multimediakit/qgraphicsvideoitem.h)10
-rw-r--r--src/multimediakitwidgets/qgraphicsvideoitem_maemo6.cpp (renamed from src/multimediakit/qgraphicsvideoitem_maemo6.cpp)2
-rw-r--r--src/multimediakitwidgets/qpaintervideosurface.cpp (renamed from src/multimediakit/qpaintervideosurface.cpp)0
-rw-r--r--src/multimediakitwidgets/qpaintervideosurface_mac.mm (renamed from src/multimediakit/qpaintervideosurface_mac.mm)0
-rw-r--r--src/multimediakitwidgets/qpaintervideosurface_mac_p.h (renamed from src/multimediakit/qpaintervideosurface_mac_p.h)3
-rw-r--r--src/multimediakitwidgets/qpaintervideosurface_p.h (renamed from src/multimediakit/qpaintervideosurface_p.h)10
-rw-r--r--src/multimediakitwidgets/qtmultimediakitwidgetdefs.h85
-rw-r--r--src/multimediakitwidgets/qvideowidget.cpp (renamed from src/multimediakit/qvideowidget.cpp)0
-rw-r--r--src/multimediakitwidgets/qvideowidget.h (renamed from src/multimediakit/qvideowidget.h)12
-rw-r--r--src/multimediakitwidgets/qvideowidget_p.h (renamed from src/multimediakit/qvideowidget_p.h)10
-rw-r--r--src/multimediakitwidgets/qvideowidgetcontrol.cpp (renamed from src/multimediakit/qvideowidgetcontrol.cpp)2
-rw-r--r--src/multimediakitwidgets/qvideowidgetcontrol.h (renamed from src/multimediakit/qvideowidgetcontrol.h)10
-rw-r--r--src/multimediakitwidgets/qvideowindowcontrol.cpp (renamed from src/multimediakit/qvideowindowcontrol.cpp)0
-rw-r--r--src/multimediakitwidgets/qvideowindowcontrol.h (renamed from src/multimediakit/qvideowindowcontrol.h)10
-rw-r--r--src/plugins/directshow/camera/dscameraservice.cpp2
-rw-r--r--src/plugins/directshow/camera/dsvideodevicecontrol.cpp2
-rw-r--r--src/plugins/directshow/camera/dsvideowidgetcontrol.h2
-rw-r--r--src/plugins/fakeradio/fakeradio.pro23
-rw-r--r--src/plugins/fakeradio/fakeradioservice.cpp71
-rw-r--r--src/plugins/fakeradio/fakeradioservice.h67
-rw-r--r--src/plugins/fakeradio/fakeradioserviceplugin.cpp87
-rw-r--r--src/plugins/fakeradio/fakeradioserviceplugin.h63
-rw-r--r--src/plugins/fakeradio/fakeradiotunercontrol.cpp335
-rw-r--r--src/plugins/fakeradio/fakeradiotunercontrol.h123
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp4
-rw-r--r--src/plugins/gstreamer/camerabin/camerabinservice.cpp3
-rw-r--r--src/plugins/gstreamer/camerabuttonlistener_meego.cpp4
-rw-r--r--src/plugins/gstreamer/gstreamer.pro9
-rw-r--r--src/plugins/gstreamer/gstvideoconnector.c4
-rw-r--r--src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp4
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp3
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp2
-rw-r--r--src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp5
-rw-r--r--src/plugins/gstreamer/qgstcodecsinfo.cpp3
-rw-r--r--src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp2
-rw-r--r--src/plugins/gstreamer/qgstreamergltexturerenderer.cpp4
-rw-r--r--src/plugins/gstreamer/qgstreamerserviceplugin.cpp2
-rw-r--r--src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp2
-rw-r--r--src/plugins/gstreamer/qgstreamervideorenderer.cpp2
-rw-r--r--src/plugins/gstreamer/qgstreamervideowidget.cpp2
-rw-r--r--src/plugins/gstreamer/qgstxvimagebuffer.cpp2
-rw-r--r--src/plugins/gstreamer/qvideosurfacegstsink.cpp2
-rw-r--r--src/plugins/gstreamer/qx11videosurface.cpp2
-rw-r--r--src/plugins/gstreamer/qx11videosurface.h2
-rw-r--r--src/plugins/plugins.pro7
-rw-r--r--src/plugins/pulseaudio/qaudioinput_pulse.cpp2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playercontrol.h2
-rw-r--r--src/plugins/qt7/mediaplayer/qt7playersession.h2
-rw-r--r--src/plugins/qt7/qt7.pro2
-rw-r--r--src/plugins/qt7/qt7movierenderer.h2
-rw-r--r--src/plugins/qt7/qt7movievideowidget.h2
-rw-r--r--src/plugins/qt7/qt7movieviewoutput.h2
-rw-r--r--src/plugins/qt7/qt7movieviewrenderer.h2
-rw-r--r--src/plugins/qt7/qt7videooutput.h2
-rw-r--r--src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp2
-rw-r--r--src/plugins/simulator/qsimulatorserviceplugin.cpp2
-rw-r--r--src/plugins/v4l/radio/v4lradioservice.cpp2
-rw-r--r--src/plugins/wmf/player/evr9videowindowcontrol.cpp34
-rw-r--r--src/plugins/wmf/player/evr9videowindowcontrol.h34
-rw-r--r--src/plugins/wmf/player/mfaudioendpointcontrol.cpp36
-rw-r--r--src/plugins/wmf/player/mfaudioendpointcontrol.h34
-rw-r--r--src/plugins/wmf/player/mfmetadatacontrol.cpp34
-rw-r--r--src/plugins/wmf/player/mfmetadatacontrol.h34
-rw-r--r--src/plugins/wmf/player/mfplayercontrol.cpp35
-rw-r--r--src/plugins/wmf/player/mfplayercontrol.h34
-rw-r--r--src/plugins/wmf/player/mfplayerservice.cpp35
-rw-r--r--src/plugins/wmf/player/mfplayerservice.h34
-rw-r--r--src/plugins/wmf/player/mfplayersession.cpp35
-rw-r--r--src/plugins/wmf/player/mfplayersession.h34
-rw-r--r--src/plugins/wmf/player/mfstream.cpp34
-rw-r--r--src/plugins/wmf/player/mfstream.h37
-rw-r--r--src/plugins/wmf/player/mfvideorenderercontrol.cpp34
-rw-r--r--src/plugins/wmf/player/mfvideorenderercontrol.h34
-rw-r--r--src/plugins/wmf/player/sourceresolver.cpp34
-rw-r--r--src/plugins/wmf/player/sourceresolver.h34
-rw-r--r--src/plugins/wmf/wmf.pro2
-rw-r--r--src/plugins/wmf/wmfserviceplugin.cpp34
-rw-r--r--src/plugins/wmf/wmfserviceplugin.h34
-rw-r--r--src/src.pro4
-rw-r--r--sync.profile4
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/multimedia.pro42
-rw-r--r--tests/auto/multimediawidgets.pro25
-rw-r--r--tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro4
-rw-r--r--tests/auto/qabstractvideosurface/qabstractvideosurface.pro4
-rw-r--r--tests/auto/qaudiocapturesource/qaudiocapturesource.pro1
-rw-r--r--tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro3
-rw-r--r--tests/auto/qaudioformat/qaudioformat.pro4
-rw-r--r--tests/auto/qaudioinput/qaudioinput.pro3
-rw-r--r--tests/auto/qaudiooutput/qaudiooutput.pro3
-rw-r--r--tests/auto/qcamera/qcamera.pro4
-rw-r--r--tests/auto/qcamera/tst_qcamera.cpp65
-rw-r--r--tests/auto/qcamerabackend/qcamerabackend.pro5
-rw-r--r--tests/auto/qcameraimagecapture/qcameraimagecapture.pro1
-rw-r--r--tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp2
-rw-r--r--tests/auto/qcameraviewfinder/qcameraviewfinder.pro4
-rw-r--r--tests/auto/qcamerawidgets/qcamerawidgets.pro12
-rw-r--r--tests/auto/qcamerawidgets/tst_qcamerawidgets.cpp319
-rw-r--r--tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro4
-rw-r--r--tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp2
-rw-r--r--tests/auto/qdeclarativevideo/qdeclarativevideo.pro5
-rw-r--r--tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp2
-rw-r--r--tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro10
-rw-r--r--tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp6
-rw-r--r--tests/auto/qmediabindableinterface/qmediabindableinterface.pro1
-rw-r--r--tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro1
-rw-r--r--tests/auto/qmediacontent/qmediacontent.pro3
-rw-r--r--tests/auto/qmediaimageviewer/qmediaimageviewer.pro4
-rw-r--r--tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp21
-rw-r--r--tests/auto/qmediaimageviewerwidgets/images.qrc5
-rw-r--r--tests/auto/qmediaimageviewerwidgets/images/image.pngbin0 -> 230 bytes
-rw-r--r--tests/auto/qmediaimageviewerwidgets/qmediaimageviewerwidgets.pro16
-rw-r--r--tests/auto/qmediaimageviewerwidgets/tst_qmediaimageviewerwidgets.cpp142
-rw-r--r--tests/auto/qmediaobject/main.cpp2
-rw-r--r--tests/auto/qmediaobject/qmediaobject.pro4
-rw-r--r--tests/auto/qmediaobject/tst_qmediaobject.cpp1
-rwxr-xr-xtests/auto/qmediaplayer/main.cpp2
-rw-r--r--tests/auto/qmediaplayer/qmediaplayer.pro4
-rw-r--r--tests/auto/qmediaplayer/tst_qmediaplayer.cpp37
-rwxr-xr-xtests/auto/qmediaplayer/tst_qmediaplayer.h1
-rw-r--r--tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro3
-rwxr-xr-xtests/auto/qmediaplayerwidgets/main.cpp53
-rw-r--r--tests/auto/qmediaplayerwidgets/qmediaplayerwidgets.pro10
-rw-r--r--tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.cpp162
-rwxr-xr-xtests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.h79
-rw-r--r--tests/auto/qmediaplaylist/qmediaplaylist.pro4
-rw-r--r--tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro4
-rw-r--r--tests/auto/qmediapluginloader/qmediapluginloader.pro4
-rwxr-xr-xtests/auto/qmediarecorder/main.cpp2
-rw-r--r--tests/auto/qmediarecorder/qmediarecorder.pro4
-rw-r--r--tests/auto/qmediaresource/qmediaresource.pro4
-rw-r--r--tests/auto/qmediaservice/qmediaservice.pro5
-rw-r--r--tests/auto/qmediaservice/tst_qmediaservice.cpp3
-rw-r--r--tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro4
-rw-r--r--tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro1
-rw-r--r--tests/auto/qmediatimerange/qmediatimerange.pro4
-rw-r--r--tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro1
-rw-r--r--tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro1
-rw-r--r--tests/auto/qmultimedia_common/mockcameraservice.h16
-rw-r--r--tests/auto/qmultimedia_common/mockmediaplayerservice.h22
-rw-r--r--tests/auto/qmultimedia_common/mockmediaserviceprovider.h1
-rw-r--r--tests/auto/qmultimedia_common/mockvideo.pri8
-rw-r--r--tests/auto/qmultimedia_common/mockvideowindowcontrol.h3
-rw-r--r--tests/auto/qpaintervideosurface/qpaintervideosurface.pro9
-rw-r--r--tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp2
-rwxr-xr-xtests/auto/qradiotuner/main.cpp2
-rw-r--r--tests/auto/qradiotuner/qradiotuner.pro4
-rw-r--r--tests/auto/qsoundeffect/qsoundeffect.pro1
-rw-r--r--tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro1
-rw-r--r--tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro1
-rw-r--r--tests/auto/qvideoframe/qvideoframe.pro4
-rw-r--r--tests/auto/qvideoframe/tst_qvideoframe.cpp2
-rw-r--r--tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro4
-rw-r--r--tests/auto/qvideowidget/qvideowidget.pro10
-rw-r--r--tests/auto/qvideowidget/tst_qvideowidget.cpp2
-rw-r--r--tests/systemtests/audio/sys_audio.qtt295
-rw-r--r--tests/systemtests/camera/sys_camera.qtt181
-rw-r--r--tests/systemtests/radio/sys_radio.qtt130
-rw-r--r--tests/systemtests/video/sys_video.qtt269
352 files changed, 5206 insertions, 883 deletions
diff --git a/config.tests/resourcepolicy/main.cpp b/config.tests/resourcepolicy/main.cpp
new file mode 100644
index 000000000..711945a51
--- /dev/null
+++ b/config.tests/resourcepolicy/main.cpp
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <policy/resource.h>
+#include <policy/resources.h>
+#include <policy/resource-set.h>
+
+int main(int argc, char** argv)
+{
+ ResourcePolicy::ResourceSet *set = new ResourcePolicy::ResourceSet("player", this);
+ return 0;
+}
diff --git a/config.tests/resourcepolicy/resourcepolicy.pro b/config.tests/resourcepolicy/resourcepolicy.pro
new file mode 100644
index 000000000..79fa6a14b
--- /dev/null
+++ b/config.tests/resourcepolicy/resourcepolicy.pro
@@ -0,0 +1,14 @@
+TEMPLATE = app
+DEPENDPATH += .
+INCLUDEPATH += .
+
+requires(unix)
+
+# Input
+SOURCES += main.cpp
+
+CONFIG += link_pkgconfig
+
+PKGCONFIG += \
+ libresourceqt1
+
diff --git a/config.tests/wmf/main.cpp b/config.tests/wmf/main.cpp
index db361ca64..de5085200 100644
--- a/config.tests/wmf/main.cpp
+++ b/config.tests/wmf/main.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/doc/src/camera.qdoc b/doc/src/camera.qdoc
index 5e140be0c..36b8e9a6c 100644
--- a/doc/src/camera.qdoc
+++ b/doc/src/camera.qdoc
@@ -25,13 +25,6 @@
**
****************************************************************************/
-// XXX OMG its so bad
-// namespace warning
-// why mention control?
-// bad brief
-// control list
-// links?
-
/*!
\page camera.html
diff --git a/doc/src/multimedia.qdoc b/doc/src/multimedia.qdoc
index b8bcc5b82..bc4e2c138 100644
--- a/doc/src/multimedia.qdoc
+++ b/doc/src/multimedia.qdoc
@@ -32,15 +32,6 @@
APIs to play and record media, and manage a collection of media content.
*/
-// XXX title sucks
-// XXX move backend stuff away
-// XXX move QML stuff up
-// XXX more introductory material
-// XXX terminology
-// XXX separate pages for audio, video, camera, radio, metadata
-// control, mediaobject etc stuff
-// symbian/harmattan specific pages
-
/*!
\page multimedia.html
diff --git a/doc/src/snippets/multimedia-snippets/audiorecorder.cpp b/doc/src/snippets/multimedia-snippets/audiorecorder.cpp
index e93c44596..9d292c48f 100644
--- a/doc/src/snippets/multimedia-snippets/audiorecorder.cpp
+++ b/doc/src/snippets/multimedia-snippets/audiorecorder.cpp
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include <qaudiocapturesource.h>
#include <qmediarecorder.h>
diff --git a/doc/src/snippets/multimedia-snippets/player.cpp b/doc/src/snippets/multimedia-snippets/player.cpp
index 35947f412..0db3c1447 100644
--- a/doc/src/snippets/multimedia-snippets/player.cpp
+++ b/doc/src/snippets/multimedia-snippets/player.cpp
@@ -48,7 +48,7 @@
#include <qmediaservice.h>
#include <qmediaplaylist.h>
-#include <QtGui>
+#include <QtWidgets>
Player::Player(QWidget *parent)
: QWidget(parent)
diff --git a/examples/audiodevices/audiodevices.pro b/examples/audiodevices/audiodevices.pro
index 3b77ec21b..87391db1f 100644
--- a/examples/audiodevices/audiodevices.pro
+++ b/examples/audiodevices/audiodevices.pro
@@ -16,3 +16,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiodevices
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/audiodevices/main.cpp b/examples/audiodevices/main.cpp
index 691afb966..e64f2c50c 100644
--- a/examples/audiodevices/main.cpp
+++ b/examples/audiodevices/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "audiodevices.h"
diff --git a/examples/audioinput/audioinput.pro b/examples/audioinput/audioinput.pro
index 6d2aa501d..cd6306673 100644
--- a/examples/audioinput/audioinput.pro
+++ b/examples/audioinput/audioinput.pro
@@ -14,3 +14,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audioinput
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/audioinput/main.cpp b/examples/audioinput/main.cpp
index 9a9eb7042..a02c01ea9 100644
--- a/examples/audioinput/main.cpp
+++ b/examples/audioinput/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "audioinput.h"
diff --git a/examples/audiooutput/audiooutput.pro b/examples/audiooutput/audiooutput.pro
index 38159fa70..b289cdbfc 100644
--- a/examples/audiooutput/audiooutput.pro
+++ b/examples/audiooutput/audiooutput.pro
@@ -14,3 +14,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiooutput
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/audiooutput/main.cpp b/examples/audiooutput/main.cpp
index f411aeba1..0c187154e 100644
--- a/examples/audiooutput/main.cpp
+++ b/examples/audiooutput/main.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
-#include <QtGui>
+#include <QtWidgets>
#include "audiooutput.h"
diff --git a/examples/audiorecorder/audiorecorder.cpp b/examples/audiorecorder/audiorecorder.cpp
index ae6d3956e..38f08ac4b 100644
--- a/examples/audiorecorder/audiorecorder.cpp
+++ b/examples/audiorecorder/audiorecorder.cpp
@@ -39,7 +39,7 @@
****************************************************************************/
#include <QtCore/qdir.h>
-#include <QtGui/qfiledialog.h>
+#include <QtWidgets/qfiledialog.h>
#include <qaudiocapturesource.h>
#include <qmediarecorder.h>
diff --git a/examples/audiorecorder/audiorecorder.h b/examples/audiorecorder/audiorecorder.h
index 5e079ee23..51a777ccd 100644
--- a/examples/audiorecorder/audiorecorder.h
+++ b/examples/audiorecorder/audiorecorder.h
@@ -42,7 +42,7 @@
#define AUDIORECORDER_H
#include <QtCore/qurl.h>
-#include <QtGui/qmainwindow.h>
+#include <QtWidgets/qmainwindow.h>
#include <qmediarecorder.h>
diff --git a/examples/audiorecorder/audiorecorder.pro b/examples/audiorecorder/audiorecorder.pro
index 5ab3ec951..b5b5d1055 100644
--- a/examples/audiorecorder/audiorecorder.pro
+++ b/examples/audiorecorder/audiorecorder.pro
@@ -22,3 +22,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/audiorecorder
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/audiorecorder/main.cpp b/examples/audiorecorder/main.cpp
index 80223a42d..12c564800 100644
--- a/examples/audiorecorder/main.cpp
+++ b/examples/audiorecorder/main.cpp
@@ -40,7 +40,7 @@
#include "audiorecorder.h"
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char *argv[])
{
diff --git a/examples/camera/camera.cpp b/examples/camera/camera.cpp
index f9f37ce3d..b8bb675be 100644
--- a/examples/camera/camera.cpp
+++ b/examples/camera/camera.cpp
@@ -51,7 +51,7 @@
#include <qmessagebox.h>
#include <qpalette.h>
-#include <QtGui>
+#include <QtWidgets>
#if (defined(Q_WS_MAEMO_6)) && QT_VERSION >= 0x040700
#define HAVE_CAMERA_BUTTONS
diff --git a/examples/camera/camera.pro b/examples/camera/camera.pro
index caa58cb77..a519354ed 100644
--- a/examples/camera/camera.pro
+++ b/examples/camera/camera.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = camera
-QT += multimediakit
+QT += multimediakit multimediakitwidgets
HEADERS = \
camera.h \
@@ -25,3 +25,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/camera
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/camera/imagesettings.cpp b/examples/camera/imagesettings.cpp
index c1bb2bec6..c3b9b22c2 100644
--- a/examples/camera/imagesettings.cpp
+++ b/examples/camera/imagesettings.cpp
@@ -41,7 +41,7 @@
#include "imagesettings.h"
#include "ui_imagesettings.h"
-#include <QtGui/qcombobox.h>
+#include <QtWidgets/qcombobox.h>
#include <QtCore/qdebug.h>
#include <qcameraimagecapture.h>
#include <qmediaservice.h>
diff --git a/examples/camera/imagesettings.h b/examples/camera/imagesettings.h
index 6a245fc26..74bca37d1 100644
--- a/examples/camera/imagesettings.h
+++ b/examples/camera/imagesettings.h
@@ -41,7 +41,7 @@
#ifndef IMAGESETTINGS_H
#define IMAGESETTINGS_H
-#include <QtGui/QDialog>
+#include <QtWidgets/QDialog>
#include <qmediaencodersettings.h>
QT_BEGIN_NAMESPACE
diff --git a/examples/camera/main.cpp b/examples/camera/main.cpp
index 4fc98ec8d..af2fa4c86 100644
--- a/examples/camera/main.cpp
+++ b/examples/camera/main.cpp
@@ -40,7 +40,7 @@
#include "camera.h"
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char *argv[])
{
diff --git a/examples/camera/videosettings.cpp b/examples/camera/videosettings.cpp
index f9ab33362..c1d816012 100644
--- a/examples/camera/videosettings.cpp
+++ b/examples/camera/videosettings.cpp
@@ -41,7 +41,7 @@
#include "videosettings.h"
#include "ui_videosettings.h"
-#include <QtGui/qcombobox.h>
+#include <QtWidgets/qcombobox.h>
#include <QtCore/qdebug.h>
#include <qmediarecorder.h>
#include <qmediaservice.h>
diff --git a/examples/camera/videosettings.h b/examples/camera/videosettings.h
index b84dc8ed2..6cce31d0b 100644
--- a/examples/camera/videosettings.h
+++ b/examples/camera/videosettings.h
@@ -41,7 +41,7 @@
#ifndef VIDEOSETTINGS_H
#define VIDEOSETTINGS_H
-#include <QtGui/QDialog>
+#include <QtWidgets/QDialog>
#include <qmediaencodersettings.h>
QT_BEGIN_NAMESPACE
diff --git a/examples/declarative-camera/declarative-camera.pro b/examples/declarative-camera/declarative-camera.pro
index 455ea6298..ad544e9f4 100644
--- a/examples/declarative-camera/declarative-camera.pro
+++ b/examples/declarative-camera/declarative-camera.pro
@@ -19,3 +19,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/qml_camera
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/declarative-camera/qmlcamera.cpp b/examples/declarative-camera/qmlcamera.cpp
index e137fe9c2..697f797ce 100644
--- a/examples/declarative-camera/qmlcamera.cpp
+++ b/examples/declarative-camera/qmlcamera.cpp
@@ -38,8 +38,8 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
-#include <QtGui/QDesktopWidget>
+#include <QtWidgets/QApplication>
+#include <QtWidgets/QDesktopWidget>
#include <QtQuick1/qdeclarativeview.h>
#include <QtDeclarative/QDeclarativeEngine>
diff --git a/examples/declarative-radio/declarative-radio.pro b/examples/declarative-radio/declarative-radio.pro
new file mode 100644
index 000000000..f3dab6411
--- /dev/null
+++ b/examples/declarative-radio/declarative-radio.pro
@@ -0,0 +1,10 @@
+TEMPLATE = app
+TARGET = declarative-radio
+DEPENDPATH += .
+INCLUDEPATH += .
+QT += declarative multimediakit
+
+# Input
+SOURCES += main.cpp
+RESOURCES += declarative-radio.qrc
+
diff --git a/examples/declarative-radio/declarative-radio.qrc b/examples/declarative-radio/declarative-radio.qrc
new file mode 100644
index 000000000..ed01a64f6
--- /dev/null
+++ b/examples/declarative-radio/declarative-radio.qrc
@@ -0,0 +1,6 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+<file>view.qml</file>
+</qresource>
+</RCC>
+
diff --git a/examples/declarative-radio/main.cpp b/examples/declarative-radio/main.cpp
new file mode 100644
index 000000000..815642509
--- /dev/null
+++ b/examples/declarative-radio/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+ **
+ ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** All rights reserved.
+ ** Contact: Nokia Corporation (qt-info@nokia.com)
+ **
+ ** This file is part of the demonstration applications of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:BSD$
+ ** You may use this file under the terms of the BSD license as follows:
+ **
+ ** "Redistribution and use in source and binary forms, with or without
+ ** modification, are permitted provided that the following conditions are
+ ** met:
+ ** * Redistributions of source code must retain the above copyright
+ ** notice, this list of conditions and the following disclaimer.
+ ** * Redistributions in binary form must reproduce the above copyright
+ ** notice, this list of conditions and the following disclaimer in
+ ** the documentation and/or other materials provided with the
+ ** distribution.
+ ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+ ** the names of its contributors may be used to endorse or promote
+ ** products derived from this software without specific prior written
+ ** permission.
+ **
+ ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ ** $QT_END_LICENSE$
+ **
+ ****************************************************************************/
+
+#include <QGuiApplication>
+
+#include <qdeclarative.h>
+#include <qsgview.h>
+
+
+int main(int argc, char ** argv)
+{
+ QGuiApplication app(argc, argv);
+
+ QSGView view;
+
+ view.setSource(QUrl("qrc:view.qml"));
+ view.show();
+
+ return app.exec();
+}
+
diff --git a/examples/declarative-radio/view.qml b/examples/declarative-radio/view.qml
new file mode 100644
index 000000000..4e2882d45
--- /dev/null
+++ b/examples/declarative-radio/view.qml
@@ -0,0 +1,191 @@
+/****************************************************************************
+ **
+ ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+ ** All rights reserved.
+ ** Contact: Nokia Corporation (qt-info@nokia.com)
+ **
+ ** This file is part of the examples of the Qt Toolkit.
+ **
+ ** $QT_BEGIN_LICENSE:BSD$
+ ** You may use this file under the terms of the BSD license as follows:
+ **
+ ** "Redistribution and use in source and binary forms, with or without
+ ** modification, are permitted provided that the following conditions are
+ ** met:
+ ** * Redistributions of source code must retain the above copyright
+ ** notice, this list of conditions and the following disclaimer.
+ ** * Redistributions in binary form must reproduce the above copyright
+ ** notice, this list of conditions and the following disclaimer in
+ ** the documentation and/or other materials provided with the
+ ** distribution.
+ ** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+ ** the names of its contributors may be used to endorse or promote
+ ** products derived from this software without specific prior written
+ ** permission.
+ **
+ ** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ ** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ ** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ ** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ ** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ ** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ ** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ ** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ ** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+ ** $QT_END_LICENSE$
+ **
+ ****************************************************************************/
+
+import QtQuick 2.0
+import Qt.multimediakit 4.0
+
+Rectangle {
+ width: 400; height: 300;
+
+ Radio {
+ id: radio
+ band: Radio.FM
+ }
+
+ Column {
+ anchors.fill: parent
+ anchors.margins: 5
+ spacing: 5
+
+ Row {
+
+ Text {
+ id: freq
+
+ width: 150
+ height: 200
+
+ verticalAlignment: Text.AlignVCenter
+ text: "" + radio.frequency / 1000 + " kHz"
+ }
+ Text {
+ id: sig
+
+ width: 200
+ height: 200
+
+ verticalAlignment: Text.AlignVCenter
+ text: (radio.isAvailable() ? "No Signal " : "No Radio Found")
+ }
+ }
+
+ Row {
+ spacing: 5
+
+ Rectangle {
+ width: 350
+ height: 10
+
+ color: "black"
+
+ Rectangle {
+ width: 5
+ height: 10
+ color: "red"
+
+ y: 0
+ x: (parent.width - 5) * ((radio.frequency - radio.minimumFrequency) / (radio.maximumFrequency -
+ radio.minimumFrequency))
+
+ }
+ }
+ }
+
+
+ Row {
+ spacing: 5
+
+ Rectangle {
+ id: scanDownButton
+ border.color: "black"
+ border.width: 1
+ radius: 2
+
+ width: 90
+ height: 40
+
+ Text {
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: "Scan Down"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: radio.scanDown();
+ }
+ }
+ Rectangle {
+ id: freqDownButton
+ border.color: "black"
+ border.width: 1
+ radius: 2
+
+ width: 90
+ height: 40
+
+ Text {
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: "Freq Down"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: radio.tuneDown();
+ }
+ }
+ Rectangle {
+ id: freqUpButton
+ border.color: "black"
+ border.width: 1
+ radius: 2
+
+ width: 90
+ height: 40
+
+ Text {
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: "Freq Up"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: radio.tuneUp();
+ }
+ }
+ Rectangle {
+ id: scanUpButton
+ border.color: "black"
+ border.width: 1
+ radius: 2
+
+ width: 90
+ height: 40
+
+ Text {
+ anchors.fill: parent
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: "Scan Up"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: radio.scanUp();
+ }
+ }
+ }
+ }
+}
diff --git a/examples/examples.pro b/examples/examples.pro
index 2a1a2338e..e26fab068 100644
--- a/examples/examples.pro
+++ b/examples/examples.pro
@@ -15,5 +15,7 @@ SUBDIRS += \
contains(QT_CONFIG, declarative) {
disabled:SUBDIRS += declarative-camera
+ SUBDIRS += declarative-radio
}
+QT+=widgets
diff --git a/examples/player/main.cpp b/examples/player/main.cpp
index 42326a764..b995658ba 100644
--- a/examples/player/main.cpp
+++ b/examples/player/main.cpp
@@ -40,7 +40,7 @@
#include "player.h"
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char *argv[])
{
diff --git a/examples/player/player.cpp b/examples/player/player.cpp
index 29612859a..18c9885aa 100644
--- a/examples/player/player.cpp
+++ b/examples/player/player.cpp
@@ -46,7 +46,7 @@
#include <qmediaservice.h>
#include <qmediaplaylist.h>
-#include <QtGui>
+#include <QtWidgets>
Player::Player(QWidget *parent)
diff --git a/examples/player/player.h b/examples/player/player.h
index ff579451b..eddf5f6b3 100644
--- a/examples/player/player.h
+++ b/examples/player/player.h
@@ -41,7 +41,7 @@
#ifndef PLAYER_H
#define PLAYER_H
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
#include <qmediaplayer.h>
#include <qmediaplaylist.h>
diff --git a/examples/player/player.pro b/examples/player/player.pro
index 687779f0f..58b6f8ed7 100644
--- a/examples/player/player.pro
+++ b/examples/player/player.pro
@@ -6,6 +6,7 @@ CONFIG += qt warn_on
QT += network \
xml \
multimediakit \
+ multimediakitwidgets
HEADERS = \
player.h \
@@ -28,3 +29,4 @@ sources.files = $$SOURCES $HEADERS $$RESOURCES $$FORMS *.pro
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/player
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/player/playercontrols.cpp b/examples/player/playercontrols.cpp
index 86272a52f..d6239fda1 100644
--- a/examples/player/playercontrols.cpp
+++ b/examples/player/playercontrols.cpp
@@ -40,11 +40,11 @@
#include "playercontrols.h"
-#include <QtGui/qboxlayout.h>
-#include <QtGui/qslider.h>
-#include <QtGui/qstyle.h>
-#include <QtGui/qtoolbutton.h>
-#include <QtGui/qcombobox.h>
+#include <QtWidgets/qboxlayout.h>
+#include <QtWidgets/qslider.h>
+#include <QtWidgets/qstyle.h>
+#include <QtWidgets/qtoolbutton.h>
+#include <QtWidgets/qcombobox.h>
PlayerControls::PlayerControls(QWidget *parent)
: QWidget(parent)
diff --git a/examples/player/playercontrols.h b/examples/player/playercontrols.h
index 26efb787a..dbcb2631b 100644
--- a/examples/player/playercontrols.h
+++ b/examples/player/playercontrols.h
@@ -43,7 +43,7 @@
#include <qmediaplayer.h>
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
QT_BEGIN_NAMESPACE
class QAbstractButton;
diff --git a/examples/player/videowidget.cpp b/examples/player/videowidget.cpp
index 5925aceec..b9809671d 100644
--- a/examples/player/videowidget.cpp
+++ b/examples/player/videowidget.cpp
@@ -40,7 +40,7 @@
#include "videowidget.h"
-#include <QtGui>
+#include <QtWidgets>
VideoWidget::VideoWidget(QWidget *parent)
: QVideoWidget(parent)
diff --git a/examples/radio/main.cpp b/examples/radio/main.cpp
index 1695d719e..56947b16b 100644
--- a/examples/radio/main.cpp
+++ b/examples/radio/main.cpp
@@ -40,7 +40,7 @@
#include "radio.h"
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char *argv[])
{
diff --git a/examples/radio/radio.cpp b/examples/radio/radio.cpp
index 0d4c33e93..f5e6591f3 100644
--- a/examples/radio/radio.cpp
+++ b/examples/radio/radio.cpp
@@ -40,13 +40,11 @@
#include "radio.h"
-#include <QtGui>
+#include <QtWidgets>
Radio::Radio()
{
radio = new QRadioTuner;
- connect(radio,SIGNAL(frequencyChanged(int)),this,SLOT(freqChanged(int)));
- connect(radio,SIGNAL(signalStrengthChanged(int)),this,SLOT(signalChanged(int)));
connect(radio, SIGNAL(error(QRadioTuner::Error)), this, SLOT(error(QRadioTuner::Error)));
if(radio->isBandSupported(QRadioTuner::FM))
@@ -62,6 +60,7 @@ Radio::Radio()
freq = new QLabel;
freq->setText(QString("%1 kHz").arg(radio->frequency()/1000));
topBar->addWidget(freq);
+ connect(radio,SIGNAL(frequencyChanged(int)),this,SLOT(freqChanged(int)));
signal = new QLabel;
if (radio->isAvailable())
@@ -69,6 +68,8 @@ Radio::Radio()
else
signal->setText(tr("No radio found"));
topBar->addWidget(signal);
+ connect(radio,SIGNAL(signalStrengthChanged(int)),this,SLOT(signalChanged(int)));
+
volumeSlider = new QSlider(Qt::Vertical,this);
volumeSlider->setRange(0,100);
volumeSlider->setValue(50);
diff --git a/examples/radio/radio.h b/examples/radio/radio.h
index c8e2ac3a3..bd30b3b97 100644
--- a/examples/radio/radio.h
+++ b/examples/radio/radio.h
@@ -41,7 +41,7 @@
#ifndef RADIO_H
#define RADIO_H
-#include <QtGui>
+#include <QtWidgets>
#include <qradiotuner.h>
diff --git a/examples/radio/radio.pro b/examples/radio/radio.pro
index db4bb0d4d..de55c591b 100644
--- a/examples/radio/radio.pro
+++ b/examples/radio/radio.pro
@@ -16,3 +16,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/radio
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/slideshow/main.cpp b/examples/slideshow/main.cpp
index 23aca43bd..ffa493f17 100644
--- a/examples/slideshow/main.cpp
+++ b/examples/slideshow/main.cpp
@@ -40,7 +40,7 @@
#include "slideshow.h"
-#include <QtGui>
+#include <QtWidgets>
int main(int argc, char *argv[])
{
diff --git a/examples/slideshow/slideshow.cpp b/examples/slideshow/slideshow.cpp
index 14d17ea6b..fea2ee64a 100644
--- a/examples/slideshow/slideshow.cpp
+++ b/examples/slideshow/slideshow.cpp
@@ -44,7 +44,7 @@
#include <qmediaplaylist.h>
#include <qvideowidget.h>
-#include <QtGui>
+#include <QtWidgets>
SlideShow::SlideShow(QWidget *parent)
: QMainWindow(parent)
diff --git a/examples/slideshow/slideshow.pro b/examples/slideshow/slideshow.pro
index 017addd7a..c4cb38080 100644
--- a/examples/slideshow/slideshow.pro
+++ b/examples/slideshow/slideshow.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = slideshow
-QT += multimediakit
+QT += multimediakit multimediakitwidgets
HEADERS = \
slideshow.h
@@ -16,3 +16,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/slideshow
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/spectrum/app/app.pro b/examples/spectrum/app/app.pro
index 120ea43c1..28cc16ab0 100644
--- a/examples/spectrum/app/app.pro
+++ b/examples/spectrum/app/app.pro
@@ -90,3 +90,4 @@ macx {
}
+QT+=widgets
diff --git a/examples/spectrum/app/main.cpp b/examples/spectrum/app/main.cpp
index ca4f078db..af567a000 100644
--- a/examples/spectrum/app/main.cpp
+++ b/examples/spectrum/app/main.cpp
@@ -38,7 +38,7 @@
**
****************************************************************************/
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
#include "mainwidget.h"
int main(int argc, char **argv)
diff --git a/examples/spectrum/spectrum.pro b/examples/spectrum/spectrum.pro
index 43e04664b..989ad11d9 100644
--- a/examples/spectrum/spectrum.pro
+++ b/examples/spectrum/spectrum.pro
@@ -17,3 +17,4 @@ sources.files = README.txt spectrum.pri spectrum.pro TODO.txt
sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/spectrum
INSTALLS += sources
+QT+=widgets
diff --git a/examples/videographicsitem/main.cpp b/examples/videographicsitem/main.cpp
index bf3f331aa..78721dab3 100644
--- a/examples/videographicsitem/main.cpp
+++ b/examples/videographicsitem/main.cpp
@@ -40,7 +40,7 @@
#include "videoplayer.h"
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
int main(int argc, char **argv)
{
diff --git a/examples/videographicsitem/videographicsitem.pro b/examples/videographicsitem/videographicsitem.pro
index 4924ab551..54002cf50 100644
--- a/examples/videographicsitem/videographicsitem.pro
+++ b/examples/videographicsitem/videographicsitem.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = videographicsitem
-QT += multimediakit
+QT += multimediakit multimediakitwidgets
contains(QT_CONFIG, opengl): QT += opengl
@@ -18,3 +18,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/videographicsitem
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/videographicsitem/videoitem.cpp b/examples/videographicsitem/videoitem.cpp
index e82fe9dd7..d314ac052 100644
--- a/examples/videographicsitem/videoitem.cpp
+++ b/examples/videographicsitem/videoitem.cpp
@@ -40,7 +40,7 @@
#include "videoitem.h"
-#include <QtGui>
+#include <QtWidgets>
#include <qvideosurfaceformat.h>
VideoItem::VideoItem(QGraphicsItem *parent)
diff --git a/examples/videographicsitem/videoitem.h b/examples/videographicsitem/videoitem.h
index 53342804a..48215a178 100644
--- a/examples/videographicsitem/videoitem.h
+++ b/examples/videographicsitem/videoitem.h
@@ -42,7 +42,7 @@
#define VIDEOITEM_H
#include <qabstractvideosurface.h>
-#include <QtGui/QGraphicsItem>
+#include <QtWidgets/QGraphicsItem>
class VideoItem
: public QAbstractVideoSurface,
diff --git a/examples/videographicsitem/videoplayer.cpp b/examples/videographicsitem/videoplayer.cpp
index dcda7cbb7..b406d51f5 100644
--- a/examples/videographicsitem/videoplayer.cpp
+++ b/examples/videographicsitem/videoplayer.cpp
@@ -41,7 +41,7 @@
#include "videoplayer.h"
#include "videoitem.h"
-#include <QtGui>
+#include <QtWidgets>
#include <qvideosurfaceformat.h>
#if !defined(QT_NO_OPENGL)
diff --git a/examples/videographicsitem/videoplayer.h b/examples/videographicsitem/videoplayer.h
index 5ca3eb0b3..e08a9dd2f 100644
--- a/examples/videographicsitem/videoplayer.h
+++ b/examples/videographicsitem/videoplayer.h
@@ -44,7 +44,7 @@
#include <qmediaplayer.h>
#include <QtGui/QMovie>
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class QAbstractButton;
diff --git a/examples/videowidget/main.cpp b/examples/videowidget/main.cpp
index b6fac52a1..725e637c5 100644
--- a/examples/videowidget/main.cpp
+++ b/examples/videowidget/main.cpp
@@ -40,7 +40,7 @@
#include "videoplayer.h"
-#include <QtGui/QApplication>
+#include <QtWidgets/QApplication>
int main(int argc, char *argv[])
{
diff --git a/examples/videowidget/videoplayer.cpp b/examples/videowidget/videoplayer.cpp
index 3f0c3f4bd..589d0c9b9 100644
--- a/examples/videowidget/videoplayer.cpp
+++ b/examples/videowidget/videoplayer.cpp
@@ -42,7 +42,7 @@
#include "videowidget.h"
-#include <QtGui>
+#include <QtWidgets>
#include <qvideosurfaceformat.h>
VideoPlayer::VideoPlayer(QWidget *parent)
diff --git a/examples/videowidget/videoplayer.h b/examples/videowidget/videoplayer.h
index 5dd0e1101..573baa152 100644
--- a/examples/videowidget/videoplayer.h
+++ b/examples/videowidget/videoplayer.h
@@ -44,7 +44,7 @@
#include <qmediaplayer.h>
#include <QtGui/QMovie>
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class QAbstractButton;
diff --git a/examples/videowidget/videowidget.cpp b/examples/videowidget/videowidget.cpp
index 8dbc1f07f..3b4fdfbb1 100644
--- a/examples/videowidget/videowidget.cpp
+++ b/examples/videowidget/videowidget.cpp
@@ -42,7 +42,7 @@
#include "videowidgetsurface.h"
-#include <QtGui>
+#include <QtWidgets>
#include <qvideosurfaceformat.h>
//! [0]
diff --git a/examples/videowidget/videowidget.h b/examples/videowidget/videowidget.h
index 917e0063d..87987cba7 100644
--- a/examples/videowidget/videowidget.h
+++ b/examples/videowidget/videowidget.h
@@ -43,7 +43,7 @@
#include "videowidgetsurface.h"
-#include <QtGui/QWidget>
+#include <QtWidgets/QWidget>
QT_BEGIN_NAMESPACE
class QAbstractVideoSurface;
diff --git a/examples/videowidget/videowidget.pro b/examples/videowidget/videowidget.pro
index 40f2cc17a..4e442563b 100644
--- a/examples/videowidget/videowidget.pro
+++ b/examples/videowidget/videowidget.pro
@@ -1,7 +1,7 @@
TEMPLATE = app
TARGET = videowidget
-QT += multimediakit
+QT += multimediakit multimediakitwidgets
HEADERS = \
videoplayer.h \
@@ -20,3 +20,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtmultimediakit/videowidget
INSTALLS += target sources
+QT+=widgets
diff --git a/examples/videowidget/videowidgetsurface.cpp b/examples/videowidget/videowidgetsurface.cpp
index 4a18c95a2..a0b71bf35 100644
--- a/examples/videowidget/videowidgetsurface.cpp
+++ b/examples/videowidget/videowidgetsurface.cpp
@@ -40,7 +40,7 @@
#include "videowidgetsurface.h"
-#include <QtGui>
+#include <QtWidgets>
#include <qabstractvideosurface.h>
#include <qvideosurfaceformat.h>
diff --git a/modules/qt_multimediakitwidgets.pri b/modules/qt_multimediakitwidgets.pri
new file mode 100644
index 000000000..55faee924
--- /dev/null
+++ b/modules/qt_multimediakitwidgets.pri
@@ -0,0 +1,17 @@
+QT.multimediakitwidgets.VERSION = 5.0.0
+QT.multimediakitwidgets.MAJOR_VERSION = 5
+QT.multimediakitwidgets.MINOR_VERSION = 0
+QT.multimediakitwidgets.PATCH_VERSION = 0
+
+QT.multimediakitwidgets.name = QtMultimediaKitWidgets
+QT.multimediakitwidgets.bins = $$QT_MODULE_BIN_BASE
+QT.multimediakitwidgets.includes = $$QT_MODULE_INCLUDE_BASE $$QT_MODULE_INCLUDE_BASE/QtMultimediaKitWidgets
+QT.multimediakitwidgets.private_includes = $$QT_MODULE_INCLUDE_BASE/QtMultimediaKitWidgets/$$QT.multimediakitwidgets.VERSION
+QT.multimediakitwidgets.sources = $$QT_MODULE_BASE/src/multimediakitwidgets
+QT.multimediakitwidgets.libs = $$QT_MODULE_LIB_BASE
+QT.multimediakitwidgets.plugins = $$QT_MODULE_PLUGIN_BASE
+QT.multimediakitwidgets.imports = $$QT_MODULE_IMPORT_BASE
+QT.multimediakitwidgets.depends = gui network
+QT.multimediakitwidgets.DEFINES = QT_MULTIMEDIAKITWIDGETS_LIB
+
+QT_CONFIG += multimediakitwidgets
diff --git a/src/imports/multimedia/multimedia.cpp b/src/imports/multimedia/multimedia.cpp
index 753fc431f..2de7401c9 100644
--- a/src/imports/multimedia/multimedia.cpp
+++ b/src/imports/multimedia/multimedia.cpp
@@ -48,6 +48,8 @@
#include "qdeclarativemediametadata_p.h"
#include "qdeclarativeaudio_p.h"
#include "qdeclarativevideooutput_p.h"
+#include "qdeclarativeradio_p.h"
+#include "qdeclarativebackgroundaudio_p.h"
#include "qdeclarativecamera_p.h"
#include "qdeclarativecamerapreviewprovider_p.h"
#include "qdeclarativecameraexposure_p.h"
@@ -72,6 +74,8 @@ public:
qmlRegisterType<QDeclarativeAudio>(uri, 4, 0, "Audio");
qmlRegisterType<QDeclarativeAudio>(uri, 4, 0, "MediaPlayer");
qmlRegisterType<QDeclarativeVideoOutput>(uri, 4, 0, "VideoOutput");
+ qmlRegisterType<QDeclarativeRadio>(uri, 4, 0, "Radio");
+ qmlRegisterType<QDeclarativeBackgroundAudio>(uri, 4, 0, "BackgroundAudio");
qmlRegisterType<QDeclarativeCamera>(uri, 4, 0, "Camera");
qmlRegisterUncreatableType<QDeclarativeCameraCapture>(uri, 4, 0, "CameraCapture",
trUtf8("CameraCapture is only provided by Camera element"));
diff --git a/src/imports/multimedia/multimedia.pro b/src/imports/multimedia/multimedia.pro
index c300e9846..4574d0247 100644
--- a/src/imports/multimedia/multimedia.pro
+++ b/src/imports/multimedia/multimedia.pro
@@ -16,6 +16,8 @@ HEADERS += \
qsgvideonode_p.h \
qsgvideonode_i420.h \
qsgvideonode_rgb32.h \
+ qdeclarativeradio_p.h \
+ qdeclarativebackgroundaudio_p.h \
qdeclarativecamera_p.h \
qdeclarativecameracapture_p.h \
qdeclarativecamerarecorder_p.h \
@@ -25,7 +27,6 @@ HEADERS += \
qdeclarativecameraimageprocessing_p.h \
qdeclarativecamerapreviewprovider_p.h
-
SOURCES += \
multimedia.cpp \
qdeclarativeaudio.cpp \
@@ -34,6 +35,8 @@ SOURCES += \
qsgvideonode.cpp \
qsgvideonode_i420.cpp \
qsgvideonode_rgb32.cpp \
+ qdeclarativeradio.cpp \
+ qdeclarativebackgroundaudio.cpp \
qdeclarativecamera.cpp \
qdeclarativecameracapture.cpp \
qdeclarativecamerarecorder.cpp \
diff --git a/src/imports/multimedia/qdeclarativebackgroundaudio.cpp b/src/imports/multimedia/qdeclarativebackgroundaudio.cpp
new file mode 100644
index 000000000..d56e9992f
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativebackgroundaudio.cpp
@@ -0,0 +1,137 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include "qdeclarativebackgroundaudio_p.h"
+#include <qmediabackgroundplaybackcontrol.h>
+#include <qmediaservice.h>
+
+void QDeclarativeBackgroundAudio::classBegin()
+{
+}
+
+void QDeclarativeBackgroundAudio::componentComplete()
+{
+ setObject(this, QMediaServiceProviderHint(QMediaServiceProviderHint::BackgroundPlayback));
+ if (m_mediaService) {
+ m_backgroundPlaybackControl =
+ static_cast<QMediaBackgroundPlaybackControl*>(
+ m_mediaService->requestControl(QMediaBackgroundPlaybackControl_iid));
+ if (m_backgroundPlaybackControl) {
+ connect(m_backgroundPlaybackControl, SIGNAL(acquired()), this, SIGNAL(acquiredChanged()));
+ connect(m_backgroundPlaybackControl, SIGNAL(lost()), this, SIGNAL(acquiredChanged()));
+ if (!m_contextId.isEmpty())
+ m_backgroundPlaybackControl->setContextId(m_contextId);
+ } else {
+ qWarning("can not get QMediaBackgroundPlaybackControl!");
+ }
+ }
+ QDeclarativeMediaBase::componentComplete();
+}
+
+QDeclarativeBackgroundAudio::QDeclarativeBackgroundAudio(QObject *parent)
+ : QDeclarativeAudio(parent)
+ , m_backgroundPlaybackControl(0)
+{
+
+}
+
+QDeclarativeBackgroundAudio::~QDeclarativeBackgroundAudio()
+{
+ if (m_backgroundPlaybackControl)
+ m_mediaService->releaseControl(m_backgroundPlaybackControl);
+}
+
+/*!
+ \qmlproperty string BackgroundAudio::contextId
+
+ This property holds the unique contextId for the application
+
+ When a new contextId is set, the previously set contextId will be released automatically.
+*/
+QString QDeclarativeBackgroundAudio::contextId() const
+{
+ return m_contextId;
+}
+
+void QDeclarativeBackgroundAudio::setContextId(QString contextId)
+{
+ if (m_contextId == contextId)
+ return;
+ m_contextId = contextId;
+ if (m_backgroundPlaybackControl)
+ m_backgroundPlaybackControl->setContextId(m_contextId);
+ emit contextIdChanged();
+}
+
+/*!
+ \qmlproperty bool BackgroundAudio::acquired
+
+ This property indicates whether the application holds the playback resource in music daemon
+*/
+bool QDeclarativeBackgroundAudio::isAcquired() const
+{
+ if (!m_backgroundPlaybackControl)
+ return false;
+ return m_backgroundPlaybackControl->isAcquired();
+}
+
+/*!
+ \qmlmethod BackgroundAudio::acquire()
+
+ try to acquire the playback resource in music daemon
+*/
+void QDeclarativeBackgroundAudio::acquire()
+{
+ if (isAcquired() || !m_backgroundPlaybackControl)
+ return;
+ m_backgroundPlaybackControl->acquire();
+}
+
+/*!
+ \qmlmethod BackgroundAudio::acquire()
+
+ try to release the playback resource in music daemon
+*/
+void QDeclarativeBackgroundAudio::release()
+{
+ if (!isAcquired() || !m_backgroundPlaybackControl)
+ return;
+ m_backgroundPlaybackControl->release();
+}
diff --git a/src/imports/multimedia/qdeclarativebackgroundaudio_p.h b/src/imports/multimedia/qdeclarativebackgroundaudio_p.h
new file mode 100644
index 000000000..f7f6778f9
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativebackgroundaudio_p.h
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef QDECLARATIVEBACKGROUNDAUDIO_P_H
+#define QDECLARATIVEBACKGROUNDAUDIO_P_H
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qdeclarativeaudio_p.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QMediaBackgroundPlaybackControl;
+class QDeclarativeBackgroundAudio : public QDeclarativeAudio
+{
+ Q_OBJECT
+ Q_PROPERTY(QString contextId READ contextId WRITE setContextId NOTIFY contextIdChanged)
+ Q_PROPERTY(bool acquired READ isAcquired NOTIFY acquiredChanged)
+public:
+ QDeclarativeBackgroundAudio(QObject *parent = 0);
+ ~QDeclarativeBackgroundAudio();
+
+ void classBegin();
+ void componentComplete();
+
+ QString contextId() const;
+ void setContextId(QString contextId);
+ bool isAcquired() const;
+
+public Q_SLOTS:
+ void acquire();
+ void release();
+
+Q_SIGNALS:
+ void contextIdChanged();
+ void acquiredChanged();
+
+private:
+ Q_DISABLE_COPY(QDeclarativeBackgroundAudio)
+ QString m_contextId;
+ QMediaBackgroundPlaybackControl *m_backgroundPlaybackControl;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeBackgroundAudio))
+
+QT_END_HEADER
+
+#endif // QDECLARATIVEBACKGROUNDAUDIO_P_H
diff --git a/src/imports/multimedia/qdeclarativemediabase.cpp b/src/imports/multimedia/qdeclarativemediabase.cpp
index 82e127407..a7435029b 100644
--- a/src/imports/multimedia/qdeclarativemediabase.cpp
+++ b/src/imports/multimedia/qdeclarativemediabase.cpp
@@ -260,12 +260,13 @@ void QDeclarativeMediaBase::shutdown()
}
-void QDeclarativeMediaBase::setObject(QObject *object)
+void QDeclarativeMediaBase::setObject(QObject *object, const QMediaServiceProviderHint& hint)
{
m_qmlObject = object;
if ((m_mediaProvider = QMediaServiceProvider::defaultServiceProvider()) != 0) {
- if ((m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER)) != 0) {
+ m_mediaService = m_mediaProvider->requestService(Q_MEDIASERVICE_MEDIAPLAYER, hint);
+ if (m_mediaService != 0) {
m_playerControl = qobject_cast<QMediaPlayerControl *>(
m_mediaService->requestControl(QMediaPlayerControl_iid));
m_metaDataControl = qobject_cast<QMetaDataReaderControl *>(
@@ -315,9 +316,12 @@ void QDeclarativeMediaBase::setObject(QObject *object)
void QDeclarativeMediaBase::componentComplete()
{
- m_playerControl->setVolume(m_vol * 100);
- m_playerControl->setMuted(m_muted);
- m_playerControl->setPlaybackRate(m_playbackRate);
+ if (!qFuzzyCompare(m_vol, qreal(1.0)))
+ m_playerControl->setVolume(m_vol * 100);
+ if (m_muted)
+ m_playerControl->setMuted(m_muted);
+ if (!qFuzzyCompare(m_playbackRate, qreal(1.0)))
+ m_playerControl->setPlaybackRate(m_playbackRate);
if (!m_source.isEmpty() && (m_autoLoad || m_playing)) // Override autoLoad if playing set
m_playerControl->setMedia(m_source, 0);
diff --git a/src/imports/multimedia/qdeclarativemediabase_p.h b/src/imports/multimedia/qdeclarativemediabase_p.h
index cfbe0c554..70e349c97 100644
--- a/src/imports/multimedia/qdeclarativemediabase_p.h
+++ b/src/imports/multimedia/qdeclarativemediabase_p.h
@@ -123,7 +123,7 @@ public:
protected:
void shutdown();
- void setObject(QObject *object);
+ void setObject(QObject *object, const QMediaServiceProviderHint& hint = QMediaServiceProviderHint());
virtual void sourceChanged() = 0;
virtual void autoLoadChanged() = 0;
diff --git a/src/imports/multimedia/qdeclarativeradio.cpp b/src/imports/multimedia/qdeclarativeradio.cpp
new file mode 100644
index 000000000..5cac32e6f
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativeradio.cpp
@@ -0,0 +1,212 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qdeclarativeradio_p.h"
+
+QT_BEGIN_NAMESPACE
+
+QDeclarativeRadio::QDeclarativeRadio(QObject *parent) :
+ QObject(parent),
+ m_radioTuner(0)
+{
+ m_radioTuner = new QRadioTuner(this);
+
+ connect(m_radioTuner, SIGNAL(stateChanged(QRadioTuner::State)), this, SLOT(_q_stateChanged(QRadioTuner::State)));
+ connect(m_radioTuner, SIGNAL(bandChanged(QRadioTuner::Band)), this, SLOT(_q_bandChanged(QRadioTuner::Band)));
+
+ connect(m_radioTuner, SIGNAL(frequencyChanged(int)), this, SIGNAL(frequencyChanged(int)));
+ connect(m_radioTuner, SIGNAL(stereoStatusChanged(bool)), this, SIGNAL(stereoStatusChanged(bool)));
+ connect(m_radioTuner, SIGNAL(searchingChanged(bool)), this, SIGNAL(searchingChanged(bool)));
+ connect(m_radioTuner, SIGNAL(signalStrengthChanged(int)), this, SIGNAL(signalStrengthChanged(int)));
+ connect(m_radioTuner, SIGNAL(volumeChanged(int)), this, SIGNAL(volumeChanged(int)));
+ connect(m_radioTuner, SIGNAL(mutedChanged(bool)), this, SIGNAL(mutedChanged(bool)));
+
+ connect(m_radioTuner, SIGNAL(error(QRadioTuner::Error)), this, SLOT(_q_error(QRadioTuner::Error)));
+}
+
+QDeclarativeRadio::~QDeclarativeRadio()
+{
+}
+
+QDeclarativeRadio::State QDeclarativeRadio::state() const
+{
+ return static_cast<QDeclarativeRadio::State>(m_radioTuner->state());
+}
+
+QDeclarativeRadio::Band QDeclarativeRadio::band() const
+{
+ return static_cast<QDeclarativeRadio::Band>(m_radioTuner->band());
+}
+
+int QDeclarativeRadio::frequency() const
+{
+ return m_radioTuner->frequency();
+}
+
+QDeclarativeRadio::StereoMode QDeclarativeRadio::stereoMode() const
+{
+ return static_cast<QDeclarativeRadio::StereoMode>(m_radioTuner->stereoMode());
+}
+
+int QDeclarativeRadio::volume() const
+{
+ return m_radioTuner->volume();
+}
+
+bool QDeclarativeRadio::muted() const
+{
+ return m_radioTuner->isMuted();
+}
+
+bool QDeclarativeRadio::stereo() const
+{
+ return m_radioTuner->isStereo();
+}
+
+int QDeclarativeRadio::signalStrength() const
+{
+ return m_radioTuner->signalStrength();
+}
+
+bool QDeclarativeRadio::searching() const
+{
+ return m_radioTuner->isSearching();
+}
+
+int QDeclarativeRadio::frequencyStep() const
+{
+ return m_radioTuner->frequencyStep(m_radioTuner->band());
+}
+
+int QDeclarativeRadio::minimumFrequency() const
+{
+ return m_radioTuner->frequencyRange(m_radioTuner->band()).first;
+}
+
+int QDeclarativeRadio::maximumFrequency() const
+{
+ return m_radioTuner->frequencyRange(m_radioTuner->band()).second;
+}
+
+bool QDeclarativeRadio::isAvailable() const
+{
+ return m_radioTuner->isAvailable();
+}
+
+void QDeclarativeRadio::setBand(QDeclarativeRadio::Band band)
+{
+ m_radioTuner->setBand(static_cast<QRadioTuner::Band>(band));
+}
+
+void QDeclarativeRadio::setFrequency(int frequency)
+{
+ m_radioTuner->setFrequency(frequency);
+}
+
+void QDeclarativeRadio::setStereoMode(QDeclarativeRadio::StereoMode stereoMode)
+{
+ m_radioTuner->setStereoMode(static_cast<QRadioTuner::StereoMode>(stereoMode));
+}
+
+void QDeclarativeRadio::setVolume(int volume)
+{
+ m_radioTuner->setVolume(volume);
+}
+
+void QDeclarativeRadio::setMuted(bool muted)
+{
+ m_radioTuner->setMuted(muted);
+}
+
+void QDeclarativeRadio::cancelScan()
+{
+ m_radioTuner->cancelSearch();
+}
+
+void QDeclarativeRadio::scanDown()
+{
+ m_radioTuner->searchBackward();
+}
+
+void QDeclarativeRadio::scanUp()
+{
+ m_radioTuner->searchForward();
+}
+
+void QDeclarativeRadio::tuneDown()
+{
+ int f = frequency();
+ f = f - frequencyStep();
+ setFrequency(f);
+}
+
+void QDeclarativeRadio::tuneUp()
+{
+ int f = frequency();
+ f = f + frequencyStep();
+ setFrequency(f);
+}
+
+void QDeclarativeRadio::start()
+{
+ m_radioTuner->start();
+}
+
+void QDeclarativeRadio::stop()
+{
+ m_radioTuner->stop();
+}
+
+void QDeclarativeRadio::_q_stateChanged(QRadioTuner::State state)
+{
+ emit stateChanged(static_cast<QDeclarativeRadio::State>(state));
+}
+
+void QDeclarativeRadio::_q_bandChanged(QRadioTuner::Band band)
+{
+ emit bandChanged(static_cast<QDeclarativeRadio::Band>(band));
+}
+
+void QDeclarativeRadio::_q_error(QRadioTuner::Error errorCode)
+{
+ emit error(static_cast<QDeclarativeRadio::Error>(errorCode));
+ emit errorChanged();
+}
diff --git a/src/imports/multimedia/qdeclarativeradio_p.h b/src/imports/multimedia/qdeclarativeradio_p.h
new file mode 100644
index 000000000..eddf93bfc
--- /dev/null
+++ b/src/imports/multimedia/qdeclarativeradio_p.h
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QDECLARATIVERADIO_P_H
+#define QDECLARATIVERADIO_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists for the convenience
+// of other Qt classes. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include <QtDeclarative/qdeclarative.h>
+#include <qradiotuner.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+class QDeclarativeRadio : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(State state READ state NOTIFY stateChanged)
+ Q_PROPERTY(Band band READ band WRITE setBand NOTIFY bandChanged)
+ Q_PROPERTY(int frequency READ frequency WRITE setFrequency NOTIFY frequencyChanged)
+ Q_PROPERTY(bool stereo READ stereo NOTIFY stereoStatusChanged)
+ Q_PROPERTY(StereoMode stereoMode READ stereoMode WRITE setStereoMode)
+ Q_PROPERTY(int signalStrength READ signalStrength NOTIFY signalStrengthChanged)
+ Q_PROPERTY(int volume READ volume WRITE setVolume NOTIFY volumeChanged)
+ Q_PROPERTY(bool muted READ muted WRITE setMuted NOTIFY mutedChanged)
+ Q_PROPERTY(bool searching READ searching NOTIFY searchingChanged)
+ Q_PROPERTY(int frequencyStep READ frequencyStep NOTIFY bandChanged)
+ Q_PROPERTY(int minimumFrequency READ minimumFrequency NOTIFY bandChanged)
+ Q_PROPERTY(int maximumFrequency READ maximumFrequency NOTIFY bandChanged)
+ Q_ENUMS(State)
+ Q_ENUMS(Band)
+ Q_ENUMS(Error)
+ Q_ENUMS(StereoMode)
+
+public:
+ enum State {
+ ActiveState = QRadioTuner::ActiveState,
+ StoppedState = QRadioTuner::StoppedState
+ };
+
+ enum Band {
+ AM = QRadioTuner::AM,
+ FM = QRadioTuner::FM,
+ SW = QRadioTuner::SW,
+ LW = QRadioTuner::LW,
+ FM2 = QRadioTuner::FM2
+ };
+
+ enum Error {
+ NoError = QRadioTuner::NoError,
+ ResourceError = QRadioTuner::ResourceError,
+ OpenError = QRadioTuner::OpenError,
+ OutOfRangeError = QRadioTuner::OutOfRangeError
+ };
+
+ enum StereoMode {
+ ForceStereo = QRadioTuner::ForceStereo,
+ ForceMono = QRadioTuner::ForceMono,
+ Auto = QRadioTuner::Auto
+ };
+
+ QDeclarativeRadio(QObject *parent = 0);
+ ~QDeclarativeRadio();
+
+ QDeclarativeRadio::State state() const;
+ QDeclarativeRadio::Band band() const;
+ int frequency() const;
+ QDeclarativeRadio::StereoMode stereoMode() const;
+ int volume() const;
+ bool muted() const;
+
+ bool stereo() const;
+ int signalStrength() const;
+ bool searching() const;
+
+ int frequencyStep() const;
+ int minimumFrequency() const;
+ int maximumFrequency() const;
+
+ Q_INVOKABLE bool isAvailable() const;
+
+public Q_SLOTS:
+ void setBand(QDeclarativeRadio::Band band);
+ void setFrequency(int frequency);
+ void setStereoMode(QDeclarativeRadio::StereoMode stereoMode);
+ void setVolume(int volume);
+ void setMuted(bool muted);
+
+ void cancelScan();
+ void scanDown();
+ void scanUp();
+ void tuneUp();
+ void tuneDown();
+ void start();
+ void stop();
+
+Q_SIGNALS:
+ void stateChanged(QDeclarativeRadio::State state);
+ void bandChanged(QDeclarativeRadio::Band band);
+ void frequencyChanged(int frequency);
+ void stereoStatusChanged(bool stereo);
+ void searchingChanged(bool searching);
+ void signalStrengthChanged(int signalStrength);
+ void volumeChanged(int volume);
+ void mutedChanged(bool muted);
+
+ void errorChanged();
+ void error(QDeclarativeRadio::Error errorCode);
+
+private Q_SLOTS:
+ void _q_stateChanged(QRadioTuner::State state);
+ void _q_bandChanged(QRadioTuner::Band band);
+ void _q_error(QRadioTuner::Error errorCode);
+
+private:
+ Q_DISABLE_COPY(QDeclarativeRadio)
+
+ QRadioTuner *m_radioTuner;
+};
+
+QT_END_NAMESPACE
+
+QML_DECLARE_TYPE(QT_PREPEND_NAMESPACE(QDeclarativeRadio))
+
+QT_END_HEADER
+
+#endif // QDECLARATIVERADIO_P_H
diff --git a/src/imports/multimedia/qsgvideonode_i420.cpp b/src/imports/multimedia/qsgvideonode_i420.cpp
index 0342de565..11135c14b 100644
--- a/src/imports/multimedia/qsgvideonode_i420.cpp
+++ b/src/imports/multimedia/qsgvideonode_i420.cpp
@@ -41,7 +41,8 @@
#include "qsgvideonode_i420.h"
#include <QtDeclarative/qsgtexturematerial.h>
#include <QtDeclarative/qsgmaterial.h>
-
+#include <QtGui/QOpenGLContext>
+#include <QtGui/QOpenGLFunctions>
#include <QtOpenGL/qglshaderprogram.h>
QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_I420::supportedPixelFormats(
@@ -254,7 +255,7 @@ void QSGVideoNode_I420::setCurrentFrame(const QVideoFrame &frame)
void QSGVideoNode_I420::bindTexture(int id, int unit, int w, int h, const uchar *bits)
{
- QGLFunctions *functions = QGLContext::currentContext()->functions();
+ QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions();
functions->glActiveTexture(unit);
glBindTexture(GL_TEXTURE_2D, id);
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, w, h, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, bits);
@@ -271,7 +272,7 @@ void QSGVideoMaterialShader_YUV420::updateState(const RenderState &state,
{
Q_UNUSED(oldMaterial);
- QGLFunctions *functions = state.context()->functions();
+ QOpenGLFunctions *functions = state.context()->functions();
QSGVideoMaterial_YUV420 *mat = static_cast<QSGVideoMaterial_YUV420 *>(newMaterial);
program()->setUniformValue(m_id_yTexture, 0);
program()->setUniformValue(m_id_uTexture, 1);
diff --git a/src/imports/multimedia/qsgvideonode_rgb32.cpp b/src/imports/multimedia/qsgvideonode_rgb32.cpp
index 1c6738d28..dbb2e8b50 100644
--- a/src/imports/multimedia/qsgvideonode_rgb32.cpp
+++ b/src/imports/multimedia/qsgvideonode_rgb32.cpp
@@ -42,6 +42,9 @@
#include <QtDeclarative/qsgtexture.h>
+#include <QtGui/QOpenGLContext>
+#include <QtGui/QOpenGLFunctions>
+
QList<QVideoFrame::PixelFormat> QSGVideoNodeFactory_RGB32::supportedPixelFormats(
QAbstractVideoBuffer::HandleType handleType) const
{
@@ -101,7 +104,7 @@ void QSGVideoTexture_RGB32::bind()
}
if (m_frame.map(QAbstractVideoBuffer::ReadOnly)) {
- QGLFunctions *functions = QGLContext::currentContext()->functions();
+ QOpenGLFunctions *functions = QOpenGLContext::currentContext()->functions();
const uchar *bits = m_frame.bits();
functions->glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, m_textureId);
diff --git a/src/multimediakit/audio/qaudio.h b/src/multimediakit/audio/qaudio.h
index b420d878c..16accfef9 100644
--- a/src/multimediakit/audio/qaudio.h
+++ b/src/multimediakit/audio/qaudio.h
@@ -51,6 +51,9 @@
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
//QTM_SYNC_HEADER_EXPORT QAudio
namespace QAudio
diff --git a/src/multimediakit/audio/qaudio_mac_p.h b/src/multimediakit/audio/qaudio_mac_p.h
index 4acff79d0..06ce43010 100644
--- a/src/multimediakit/audio/qaudio_mac_p.h
+++ b/src/multimediakit/audio/qaudio_mac_p.h
@@ -65,6 +65,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
extern QDebug operator<<(QDebug dbg, const QAudioFormat& audioFormat);
diff --git a/src/multimediakit/audio/qaudiodevicefactory_p.h b/src/multimediakit/audio/qaudiodevicefactory_p.h
index 74104bb73..16ddb573a 100644
--- a/src/multimediakit/audio/qaudiodevicefactory_p.h
+++ b/src/multimediakit/audio/qaudiodevicefactory_p.h
@@ -65,6 +65,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAbstractAudioInput;
class QAbstractAudioOutput;
class QAbstractAudioDeviceInfo;
diff --git a/src/multimediakit/audio/qaudiodeviceinfo.cpp b/src/multimediakit/audio/qaudiodeviceinfo.cpp
index 4b71b273b..6b6f7951e 100644
--- a/src/multimediakit/audio/qaudiodeviceinfo.cpp
+++ b/src/multimediakit/audio/qaudiodeviceinfo.cpp
@@ -188,8 +188,6 @@ bool QAudioDeviceInfo::isNull() const
Device names vary depending on the platform/audio plugin being used.
- XXX
-
They are a unique string identifier for the audio device.
eg. default, Intel, U0x46d0x9a4
diff --git a/src/multimediakit/audio/qaudiodeviceinfo.h b/src/multimediakit/audio/qaudiodeviceinfo.h
index 703447910..e8616ce35 100644
--- a/src/multimediakit/audio/qaudiodeviceinfo.h
+++ b/src/multimediakit/audio/qaudiodeviceinfo.h
@@ -59,6 +59,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAudioDeviceFactory;
class QAudioDeviceInfoPrivate;
diff --git a/src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h b/src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h
index 5afc8f8c4..cf19d2554 100644
--- a/src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h
+++ b/src/multimediakit/audio/qaudiodeviceinfo_alsa_p.h
@@ -65,8 +65,13 @@
#include "qaudiodeviceinfo.h"
#include "qaudiosystem.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
const unsigned int MAX_SAMPLE_RATES = 5;
const unsigned int SAMPLE_RATES[] =
{ 8000, 11025, 22050, 44100, 48000 };
@@ -117,5 +122,8 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/audio/qaudiodeviceinfo_mac_p.h b/src/multimediakit/audio/qaudiodeviceinfo_mac_p.h
index 099d7fd61..3b9ca4676 100644
--- a/src/multimediakit/audio/qaudiodeviceinfo_mac_p.h
+++ b/src/multimediakit/audio/qaudiodeviceinfo_mac_p.h
@@ -62,6 +62,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAudioDeviceInfoInternal : public QAbstractAudioDeviceInfo
{
public:
diff --git a/src/multimediakit/audio/qaudiodeviceinfo_win32_p.h b/src/multimediakit/audio/qaudiodeviceinfo_win32_p.h
index 9ed3b66d5..2d4e27106 100644
--- a/src/multimediakit/audio/qaudiodeviceinfo_win32_p.h
+++ b/src/multimediakit/audio/qaudiodeviceinfo_win32_p.h
@@ -63,8 +63,13 @@
#include <qaudiosystem.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
const unsigned int MAX_SAMPLE_RATES = 5;
const unsigned int SAMPLE_RATES[] = { 8000, 11025, 22050, 44100, 48000 };
@@ -109,4 +114,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/audio/qaudioformat.h b/src/multimediakit/audio/qaudioformat.h
index ebee33a7b..c6600cdcf 100644
--- a/src/multimediakit/audio/qaudioformat.h
+++ b/src/multimediakit/audio/qaudioformat.h
@@ -53,6 +53,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAudioFormatPrivate;
diff --git a/src/multimediakit/audio/qaudioinput.cpp b/src/multimediakit/audio/qaudioinput.cpp
index bb4f89653..4a6bfaefd 100644
--- a/src/multimediakit/audio/qaudioinput.cpp
+++ b/src/multimediakit/audio/qaudioinput.cpp
@@ -57,12 +57,6 @@ QT_BEGIN_NAMESPACE
\ingroup multimedia
\since 1.0
- XXX Needs more blurb about use cases etc
- Link to terminology etc
- Push/Pull mode
- State diagram
-
-
You can construct an audio input with the system's
\l{QAudioDeviceInfo::defaultInputDevice()}{default audio input
device}. It is also possible to create QAudioInput with a
diff --git a/src/multimediakit/audio/qaudioinput.h b/src/multimediakit/audio/qaudioinput.h
index 13d3cb015..8684a10fe 100644
--- a/src/multimediakit/audio/qaudioinput.h
+++ b/src/multimediakit/audio/qaudioinput.h
@@ -57,6 +57,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAbstractAudioInput;
diff --git a/src/multimediakit/audio/qaudioinput_alsa_p.h b/src/multimediakit/audio/qaudioinput_alsa_p.h
index 2a5b3df1a..a05f6954d 100644
--- a/src/multimediakit/audio/qaudioinput_alsa_p.h
+++ b/src/multimediakit/audio/qaudioinput_alsa_p.h
@@ -67,8 +67,13 @@
#include "qaudiodeviceinfo.h"
#include "qaudiosystem.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class InputPrivate;
class RingBuffer
@@ -180,4 +185,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/audio/qaudioinput_mac_p.h b/src/multimediakit/audio/qaudioinput_mac_p.h
index cc0e62b11..99e8ad061 100644
--- a/src/multimediakit/audio/qaudioinput_mac_p.h
+++ b/src/multimediakit/audio/qaudioinput_mac_p.h
@@ -72,6 +72,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QTimer;
class QIODevice;
class QAbstractAudioDeviceInfo;
diff --git a/src/multimediakit/audio/qaudioinput_win32_p.h b/src/multimediakit/audio/qaudioinput_win32_p.h
index 0fc1ae8a6..10d41a552 100644
--- a/src/multimediakit/audio/qaudioinput_win32_p.h
+++ b/src/multimediakit/audio/qaudioinput_win32_p.h
@@ -69,8 +69,13 @@
#include <qaudiosystem.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
// For compat with 4.6
#if !defined(QT_WIN_CALLBACK)
# if defined(Q_CC_MINGW)
@@ -168,4 +173,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/audio/qaudiooutput.cpp b/src/multimediakit/audio/qaudiooutput.cpp
index 10496bd98..ea9dcb11f 100644
--- a/src/multimediakit/audio/qaudiooutput.cpp
+++ b/src/multimediakit/audio/qaudiooutput.cpp
@@ -58,8 +58,6 @@ QT_BEGIN_NAMESPACE
\ingroup multimedia
\since 1.0
- XXX
-
You can construct an audio output with the system's
\l{QAudioDeviceInfo::defaultOutputDevice()}{default audio output
device}. It is also possible to create QAudioOutput with a
@@ -148,7 +146,7 @@ QAudioOutput::QAudioOutput(const QAudioDeviceInfo &audioDevice, const QAudioForm
/*!
Destroys this audio output.
- XXX This will release any system resources used and free any buffers.
+ This will release any system resources used and free any buffers.
*/
QAudioOutput::~QAudioOutput()
{
@@ -207,7 +205,6 @@ QIODevice* QAudioOutput::start()
/*!
Stops the audio output, detaching from the system resource.
- XXX
Sets error() to QAudio::NoError, state() to QAudio::StoppedState and
emit stateChanged() signal.
\since 1.0
@@ -220,7 +217,6 @@ void QAudioOutput::stop()
/*!
Drops all audio data in the buffers, resets buffers to zero.
- XXX what about state
\since 1.0
*/
void QAudioOutput::reset()
@@ -231,8 +227,6 @@ void QAudioOutput::reset()
/*!
Stops processing audio data, preserving buffered audio data.
- XXX
-
Sets error() to QAudio::NoError, state() to QAudio::SuspendedState and
emits stateChanged() signal.
\since 1.0
@@ -245,8 +239,6 @@ void QAudioOutput::suspend()
/*!
Resumes processing audio data after a suspend().
-XXX
-
Sets error() to QAudio::NoError.
Sets state() to QAudio::ActiveState if you previously called start(QIODevice*).
Sets state() to QAudio::IdleState if you previously called start().
diff --git a/src/multimediakit/audio/qaudiooutput.h b/src/multimediakit/audio/qaudiooutput.h
index bc7fa62db..b61c4d9f3 100644
--- a/src/multimediakit/audio/qaudiooutput.h
+++ b/src/multimediakit/audio/qaudiooutput.h
@@ -57,6 +57,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAbstractAudioOutput;
diff --git a/src/multimediakit/audio/qaudiooutput_alsa_p.h b/src/multimediakit/audio/qaudiooutput_alsa_p.h
index 953dc7ae7..f914ded2c 100644
--- a/src/multimediakit/audio/qaudiooutput_alsa_p.h
+++ b/src/multimediakit/audio/qaudiooutput_alsa_p.h
@@ -66,8 +66,13 @@
#include "qaudiodeviceinfo.h"
#include "qaudiosystem.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class OutputPrivate;
class QAudioOutputPrivate : public QAbstractAudioOutput
@@ -164,4 +169,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/audio/qaudiooutput_mac_p.h b/src/multimediakit/audio/qaudiooutput_mac_p.h
index 8e7a11919..d1cf680b1 100644
--- a/src/multimediakit/audio/qaudiooutput_mac_p.h
+++ b/src/multimediakit/audio/qaudiooutput_mac_p.h
@@ -72,6 +72,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QIODevice;
class QAbstractAudioDeviceInfo;
diff --git a/src/multimediakit/audio/qaudiooutput_win32_p.h b/src/multimediakit/audio/qaudiooutput_win32_p.h
index 6ca6fc562..aa86d4e9b 100644
--- a/src/multimediakit/audio/qaudiooutput_win32_p.h
+++ b/src/multimediakit/audio/qaudiooutput_win32_p.h
@@ -76,8 +76,13 @@
# endif
#endif
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAudioOutputPrivate : public QAbstractAudioOutput
{
Q_OBJECT
@@ -164,4 +169,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/audio/qaudiopluginloader.cpp b/src/multimediakit/audio/qaudiopluginloader.cpp
index 2807fcf9d..4aa24d57b 100644
--- a/src/multimediakit/audio/qaudiopluginloader.cpp
+++ b/src/multimediakit/audio/qaudiopluginloader.cpp
@@ -43,7 +43,7 @@
#include "qaudiopluginloader_p.h"
#include <QtCore/qcoreapplication.h>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
#include <QtCore/qpluginloader.h>
#include <QtCore/qfactoryinterface.h>
#include <QtCore/qdir.h>
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QAudioPluginLoader::QAudioPluginLoader(const char *iid, const QString &location, Qt::CaseSensitivity):
m_iid(iid)
{
- m_location = location + "/";
+ m_location = location + QLatin1Char('/');
load();
}
diff --git a/src/multimediakit/audio/qaudiopluginloader_p.h b/src/multimediakit/audio/qaudiopluginloader_p.h
index 89d9679d8..a0f130fd1 100644
--- a/src/multimediakit/audio/qaudiopluginloader_p.h
+++ b/src/multimediakit/audio/qaudiopluginloader_p.h
@@ -61,8 +61,13 @@
#include <QtCore/qpluginloader.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAudioPluginLoader
{
public:
@@ -89,4 +94,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QAUDIOPLUGINLOADER_H
diff --git a/src/multimediakit/audio/qaudiosystem.h b/src/multimediakit/audio/qaudiosystem.h
index 6773343ad..7430528a8 100644
--- a/src/multimediakit/audio/qaudiosystem.h
+++ b/src/multimediakit/audio/qaudiosystem.h
@@ -53,6 +53,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QAbstractAudioDeviceInfo : public QObject
{
Q_OBJECT
diff --git a/src/multimediakit/audio/qaudiosystemplugin.h b/src/multimediakit/audio/qaudiosystemplugin.h
index 13e642fde..5a876dedb 100644
--- a/src/multimediakit/audio/qaudiosystemplugin.h
+++ b/src/multimediakit/audio/qaudiosystemplugin.h
@@ -58,6 +58,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
struct Q_MULTIMEDIA_EXPORT QAudioSystemFactoryInterface : public QFactoryInterface
{
virtual QList<QByteArray> availableDevices(QAudio::Mode) const = 0;
diff --git a/src/multimediakit/effects/qsamplecache_p.cpp b/src/multimediakit/effects/qsamplecache_p.cpp
index da550e8ae..1610a4382 100644
--- a/src/multimediakit/effects/qsamplecache_p.cpp
+++ b/src/multimediakit/effects/qsamplecache_p.cpp
@@ -297,7 +297,7 @@ void QSample::addRef()
// Called in loading thread
void QSample::readSample()
{
- Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
+ Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
QMutexLocker m(&m_mutex);
#ifdef QT_SAMPLECACHE_DEBUG
qDebug() << "QSample: readSample";
@@ -316,7 +316,7 @@ void QSample::readSample()
// Called in loading thread
void QSample::decoderReady()
{
- Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
+ Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
QMutexLocker m(&m_mutex);
#ifdef QT_SAMPLECACHE_DEBUG
qDebug() << "QSample: decoder ready";
@@ -343,7 +343,7 @@ QSample::State QSample::state() const
// Essentially a second ctor, doesn't need locks (?)
void QSample::load()
{
- Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
+ Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
#ifdef QT_SAMPLECACHE_DEBUG
qDebug() << "QSample: load [" << m_url << "]";
#endif
@@ -358,7 +358,7 @@ void QSample::load()
// Called in loading thread
void QSample::decoderError()
{
- Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
+ Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
QMutexLocker m(&m_mutex);
#ifdef QT_SAMPLECACHE_DEBUG
qDebug() << "QSample: decoder error";
@@ -371,7 +371,7 @@ void QSample::decoderError()
// Called in loading thread from decoder when sample is done. Locked already.
void QSample::onReady()
{
- Q_ASSERT(QThread::currentThread()->objectName() == "QSampleCache::LoadingThread");
+ Q_ASSERT(QThread::currentThread()->objectName() == QLatin1String("QSampleCache::LoadingThread"));
#ifdef QT_SAMPLECACHE_DEBUG
qDebug() << "QSample: load ready";
#endif
diff --git a/src/multimediakit/effects/qsamplecache_p.h b/src/multimediakit/effects/qsamplecache_p.h
index fbe246008..91ca457e6 100644
--- a/src/multimediakit/effects/qsamplecache_p.h
+++ b/src/multimediakit/effects/qsamplecache_p.h
@@ -66,6 +66,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QNetworkAccessManager;
class QSampleCache;
class QWaveDecoder;
diff --git a/src/multimediakit/effects/qsoundeffect_p.h b/src/multimediakit/effects/qsoundeffect_p.h
index de8de12a3..4d6764742 100644
--- a/src/multimediakit/effects/qsoundeffect_p.h
+++ b/src/multimediakit/effects/qsoundeffect_p.h
@@ -63,6 +63,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QSoundEffectPrivate;
class Q_MULTIMEDIA_EXPORT QSoundEffect : public QObject
diff --git a/src/multimediakit/effects/qsoundeffect_pulse_p.cpp b/src/multimediakit/effects/qsoundeffect_pulse_p.cpp
index f65fd9995..4570f8fd5 100644
--- a/src/multimediakit/effects/qsoundeffect_pulse_p.cpp
+++ b/src/multimediakit/effects/qsoundeffect_pulse_p.cpp
@@ -359,6 +359,8 @@ void QSoundEffectPrivate::setSource(const QUrl &url)
case QSample::Error:
decoderError();
break;
+ default:
+ break;
}
}
diff --git a/src/multimediakit/effects/qsoundeffect_pulse_p.h b/src/multimediakit/effects/qsoundeffect_pulse_p.h
index 6653f0533..c78bcdec5 100644
--- a/src/multimediakit/effects/qsoundeffect_pulse_p.h
+++ b/src/multimediakit/effects/qsoundeffect_pulse_p.h
@@ -66,6 +66,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QSoundEffectPrivate : public QObject
{
Q_OBJECT
diff --git a/src/multimediakit/effects/qsoundeffect_qmedia_p.h b/src/multimediakit/effects/qsoundeffect_qmedia_p.h
index 9e5dd25db..adafa04a2 100644
--- a/src/multimediakit/effects/qsoundeffect_qmedia_p.h
+++ b/src/multimediakit/effects/qsoundeffect_qmedia_p.h
@@ -62,6 +62,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QSoundEffectPrivate : public QObject
{
diff --git a/src/multimediakit/effects/qsoundeffect_qsound_p.cpp b/src/multimediakit/effects/qsoundeffect_qsound_p.cpp
index 1706af9f1..0b9082eb5 100644
--- a/src/multimediakit/effects/qsoundeffect_qsound_p.cpp
+++ b/src/multimediakit/effects/qsoundeffect_qsound_p.cpp
@@ -53,7 +53,7 @@
#include "qsoundeffect_qsound_p.h"
#include <QtCore/qcoreapplication.h>
-#include <QtGui/qsound.h>
+#include <QtWidgets/qsound.h>
#include <QtCore/qstringlist.h>
diff --git a/src/multimediakit/effects/qsoundeffect_qsound_p.h b/src/multimediakit/effects/qsoundeffect_qsound_p.h
index 085a97ea2..c98ad79ce 100644
--- a/src/multimediakit/effects/qsoundeffect_qsound_p.h
+++ b/src/multimediakit/effects/qsoundeffect_qsound_p.h
@@ -62,6 +62,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QSound;
class QSoundEffectPrivate : public QObject
diff --git a/src/multimediakit/effects/qwavedecoder_p.h b/src/multimediakit/effects/qwavedecoder_p.h
index d2e438fe7..6c4c00c25 100644
--- a/src/multimediakit/effects/qwavedecoder_p.h
+++ b/src/multimediakit/effects/qwavedecoder_p.h
@@ -61,6 +61,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QWaveDecoder : public QIODevice
{
diff --git a/src/multimediakit/multimediakit.pro b/src/multimediakit/multimediakit.pro
index 4cc1dbfdc..968832651 100644
--- a/src/multimediakit/multimediakit.pro
+++ b/src/multimediakit/multimediakit.pro
@@ -9,7 +9,6 @@ CONFIG += module
MODULE_PRI += ../../modules/qt_multimediakit.pri
contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) {
- QT += opengl
} else {
DEFINES += QT_NO_OPENGL
}
@@ -21,6 +20,7 @@ load(qt_module_config)
HEADERS += qtmultimediakitversion.h
+
PRIVATE_HEADERS += \
qmediacontrol_p.h \
qmediaobject_p.h \
@@ -28,9 +28,7 @@ PRIVATE_HEADERS += \
qmediaplaylist_p.h \
qmediaplaylistprovider_p.h \
qmediaimageviewerservice_p.h \
- qvideowidget_p.h \
qmediapluginloader_p.h \
- qpaintervideosurface_p.h \
qvideosurfaceoutput_p.h
PUBLIC_HEADERS += \
@@ -46,6 +44,7 @@ PUBLIC_HEADERS += \
qmediaplaylistnavigator.h \
qmediaplaylistprovider.h \
qmediaplaylistioplugin.h \
+ qmediabackgroundplaybackcontrol.h \
qmediacontent.h \
qmediaresource.h \
qmediarecorder.h \
@@ -59,9 +58,6 @@ PUBLIC_HEADERS += \
qradiotuner.h \
qradiotunercontrol.h \
qtmedianamespace.h \
- qvideowidget.h \
- qvideowindowcontrol.h \
- qvideowidgetcontrol.h \
qaudioencodercontrol.h \
qvideoencodercontrol.h \
qimageencodercontrol.h \
@@ -71,7 +67,6 @@ PUBLIC_HEADERS += \
qmediaplaylistsourcecontrol.h \
qaudioendpointselector.h \
qvideodevicecontrol.h \
- qgraphicsvideoitem.h \
qvideorenderercontrol.h \
qmediatimerange.h \
qmedianetworkaccesscontrol.h \
@@ -102,9 +97,6 @@ SOURCES += qmediacontrol.cpp \
qmediastreamscontrol.cpp \
qradiotuner.cpp \
qradiotunercontrol.cpp \
- qvideowidget.cpp \
- qvideowindowcontrol.cpp \
- qvideowidgetcontrol.cpp \
qaudioencodercontrol.cpp \
qvideoencodercontrol.cpp \
qimageencodercontrol.cpp \
@@ -115,16 +107,15 @@ SOURCES += qmediacontrol.cpp \
qaudioendpointselector.cpp \
qvideodevicecontrol.cpp \
qmediapluginloader.cpp \
- qpaintervideosurface.cpp \
qvideorenderercontrol.cpp \
qmediatimerange.cpp \
qmedianetworkaccesscontrol.cpp \
- qvideosurfaceoutput.cpp
+ qvideosurfaceoutput.cpp \
+ qmediabackgroundplaybackcontrol.cpp
#Camera
PUBLIC_HEADERS += \
qcamera.h \
- qcameraviewfinder.h \
qcameraimagecapture.h \
qcameraimagecapturecontrol.h \
qcameraexposure.h \
@@ -141,7 +132,6 @@ PUBLIC_HEADERS += \
SOURCES += \
qcamera.cpp \
- qcameraviewfinder.cpp \
qcameraexposure.cpp \
qcamerafocus.cpp \
qcameraimageprocessing.cpp \
@@ -161,29 +151,7 @@ include(video/video.pri)
include(effects/effects.pri)
mac:!qpa {
-!simulator {
- HEADERS += qpaintervideosurface_mac_p.h
- OBJECTIVE_SOURCES += qpaintervideosurface_mac.mm
-}
LIBS += -framework AppKit -framework QuartzCore -framework QTKit
}
-maemo6 {
- isEqual(QT_ARCH,armv6) {
- HEADERS += qeglimagetexturesurface_p.h
- SOURCES += qeglimagetexturesurface.cpp
-
- SOURCES += qgraphicsvideoitem_maemo6.cpp
-
- LIBS += -lX11
- } else {
- SOURCES += qgraphicsvideoitem.cpp
- }
-}
-
-!maemo* {
- SOURCES += qgraphicsvideoitem.cpp
-}
-
HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
-
diff --git a/src/multimediakit/qaudiocapturesource.h b/src/multimediakit/qaudiocapturesource.h
index 7f2200895..e27450514 100644
--- a/src/multimediakit/qaudiocapturesource.h
+++ b/src/multimediakit/qaudiocapturesource.h
@@ -55,8 +55,13 @@
#include "qmediaserviceprovider.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAudioCaptureSourcePrivate;
class Q_MULTIMEDIA_EXPORT QAudioCaptureSource : public QMediaObject
@@ -92,4 +97,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QAUDIOCAPTURESOURCE_H
diff --git a/src/multimediakit/qaudioencodercontrol.h b/src/multimediakit/qaudioencodercontrol.h
index e464bc055..2e3a4bf87 100644
--- a/src/multimediakit/qaudioencodercontrol.h
+++ b/src/multimediakit/qaudioencodercontrol.h
@@ -47,7 +47,12 @@
#include <QtCore/qlist.h>
#include <QtCore/qpair.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QStringList;
class QAudioFormat;
QT_END_NAMESPACE
@@ -84,4 +89,7 @@ Q_MEDIA_DECLARE_CONTROL(QAudioEncoderControl, QAudioEncoderControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QAUDIOCAPTUREPROPERTIESCONTROL_H
diff --git a/src/multimediakit/qaudioendpointselector.cpp b/src/multimediakit/qaudioendpointselector.cpp
index 9bbe267a3..8f2f28f56 100644
--- a/src/multimediakit/qaudioendpointselector.cpp
+++ b/src/multimediakit/qaudioendpointselector.cpp
@@ -55,8 +55,6 @@ QT_BEGIN_NAMESPACE
endpoints available on a system and allows one to be selected as the audio
of a media service.
- XXX why do I care
-
The interface name of QAudioEndpointSelector is \c com.nokia.Qt.QAudioEndpointSelector/1.0 as
defined in QAudioEndpointSelector_iid.
diff --git a/src/multimediakit/qaudioendpointselector.h b/src/multimediakit/qaudioendpointselector.h
index 1fc10904c..00250bc54 100644
--- a/src/multimediakit/qaudioendpointselector.h
+++ b/src/multimediakit/qaudioendpointselector.h
@@ -45,8 +45,13 @@
#include <qaudio.h>
#include <qmediacontrol.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QAudioEndpointSelector : public QMediaControl
{
Q_OBJECT
@@ -75,4 +80,7 @@ Q_MEDIA_DECLARE_CONTROL(QAudioEndpointSelector, QAudioEndpointSelector_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QAUDIOENDPOINTSELECTOR_H
diff --git a/src/multimediakit/qcamera.cpp b/src/multimediakit/qcamera.cpp
index d7fb532db..7870c2494 100644
--- a/src/multimediakit/qcamera.cpp
+++ b/src/multimediakit/qcamera.cpp
@@ -52,8 +52,6 @@
#include <qcameraimageprocessingcontrol.h>
#include <qcameraimagecapturecontrol.h>
#include <qvideodevicecontrol.h>
-#include <qvideowidget.h>
-#include <qgraphicsvideoitem.h>
#include <qvideosurfaceoutput_p.h>
QT_USE_NAMESPACE
@@ -365,7 +363,7 @@ QCamera::QCamera(const QByteArray& device, QObject *parent):
if (d->service != 0) {
//pass device name to service
if (d->deviceControl) {
- QString deviceName(device);
+ QString deviceName = QString::fromLatin1(device);
for (int i=0; i<d->deviceControl->deviceCount(); i++) {
if (d->deviceControl->deviceName(i) == deviceName) {
@@ -470,6 +468,8 @@ QCameraImageProcessing *QCamera::imageProcessing() const
The previously set viewfinder is detached.
\since 1.1
*/
+
+// QVideoWidget is forward declared
void QCamera::setViewfinder(QVideoWidget *viewfinder)
{
Q_D(QCamera);
@@ -478,7 +478,10 @@ void QCamera::setViewfinder(QVideoWidget *viewfinder)
if (d->viewfinder)
unbind(d->viewfinder);
- d->viewfinder = viewfinder && bind(viewfinder) ? viewfinder : 0;
+ // We don't know (in this library) that QVideoWidget inherits QObject
+ QObject *viewFinderObject = reinterpret_cast<QObject*>(viewfinder);
+
+ d->viewfinder = viewFinderObject && bind(viewFinderObject) ? viewFinderObject : 0;
}
/*!
@@ -486,6 +489,7 @@ void QCamera::setViewfinder(QVideoWidget *viewfinder)
The previously set viewfinder is detached.
\since 1.1
*/
+// QGraphicsVideoItem is forward declared
void QCamera::setViewfinder(QGraphicsVideoItem *viewfinder)
{
Q_D(QCamera);
@@ -494,7 +498,11 @@ void QCamera::setViewfinder(QGraphicsVideoItem *viewfinder)
if (d->viewfinder)
unbind(d->viewfinder);
- d->viewfinder = viewfinder && bind(viewfinder) ? viewfinder : 0;
+ // We don't know (in this library) that QGraphicsVideoItem (multiply) inherits QObject
+ // but QObject inheritance depends on QObject coming first, so try this out.
+ QObject *viewFinderObject = reinterpret_cast<QObject*>(viewfinder);
+
+ d->viewfinder = viewFinderObject && bind(viewFinderObject) ? viewFinderObject : 0;
}
/*!
diff --git a/src/multimediakit/qcamera.h b/src/multimediakit/qcamera.h
index 268e09e6a..5091759ab 100644
--- a/src/multimediakit/qcamera.h
+++ b/src/multimediakit/qcamera.h
@@ -59,8 +59,13 @@
#include <qmediaserviceprovider.h>
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAbstractVideoSurface;
class QVideoWidget;
class QGraphicsVideoItem;
@@ -228,4 +233,6 @@ Q_MEDIA_ENUM_DEBUG(QCamera, LockType)
Q_MEDIA_ENUM_DEBUG(QCamera, LockStatus)
Q_MEDIA_ENUM_DEBUG(QCamera, LockChangeReason)
+QT_END_HEADER
+
#endif // QCAMERA_H
diff --git a/src/multimediakit/qcameracapturebufferformatcontrol.h b/src/multimediakit/qcameracapturebufferformatcontrol.h
index cf296e60e..81079a77d 100644
--- a/src/multimediakit/qcameracapturebufferformatcontrol.h
+++ b/src/multimediakit/qcameracapturebufferformatcontrol.h
@@ -45,8 +45,13 @@
#include <qmediacontrol.h>
#include <qcameraimagecapture.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QCameraCaptureBufferFormatControl : public QMediaControl
{
Q_OBJECT
@@ -69,5 +74,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraCaptureBufferFormatControl, QCameraCaptureBufferF
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qcameracapturedestinationcontrol.h b/src/multimediakit/qcameracapturedestinationcontrol.h
index 7dcae365f..cdd769a4d 100644
--- a/src/multimediakit/qcameracapturedestinationcontrol.h
+++ b/src/multimediakit/qcameracapturedestinationcontrol.h
@@ -45,8 +45,13 @@
#include <qmediacontrol.h>
#include <qcameraimagecapture.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QCameraCaptureDestinationControl : public QMediaControl
{
Q_OBJECT
@@ -69,5 +74,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraCaptureDestinationControl, QCameraCaptureDestinat
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qcameracontrol.h b/src/multimediakit/qcameracontrol.h
index e64f77a64..dfc2b3743 100644
--- a/src/multimediakit/qcameracontrol.h
+++ b/src/multimediakit/qcameracontrol.h
@@ -47,8 +47,13 @@
#include <qcamera.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QCameraControl : public QMediaControl
{
Q_OBJECT
@@ -89,5 +94,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraControl, QCameraControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QCAMERACONTROL_H
diff --git a/src/multimediakit/qcameraexposure.h b/src/multimediakit/qcameraexposure.h
index 590f73402..088e7c036 100644
--- a/src/multimediakit/qcameraexposure.h
+++ b/src/multimediakit/qcameraexposure.h
@@ -45,8 +45,13 @@
#include <qmediaobject.h>
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QCamera;
class QCameraExposurePrivate;
@@ -175,4 +180,6 @@ Q_MEDIA_ENUM_DEBUG(QCameraExposure, ExposureMode)
Q_MEDIA_ENUM_DEBUG(QCameraExposure, FlashMode)
Q_MEDIA_ENUM_DEBUG(QCameraExposure, MeteringMode)
+QT_END_HEADER
+
#endif // QCAMERAEXPOSURE_H
diff --git a/src/multimediakit/qcameraexposurecontrol.h b/src/multimediakit/qcameraexposurecontrol.h
index b764a9112..ff60784bf 100644
--- a/src/multimediakit/qcameraexposurecontrol.h
+++ b/src/multimediakit/qcameraexposurecontrol.h
@@ -49,8 +49,13 @@
#include <qcamera.h>
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QCameraExposureControl : public QMediaControl
{
Q_OBJECT
@@ -112,5 +117,8 @@ Q_MEDIA_ENUM_DEBUG(QCameraExposureControl, ExposureParameter)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QCAMERAEXPOSURECONTROL_H
diff --git a/src/multimediakit/qcameraflashcontrol.cpp b/src/multimediakit/qcameraflashcontrol.cpp
index 1633a6481..27bf09a7c 100644
--- a/src/multimediakit/qcameraflashcontrol.cpp
+++ b/src/multimediakit/qcameraflashcontrol.cpp
@@ -60,8 +60,6 @@ QT_BEGIN_NAMESPACE
You can retrieve this control from the camera object in the usual way:
- XXX snippet for retrieving control
-
Some camera devices may not have flash hardware, or may not be configurable. In that
case, there will be no QCameraFlashControl available.
diff --git a/src/multimediakit/qcameraflashcontrol.h b/src/multimediakit/qcameraflashcontrol.h
index d2b393990..89b3b9d06 100644
--- a/src/multimediakit/qcameraflashcontrol.h
+++ b/src/multimediakit/qcameraflashcontrol.h
@@ -48,8 +48,13 @@
#include <qcameraexposure.h>
#include <qcamera.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QCameraFlashControl : public QMediaControl
{
Q_OBJECT
@@ -75,5 +80,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraFlashControl, QCameraFlashControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QCAMERAFLASHCONTROL_H
diff --git a/src/multimediakit/qcamerafocus.h b/src/multimediakit/qcamerafocus.h
index 78ca75406..064af7aa1 100644
--- a/src/multimediakit/qcamerafocus.h
+++ b/src/multimediakit/qcamerafocus.h
@@ -52,8 +52,13 @@
#include <qmediaobject.h>
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QCamera;
class QCameraFocusZoneData;
@@ -173,4 +178,6 @@ Q_DECLARE_METATYPE(QCameraFocus::FocusPointMode)
Q_MEDIA_ENUM_DEBUG(QCameraFocus, FocusMode)
Q_MEDIA_ENUM_DEBUG(QCameraFocus, FocusPointMode)
+QT_END_HEADER
+
#endif // QCAMERAFOCUS_H
diff --git a/src/multimediakit/qcamerafocuscontrol.h b/src/multimediakit/qcamerafocuscontrol.h
index 7962435a3..20ffe6af1 100644
--- a/src/multimediakit/qcamerafocuscontrol.h
+++ b/src/multimediakit/qcamerafocuscontrol.h
@@ -47,8 +47,13 @@
#include <qcamerafocus.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QCameraFocusControl : public QMediaControl
{
Q_OBJECT
@@ -91,5 +96,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraFocusControl, QCameraFocusControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QCAMERAFOCUSCONTROL_H
diff --git a/src/multimediakit/qcameraimagecapture.h b/src/multimediakit/qcameraimagecapture.h
index 0e33f37fb..f4a5a9c11 100644
--- a/src/multimediakit/qcameraimagecapture.h
+++ b/src/multimediakit/qcameraimagecapture.h
@@ -49,7 +49,12 @@
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QSize;
QT_END_NAMESPACE
@@ -159,5 +164,7 @@ Q_DECLARE_METATYPE(QCameraImageCapture::CaptureDestinations)
Q_MEDIA_ENUM_DEBUG(QCameraImageCapture, Error)
Q_MEDIA_ENUM_DEBUG(QCameraImageCapture, CaptureDestination)
+QT_END_HEADER
+
#endif
diff --git a/src/multimediakit/qcameraimagecapturecontrol.h b/src/multimediakit/qcameraimagecapturecontrol.h
index 6915b5dd2..b9ac599f6 100644
--- a/src/multimediakit/qcameraimagecapturecontrol.h
+++ b/src/multimediakit/qcameraimagecapturecontrol.h
@@ -45,7 +45,12 @@
#include <qmediacontrol.h>
#include <qcameraimagecapture.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QImage;
QT_END_NAMESPACE
@@ -87,5 +92,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraImageCaptureControl, QCameraImageCaptureControl_i
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QCAMERAIMAGECAPTURECONTROL_H
diff --git a/src/multimediakit/qcameraimageprocessing.h b/src/multimediakit/qcameraimageprocessing.h
index aba38a3dc..42a7eb589 100644
--- a/src/multimediakit/qcameraimageprocessing.h
+++ b/src/multimediakit/qcameraimageprocessing.h
@@ -53,8 +53,13 @@
#include <qmediaservice.h>
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QCamera;
class QCameraImageProcessingPrivate;
@@ -114,4 +119,6 @@ Q_DECLARE_METATYPE(QCameraImageProcessing::WhiteBalanceMode)
Q_MEDIA_ENUM_DEBUG(QCameraImageProcessing, WhiteBalanceMode)
+QT_END_HEADER
+
#endif // QCAMERAIMAGEPROCESSING_H
diff --git a/src/multimediakit/qcameraimageprocessingcontrol.h b/src/multimediakit/qcameraimageprocessingcontrol.h
index db77f09ac..8c739287c 100644
--- a/src/multimediakit/qcameraimageprocessingcontrol.h
+++ b/src/multimediakit/qcameraimageprocessingcontrol.h
@@ -48,8 +48,13 @@
#include <qcamera.h>
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QCameraImageProcessingControl : public QMediaControl
{
Q_OBJECT
@@ -89,5 +94,7 @@ Q_DECLARE_METATYPE(QCameraImageProcessingControl::ProcessingParameter)
Q_MEDIA_ENUM_DEBUG(QCameraImageProcessingControl, ProcessingParameter)
+QT_END_HEADER
+
#endif
diff --git a/src/multimediakit/qcameralockscontrol.h b/src/multimediakit/qcameralockscontrol.h
index 0d6e1a224..93120ee1a 100644
--- a/src/multimediakit/qcameralockscontrol.h
+++ b/src/multimediakit/qcameralockscontrol.h
@@ -47,8 +47,13 @@
#include <qcamera.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QCameraLocksControl : public QMediaControl
{
Q_OBJECT
@@ -74,5 +79,8 @@ Q_MEDIA_DECLARE_CONTROL(QCameraLocksControl, QCameraLocksControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QCAMERALOCKSCONTROL_H
diff --git a/src/multimediakit/qimageencodercontrol.h b/src/multimediakit/qimageencodercontrol.h
index cebcecb33..c8a8261a4 100644
--- a/src/multimediakit/qimageencodercontrol.h
+++ b/src/multimediakit/qimageencodercontrol.h
@@ -48,7 +48,12 @@
#include <QtCore/qsize.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QByteArray;
class QStringList;
QT_END_NAMESPACE
@@ -80,4 +85,7 @@ Q_MEDIA_DECLARE_CONTROL(QImageEncoderControl, QImageEncoderControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qlocalmediaplaylistprovider.h b/src/multimediakit/qlocalmediaplaylistprovider.h
index 32b50cfe2..e712a3f73 100644
--- a/src/multimediakit/qlocalmediaplaylistprovider.h
+++ b/src/multimediakit/qlocalmediaplaylistprovider.h
@@ -44,8 +44,13 @@
#include "qmediaplaylistprovider.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QLocalMediaPlaylistProviderPrivate;
class Q_MULTIMEDIA_EXPORT QLocalMediaPlaylistProvider : public QMediaPlaylistProvider
{
@@ -76,4 +81,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QLOCALMEDIAPAYLISTSOURCE_H
diff --git a/src/multimediakit/qmediabackgroundplaybackcontrol.cpp b/src/multimediakit/qmediabackgroundplaybackcontrol.cpp
new file mode 100644
index 000000000..0413fba01
--- /dev/null
+++ b/src/multimediakit/qmediabackgroundplaybackcontrol.cpp
@@ -0,0 +1,149 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qmediabackgroundplaybackcontrol.h"
+#include "qmediacontrol_p.h"
+
+QT_BEGIN_NAMESPACE
+
+
+/*!
+ \class QMediaBackgroundPlaybackControl
+ \inmodule QtMultimediaKit
+ \ingroup multimedia
+ \since 5.0
+
+
+ \brief The QMediaBackgroundPlaybackControl class provides access to the background playback
+ related control of a QMediaService.
+
+ If a QMediaService can play media in background, it should implement QMediaBackgroundPlaybackControl.
+ This control provides a means to set the \l {setContextId()}{contextId} for application,
+ \l {acquire()}{acquire the resource for playback} and \l {release()} {release the playback resource}.
+
+ The interface name of QMediaBackgroundPlaybackControl is \c com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0 as
+ defined in QMediaBackgroundPlaybackControl_iid.
+
+ \sa QMediaService::requestControl(), QMediaPlayer
+*/
+
+/*!
+ \macro QMediaBackgroundPlaybackControl_iid
+
+ \c com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0
+
+ Defines the interface name of the QMediaBackgroundPlaybackControl class.
+
+ \relates QMediaBackgroundPlaybackControl
+*/
+
+/*!
+ Destroys a media background playback control.
+*/
+QMediaBackgroundPlaybackControl::~QMediaBackgroundPlaybackControl()
+{
+}
+
+/*!
+ Constructs a new media background playback control with the given \a parent.
+*/
+QMediaBackgroundPlaybackControl::QMediaBackgroundPlaybackControl(QObject *parent):
+ QMediaControl(*new QMediaControlPrivate, parent)
+{
+}
+
+/*!
+ \fn QMediaBackgroundPlaybackControl::setContextId(const QString& contextId)
+
+ Sets the contextId for the application, the last contextId will be released if previously set.
+ \l {acquire()}{acquire method} will be automatically invoked after setting a new contextId.
+
+ contextId is an unique string set by the application and is used by the background daemon to
+ distinguish and manage different context for different application.
+
+ \since 1.0
+*/
+
+/*!
+ \fn QMediaBackgroundPlaybackControl::acquire()
+
+ Try to acquire the playback resource for current application
+ \since 1.0
+*/
+
+/*!
+ \fn QMediaBackgroundPlaybackControl::release()
+
+ Give up the playback resource if current applicaiton holds it.
+ \since 1.0
+*/
+
+/*!
+ \property QMediaBackgroundPlaybackControl::isAcquired()
+ \brief indicate whether the background playback resource is granted or not
+
+ It may take sometime for the backend to actually update this value before the first use.
+
+ By default this property is false
+
+ \since 1.0
+*/
+
+/*!
+ \fn QMediaBackgroundPlaybackControl::acquired()
+
+ Signals that the playback resource is acquired
+
+ \since 1.0
+*/
+
+/*!
+ \fn QMediaBackgroundPlaybackControl::lost()
+
+ Signals that the playback resource is lost
+
+ \since 1.0
+*/
+
+#include "moc_qmediabackgroundplaybackcontrol.cpp"
+QT_END_NAMESPACE
+
+
diff --git a/src/multimediakit/qmediabackgroundplaybackcontrol.h b/src/multimediakit/qmediabackgroundplaybackcontrol.h
new file mode 100644
index 000000000..2cf8d1935
--- /dev/null
+++ b/src/multimediakit/qmediabackgroundplaybackcontrol.h
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef QMEDIABACKGROUNDPLAYBACKCONTROL_H
+#define QMEDIABACKGROUNDPLAYBACKCONTROL_H
+
+#include "qmediacontrol.h"
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
+
+class Q_MULTIMEDIA_EXPORT QMediaBackgroundPlaybackControl : public QMediaControl
+{
+ Q_OBJECT
+
+public:
+ virtual ~QMediaBackgroundPlaybackControl();
+
+ virtual void setContextId(const QString& contextId) = 0;
+ virtual void acquire() = 0;
+ virtual void release() = 0;
+
+ virtual bool isAcquired() const = 0;
+
+Q_SIGNALS:
+ void acquired();
+ void lost();
+
+protected:
+ QMediaBackgroundPlaybackControl(QObject* parent = 0);
+};
+
+#define QMediaBackgroundPlaybackControl_iid "com.nokia.Qt.QMediaBackgroundPlaybackControl/1.0"
+Q_MEDIA_DECLARE_CONTROL(QMediaBackgroundPlaybackControl, QMediaBackgroundPlaybackControl_iid)
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+
+#endif // QMEDIABACKGROUNDPLAYBACKCONTROL_H
diff --git a/src/multimediakit/qmediabindableinterface.h b/src/multimediakit/qmediabindableinterface.h
index 68e11fa2d..02b5b1a21 100644
--- a/src/multimediakit/qmediabindableinterface.h
+++ b/src/multimediakit/qmediabindableinterface.h
@@ -44,8 +44,13 @@
#include <qmediaobject.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaObject;
class Q_MULTIMEDIA_EXPORT QMediaBindableInterface
@@ -66,4 +71,7 @@ Q_DECLARE_INTERFACE(QMediaBindableInterface, QMediaBindableInterface_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIABINDABLEINTERFACE_H
diff --git a/src/multimediakit/qmediacontainercontrol.h b/src/multimediakit/qmediacontainercontrol.h
index 162b9af25..af48605d0 100644
--- a/src/multimediakit/qmediacontainercontrol.h
+++ b/src/multimediakit/qmediacontainercontrol.h
@@ -45,8 +45,13 @@
#include "qmediacontrol.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QMediaContainerControl : public QMediaControl
{
Q_OBJECT
@@ -69,4 +74,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaContainerControl, QMediaContainerControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIACONTAINERCONTROL_H
diff --git a/src/multimediakit/qmediacontent.h b/src/multimediakit/qmediacontent.h
index 73e156f0d..99471f305 100644
--- a/src/multimediakit/qmediacontent.h
+++ b/src/multimediakit/qmediacontent.h
@@ -50,8 +50,13 @@
#include <qtmultimediakitdefs.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaContentPrivate;
class Q_MULTIMEDIA_EXPORT QMediaContent
{
@@ -85,6 +90,6 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QMediaContent)
-
+QT_END_HEADER
#endif // QMEDIACONTENT_H
diff --git a/src/multimediakit/qmediacontrol.cpp b/src/multimediakit/qmediacontrol.cpp
index b47d694c1..b7dfb3dc5 100644
--- a/src/multimediakit/qmediacontrol.cpp
+++ b/src/multimediakit/qmediacontrol.cpp
@@ -63,8 +63,6 @@ QT_BEGIN_NAMESPACE
the core functionality of the service and a number of optional controls which
expose any additional functionality.
- XXX concrete example of this relationship
-
A pointer to a control implemented by a media service can be obtained using
the \l {QMediaService::requestControl()} member of QMediaService. If the
service doesn't implement a control it will instead return a null pointer.
diff --git a/src/multimediakit/qmediacontrol.h b/src/multimediakit/qmediacontrol.h
index 171e95bae..47cc13524 100644
--- a/src/multimediakit/qmediacontrol.h
+++ b/src/multimediakit/qmediacontrol.h
@@ -49,8 +49,13 @@
#include <QtCore/qvariant.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaControlPrivate;
class Q_MULTIMEDIA_EXPORT QMediaControl : public QObject
{
@@ -76,4 +81,7 @@ template <typename T> const char *qmediacontrol_iid() { return 0; }
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QABSTRACTMEDIACONTROL_H
diff --git a/src/multimediakit/qmediacontrol_p.h b/src/multimediakit/qmediacontrol_p.h
index baf5b8e5c..cde6cc688 100644
--- a/src/multimediakit/qmediacontrol_p.h
+++ b/src/multimediakit/qmediacontrol_p.h
@@ -55,8 +55,13 @@
#include <qtmultimediakitdefs.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaControl;
class QMediaControlPrivate
@@ -69,4 +74,7 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qmediaencodersettings.h b/src/multimediakit/qmediaencodersettings.h
index a37d11202..14edc08f3 100644
--- a/src/multimediakit/qmediaencodersettings.h
+++ b/src/multimediakit/qmediaencodersettings.h
@@ -48,8 +48,13 @@
#include <qtmultimediakitdefs.h>
#include "qtmedianamespace.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAudioEncoderSettingsPrivate;
class Q_MULTIMEDIA_EXPORT QAudioEncoderSettings
@@ -157,4 +162,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qmediaimageviewer.cpp b/src/multimediakit/qmediaimageviewer.cpp
index 1a5e659f1..cac508f8d 100644
--- a/src/multimediakit/qmediaimageviewer.cpp
+++ b/src/multimediakit/qmediaimageviewer.cpp
@@ -44,12 +44,10 @@
#include "qmediaobject_p.h"
#include "qmediaimageviewerservice_p.h"
-#include <qgraphicsvideoitem.h>
#include <qmediaplaylist.h>
#include <qmediaplaylistsourcecontrol.h>
#include <qmediacontent.h>
#include <qmediaresource.h>
-#include <qvideowidget.h>
#include <qvideosurfaceoutput_p.h>
#include <QtCore/qcoreevent.h>
@@ -411,7 +409,10 @@ void QMediaImageViewer::setVideoOutput(QVideoWidget *widget)
if (d->videoOutput)
unbind(d->videoOutput);
- d->videoOutput = bind(widget) ? widget : 0;
+ // We don't know (in this library) that QVideoWidget inherits QObject
+ QObject *widgetObject = reinterpret_cast<QObject*>(widget);
+
+ d->videoOutput = widgetObject && bind(widgetObject) ? widgetObject : 0;
}
/*!
@@ -428,7 +429,11 @@ void QMediaImageViewer::setVideoOutput(QGraphicsVideoItem *item)
if (d->videoOutput)
unbind(d->videoOutput);
- d->videoOutput = bind(item) ? item : 0;
+ // We don't know (in this library) that QGraphicsVideoItem (multiply) inherits QObject
+ // but QObject inheritance depends on QObject coming first, so try this out.
+ QObject *itemObject = reinterpret_cast<QObject*>(item);
+
+ d->videoOutput = itemObject && bind(itemObject) ? itemObject : 0;
}
/*!
diff --git a/src/multimediakit/qmediaimageviewer.h b/src/multimediakit/qmediaimageviewer.h
index 8c6116851..7010fad3f 100644
--- a/src/multimediakit/qmediaimageviewer.h
+++ b/src/multimediakit/qmediaimageviewer.h
@@ -46,8 +46,13 @@
#include "qmediacontent.h"
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAbstractVideoSurface;
class QGraphicsVideoItem;
class QMediaPlaylist;
@@ -132,4 +137,6 @@ Q_DECLARE_METATYPE(QMediaImageViewer::MediaStatus)
Q_MEDIA_ENUM_DEBUG(QMediaImageViewer, State)
Q_MEDIA_ENUM_DEBUG(QMediaImageViewer, MediaStatus)
+QT_END_HEADER
+
#endif
diff --git a/src/multimediakit/qmediaimageviewerservice.cpp b/src/multimediakit/qmediaimageviewerservice.cpp
index 869872c54..65de7a81b 100644
--- a/src/multimediakit/qmediaimageviewerservice.cpp
+++ b/src/multimediakit/qmediaimageviewerservice.cpp
@@ -48,13 +48,11 @@
#include <qmediaresource.h>
#include <qmediaobject_p.h>
#include <qvideorenderercontrol.h>
-#include <qvideowidgetcontrol.h>
#include <QtCore/qdebug.h>
#include <QtCore/qurl.h>
#include <QtGui/qimagereader.h>
-#include <QtGui/qpainter.h>
#include <QtNetwork/qnetworkaccessmanager.h>
#include <QtNetwork/qnetworkreply.h>
diff --git a/src/multimediakit/qmediaimageviewerservice_p.h b/src/multimediakit/qmediaimageviewerservice_p.h
index 55d36c8cb..e40cdc5f4 100644
--- a/src/multimediakit/qmediaimageviewerservice_p.h
+++ b/src/multimediakit/qmediaimageviewerservice_p.h
@@ -57,13 +57,16 @@
#include <qmediaservice.h>
#include <qmediaimageviewer.h>
#include <qvideorenderercontrol.h>
-#include <qvideowidget.h>
-#include <qvideowidgetcontrol.h>
#include <QtCore/qpointer.h>
#include <QtGui/qimage.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QAbstractVideoSurface;
class QNetworkAccessManager;
QT_END_NAMESPACE
@@ -138,4 +141,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qmedianetworkaccesscontrol.h b/src/multimediakit/qmedianetworkaccesscontrol.h
index f16edfb8e..22ee95711 100644
--- a/src/multimediakit/qmedianetworkaccesscontrol.h
+++ b/src/multimediakit/qmedianetworkaccesscontrol.h
@@ -48,8 +48,13 @@
#include <QtCore/qlist.h>
#include <QtNetwork/qnetworkconfiguration.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QMediaNetworkAccessControl : public QMediaControl
{
Q_OBJECT
@@ -72,4 +77,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaNetworkAccessControl, QMediaNetworkAccessControl_i
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qmediaobject.cpp b/src/multimediakit/qmediaobject.cpp
index 3276a2b44..2f6840e04 100644
--- a/src/multimediakit/qmediaobject.cpp
+++ b/src/multimediakit/qmediaobject.cpp
@@ -74,8 +74,6 @@ void QMediaObjectPrivate::_q_notify()
\ingroup multimedia
\since 1.0
- XXX why do I care
-
QMediaObject derived classes provide access to the functionality of a
QMediaService. Each media object hosts a QMediaService and uses the
QMediaControl interfaces implemented by the service to implement its
@@ -156,8 +154,6 @@ void QMediaObject::setNotifyInterval(int milliSeconds)
that wrap this functionality, so this function rarely needs to be
called directly.
- XXX for example
-
The object passed must implement the QMediaBindableInterface interface.
\since 1.0
diff --git a/src/multimediakit/qmediaobject.h b/src/multimediakit/qmediaobject.h
index 081764f1e..0fcf4cdee 100644
--- a/src/multimediakit/qmediaobject.h
+++ b/src/multimediakit/qmediaobject.h
@@ -48,8 +48,13 @@
#include <qtmultimediakitdefs.h>
#include "qtmedianamespace.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaService;
class QMediaBindableInterface;
@@ -107,4 +112,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QABSTRACTMEDIAOBJECT_H
diff --git a/src/multimediakit/qmediaobject_p.h b/src/multimediakit/qmediaobject_p.h
index 53225d6c0..f27420cf0 100644
--- a/src/multimediakit/qmediaobject_p.h
+++ b/src/multimediakit/qmediaobject_p.h
@@ -59,8 +59,13 @@
#include "qmediaobject.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMetaDataReaderControl;
#define Q_DECLARE_NON_CONST_PUBLIC(Class) \
@@ -88,4 +93,7 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qmediaplayer.cpp b/src/multimediakit/qmediaplayer.cpp
index 75e414f6d..4e87e9c42 100644
--- a/src/multimediakit/qmediaplayer.cpp
+++ b/src/multimediakit/qmediaplayer.cpp
@@ -55,9 +55,7 @@
#include <qmediaplaylist.h>
#include <qmediaplaylistcontrol.h>
#include <qmediaplaylistsourcecontrol.h>
-#include <qvideowidget.h>
#include <qvideosurfaceoutput_p.h>
-#include <qgraphicsvideoitem.h>
#include <qmedianetworkaccesscontrol.h>
QT_BEGIN_NAMESPACE
@@ -748,7 +746,10 @@ void QMediaPlayer::setVideoOutput(QVideoWidget *output)
if (d->videoOutput)
unbind(d->videoOutput);
- d->videoOutput = output && bind(output) ? output : 0;
+ // We don't know (in this library) that QVideoWidget inherits QObject
+ QObject *outputObject = reinterpret_cast<QObject*>(output);
+
+ d->videoOutput = outputObject && bind(outputObject) ? outputObject : 0;
}
/*!
@@ -767,7 +768,11 @@ void QMediaPlayer::setVideoOutput(QGraphicsVideoItem *output)
if (d->videoOutput)
unbind(d->videoOutput);
- d->videoOutput = output && bind(output) ? output : 0;
+ // We don't know (in this library) that QGraphicsVideoItem (multiply) inherits QObject
+ // but QObject inheritance depends on QObject coming first, so try this out.
+ QObject *outputObject = reinterpret_cast<QObject*>(output);
+
+ d->videoOutput = outputObject && bind(outputObject) ? outputObject : 0;
}
/*!
diff --git a/src/multimediakit/qmediaplayer.h b/src/multimediakit/qmediaplayer.h
index 8361c3efa..af096147f 100644
--- a/src/multimediakit/qmediaplayer.h
+++ b/src/multimediakit/qmediaplayer.h
@@ -52,8 +52,13 @@
QT_BEGIN_HEADER
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAbstractVideoSurface;
class QMediaPlaylist;
class QVideoWidget;
diff --git a/src/multimediakit/qmediaplayercontrol.h b/src/multimediakit/qmediaplayercontrol.h
index c83099d8c..a6e02ee9a 100644
--- a/src/multimediakit/qmediaplayercontrol.h
+++ b/src/multimediakit/qmediaplayercontrol.h
@@ -48,8 +48,13 @@
#include <QtCore/qpair.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaPlaylist;
class Q_MULTIMEDIA_EXPORT QMediaPlayerControl : public QMediaControl
@@ -119,5 +124,8 @@ Q_MEDIA_DECLARE_CONTROL(QMediaPlayerControl, QMediaPlayerControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLAYERCONTROL_H
diff --git a/src/multimediakit/qmediaplaylist.h b/src/multimediakit/qmediaplaylist.h
index ea48c3deb..7b4b62260 100644
--- a/src/multimediakit/qmediaplaylist.h
+++ b/src/multimediakit/qmediaplaylist.h
@@ -50,8 +50,13 @@
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaPlaylistProvider;
class QMediaPlaylistPrivate;
@@ -144,4 +149,6 @@ Q_DECLARE_METATYPE(QMediaPlaylist::Error)
Q_MEDIA_ENUM_DEBUG(QMediaPlaylist, PlaybackMode)
Q_MEDIA_ENUM_DEBUG(QMediaPlaylist, Error)
+QT_END_HEADER
+
#endif // QMEDIAPLAYLIST_H
diff --git a/src/multimediakit/qmediaplaylist_p.h b/src/multimediakit/qmediaplaylist_p.h
index 12a257f04..c04483c02 100644
--- a/src/multimediakit/qmediaplaylist_p.h
+++ b/src/multimediakit/qmediaplaylist_p.h
@@ -66,8 +66,13 @@
# pragma Q_MOC_EXPAND_MACROS
#endif
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaPlaylistControl;
class QMediaPlaylistProvider;
class QMediaPlaylistReader;
@@ -166,4 +171,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLAYLIST_P_H
diff --git a/src/multimediakit/qmediaplaylistcontrol.h b/src/multimediakit/qmediaplaylistcontrol.h
index 5a65fef59..2cce448fa 100644
--- a/src/multimediakit/qmediaplaylistcontrol.h
+++ b/src/multimediakit/qmediaplaylistcontrol.h
@@ -47,8 +47,13 @@
#include "qmediaplaylistnavigator.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaPlaylistProvider;
class Q_MULTIMEDIA_EXPORT QMediaPlaylistControl : public QMediaControl
@@ -87,4 +92,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaPlaylistControl, QMediaPlaylistControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLAYLISTCONTROL_H
diff --git a/src/multimediakit/qmediaplaylistioplugin.h b/src/multimediakit/qmediaplaylistioplugin.h
index 2d792df16..4234fb8ea 100644
--- a/src/multimediakit/qmediaplaylistioplugin.h
+++ b/src/multimediakit/qmediaplaylistioplugin.h
@@ -50,7 +50,12 @@
#include "qmediacontent.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QString;
class QUrl;
class QByteArray;
@@ -115,4 +120,7 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLAYLISTIOPLUGIN_H
diff --git a/src/multimediakit/qmediaplaylistnavigator.h b/src/multimediakit/qmediaplaylistnavigator.h
index 4f2e15dbf..72e452072 100644
--- a/src/multimediakit/qmediaplaylistnavigator.h
+++ b/src/multimediakit/qmediaplaylistnavigator.h
@@ -46,8 +46,13 @@
#include "qmediaplaylist.h"
#include <QtCore/qobject.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaPlaylistNavigatorPrivate;
class Q_MULTIMEDIA_EXPORT QMediaPlaylistNavigator : public QObject
{
@@ -104,4 +109,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLAYLISTNAVIGATOR_H
diff --git a/src/multimediakit/qmediaplaylistprovider.h b/src/multimediakit/qmediaplaylistprovider.h
index 07723810c..79167e8ba 100644
--- a/src/multimediakit/qmediaplaylistprovider.h
+++ b/src/multimediakit/qmediaplaylistprovider.h
@@ -47,7 +47,12 @@
#include "qmediacontent.h"
#include "qmediaplaylist.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QString;
QT_END_NAMESPACE
@@ -104,4 +109,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLAYLISTPROVIDER_H
diff --git a/src/multimediakit/qmediaplaylistprovider_p.h b/src/multimediakit/qmediaplaylistprovider_p.h
index 1ca28f9e9..71fb86f20 100644
--- a/src/multimediakit/qmediaplaylistprovider_p.h
+++ b/src/multimediakit/qmediaplaylistprovider_p.h
@@ -55,8 +55,13 @@
#include "qmediaplaylist.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaPlaylistProviderPrivate
{
public:
@@ -68,5 +73,8 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLAYLISTSOURCE_P_H
diff --git a/src/multimediakit/qmediaplaylistsourcecontrol.h b/src/multimediakit/qmediaplaylistsourcecontrol.h
index e55287fbc..040bb6431 100644
--- a/src/multimediakit/qmediaplaylistsourcecontrol.h
+++ b/src/multimediakit/qmediaplaylistsourcecontrol.h
@@ -45,8 +45,13 @@
#include <qmediacontrol.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaPlaylist;
class Q_MULTIMEDIA_EXPORT QMediaPlaylistSourceControl : public QMediaControl
@@ -71,4 +76,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaPlaylistSourceControl, QMediaPlaylistSourceControl
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLAYLISTCONTROL_H
diff --git a/src/multimediakit/qmediapluginloader_p.h b/src/multimediakit/qmediapluginloader_p.h
index 0c4ad767b..2f0a4d939 100644
--- a/src/multimediakit/qmediapluginloader_p.h
+++ b/src/multimediakit/qmediapluginloader_p.h
@@ -60,8 +60,13 @@
#include <QtCore/qmap.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaServiceProviderPlugin;
class Q_AUTOTEST_EXPORT QMediaPluginLoader
@@ -88,4 +93,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIAPLUGINLOADER_H
diff --git a/src/multimediakit/qmediarecorder.h b/src/multimediakit/qmediarecorder.h
index 53e829526..1e99b95c6 100644
--- a/src/multimediakit/qmediarecorder.h
+++ b/src/multimediakit/qmediarecorder.h
@@ -50,7 +50,12 @@
#include <QtCore/qpair.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QUrl;
class QSize;
class QAudioFormat;
@@ -187,4 +192,6 @@ Q_DECLARE_METATYPE(QMediaRecorder::Error)
Q_MEDIA_ENUM_DEBUG(QMediaRecorder, State)
Q_MEDIA_ENUM_DEBUG(QMediaRecorder, Error)
+QT_END_HEADER
+
#endif // QMEDIARECORDER_H
diff --git a/src/multimediakit/qmediarecordercontrol.h b/src/multimediakit/qmediarecordercontrol.h
index f7ef516b9..26f244c08 100644
--- a/src/multimediakit/qmediarecordercontrol.h
+++ b/src/multimediakit/qmediarecordercontrol.h
@@ -45,7 +45,12 @@
#include "qmediacontrol.h"
#include "qmediarecorder.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QUrl;
QT_END_NAMESPACE
@@ -90,4 +95,7 @@ Q_MEDIA_DECLARE_CONTROL(QMediaRecorderControl, QMediaRecorderControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qmediaresource.h b/src/multimediakit/qmediaresource.h
index 6b2738181..02469e04c 100644
--- a/src/multimediakit/qmediaresource.h
+++ b/src/multimediakit/qmediaresource.h
@@ -48,8 +48,13 @@
#include <qtmultimediakitdefs.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QMediaResource
{
public:
@@ -124,5 +129,6 @@ QT_END_NAMESPACE
Q_DECLARE_METATYPE(QMediaResource)
Q_DECLARE_METATYPE(QMediaResourceList)
+QT_END_HEADER
#endif
diff --git a/src/multimediakit/qmediaservice.h b/src/multimediakit/qmediaservice.h
index 77e1615ae..7bf90ba4f 100644
--- a/src/multimediakit/qmediaservice.h
+++ b/src/multimediakit/qmediaservice.h
@@ -48,8 +48,13 @@
#include "qmediacontrol.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaServicePrivate;
class Q_MULTIMEDIA_EXPORT QMediaService : public QObject
{
@@ -85,5 +90,8 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QABSTRACTMEDIASERVICE_H
diff --git a/src/multimediakit/qmediaservice_p.h b/src/multimediakit/qmediaservice_p.h
index a0f0b6b7f..83fd7287f 100644
--- a/src/multimediakit/qmediaservice_p.h
+++ b/src/multimediakit/qmediaservice_p.h
@@ -53,8 +53,13 @@
// We mean it.
//
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAudioDeviceControl;
class QMediaServicePrivate
@@ -68,5 +73,8 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qmediaserviceprovider.cpp b/src/multimediakit/qmediaserviceprovider.cpp
index dab7fe00d..e9ac801c0 100644
--- a/src/multimediakit/qmediaserviceprovider.cpp
+++ b/src/multimediakit/qmediaserviceprovider.cpp
@@ -110,6 +110,9 @@ public:
\value VideoSurface
The service is capable of renderering to a QAbstractVideoSurface
output.
+
+ \value BackgroundPlayback
+ The service is capable of doing playback in the background
*/
/*!
@@ -289,7 +292,7 @@ class QPluginServiceProvider : public QMediaServiceProvider
public:
QMediaService* requestService(const QByteArray &type, const QMediaServiceProviderHint &hint)
{
- QString key(type);
+ QString key(QLatin1String(type.constData()));
QList<QMediaServiceProviderPlugin *>plugins;
foreach (QObject *obj, loader()->instances(key)) {
@@ -404,7 +407,7 @@ public:
const QStringList& codecs,
int flags) const
{
- QList<QObject*> instances = loader()->instances(serviceType);
+ QList<QObject*> instances = loader()->instances(QLatin1String(serviceType));
if (instances.isEmpty())
return QtMultimediaKit::NotSupported;
@@ -456,7 +459,7 @@ public:
QStringList supportedMimeTypes(const QByteArray &serviceType, int flags) const
{
- QList<QObject*> instances = loader()->instances(serviceType);
+ QList<QObject*> instances = loader()->instances(QLatin1String(serviceType));
QStringList supportedTypes;
@@ -505,7 +508,7 @@ public:
{
QList<QByteArray> res;
- foreach(QObject *obj, loader()->instances(serviceType)) {
+ foreach (QObject *obj, loader()->instances(QLatin1String(serviceType))) {
QMediaServiceSupportedDevicesInterface *iface =
qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
@@ -519,7 +522,7 @@ public:
QString deviceDescription(const QByteArray &serviceType, const QByteArray &device)
{
- foreach(QObject *obj, loader()->instances(serviceType)) {
+ foreach (QObject *obj, loader()->instances(QLatin1String(serviceType))) {
QMediaServiceSupportedDevicesInterface *iface =
qobject_cast<QMediaServiceSupportedDevicesInterface*>(obj);
diff --git a/src/multimediakit/qmediaserviceprovider.h b/src/multimediakit/qmediaserviceprovider.h
index d9a789bf4..6305796b0 100644
--- a/src/multimediakit/qmediaserviceprovider.h
+++ b/src/multimediakit/qmediaserviceprovider.h
@@ -47,8 +47,13 @@
#include <qtmultimediakitdefs.h>
#include "qtmedianamespace.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaService;
class QMediaServiceProviderHintPrivate;
@@ -61,7 +66,8 @@ public:
LowLatencyPlayback = 0x01,
RecordingSupport = 0x02,
StreamPlayback = 0x04,
- VideoSurface = 0x08
+ VideoSurface = 0x08,
+ BackgroundPlayback = 0x10,
};
Q_DECLARE_FLAGS(Features, Feature)
@@ -167,4 +173,7 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIASERVICEPROVIDER_H
diff --git a/src/multimediakit/qmediaserviceproviderplugin.h b/src/multimediakit/qmediaserviceproviderplugin.h
index 6cf45fda4..5d150a22b 100644
--- a/src/multimediakit/qmediaserviceproviderplugin.h
+++ b/src/multimediakit/qmediaserviceproviderplugin.h
@@ -52,8 +52,13 @@
# pragma Q_MOC_EXPAND_MACROS
#endif
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaService;
struct Q_MULTIMEDIA_EXPORT QMediaServiceProviderFactoryInterface : public QFactoryInterface
@@ -117,5 +122,8 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIASERVICEPROVIDERPLUGIN_H
diff --git a/src/multimediakit/qmediastreamscontrol.h b/src/multimediakit/qmediastreamscontrol.h
index dd5468ee2..10c38e130 100644
--- a/src/multimediakit/qmediastreamscontrol.h
+++ b/src/multimediakit/qmediastreamscontrol.h
@@ -48,8 +48,13 @@
#include "qtmultimediakitdefs.h"
#include <qmediaenumdebug.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QMediaStreamsControl : public QMediaControl
{
Q_OBJECT
@@ -84,5 +89,7 @@ Q_DECLARE_METATYPE(QMediaStreamsControl::StreamType)
Q_MEDIA_ENUM_DEBUG(QMediaStreamsControl, StreamType)
+QT_END_HEADER
+
#endif // QMEDIASTREAMSCONTROL_H
diff --git a/src/multimediakit/qmediatimerange.h b/src/multimediakit/qmediatimerange.h
index 15ef12691..927801f34 100644
--- a/src/multimediakit/qmediatimerange.h
+++ b/src/multimediakit/qmediatimerange.h
@@ -46,8 +46,13 @@
#include "qtmedianamespace.h"
#include <QtCore/qshareddata.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaTimeRangePrivate;
class Q_MULTIMEDIA_EXPORT QMediaTimeInterval
@@ -129,4 +134,7 @@ Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, const QMediaTimeRange &);
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMEDIATIMERANGE_H
diff --git a/src/multimediakit/qmetadatareadercontrol.h b/src/multimediakit/qmetadatareadercontrol.h
index cb0ed7387..4689e30bc 100644
--- a/src/multimediakit/qmetadatareadercontrol.h
+++ b/src/multimediakit/qmetadatareadercontrol.h
@@ -50,8 +50,13 @@
#include <qtmultimediakitdefs.h>
#include "qtmedianamespace.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QMetaDataReaderControl : public QMediaControl
{
@@ -81,4 +86,7 @@ Q_MEDIA_DECLARE_CONTROL(QMetaDataReaderControl, QMetaDataReaderControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QMETADATAPROVIDER_H
diff --git a/src/multimediakit/qmetadatawritercontrol.h b/src/multimediakit/qmetadatawritercontrol.h
index 417e91abb..41a2fbba7 100644
--- a/src/multimediakit/qmetadatawritercontrol.h
+++ b/src/multimediakit/qmetadatawritercontrol.h
@@ -50,8 +50,13 @@
#include <qtmultimediakitdefs.h>
#include "qtmedianamespace.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QMetaDataWriterControl : public QMediaControl
{
@@ -86,4 +91,7 @@ Q_MEDIA_DECLARE_CONTROL(QMetaDataWriterControl, QMetaDataWriterControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qradiotuner.h b/src/multimediakit/qradiotuner.h
index e88f8488d..c0f94125f 100644
--- a/src/multimediakit/qradiotuner.h
+++ b/src/multimediakit/qradiotuner.h
@@ -50,8 +50,13 @@
#include <QPair>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QRadioTunerPrivate;
class Q_MULTIMEDIA_EXPORT QRadioTuner : public QMediaObject
{
@@ -148,4 +153,6 @@ Q_MEDIA_ENUM_DEBUG(QRadioTuner, Band)
Q_MEDIA_ENUM_DEBUG(QRadioTuner, Error)
Q_MEDIA_ENUM_DEBUG(QRadioTuner, StereoMode)
+QT_END_HEADER
+
#endif // QRADIOPLAYER_H
diff --git a/src/multimediakit/qradiotunercontrol.h b/src/multimediakit/qradiotunercontrol.h
index 6f9471700..ae6990ddc 100644
--- a/src/multimediakit/qradiotunercontrol.h
+++ b/src/multimediakit/qradiotunercontrol.h
@@ -45,8 +45,13 @@
#include "qmediacontrol.h"
#include "qradiotuner.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QRadioTunerControl : public QMediaControl
{
Q_OBJECT
@@ -97,7 +102,7 @@ Q_SIGNALS:
void bandChanged(QRadioTuner::Band band);
void frequencyChanged(int frequency);
void stereoStatusChanged(bool stereo);
- void searchingChanged(bool stereo);
+ void searchingChanged(bool searching);
void signalStrengthChanged(int signalStrength);
void volumeChanged(int volume);
void mutedChanged(bool muted);
@@ -112,4 +117,7 @@ Q_MEDIA_DECLARE_CONTROL(QRadioTunerControl, QRadioTunerControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QRADIOTUNERCONTROL_H
diff --git a/src/multimediakit/qtmedianamespace.h b/src/multimediakit/qtmedianamespace.h
index 9e71617e2..cadbc28d9 100644
--- a/src/multimediakit/qtmedianamespace.h
+++ b/src/multimediakit/qtmedianamespace.h
@@ -47,8 +47,13 @@
#include <qtmultimediakitdefs.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
namespace QtMultimediaKit
{
enum MetaData
@@ -187,4 +192,7 @@ namespace QtMultimediaKit
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qtmultimediakitdefs.h b/src/multimediakit/qtmultimediakitdefs.h
index d6ac059db..5ddc3e91c 100644
--- a/src/multimediakit/qtmultimediakitdefs.h
+++ b/src/multimediakit/qtmultimediakitdefs.h
@@ -73,7 +73,7 @@
# endif
#endif
-#if !defined(Q_SERVICEFW_EXPORT)
+#if !defined(Q_MULTIMEDIA_EXPORT)
# if defined(QT_SHARED)
# define Q_MULTIMEDIA_EXPORT Q_DECL_EXPORT
# else
diff --git a/src/multimediakit/qvideodevicecontrol.h b/src/multimediakit/qvideodevicecontrol.h
index 260c15868..6f44c4671 100644
--- a/src/multimediakit/qvideodevicecontrol.h
+++ b/src/multimediakit/qvideodevicecontrol.h
@@ -44,8 +44,12 @@
#include "qmediacontrol.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
class Q_MULTIMEDIA_EXPORT QVideoDeviceControl : public QMediaControl
{
Q_OBJECT
@@ -77,7 +81,8 @@ protected:
#define QVideoDeviceControl_iid "com.nokia.Qt.QVideoDeviceControl/1.0"
Q_MEDIA_DECLARE_CONTROL(QVideoDeviceControl, QVideoDeviceControl_iid)
-
QT_END_NAMESPACE
+QT_END_HEADER
+
#endif // QVIDEODEVICECONTROL_H
diff --git a/src/multimediakit/qvideoencodercontrol.h b/src/multimediakit/qvideoencodercontrol.h
index bf37a8364..343af8039 100644
--- a/src/multimediakit/qvideoencodercontrol.h
+++ b/src/multimediakit/qvideoencodercontrol.h
@@ -48,7 +48,12 @@
#include <QtCore/qpair.h>
#include <QtCore/qsize.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QByteArray;
class QStringList;
QT_END_NAMESPACE
@@ -87,4 +92,7 @@ Q_MEDIA_DECLARE_CONTROL(QVideoEncoderControl, QVideoEncoderControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qvideorenderercontrol.h b/src/multimediakit/qvideorenderercontrol.h
index 70bc64f69..b3a70837c 100644
--- a/src/multimediakit/qvideorenderercontrol.h
+++ b/src/multimediakit/qvideorenderercontrol.h
@@ -44,7 +44,12 @@
#include "qmediacontrol.h"
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QAbstractVideoSurface;
QT_END_NAMESPACE
@@ -70,4 +75,7 @@ Q_MEDIA_DECLARE_CONTROL(QVideoRendererControl, QVideoRendererControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QVIDEORENDERERCONTROL_H
diff --git a/src/multimediakit/qvideosurfaceoutput_p.h b/src/multimediakit/qvideosurfaceoutput_p.h
index d74f73082..76ec5e84d 100644
--- a/src/multimediakit/qvideosurfaceoutput_p.h
+++ b/src/multimediakit/qvideosurfaceoutput_p.h
@@ -46,8 +46,13 @@
#include <QtCore/qsharedpointer.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAbstractVideoSurface;
class QVideoRendererControl;
@@ -75,4 +80,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/video/qabstractvideobuffer.cpp b/src/multimediakit/video/qabstractvideobuffer.cpp
index 8704e40fc..88c00f6a5 100644
--- a/src/multimediakit/video/qabstractvideobuffer.cpp
+++ b/src/multimediakit/video/qabstractvideobuffer.cpp
@@ -55,8 +55,6 @@ QT_BEGIN_NAMESPACE
video data. Creating a subclass of QAbstractVideoBuffer will allow you to construct video
frames from preallocated or static buffers.
- XXX where do these come from?
-
The contents of a buffer can be accessed by mapping the buffer to memory using the map()
function which returns a pointer to memory containing the contents of the the video buffer.
The memory returned by map() is released by calling the unmap() function.
@@ -64,8 +62,6 @@ QT_BEGIN_NAMESPACE
The handle() of a buffer may also be used to manipulate its contents using type specific APIs.
The type of a buffer's handle is given by the handleType() function.
- XXX example of handle stuff (opengl etc)
-
\sa QVideoFrame
*/
@@ -194,8 +190,6 @@ QAbstractVideoBuffer::HandleType QAbstractVideoBuffer::handleType() const
The type of the handle is given by handleType() function.
- XXX put a table here too
-
\since 1.0
\sa handleType()
*/
diff --git a/src/multimediakit/video/qabstractvideobuffer.h b/src/multimediakit/video/qabstractvideobuffer.h
index 25e63825a..5662ee140 100644
--- a/src/multimediakit/video/qabstractvideobuffer.h
+++ b/src/multimediakit/video/qabstractvideobuffer.h
@@ -52,6 +52,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QVariant;
class QAbstractVideoBufferPrivate;
diff --git a/src/multimediakit/video/qabstractvideobuffer_p.h b/src/multimediakit/video/qabstractvideobuffer_p.h
index 2d2107e8a..80c37222b 100644
--- a/src/multimediakit/video/qabstractvideobuffer_p.h
+++ b/src/multimediakit/video/qabstractvideobuffer_p.h
@@ -60,8 +60,13 @@
#include <qtmedianamespace.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QAbstractVideoBufferPrivate
{
public:
@@ -77,4 +82,7 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/video/qabstractvideosurface.cpp b/src/multimediakit/video/qabstractvideosurface.cpp
index 13c2b25de..62a8acf57 100644
--- a/src/multimediakit/video/qabstractvideosurface.cpp
+++ b/src/multimediakit/video/qabstractvideosurface.cpp
@@ -61,8 +61,6 @@ Q_DECLARE_METATYPE(QAbstractVideoSurface::Error)
A video surface presents a continuous stream of identically formatted frames, where the format
of each frame is compatible with a stream format supplied when starting a presentation.
- XXX Why do I carE?
-
The QAbstractVideoSurface class defines the standard interface that video producers use to
inter-operate with video presentation surfaces. It is not supposed to be instantiated directly.
Instead, you should subclass it to create new video surfaces.
@@ -78,8 +76,6 @@ Q_DECLARE_METATYPE(QAbstractVideoSurface::Error)
hold a reference to the buffer of a presented video frame until a new frame is presented or
streaming is stopped. The stop() function will disable a surface and a release any video
buffers it holds references to.
-
- XXX Example?
*/
/*!
diff --git a/src/multimediakit/video/qabstractvideosurface.h b/src/multimediakit/video/qabstractvideosurface.h
index d473a9263..37c4d385f 100644
--- a/src/multimediakit/video/qabstractvideosurface.h
+++ b/src/multimediakit/video/qabstractvideosurface.h
@@ -49,6 +49,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QRectF;
class QVideoSurfaceFormat;
diff --git a/src/multimediakit/video/qimagevideobuffer_p.h b/src/multimediakit/video/qimagevideobuffer_p.h
index 2432f5dcf..dae952ed4 100644
--- a/src/multimediakit/video/qimagevideobuffer_p.h
+++ b/src/multimediakit/video/qimagevideobuffer_p.h
@@ -55,8 +55,13 @@
#include <qabstractvideobuffer.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QImage;
class QImageVideoBufferPrivate;
@@ -76,4 +81,7 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/video/qmemoryvideobuffer_p.h b/src/multimediakit/video/qmemoryvideobuffer_p.h
index 06d7d70cf..d5bc4e3c8 100644
--- a/src/multimediakit/video/qmemoryvideobuffer_p.h
+++ b/src/multimediakit/video/qmemoryvideobuffer_p.h
@@ -57,8 +57,13 @@
QT_BEGIN_HEADER
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMemoryVideoBufferPrivate;
class Q_MULTIMEDIA_EXPORT QMemoryVideoBuffer : public QAbstractVideoBuffer
@@ -78,4 +83,7 @@ QT_END_NAMESPACE
QT_END_HEADER
+
+QT_END_HEADER
+
#endif
diff --git a/src/multimediakit/video/qvideoframe.cpp b/src/multimediakit/video/qvideoframe.cpp
index 9286f898f..7c6bbdb11 100644
--- a/src/multimediakit/video/qvideoframe.cpp
+++ b/src/multimediakit/video/qvideoframe.cpp
@@ -120,8 +120,6 @@ private:
A QVideoFrame encapsulates the data of a video frame, and information about the frame.
- XXX why do I care
-
The contents of a video frame can be mapped to memory using the map() function. While
mapped, the video data can accessed using the bits() function, which returns a pointer to a
buffer. The total size of this buffer is given by the mappedBytes() function, and the size of each line is given
@@ -133,8 +131,6 @@ private:
\note QVideoFrame is explicitly shared, any change made to video frame will also apply to any
copies.
-
- XXX example
*/
/*!
@@ -343,8 +339,6 @@ QVideoFrame::QVideoFrame(const QImage &image)
/*!
Constructs a copy of \a other.
- XXX reference count
-
\since 1.0
*/
QVideoFrame::QVideoFrame(const QVideoFrame &other)
@@ -365,8 +359,6 @@ QVideoFrame &QVideoFrame::operator =(const QVideoFrame &other)
/*!
Destroys a video frame.
-
- XXX reference count
*/
QVideoFrame::~QVideoFrame()
{
@@ -397,8 +389,6 @@ QVideoFrame::PixelFormat QVideoFrame::pixelFormat() const
/*!
Returns the type of a video frame's handle.
- XXX What about it?
-
\since 1.0
*/
QAbstractVideoBuffer::HandleType QVideoFrame::handleType() const
@@ -536,8 +526,6 @@ QAbstractVideoBuffer::MapMode QVideoFrame::mapMode() const
Returns true if the buffer was mapped to memory in the given \a mode and false otherwise.
- XXX examples and why do I care
-
\since 1.0
\sa unmap(), mapMode(), bits()
*/
@@ -581,8 +569,6 @@ void QVideoFrame::unmap()
\note This is the bytes per line of the first plane only. The bytes per line of subsequent
planes should be calculated as per the frame type.
- XXX examples of these calculations
-
This value is only valid while the frame data is \l {map()}{mapped}.
\since 1.0
@@ -643,8 +629,6 @@ int QVideoFrame::mappedBytes() const
For an OpenGL texture this would be the texture ID.
- XXX Perhaps a table with corresondence
-
\since 1.0
\sa QAbstractVideoBuffer::handle()
*/
@@ -674,7 +658,6 @@ void QVideoFrame::setStartTime(qint64 time)
/*!
Returns the presentation time when a frame should stop being displayed.
- XXX example? if start=end what happens?
\since 1.0
*/
qint64 QVideoFrame::endTime() const
diff --git a/src/multimediakit/video/qvideoframe.h b/src/multimediakit/video/qvideoframe.h
index 20890b4e8..6dffaf59d 100644
--- a/src/multimediakit/video/qvideoframe.h
+++ b/src/multimediakit/video/qvideoframe.h
@@ -51,6 +51,8 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
class QSize;
class QVariant;
diff --git a/src/multimediakit/video/qvideosurfaceformat.cpp b/src/multimediakit/video/qvideosurfaceformat.cpp
index da27b5f41..4d198e186 100644
--- a/src/multimediakit/video/qvideosurfaceformat.cpp
+++ b/src/multimediakit/video/qvideosurfaceformat.cpp
@@ -142,9 +142,6 @@ public:
A video surface presents a stream of video frames. The surface's format describes the type of
the frames and determines how they should be presented.
- XXX Why do I care
- XXX why isn't it videostreamformat then?
-
The core properties of a video stream required to setup a video surface are the pixel format
given by pixelFormat(), and the frame dimensions given by frameSize().
diff --git a/src/multimediakit/video/qvideosurfaceformat.h b/src/multimediakit/video/qvideosurfaceformat.h
index 3fed1991e..f830b80a6 100644
--- a/src/multimediakit/video/qvideosurfaceformat.h
+++ b/src/multimediakit/video/qvideosurfaceformat.h
@@ -53,6 +53,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QDebug;
class QVideoSurfaceFormatPrivate;
diff --git a/src/multimediakitwidgets/multimediakitwidgets.pro b/src/multimediakitwidgets/multimediakitwidgets.pro
new file mode 100644
index 000000000..5adda10d7
--- /dev/null
+++ b/src/multimediakitwidgets/multimediakitwidgets.pro
@@ -0,0 +1,68 @@
+load(qt_module)
+
+# distinct from QtMultimediaKit
+TARGET = QtMultimediaKitWidgets
+QPRO_PWD = $$PWD
+QT = core gui multimediakit-private
+
+CONFIG += module no_private_qt_headers_warning
+MODULE_PRI += ../../modules/qt_multimediakitwidgets.pri
+
+contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) {
+ QT += opengl
+} else {
+ DEFINES += QT_NO_OPENGL
+}
+
+!static:DEFINES += QT_MAKEDLL
+DEFINES += QT_BUILD_MULTIMEDIAWIDGETS_LIB
+
+load(qt_module_config)
+
+PRIVATE_HEADERS += \
+ qvideowidget_p.h \
+ qpaintervideosurface_p.h \
+
+PUBLIC_HEADERS += \
+ qtmultimediakitwidgetdefs.h \
+ qtmultimediakitwidgetsversion.h \
+ qcameraviewfinder.h \
+ qgraphicsvideoitem.h \
+ qvideowidgetcontrol.h \
+ qvideowidget.h \
+ qvideowindowcontrol.h
+
+SOURCES += \
+ qcameraviewfinder.cpp \
+ qpaintervideosurface.cpp \
+ qvideowidgetcontrol.cpp \
+ qvideowidget.cpp \
+ qvideowindowcontrol.cpp \
+
+mac:!qpa {
+!simulator {
+ PRIVATE_HEADERS += qpaintervideosurface_mac_p.h
+ OBJECTIVE_SOURCES += qpaintervideosurface_mac.mm
+}
+ LIBS += -framework AppKit -framework QuartzCore -framework QTKit
+}
+
+maemo6 {
+ isEqual(QT_ARCH,armv6) {
+ PRIVATE_HEADERS += qeglimagetexturesurface_p.h
+ SOURCES += qeglimagetexturesurface.cpp
+
+ SOURCES += qgraphicsvideoitem_maemo6.cpp
+
+ LIBS += -lX11
+ } else {
+ SOURCES += qgraphicsvideoitem.cpp
+ }
+}
+
+!maemo* {
+ SOURCES += qgraphicsvideoitem.cpp
+}
+
+HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS
+
diff --git a/src/multimediakit/qcameraviewfinder.cpp b/src/multimediakitwidgets/qcameraviewfinder.cpp
index c4df95934..42167ebb4 100644
--- a/src/multimediakit/qcameraviewfinder.cpp
+++ b/src/multimediakitwidgets/qcameraviewfinder.cpp
@@ -41,7 +41,7 @@
#include <QDebug>
-#include <qmediaobject_p.h>
+#include <private/qmediaobject_p.h>
#include <qcamera.h>
#include <qcameraviewfinder.h>
diff --git a/src/multimediakit/qcameraviewfinder.h b/src/multimediakitwidgets/qcameraviewfinder.h
index 0feee37c1..4ac39ebb9 100644
--- a/src/multimediakit/qcameraviewfinder.h
+++ b/src/multimediakitwidgets/qcameraviewfinder.h
@@ -55,8 +55,13 @@
#include <qmediaserviceprovider.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QCamera;
class QCameraViewfinderPrivate;
@@ -79,4 +84,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif // QCAMERA_H
diff --git a/src/multimediakit/qeglimagetexturesurface.cpp b/src/multimediakitwidgets/qeglimagetexturesurface.cpp
index 685ae031f..dfab86c90 100644
--- a/src/multimediakit/qeglimagetexturesurface.cpp
+++ b/src/multimediakitwidgets/qeglimagetexturesurface.cpp
@@ -46,7 +46,7 @@
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
#include <QtGui/qpainter.h>
-#include <QtGui/qx11info_x11.h>
+#include <QtWidgets/qx11info_x11.h>
#include <qvideosurfaceformat.h>
diff --git a/src/multimediakit/qeglimagetexturesurface_p.h b/src/multimediakitwidgets/qeglimagetexturesurface_p.h
index d8aceb74d..9e941049d 100644
--- a/src/multimediakit/qeglimagetexturesurface_p.h
+++ b/src/multimediakitwidgets/qeglimagetexturesurface_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <qtmultimediakitdefs.h>
+#include <qtmultimediakitwidgetdefs.h>
#include <QtCore/qsize.h>
#include <QtGui/qimage.h>
#include <QtGui/qmatrix4x4.h>
@@ -65,7 +65,12 @@
#include <qvideosurfaceformat.h>
#include <qvideoframe.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QGLContext;
class QGLShaderProgram;
class QPainterVideoSurface;
@@ -139,4 +144,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qgraphicsvideoitem.cpp b/src/multimediakitwidgets/qgraphicsvideoitem.cpp
index 1f8f6db61..1f8f6db61 100644
--- a/src/multimediakit/qgraphicsvideoitem.cpp
+++ b/src/multimediakitwidgets/qgraphicsvideoitem.cpp
diff --git a/src/multimediakit/qgraphicsvideoitem.h b/src/multimediakitwidgets/qgraphicsvideoitem.h
index 309ec4ddb..cf8913417 100644
--- a/src/multimediakit/qgraphicsvideoitem.h
+++ b/src/multimediakitwidgets/qgraphicsvideoitem.h
@@ -42,12 +42,17 @@
#ifndef QGRAPHICSVIDEOITEM_H
#define QGRAPHICSVIDEOITEM_H
-#include <QtGui/qgraphicsitem.h>
+#include <QtWidgets/qgraphicsitem.h>
#include <qvideowidget.h>
#include <qmediabindableinterface.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QVideoSurfaceFormat;
QT_END_NAMESPACE
@@ -104,4 +109,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qgraphicsvideoitem_maemo6.cpp b/src/multimediakitwidgets/qgraphicsvideoitem_maemo6.cpp
index e0f812ca6..387a25042 100644
--- a/src/multimediakit/qgraphicsvideoitem_maemo6.cpp
+++ b/src/multimediakitwidgets/qgraphicsvideoitem_maemo6.cpp
@@ -45,7 +45,7 @@
#include <QtCore/qpointer.h>
#include <QtCore/qbasictimer.h>
-#include <QtGui/qgraphicsscene.h>
+#include <QtWidgets/qgraphicsscene.h>
#include <qmediaobject.h>
#include <qmediaservice.h>
diff --git a/src/multimediakit/qpaintervideosurface.cpp b/src/multimediakitwidgets/qpaintervideosurface.cpp
index bd82f7841..bd82f7841 100644
--- a/src/multimediakit/qpaintervideosurface.cpp
+++ b/src/multimediakitwidgets/qpaintervideosurface.cpp
diff --git a/src/multimediakit/qpaintervideosurface_mac.mm b/src/multimediakitwidgets/qpaintervideosurface_mac.mm
index 02eabfe7d..02eabfe7d 100644
--- a/src/multimediakit/qpaintervideosurface_mac.mm
+++ b/src/multimediakitwidgets/qpaintervideosurface_mac.mm
diff --git a/src/multimediakit/qpaintervideosurface_mac_p.h b/src/multimediakitwidgets/qpaintervideosurface_mac_p.h
index 667d4b5e3..d650d9ad7 100644
--- a/src/multimediakit/qpaintervideosurface_mac_p.h
+++ b/src/multimediakitwidgets/qpaintervideosurface_mac_p.h
@@ -61,6 +61,9 @@ QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QVideoSurfaceCoreGraphicsPainter : public QVideoSurfacePainter
{
public:
diff --git a/src/multimediakit/qpaintervideosurface_p.h b/src/multimediakitwidgets/qpaintervideosurface_p.h
index 19361ed5f..9b46e0395 100644
--- a/src/multimediakit/qpaintervideosurface_p.h
+++ b/src/multimediakitwidgets/qpaintervideosurface_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <qtmultimediakitdefs.h>
+#include <qtmultimediakitwidgetdefs.h>
#include <QtCore/qsize.h>
#include <QtGui/qimage.h>
#include <QtGui/qmatrix4x4.h>
@@ -61,7 +61,12 @@
#include <qabstractvideosurface.h>
#include <qvideoframe.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+
+QT_MODULE(Multimedia)
+
class QGLContext;
QT_END_NAMESPACE
@@ -180,4 +185,7 @@ Q_DECLARE_OPERATORS_FOR_FLAGS(QPainterVideoSurface::ShaderTypes)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakitwidgets/qtmultimediakitwidgetdefs.h b/src/multimediakitwidgets/qtmultimediakitwidgetdefs.h
new file mode 100644
index 000000000..c9d3202a8
--- /dev/null
+++ b/src/multimediakitwidgets/qtmultimediakitwidgetdefs.h
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. It exists purely as an
+// implementation detail. This header file may change from version to
+// version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#ifndef QTMULTIMEDIAKITWIDGETS_P_H
+#define QTMULTIMEDIAKITWIDGETS_P_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(Q_OS_WIN)
+# if defined(QT_NODLL)
+# undef QT_MAKEDLL
+# undef QT_DLL
+# elif defined(QT_MAKEDLL)
+# if defined(QT_DLL)
+# undef QT_DLL
+# endif
+# if defined(QT_BUILD_MULTIMEDIA_LIB)
+# define Q_MULTIMEDIAWIDGETS_EXPORT Q_DECL_EXPORT
+# else
+# define Q_MULTIMEDIAWIDGETS_EXPORT Q_DECL_IMPORT
+# endif
+# elif defined(QT_DLL) /* use a Qt DLL library */
+# define Q_MULTIMEDIAWIDGETS_EXPORT Q_DECL_IMPORT
+# endif
+#endif
+
+#if !defined(Q_MULTIMEDIAWIDGETS_EXPORT)
+# if defined(QT_SHARED)
+# define Q_MULTIMEDIAWIDGETS_EXPORT Q_DECL_EXPORT
+# else
+# define Q_MULTIMEDIAWIDGETS_EXPORT
+# endif
+#endif
+
+#endif // QMULTIMEDIAKITWIDGETS_P_H
+
diff --git a/src/multimediakit/qvideowidget.cpp b/src/multimediakitwidgets/qvideowidget.cpp
index 6ed9209c2..6ed9209c2 100644
--- a/src/multimediakit/qvideowidget.cpp
+++ b/src/multimediakitwidgets/qvideowidget.cpp
diff --git a/src/multimediakit/qvideowidget.h b/src/multimediakitwidgets/qvideowidget.h
index 43c603ed4..c0675c6e2 100644
--- a/src/multimediakit/qvideowidget.h
+++ b/src/multimediakitwidgets/qvideowidget.h
@@ -42,13 +42,18 @@
#ifndef QVIDEOWIDGET_H
#define QVIDEOWIDGET_H
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
-#include <qtmultimediakitdefs.h>
+#include <qtmultimediakitwidgetdefs.h>
#include <qmediabindableinterface.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaObject;
class QVideoWidgetPrivate;
@@ -128,4 +133,7 @@ private:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qvideowidget_p.h b/src/multimediakitwidgets/qvideowidget_p.h
index 4676cb6b9..ca9bc767a 100644
--- a/src/multimediakit/qvideowidget_p.h
+++ b/src/multimediakitwidgets/qvideowidget_p.h
@@ -53,7 +53,7 @@
// We mean it.
//
-#include <qtmultimediakitdefs.h>
+#include <qtmultimediakitwidgetdefs.h>
#include "qvideowidget.h"
#ifndef QT_NO_OPENGL
@@ -64,8 +64,13 @@
#include <QtCore/qpointer.h>
+QT_BEGIN_HEADER
+
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QMediaService;
class QVideoWidgetControlInterface
@@ -279,4 +284,7 @@ public:
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qvideowidgetcontrol.cpp b/src/multimediakitwidgets/qvideowidgetcontrol.cpp
index cd29cbd8c..d85c64def 100644
--- a/src/multimediakit/qvideowidgetcontrol.cpp
+++ b/src/multimediakitwidgets/qvideowidgetcontrol.cpp
@@ -40,7 +40,7 @@
****************************************************************************/
#include "qvideowidgetcontrol.h"
-#include "qmediacontrol_p.h"
+#include "private/qmediacontrol_p.h"
QT_BEGIN_NAMESPACE
diff --git a/src/multimediakit/qvideowidgetcontrol.h b/src/multimediakitwidgets/qvideowidgetcontrol.h
index d5797918d..c5ac880fa 100644
--- a/src/multimediakit/qvideowidgetcontrol.h
+++ b/src/multimediakitwidgets/qvideowidgetcontrol.h
@@ -45,10 +45,15 @@
#include "qvideowidget.h"
#include "qmediacontrol.h"
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class QVideoWidgetControlPrivate;
class Q_MULTIMEDIA_EXPORT QVideoWidgetControl : public QMediaControl
@@ -94,4 +99,7 @@ Q_MEDIA_DECLARE_CONTROL(QVideoWidgetControl, QVideoWidgetControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/multimediakit/qvideowindowcontrol.cpp b/src/multimediakitwidgets/qvideowindowcontrol.cpp
index 0adcfec06..0adcfec06 100644
--- a/src/multimediakit/qvideowindowcontrol.cpp
+++ b/src/multimediakitwidgets/qvideowindowcontrol.cpp
diff --git a/src/multimediakit/qvideowindowcontrol.h b/src/multimediakitwidgets/qvideowindowcontrol.h
index c48294d85..590ce64be 100644
--- a/src/multimediakit/qvideowindowcontrol.h
+++ b/src/multimediakitwidgets/qvideowindowcontrol.h
@@ -45,10 +45,15 @@
#include "qmediacontrol.h"
#include "qvideowidget.h"
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
+
+QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
+QT_MODULE(Multimedia)
+
+
class Q_MULTIMEDIA_EXPORT QVideoWindowControl : public QMediaControl
{
Q_OBJECT
@@ -101,4 +106,7 @@ Q_MEDIA_DECLARE_CONTROL(QVideoWindowControl, QVideoWindowControl_iid)
QT_END_NAMESPACE
+QT_END_HEADER
+
+
#endif
diff --git a/src/plugins/directshow/camera/dscameraservice.cpp b/src/plugins/directshow/camera/dscameraservice.cpp
index 01da662c0..3b42a18d1 100644
--- a/src/plugins/directshow/camera/dscameraservice.cpp
+++ b/src/plugins/directshow/camera/dscameraservice.cpp
@@ -41,7 +41,7 @@
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
#include <QVideoWidgetControl.h>
diff --git a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
index 243e8403d..11da5d357 100644
--- a/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
+++ b/src/plugins/directshow/camera/dsvideodevicecontrol.cpp
@@ -41,7 +41,7 @@
#include <QDebug>
#include <QFile>
-#include <QtGui/QIcon>
+#include <QtWidgets/QIcon>
#include "dsvideodevicecontrol.h"
#include "dscamerasession.h"
diff --git a/src/plugins/directshow/camera/dsvideowidgetcontrol.h b/src/plugins/directshow/camera/dsvideowidgetcontrol.h
index 35048ab79..62eb502f4 100644
--- a/src/plugins/directshow/camera/dsvideowidgetcontrol.h
+++ b/src/plugins/directshow/camera/dsvideowidgetcontrol.h
@@ -43,7 +43,7 @@
#define DSVIDEOWIDGETCONTROL_H
#include <QtCore/qobject.h>
-#include <QtGui>
+#include <QtWidgets>
#include <QtMultimedia/qvideoframe.h>
#include <QtMultimedia/qabstractvideosurface.h>
#include <QtMultimedia/qvideosurfaceformat.h>
diff --git a/src/plugins/fakeradio/fakeradio.pro b/src/plugins/fakeradio/fakeradio.pro
new file mode 100644
index 000000000..f6a495aac
--- /dev/null
+++ b/src/plugins/fakeradio/fakeradio.pro
@@ -0,0 +1,23 @@
+load(qt_module)
+
+TARGET = qtmedia_fakeradio
+QT += multimediakit-private
+PLUGIN_TYPE = mediaservice
+
+load(qt_plugin)
+DESTDIR = $$QT.multimediakit.plugins/$${PLUGIN_TYPE}
+
+HEADERS += \
+ fakeradioserviceplugin.h \
+ fakeradioservice.h \
+ fakeradiotunercontrol.h
+
+SOURCES += \
+ fakeradioserviceplugin.cpp \
+ fakeradioservice.cpp \
+ fakeradiotunercontrol.cpp
+
+
+target.path += $$[QT_INSTALL_PLUGINS]/$${PLUGIN_TYPE}
+INSTALLS += target
+
diff --git a/src/plugins/fakeradio/fakeradioservice.cpp b/src/plugins/fakeradio/fakeradioservice.cpp
new file mode 100644
index 000000000..144e3b3c7
--- /dev/null
+++ b/src/plugins/fakeradio/fakeradioservice.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qvariant.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qfile.h>
+#include <QtWidgets/qwidget.h>
+
+#include "fakeradioservice.h"
+#include "fakeradiotunercontrol.h"
+
+FakeRadioService::FakeRadioService(QObject *parent):
+ QMediaService(parent)
+{
+ m_control = new FakeRadioTunerControl(this);
+}
+
+FakeRadioService::~FakeRadioService()
+{
+}
+
+QMediaControl *FakeRadioService::requestControl(const char* name)
+{
+ if (qstrcmp(name,QRadioTunerControl_iid) == 0)
+ return m_control;
+
+ return 0;
+}
+
+
+void FakeRadioService::releaseControl(QMediaControl *)
+{
+}
diff --git a/src/plugins/fakeradio/fakeradioservice.h b/src/plugins/fakeradio/fakeradioservice.h
new file mode 100644
index 000000000..6b55d5380
--- /dev/null
+++ b/src/plugins/fakeradio/fakeradioservice.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FAKERADIOSERVICE_H
+#define FAKERADIOSERVICE_H
+
+#include <QtCore/qobject.h>
+
+#include <qmediaservice.h>
+QT_USE_NAMESPACE
+
+class FakeRadioTunerControl;
+
+class FakeRadioService : public QMediaService
+{
+ Q_OBJECT
+
+public:
+ FakeRadioService(QObject *parent = 0);
+ ~FakeRadioService();
+
+ QMediaControl *requestControl(const char* name);
+ void releaseControl(QMediaControl *);
+
+private:
+ FakeRadioTunerControl *m_control;
+};
+
+#endif // FAKERADIOSERVICE_H
diff --git a/src/plugins/fakeradio/fakeradioserviceplugin.cpp b/src/plugins/fakeradio/fakeradioserviceplugin.cpp
new file mode 100644
index 000000000..d4881195c
--- /dev/null
+++ b/src/plugins/fakeradio/fakeradioserviceplugin.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/qstring.h>
+#include <QtCore/qfile.h>
+#include <QtCore/qdebug.h>
+#include <QtCore/qdir.h>
+
+#include "fakeradioserviceplugin.h"
+#include "fakeradioservice.h"
+
+#include <qmediaserviceprovider.h>
+
+
+QStringList FakeRadioServicePlugin::keys() const
+{
+ return QStringList() <<
+ QLatin1String(Q_MEDIASERVICE_RADIO);
+}
+
+QMediaService* FakeRadioServicePlugin::create(QString const& key)
+{
+ if (key == QLatin1String(Q_MEDIASERVICE_RADIO))
+ return new FakeRadioService;
+
+ return 0;
+}
+
+void FakeRadioServicePlugin::release(QMediaService *service)
+{
+ delete service;
+}
+
+QList<QByteArray> FakeRadioServicePlugin::devices(const QByteArray &service) const
+{
+ Q_UNUSED(service);
+ return QList<QByteArray>();
+}
+
+QString FakeRadioServicePlugin::deviceDescription(const QByteArray &service, const QByteArray &device)
+{
+ Q_UNUSED(service);
+ Q_UNUSED(device);
+ return QString();
+}
+
+
+Q_EXPORT_PLUGIN2(qtmedia_fakeradio, FakeRadioServicePlugin);
+
diff --git a/src/plugins/fakeradio/fakeradioserviceplugin.h b/src/plugins/fakeradio/fakeradioserviceplugin.h
new file mode 100644
index 000000000..50b912838
--- /dev/null
+++ b/src/plugins/fakeradio/fakeradioserviceplugin.h
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#ifndef FAKERADIOSERVICEPLUGIN_H
+#define FAKERADIOSERVICEPLUGIN_H
+
+#include <qmediaserviceproviderplugin.h>
+
+QT_USE_NAMESPACE
+
+class FakeRadioServicePlugin : public QMediaServiceProviderPlugin, public QMediaServiceSupportedDevicesInterface
+{
+ Q_OBJECT
+ Q_INTERFACES(QMediaServiceSupportedDevicesInterface)
+public:
+ QStringList keys() const;
+ QMediaService* create(QString const& key);
+ void release(QMediaService *service);
+
+ QList<QByteArray> devices(const QByteArray &service) const;
+ QString deviceDescription(const QByteArray &service, const QByteArray &device);
+};
+
+#endif // FAKERADIOSERVICEPLUGIN_H
diff --git a/src/plugins/fakeradio/fakeradiotunercontrol.cpp b/src/plugins/fakeradio/fakeradiotunercontrol.cpp
new file mode 100644
index 000000000..4686692af
--- /dev/null
+++ b/src/plugins/fakeradio/fakeradiotunercontrol.cpp
@@ -0,0 +1,335 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "fakeradiotunercontrol.h"
+#include "fakeradioservice.h"
+
+#include <QtCore/qdebug.h>
+
+FakeRadioTunerControl::FakeRadioTunerControl(QObject *parent)
+ :QRadioTunerControl(parent)
+{
+ m_state = QRadioTuner::StoppedState;
+ m_freqMin = 520000;
+ m_freqMax = 108000000;
+ m_currentBand = QRadioTuner::FM;
+ m_currentFreq = 0;
+ m_stereo = true;
+ m_stereoMode = QRadioTuner::Auto;
+ m_signalStrength = 0;
+ m_volume = 50;
+ m_muted = false;
+
+ m_searching = false;
+ m_forward = true;
+ m_searchTimer = new QTimer(this);
+ m_searchTimer->setSingleShot(true);
+ connect(m_searchTimer, SIGNAL(timeout()), this, SLOT(searchEnded()));
+
+ QTimer::singleShot(300, this, SLOT(delayedInit()));
+
+ qsrand(QTime::currentTime().msec());
+}
+
+FakeRadioTunerControl::~FakeRadioTunerControl()
+{
+ m_searchTimer->stop();
+}
+
+bool FakeRadioTunerControl::isAvailable() const
+{
+ return true;
+}
+
+QtMultimediaKit::AvailabilityError FakeRadioTunerControl::availabilityError() const
+{
+ return QtMultimediaKit::NoError;
+}
+
+QRadioTuner::State FakeRadioTunerControl::state() const
+{
+ return m_state;
+}
+
+QRadioTuner::Band FakeRadioTunerControl::band() const
+{
+ return m_currentBand;
+}
+
+bool FakeRadioTunerControl::isBandSupported(QRadioTuner::Band b) const
+{
+ switch (b) {
+ case QRadioTuner::FM:
+ if (m_freqMin <= 87500000 && m_freqMax >= 108000000)
+ return true;
+ break;
+ case QRadioTuner::LW:
+ if (m_freqMin <= 148500 && m_freqMax >= 283500)
+ return true;
+ case QRadioTuner::AM:
+ if (m_freqMin <= 520000 && m_freqMax >= 1610000)
+ return true;
+ default:
+ if (m_freqMin <= 1711000 && m_freqMax >= 30000000)
+ return true;
+ }
+
+ return false;
+}
+
+void FakeRadioTunerControl::setBand(QRadioTuner::Band b)
+{
+ if (isBandSupported(b)) {
+ m_currentBand = b;
+ emit bandChanged(m_currentBand);
+
+ int f = m_currentFreq;
+ QPair<int, int> fRange = frequencyRange(m_currentBand);
+
+ if (f < fRange.first)
+ f = fRange.first;
+ if (f > fRange.second)
+ f = fRange.second;
+
+ if (f != m_currentFreq) {
+ m_currentFreq = f;
+ emit frequencyChanged(m_currentFreq);
+ }
+ }
+}
+
+int FakeRadioTunerControl::frequency() const
+{
+ return m_currentFreq;
+}
+
+int FakeRadioTunerControl::frequencyStep(QRadioTuner::Band b) const
+{
+ int step = 0;
+
+ if (b == QRadioTuner::FM)
+ step = 100000; // 100kHz steps
+ else if (b == QRadioTuner::LW)
+ step = 1000; // 1kHz steps
+ else if (b == QRadioTuner::AM)
+ step = 1000; // 1kHz steps
+ else if (b == QRadioTuner::SW)
+ step = 500; // 500Hz steps
+
+ return step;
+}
+
+QPair<int,int> FakeRadioTunerControl::frequencyRange(QRadioTuner::Band b) const
+{
+ if (b == QRadioTuner::FM)
+ return qMakePair<int,int>(87500000,108000000);
+ else if (b == QRadioTuner::LW)
+ return qMakePair<int,int>(148500,283500);
+ else if (b == QRadioTuner::AM)
+ return qMakePair<int,int>(520000,1710000);
+ else if (b == QRadioTuner::SW)
+ return qMakePair<int,int>(1711111,30000000);
+
+ return qMakePair<int,int>(0,0);
+}
+
+void FakeRadioTunerControl::setFrequency(int frequency)
+{
+ qint64 f = frequency;
+ QPair<int, int> fRange = frequencyRange(m_currentBand);
+
+ if (frequency < fRange.first)
+ f = fRange.first;
+ if (frequency > fRange.second)
+ f = fRange.second;
+
+ m_currentFreq = f;
+ emit frequencyChanged(m_currentFreq);
+}
+
+bool FakeRadioTunerControl::isStereo() const
+{
+ return m_stereo;
+}
+
+QRadioTuner::StereoMode FakeRadioTunerControl::stereoMode() const
+{
+ return m_stereoMode;
+}
+
+void FakeRadioTunerControl::setStereoMode(QRadioTuner::StereoMode mode)
+{
+ bool stereo = true;
+
+ if (mode == QRadioTuner::ForceMono)
+ stereo = false;
+ else
+ stereo = true;
+
+ m_stereo = stereo;
+ m_stereoMode = mode;
+
+ emit stereoStatusChanged(stereo);
+}
+
+int FakeRadioTunerControl::signalStrength() const
+{
+ return m_signalStrength;
+}
+
+int FakeRadioTunerControl::volume() const
+{
+ return m_volume;
+}
+
+void FakeRadioTunerControl::setVolume(int volume)
+{
+ int v = volume;
+
+ if (v < 0)
+ v = 0;
+ if (100 > v)
+ v = 100;
+
+ m_volume = v;
+}
+
+bool FakeRadioTunerControl::isMuted() const
+{
+ return m_muted;
+}
+
+void FakeRadioTunerControl::setMuted(bool muted)
+{
+ if (muted != m_muted) {
+ m_muted = muted;
+ emit mutedChanged(m_muted);
+ }
+}
+
+bool FakeRadioTunerControl::isSearching() const
+{
+ return m_searching;
+}
+
+void FakeRadioTunerControl::cancelSearch()
+{
+ m_searching = false;
+ m_searchTimer->stop();
+ emit searchingChanged(m_searching);
+}
+
+void FakeRadioTunerControl::searchForward()
+{
+ m_forward = true;
+ performSearch();
+}
+
+void FakeRadioTunerControl::searchBackward()
+{
+ m_forward = false;
+ performSearch();
+}
+
+void FakeRadioTunerControl::start()
+{
+ if (isAvailable() && m_state != QRadioTuner::ActiveState) {
+ m_state = QRadioTuner::ActiveState;
+ emit stateChanged(m_state);
+ }
+}
+
+void FakeRadioTunerControl::stop()
+{
+ if (m_state != QRadioTuner::StoppedState) {
+ m_state = QRadioTuner::StoppedState;
+ emit stateChanged(m_state);
+ }
+}
+
+QRadioTuner::Error FakeRadioTunerControl::error() const
+{
+ return QRadioTuner::NoError;
+}
+
+QString FakeRadioTunerControl::errorString() const
+{
+ return QString();
+}
+
+void FakeRadioTunerControl::delayedInit()
+{
+ m_signalStrength = 50;
+ emit signalStrengthChanged(m_signalStrength);
+}
+
+void FakeRadioTunerControl::performSearch()
+{
+ m_searching = true;
+ m_searchTimer->start(qrand() % 1000);
+ emit searchingChanged(m_searching);
+}
+
+void FakeRadioTunerControl::searchEnded()
+{
+ int minFreq, maxFreq, newFreq;
+ QPair<int, int> fRange = frequencyRange(m_currentBand);
+
+ if (m_forward) {
+ minFreq = m_currentFreq;
+ maxFreq = fRange.second;
+ } else {
+ minFreq = fRange.first;
+ maxFreq = m_currentFreq;
+ }
+
+ if ((qreal)(maxFreq - minFreq) / (qreal)(fRange.second - fRange.first) < 0.02) { // don't want to do anything if we have less than 2% of the range to move
+ return;
+ }
+
+ newFreq = (qrand() % (maxFreq - minFreq)) + minFreq;
+ newFreq -= newFreq % frequencyStep(m_currentBand);
+
+ m_searching = false;
+ m_currentFreq = newFreq;
+ emit searchingChanged(m_searching);
+ emit frequencyChanged(m_currentFreq);
+}
diff --git a/src/plugins/fakeradio/fakeradiotunercontrol.h b/src/plugins/fakeradio/fakeradiotunercontrol.h
new file mode 100644
index 000000000..a2faf2c02
--- /dev/null
+++ b/src/plugins/fakeradio/fakeradiotunercontrol.h
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef FAKERADIOTUNERCONTROL_H
+#define FAKERADIOTUNERCONTROL_H
+
+#include <QtCore/qobject.h>
+#include <QtCore/qtimer.h>
+#include <QtCore/qdatetime.h>
+
+#include <qradiotunercontrol.h>
+
+QT_USE_NAMESPACE
+
+class FakeRadioService;
+
+class FakeRadioTunerControl : public QRadioTunerControl
+{
+ Q_OBJECT
+public:
+ FakeRadioTunerControl(QObject *parent = 0);
+ ~FakeRadioTunerControl();
+
+ bool isAvailable() const;
+ QtMultimediaKit::AvailabilityError availabilityError() const;
+
+ QRadioTuner::State state() const;
+
+ QRadioTuner::Band band() const;
+ void setBand(QRadioTuner::Band b);
+ bool isBandSupported(QRadioTuner::Band b) const;
+
+ int frequency() const;
+ int frequencyStep(QRadioTuner::Band b) const;
+ QPair<int,int> frequencyRange(QRadioTuner::Band b) const;
+ void setFrequency(int frequency);
+
+ bool isStereo() const;
+ QRadioTuner::StereoMode stereoMode() const;
+ void setStereoMode(QRadioTuner::StereoMode mode);
+
+ int signalStrength() const;
+
+ int volume() const;
+ void setVolume(int volume);
+
+ bool isMuted() const;
+ void setMuted(bool muted);
+
+ bool isSearching() const;
+ void cancelSearch();
+
+ void searchForward();
+ void searchBackward();
+
+ void start();
+ void stop();
+
+ QRadioTuner::Error error() const;
+ QString errorString() const;
+
+private slots:
+ void delayedInit();
+ void performSearch();
+ void searchEnded();
+
+private: //data
+ QRadioTuner::State m_state;
+ QRadioTuner::Band m_currentBand;
+ qint64 m_freqMin;
+ qint64 m_freqMax;
+ qint64 m_currentFreq;
+ bool m_stereo;
+ QRadioTuner::StereoMode m_stereoMode;
+ int m_signalStrength;
+ int m_volume;
+ bool m_muted;
+
+ // searching
+ bool m_searching;
+ bool m_forward;
+ QTimer *m_searchTimer;
+};
+
+#endif // FAKERADIOTUNERCONTROL_H
diff --git a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp
index 149524b73..df5583d14 100644
--- a/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinresourcepolicy.cpp
@@ -41,10 +41,6 @@
#include "camerabinresourcepolicy.h"
-#ifdef Q_WS_MAEMO_6
-#define HAVE_RESOURCE_POLICY
-#endif
-
//#define DEBUG_RESOURCE_POLICY
#include <QtCore/qdebug.h>
#include <QtCore/qset.h>
diff --git a/src/plugins/gstreamer/camerabin/camerabinservice.cpp b/src/plugins/gstreamer/camerabin/camerabinservice.cpp
index 74fb40cb9..3c994b0ff 100644
--- a/src/plugins/gstreamer/camerabin/camerabinservice.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinservice.cpp
@@ -114,6 +114,7 @@ CameraBinService::CameraBinService(const QString &service, QObject *parent):
m_videoRenderer = new QGstreamerVideoRenderer(this);
#endif
+#if defined(Q_WS_X11) && !defined(QT_NO_XVIDEO)
#ifdef Q_WS_MAEMO_6
m_videoWindow = new QGstreamerVideoWindow(this, "omapxvsink");
@@ -124,6 +125,8 @@ CameraBinService::CameraBinService(const QString &service, QObject *parent):
m_videoWidgetControl = new QGstreamerVideoWidgetControl(this);
+#endif
+
}
if (!m_captureSession) {
diff --git a/src/plugins/gstreamer/camerabuttonlistener_meego.cpp b/src/plugins/gstreamer/camerabuttonlistener_meego.cpp
index c5cdf2ff9..5ee1daf42 100644
--- a/src/plugins/gstreamer/camerabuttonlistener_meego.cpp
+++ b/src/plugins/gstreamer/camerabuttonlistener_meego.cpp
@@ -41,9 +41,9 @@
#include "camerabuttonlistener_meego.h"
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
#include <QtGui/qevent.h>
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
#include <QtCore/qdebug.h>
CameraButtonListener::CameraButtonListener(QObject *parent) :
diff --git a/src/plugins/gstreamer/gstreamer.pro b/src/plugins/gstreamer/gstreamer.pro
index ef3b0ab40..550040ecf 100644
--- a/src/plugins/gstreamer/gstreamer.pro
+++ b/src/plugins/gstreamer/gstreamer.pro
@@ -2,7 +2,7 @@
load(qt_module)
TARGET = qgstengine
-QT += multimediakit-private network
+QT += multimediakit-private network multimediakitwidgets-private
PLUGIN_TYPE=mediaservice
load(qt_plugin)
@@ -27,11 +27,16 @@ PKGCONFIG += \
maemo*:PKGCONFIG +=gstreamer-plugins-bad-0.10
contains(config_test_gstreamer_appsrc, yes): PKGCONFIG += gstreamer-app-0.10
+contains(config_test_resourcepolicy, yes) {
+ DEFINES += HAVE_RESOURCE_POLICY
+ PKGCONFIG += libresourceqt1
+}
+
maemo6 {
HEADERS += camerabuttonlistener_meego.h
SOURCES += camerabuttonlistener_meego.cpp
- PKGCONFIG += qmsystem2 libresourceqt1
+ PKGCONFIG += qmsystem2
isEqual(QT_ARCH,armv6) {
HEADERS += qgstreamergltexturerenderer.h
diff --git a/src/plugins/gstreamer/gstvideoconnector.c b/src/plugins/gstreamer/gstvideoconnector.c
index c3f969fa5..d5b56c7c9 100644
--- a/src/plugins/gstreamer/gstvideoconnector.c
+++ b/src/plugins/gstreamer/gstvideoconnector.c
@@ -131,6 +131,7 @@ static void
gst_video_connector_init (GstVideoConnector *element,
GstVideoConnectorClass *g_class)
{
+ (void) g_class;
element->sinkpad =
gst_pad_new_from_static_template (&gst_video_connector_sink_factory,
"sink");
@@ -269,6 +270,9 @@ gst_video_connector_resend_new_segment(GstElement * element, gboolean emitFailed
static gboolean gst_video_connector_new_buffer_probe(GstObject *pad, GstBuffer *buffer, guint * object)
{
+ (void) pad;
+ (void) buffer;
+
GstVideoConnector *element = GST_VIDEO_CONNECTOR (object);
/*
diff --git a/src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp b/src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp
index 730427a8d..8b49cfce3 100644
--- a/src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp
+++ b/src/plugins/gstreamer/mediaplayer/playerresourcepolicy.cpp
@@ -41,10 +41,6 @@
#include "playerresourcepolicy.h"
-#ifdef Q_WS_MAEMO_6
-#define HAVE_RESOURCE_POLICY
-#endif
-
//#define DEBUG_RESOURCE_POLICY
#include <QtCore/qdebug.h>
diff --git a/src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp b/src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp
index ba36f560b..dc1f21ea2 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstappsrc.cpp
@@ -182,6 +182,7 @@ bool QGstAppSrc::doSeek(qint64 value)
gboolean QGstAppSrc::on_seek_data(GstAppSrc *element, guint64 arg0, gpointer userdata)
{
+ Q_UNUSED(element);
QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata);
if (self && self->isStreamValid()) {
if (!self->stream()->isSequential())
@@ -195,6 +196,7 @@ gboolean QGstAppSrc::on_seek_data(GstAppSrc *element, guint64 arg0, gpointer use
void QGstAppSrc::on_enough_data(GstAppSrc *element, gpointer userdata)
{
+ Q_UNUSED(element);
QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata);
if (self)
self->enoughData() = true;
@@ -202,6 +204,7 @@ void QGstAppSrc::on_enough_data(GstAppSrc *element, gpointer userdata)
void QGstAppSrc::on_need_data(GstAppSrc *element, guint arg0, gpointer userdata)
{
+ Q_UNUSED(element);
QGstAppSrc *self = reinterpret_cast<QGstAppSrc*>(userdata);
if (self) {
self->dataRequested() = true;
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
index 1cd595ef6..7c017e284 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayerservice.cpp
@@ -41,7 +41,7 @@
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
#include "qgstreamerplayerservice.h"
#include "qgstreamerplayercontrol.h"
diff --git a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
index 9e4e8bc69..d3d582332 100644
--- a/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
+++ b/src/plugins/gstreamer/mediaplayer/qgstreamerplayersession.cpp
@@ -103,8 +103,8 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
m_lastPosition(0),
m_duration(-1),
m_durationQueries(0),
- m_everPlayed(false) ,
m_sourceType(UnknownSrc),
+ m_everPlayed(false),
m_isLiveSource(false)
{
#ifdef USE_PLAYBIN2
@@ -195,6 +195,9 @@ GstElement *QGstreamerPlayerSession::playbin() const
#if defined(HAVE_GST_APPSRC)
void QGstreamerPlayerSession::configureAppSrcElement(GObject* object, GObject *orig, GParamSpec *pspec, QGstreamerPlayerSession* self)
{
+ Q_UNUSED(object);
+ Q_UNUSED(pspec);
+
if (self->appsrc()->isReady())
return;
diff --git a/src/plugins/gstreamer/qgstcodecsinfo.cpp b/src/plugins/gstreamer/qgstcodecsinfo.cpp
index f823281d5..34c18a18a 100644
--- a/src/plugins/gstreamer/qgstcodecsinfo.cpp
+++ b/src/plugins/gstreamer/qgstcodecsinfo.cpp
@@ -93,7 +93,8 @@ QGstCodecsInfo::QGstCodecsInfo(QGstCodecsInfo::ElementType elementType)
gst_caps_remove_structure(caps, 0);
}
-
+#else
+ Q_UNUSED(elementType);
#endif // GST_CHECK_VERSION(0,10,31)
}
diff --git a/src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp b/src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp
index 3605c576d..9433850bd 100644
--- a/src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp
+++ b/src/plugins/gstreamer/qgstreameraudioinputendpointselector.cpp
@@ -41,7 +41,7 @@
#include "qgstreameraudioinputendpointselector.h"
-#include <QtGui/QIcon>
+#include <QtWidgets/QIcon>
#include <QtCore/QDir>
#include <QtCore/QDebug>
diff --git a/src/plugins/gstreamer/qgstreamergltexturerenderer.cpp b/src/plugins/gstreamer/qgstreamergltexturerenderer.cpp
index af68096bd..615d23d82 100644
--- a/src/plugins/gstreamer/qgstreamergltexturerenderer.cpp
+++ b/src/plugins/gstreamer/qgstreamergltexturerenderer.cpp
@@ -44,8 +44,8 @@
#include "qgstutils.h"
#include <QtGui/qevent.h>
-#include <QtGui/qapplication.h>
-#include <QtGui/qx11info_x11.h>
+#include <QtWidgets/qapplication.h>
+#include <QtWidgets/qx11info_x11.h>
#include <QtCore/qdebug.h>
#include <QtCore/qthread.h>
diff --git a/src/plugins/gstreamer/qgstreamerserviceplugin.cpp b/src/plugins/gstreamer/qgstreamerserviceplugin.cpp
index c4ca9cdda..baa5bae06 100644
--- a/src/plugins/gstreamer/qgstreamerserviceplugin.cpp
+++ b/src/plugins/gstreamer/qgstreamerserviceplugin.cpp
@@ -41,7 +41,7 @@
#include <QtCore/qstring.h>
#include <QtCore/qdebug.h>
-#include <QtGui/QIcon>
+#include <QtWidgets/QIcon>
#include <QtCore/QDir>
#include <QtCore/QDebug>
diff --git a/src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp b/src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp
index d0280346a..ec9e9baf4 100644
--- a/src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp
+++ b/src/plugins/gstreamer/qgstreamervideoinputdevicecontrol.cpp
@@ -41,7 +41,7 @@
#include "qgstreamervideoinputdevicecontrol.h"
-#include <QtGui/QIcon>
+#include <QtWidgets/QIcon>
#include <QtCore/QDir>
#include <QtCore/QDebug>
diff --git a/src/plugins/gstreamer/qgstreamervideorenderer.cpp b/src/plugins/gstreamer/qgstreamervideorenderer.cpp
index d32e98ddb..e924f8353 100644
--- a/src/plugins/gstreamer/qgstreamervideorenderer.cpp
+++ b/src/plugins/gstreamer/qgstreamervideorenderer.cpp
@@ -44,7 +44,7 @@
#include "qabstractvideosurface.h"
#include <QEvent>
-#include <QApplication>
+#include <QtWidgets/QApplication>
#include <QDebug>
#include <gst/gst.h>
diff --git a/src/plugins/gstreamer/qgstreamervideowidget.cpp b/src/plugins/gstreamer/qgstreamervideowidget.cpp
index e1bf0037d..61c47f01b 100644
--- a/src/plugins/gstreamer/qgstreamervideowidget.cpp
+++ b/src/plugins/gstreamer/qgstreamervideowidget.cpp
@@ -44,7 +44,7 @@
#include <QtCore/qcoreevent.h>
#include <QtCore/qdebug.h>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
#include <QtGui/qpainter.h>
#ifdef Q_WS_X11
diff --git a/src/plugins/gstreamer/qgstxvimagebuffer.cpp b/src/plugins/gstreamer/qgstxvimagebuffer.cpp
index 55e58e2e0..31839920b 100644
--- a/src/plugins/gstreamer/qgstxvimagebuffer.cpp
+++ b/src/plugins/gstreamer/qgstxvimagebuffer.cpp
@@ -42,7 +42,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qthread.h>
#include <QtCore/qvariant.h>
-#include <QtGui/qx11info_x11.h>
+#include <QtWidgets/qx11info_x11.h>
#include "qgstxvimagebuffer.h"
#include "qvideosurfacegstsink.h"
diff --git a/src/plugins/gstreamer/qvideosurfacegstsink.cpp b/src/plugins/gstreamer/qvideosurfacegstsink.cpp
index 58fabeda4..6ccc1b1c5 100644
--- a/src/plugins/gstreamer/qvideosurfacegstsink.cpp
+++ b/src/plugins/gstreamer/qvideosurfacegstsink.cpp
@@ -49,7 +49,7 @@
#include "qgstvideobuffer.h"
#if defined(Q_WS_X11) && !defined(QT_NO_XVIDEO)
-#include <QtGui/qx11info_x11.h>
+#include <QtWidgets/qx11info_x11.h>
#include "qgstxvimagebuffer.h"
#endif
diff --git a/src/plugins/gstreamer/qx11videosurface.cpp b/src/plugins/gstreamer/qx11videosurface.cpp
index 035f9452d..f12be3e1b 100644
--- a/src/plugins/gstreamer/qx11videosurface.cpp
+++ b/src/plugins/gstreamer/qx11videosurface.cpp
@@ -41,7 +41,7 @@
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
-#include <QtGui/qx11info_x11.h>
+#include <QtWidgets/qx11info_x11.h>
#include <qvideosurfaceformat.h>
#ifndef QT_NO_XVIDEO
diff --git a/src/plugins/gstreamer/qx11videosurface.h b/src/plugins/gstreamer/qx11videosurface.h
index cac7a757e..ecc84e368 100644
--- a/src/plugins/gstreamer/qx11videosurface.h
+++ b/src/plugins/gstreamer/qx11videosurface.h
@@ -42,7 +42,7 @@
#ifndef QX11VIDEOSURFACE_H
#define QX11VIDEOSURFACE_H
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
#include <qabstractvideosurface.h>
#ifndef QT_NO_XVIDEO
diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro
index bc82c60b3..15a25b3d5 100644
--- a/src/plugins/plugins.pro
+++ b/src/plugins/plugins.pro
@@ -33,7 +33,8 @@ unix:!mac {
SUBDIRS += audiocapture
}
- !maemo*:SUBDIRS += v4l
+ # v4l is turned off because it is not supported in Qt 5
+ # !maemo*:SUBDIRS += v4l
contains(config_test_pulseaudio, yes) {
SUBDIRS += pulseaudio
@@ -44,3 +45,7 @@ mac:!simulator {
SUBDIRS += audiocapture
!qpa: SUBDIRS += qt7
}
+
+# fake radio to test the radio APIs
+SUBDIRS += fakeradio
+
diff --git a/src/plugins/pulseaudio/qaudioinput_pulse.cpp b/src/plugins/pulseaudio/qaudioinput_pulse.cpp
index d528cb106..d2ee31679 100644
--- a/src/plugins/pulseaudio/qaudioinput_pulse.cpp
+++ b/src/plugins/pulseaudio/qaudioinput_pulse.cpp
@@ -359,7 +359,7 @@ qint64 QPulseAudioInput::read(char *data, qint64 len)
emit stateChanged(m_deviceState);
}
- size_t readBytes = 0;
+ int readBytes = 0;
if (!m_pullMode && !m_tempBuffer.isEmpty()) {
readBytes = qMin(static_cast<int>(len), m_tempBuffer.size());
diff --git a/src/plugins/qt7/mediaplayer/qt7playercontrol.h b/src/plugins/qt7/mediaplayer/qt7playercontrol.h
index 15ea20a4a..54b9f4e87 100644
--- a/src/plugins/qt7/mediaplayer/qt7playercontrol.h
+++ b/src/plugins/qt7/mediaplayer/qt7playercontrol.h
@@ -47,7 +47,7 @@
#include <qmediaplayercontrol.h>
#include <qmediaplayer.h>
-#include <QtGui/qmacdefines_mac.h>
+#include <QtWidgets/qmacdefines_mac.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/qt7/mediaplayer/qt7playersession.h b/src/plugins/qt7/mediaplayer/qt7playersession.h
index de49a2398..c6e01151a 100644
--- a/src/plugins/qt7/mediaplayer/qt7playersession.h
+++ b/src/plugins/qt7/mediaplayer/qt7playersession.h
@@ -50,7 +50,7 @@
#include <qmediaplayercontrol.h>
#include <qmediaplayer.h>
-#include <QtGui/qmacdefines_mac.h>
+#include <QtWidgets/qmacdefines_mac.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/qt7/qt7.pro b/src/plugins/qt7/qt7.pro
index a8d2b4653..5be085eb2 100644
--- a/src/plugins/qt7/qt7.pro
+++ b/src/plugins/qt7/qt7.pro
@@ -1,7 +1,7 @@
load(qt_module)
TARGET = qqt7engine
-QT += multimediakit-private network
+QT += multimediakit-private multimediakitwidgets-private network
PLUGIN_TYPE = mediaservice
load(qt_plugin)
diff --git a/src/plugins/qt7/qt7movierenderer.h b/src/plugins/qt7/qt7movierenderer.h
index 0dc100da3..705515833 100644
--- a/src/plugins/qt7/qt7movierenderer.h
+++ b/src/plugins/qt7/qt7movierenderer.h
@@ -50,7 +50,7 @@
#include <qvideorenderercontrol.h>
#include <qmediaplayer.h>
-#include <QtGui/qmacdefines_mac.h>
+#include <QtWidgets/qmacdefines_mac.h>
#include "qt7videooutput.h"
#include <QuartzCore/CVOpenGLTexture.h>
diff --git a/src/plugins/qt7/qt7movievideowidget.h b/src/plugins/qt7/qt7movievideowidget.h
index 8556e1866..d3e607801 100644
--- a/src/plugins/qt7/qt7movievideowidget.h
+++ b/src/plugins/qt7/qt7movievideowidget.h
@@ -48,7 +48,7 @@
#include <qvideowindowcontrol.h>
#include <qmediaplayer.h>
-#include <QtGui/qmacdefines_mac.h>
+#include <QtWidgets/qmacdefines_mac.h>
#include "qt7videooutput.h"
#include <QuartzCore/CVOpenGLTexture.h>
diff --git a/src/plugins/qt7/qt7movieviewoutput.h b/src/plugins/qt7/qt7movieviewoutput.h
index dffbbddbb..d48255d34 100644
--- a/src/plugins/qt7/qt7movieviewoutput.h
+++ b/src/plugins/qt7/qt7movieviewoutput.h
@@ -47,7 +47,7 @@
#include <qvideowindowcontrol.h>
#include <qmediaplayer.h>
-#include <QtGui/qmacdefines_mac.h>
+#include <QtWidgets/qmacdefines_mac.h>
#include "qt7videooutput.h"
diff --git a/src/plugins/qt7/qt7movieviewrenderer.h b/src/plugins/qt7/qt7movieviewrenderer.h
index 65eebf7f6..6d5cef7da 100644
--- a/src/plugins/qt7/qt7movieviewrenderer.h
+++ b/src/plugins/qt7/qt7movieviewrenderer.h
@@ -48,7 +48,7 @@
#include <qvideowindowcontrol.h>
#include <qmediaplayer.h>
-#include <QtGui/qmacdefines_mac.h>
+#include <QtWidgets/qmacdefines_mac.h>
#include "qt7videooutput.h"
#include <qvideoframe.h>
diff --git a/src/plugins/qt7/qt7videooutput.h b/src/plugins/qt7/qt7videooutput.h
index 34feb391b..15b93c937 100644
--- a/src/plugins/qt7/qt7videooutput.h
+++ b/src/plugins/qt7/qt7videooutput.h
@@ -50,7 +50,7 @@
#include <qvideorenderercontrol.h>
#include <qmediaplayer.h>
-#include <QtGui/qmacdefines_mac.h>
+#include <QtWidgets/qmacdefines_mac.h>
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp b/src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp
index 55f9c9f45..95c4e2da9 100644
--- a/src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp
+++ b/src/plugins/simulator/camera/simulatorvideoinputdevicecontrol.cpp
@@ -41,7 +41,7 @@
#include "simulatorvideoinputdevicecontrol.h"
-#include <QtGui/QIcon>
+#include <QtWidgets/QIcon>
#include <QtCore/QDir>
#include <QtCore/QDebug>
#include <QtCore/QStringList>
diff --git a/src/plugins/simulator/qsimulatorserviceplugin.cpp b/src/plugins/simulator/qsimulatorserviceplugin.cpp
index 2971f59f7..e0e6d1293 100644
--- a/src/plugins/simulator/qsimulatorserviceplugin.cpp
+++ b/src/plugins/simulator/qsimulatorserviceplugin.cpp
@@ -41,7 +41,7 @@
#include <QtCore/qstring.h>
#include <QtCore/qdebug.h>
-#include <QtGui/QIcon>
+#include <QtWidgets/QIcon>
#include <QtCore/QDir>
#include <QtCore/QDebug>
diff --git a/src/plugins/v4l/radio/v4lradioservice.cpp b/src/plugins/v4l/radio/v4lradioservice.cpp
index 122993229..1d9ad2fcb 100644
--- a/src/plugins/v4l/radio/v4lradioservice.cpp
+++ b/src/plugins/v4l/radio/v4lradioservice.cpp
@@ -42,7 +42,7 @@
#include <QtCore/qvariant.h>
#include <QtCore/qdebug.h>
#include <QtCore/qfile.h>
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
#include "v4lradioservice.h"
#include "v4lradiocontrol.h"
diff --git a/src/plugins/wmf/player/evr9videowindowcontrol.cpp b/src/plugins/wmf/player/evr9videowindowcontrol.cpp
index 0b705b743..e653dd9c2 100644
--- a/src/plugins/wmf/player/evr9videowindowcontrol.cpp
+++ b/src/plugins/wmf/player/evr9videowindowcontrol.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/evr9videowindowcontrol.h b/src/plugins/wmf/player/evr9videowindowcontrol.h
index a39d75041..a4152432d 100644
--- a/src/plugins/wmf/player/evr9videowindowcontrol.h
+++ b/src/plugins/wmf/player/evr9videowindowcontrol.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp
index dac5a0abf..c1d8bd3b9 100644
--- a/src/plugins/wmf/player/mfaudioendpointcontrol.cpp
+++ b/src/plugins/wmf/player/mfaudioendpointcontrol.cpp
@@ -1,35 +1,35 @@
/****************************************************************************
**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfaudioendpointcontrol.h b/src/plugins/wmf/player/mfaudioendpointcontrol.h
index b4aa6f797..67f77566f 100644
--- a/src/plugins/wmf/player/mfaudioendpointcontrol.h
+++ b/src/plugins/wmf/player/mfaudioendpointcontrol.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfmetadatacontrol.cpp b/src/plugins/wmf/player/mfmetadatacontrol.cpp
index 21cc7032b..4d62b9091 100644
--- a/src/plugins/wmf/player/mfmetadatacontrol.cpp
+++ b/src/plugins/wmf/player/mfmetadatacontrol.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfmetadatacontrol.h b/src/plugins/wmf/player/mfmetadatacontrol.h
index 59eddade7..c666aaf5b 100644
--- a/src/plugins/wmf/player/mfmetadatacontrol.h
+++ b/src/plugins/wmf/player/mfmetadatacontrol.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfplayercontrol.cpp b/src/plugins/wmf/player/mfplayercontrol.cpp
index 3eb0764fb..cb76a037a 100644
--- a/src/plugins/wmf/player/mfplayercontrol.cpp
+++ b/src/plugins/wmf/player/mfplayercontrol.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#include "mfplayercontrol.h"
#include <qtcore/qdebug.h>
diff --git a/src/plugins/wmf/player/mfplayercontrol.h b/src/plugins/wmf/player/mfplayercontrol.h
index c2399504b..0256b89c6 100644
--- a/src/plugins/wmf/player/mfplayercontrol.h
+++ b/src/plugins/wmf/player/mfplayercontrol.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfplayerservice.cpp b/src/plugins/wmf/player/mfplayerservice.cpp
index 81fdf5792..bda86a342 100644
--- a/src/plugins/wmf/player/mfplayerservice.cpp
+++ b/src/plugins/wmf/player/mfplayerservice.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#include "qmediacontent.h"
#include <QtCore/qdebug.h>
diff --git a/src/plugins/wmf/player/mfplayerservice.h b/src/plugins/wmf/player/mfplayerservice.h
index 7fef10784..1e8a617b8 100644
--- a/src/plugins/wmf/player/mfplayerservice.h
+++ b/src/plugins/wmf/player/mfplayerservice.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfplayersession.cpp b/src/plugins/wmf/player/mfplayersession.cpp
index bb5b4bd2b..42b4f60d2 100644
--- a/src/plugins/wmf/player/mfplayersession.cpp
+++ b/src/plugins/wmf/player/mfplayersession.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#include "qmediacontent.h"
#include "qmediaplayercontrol.h"
diff --git a/src/plugins/wmf/player/mfplayersession.h b/src/plugins/wmf/player/mfplayersession.h
index e6e46ada2..933c865f9 100644
--- a/src/plugins/wmf/player/mfplayersession.h
+++ b/src/plugins/wmf/player/mfplayersession.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfstream.cpp b/src/plugins/wmf/player/mfstream.cpp
index fab854e4a..be9117540 100644
--- a/src/plugins/wmf/player/mfstream.cpp
+++ b/src/plugins/wmf/player/mfstream.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfstream.h b/src/plugins/wmf/player/mfstream.h
index 985d42e96..226bda9bb 100644
--- a/src/plugins/wmf/player/mfstream.h
+++ b/src/plugins/wmf/player/mfstream.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
@@ -38,6 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+
#ifndef MFSTREAM_H
#define MFSTREAM_H
@@ -146,4 +147,4 @@ protected:
IMFAsyncResult *m_currentReadResult;
};
-#endif \ No newline at end of file
+#endif
diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.cpp b/src/plugins/wmf/player/mfvideorenderercontrol.cpp
index ef9ac7821..18deb8af7 100644
--- a/src/plugins/wmf/player/mfvideorenderercontrol.cpp
+++ b/src/plugins/wmf/player/mfvideorenderercontrol.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/mfvideorenderercontrol.h b/src/plugins/wmf/player/mfvideorenderercontrol.h
index f34b5bf95..ad0277211 100644
--- a/src/plugins/wmf/player/mfvideorenderercontrol.h
+++ b/src/plugins/wmf/player/mfvideorenderercontrol.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/sourceresolver.cpp b/src/plugins/wmf/player/sourceresolver.cpp
index 1b98365b5..9c62fa8c6 100644
--- a/src/plugins/wmf/player/sourceresolver.cpp
+++ b/src/plugins/wmf/player/sourceresolver.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/player/sourceresolver.h b/src/plugins/wmf/player/sourceresolver.h
index 60bee69f1..18eb737a0 100644
--- a/src/plugins/wmf/player/sourceresolver.h
+++ b/src/plugins/wmf/player/sourceresolver.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/wmf.pro b/src/plugins/wmf/wmf.pro
index 5eccc80d5..0bb1743a7 100644
--- a/src/plugins/wmf/wmf.pro
+++ b/src/plugins/wmf/wmf.pro
@@ -1,7 +1,7 @@
load(qt_module)
TARGET = wmfengine
-QT += multimediakit-private network
+QT += multimediakit-private network multimediakitwidgets-private
PLUGIN_TYPE=mediaservice
load(qt_plugin)
diff --git a/src/plugins/wmf/wmfserviceplugin.cpp b/src/plugins/wmf/wmfserviceplugin.cpp
index 31910fd3a..ccc4ada00 100644
--- a/src/plugins/wmf/wmfserviceplugin.cpp
+++ b/src/plugins/wmf/wmfserviceplugin.cpp
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/plugins/wmf/wmfserviceplugin.h b/src/plugins/wmf/wmfserviceplugin.h
index cfaaef58c..9bcffaf1a 100644
--- a/src/plugins/wmf/wmfserviceplugin.h
+++ b/src/plugins/wmf/wmfserviceplugin.h
@@ -7,29 +7,29 @@
** This file is part of the Qt Mobility Components.
**
** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
** 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.
+** 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, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
+** rights. These rights are described in the Nokia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
+** 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.
**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
**
**
**
diff --git a/src/src.pro b/src/src.pro
index 6ee33f358..cad13103e 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -2,7 +2,11 @@
TEMPLATE = subdirs
CONFIG += ordered
+library_qtmmkwidgets.subdir = $$IN_PWD/multimediakitwidgets
+library_qtmmkwidgets.depends = multimediakit
+
SUBDIRS += multimediakit
+SUBDIRS += library_qtmmkwidgets
SUBDIRS += imports
SUBDIRS += plugins
diff --git a/sync.profile b/sync.profile
index 9939e4638..57945b1b2 100644
--- a/sync.profile
+++ b/sync.profile
@@ -1,5 +1,6 @@
%modules = ( # path to module name map
"QtMultimediaKit" => "$basedir/src/multimediakit",
+ "QtMultimediaKitWidgets" => "$basedir/src/multimediakitwidgets",
);
%moduleheaders = ( # restrict the module headers to those found in relative path
@@ -7,6 +8,7 @@
%classnames = (
"qtmultimediakitversion.h" => "QtMultimediaKitVersion",
+ "qtmultimediakitwidgetsversion.h" => "QtMultimediaKitWidgetsVersion",
);
%mastercontent = (
@@ -17,6 +19,7 @@
%modulepris = (
"QtMultimediaKit" => "$basedir/modules/qt_multimediakit.pri",
+ "QtMultimediaKitWidgets" => "$basedir/modules/qt_multimediakitwidgets.pri",
);
# Module dependencies.
@@ -45,4 +48,5 @@
"gstreamer_photography" => {},
"gstreamer_appsrc" => {},
"pulseaudio" => {},
+ "resourcepolicy" => {},
);
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index b3a5771a2..a8160c376 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -1,6 +1,7 @@
TEMPLATE = subdirs
-SUBDIRS+=multimedia.pro
+SUBDIRS += multimedia.pro
+contains(QT_CONFIG,multimediakitwidgets): SUBDIRS += multimediawidgets.pro
# These autotests consist of things such as static code checks
# which require that the autotest is run on the same machine
diff --git a/tests/auto/multimedia.pro b/tests/auto/multimedia.pro
index 9bacbbff6..6a6d08b9e 100644
--- a/tests/auto/multimedia.pro
+++ b/tests/auto/multimedia.pro
@@ -8,15 +8,9 @@ SUBDIRS += \
qaudioformat \
qaudioinput \
qaudiooutput \
- qcamera \
- qcamerabackend \
- qcameraimagecapture \
- qcameraviewfinder \
qmediabindableinterface \
qmediacontainercontrol \
qmediacontent \
- qmediaobject \
- qmediaplayer \
qmediaplayerbackend \
qmediaplaylistnavigator \
qmediarecorder \
@@ -28,9 +22,11 @@ SUBDIRS += \
qvideosurfaceformat \
qmetadatareadercontrol \
qmetadatawritercontrol \
-
-# This is disabled because it is unfinished
-# qmediastreamscontrol \
+ qmediaplayer \
+ qcameraimagecapture \
+ qmediaobject \
+ qcamera \
+ qcamerabackend \
# These is disabled until intent is clearer
# qvideodevicecontrol \
@@ -44,24 +40,16 @@ SUBDIRS += \
# Tests depending on private interfaces should only be built if
# these interfaces are exported.
contains (QT_CONFIG, private_tests) {
- SUBDIRS += \
- qgraphicsvideoitem \
- qmediaimageviewer \
- qmediaplaylist \
- qmediapluginloader \
- qmediaserviceprovider \
- qpaintervideosurface \
- qvideowidget \
-}
-
-contains (QT_CONFIG, declarative) {
- # All the declarative tests depend on private interfaces
- contains (QT_CONFIG, private_tests) {
SUBDIRS += \
- qsoundeffect \
- qdeclarativeaudio \
+ qmediaplaylist \
+ qmediapluginloader \
+ qmediaimageviewer \
+ qmediaserviceprovider
-
- disabled:SUBDIRS += qdeclarativevideo
- }
+ contains (QT_CONFIG, declarative) {
+ # All the declarative tests depend on private interfaces
+ SUBDIRS += \
+ qsoundeffect \
+ qdeclarativeaudio
+ }
}
diff --git a/tests/auto/multimediawidgets.pro b/tests/auto/multimediawidgets.pro
new file mode 100644
index 000000000..5a55ecc37
--- /dev/null
+++ b/tests/auto/multimediawidgets.pro
@@ -0,0 +1,25 @@
+
+TEMPLATE = subdirs
+SUBDIRS += \
+ qcameraviewfinder \
+ qcamerawidgets \
+ qmediaplayerwidgets \
+
+# This is a commment for the mock backend directory so that maketestselftest
+# doesn't believe it's an untested directory
+# qmultimedia_common
+
+# Tests depending on private interfaces should only be built if
+# these interfaces are exported.
+contains (QT_CONFIG, private_tests) {
+ SUBDIRS += \
+ qgraphicsvideoitem \
+ qpaintervideosurface \
+ qmediaimageviewerwidgets \
+ qvideowidget \
+
+ contains (QT_CONFIG, declarative) {
+ disabled:SUBDIRS += qdeclarativevideo
+ }
+}
+
diff --git a/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro b/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro
index e1fa50355..9bc5bbebc 100644
--- a/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro
+++ b/tests/auto/qabstractvideobuffer/qabstractvideobuffer.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qabstractvideobuffer
-#CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qabstractvideobuffer.cpp
diff --git a/tests/auto/qabstractvideosurface/qabstractvideosurface.pro b/tests/auto/qabstractvideosurface/qabstractvideosurface.pro
index 1778b566b..49461d385 100644
--- a/tests/auto/qabstractvideosurface/qabstractvideosurface.pro
+++ b/tests/auto/qabstractvideosurface/qabstractvideosurface.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qabstractvideosurface
-#CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qabstractvideosurface.cpp
diff --git a/tests/auto/qaudiocapturesource/qaudiocapturesource.pro b/tests/auto/qaudiocapturesource/qaudiocapturesource.pro
index 65c6cf3b4..9addb194c 100644
--- a/tests/auto/qaudiocapturesource/qaudiocapturesource.pro
+++ b/tests/auto/qaudiocapturesource/qaudiocapturesource.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qaudiocapturesource.cpp
diff --git a/tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro b/tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro
index 08d1634bb..bca2f3edd 100644
--- a/tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro
+++ b/tests/auto/qaudiodeviceinfo/qaudiodeviceinfo.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qaudiodeviceinfo
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qaudioformat/qaudioformat.pro b/tests/auto/qaudioformat/qaudioformat.pro
index 568cad09a..60fd74a4f 100644
--- a/tests/auto/qaudioformat/qaudioformat.pro
+++ b/tests/auto/qaudioformat/qaudioformat.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qaudioformat
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qaudioformat.cpp
diff --git a/tests/auto/qaudioinput/qaudioinput.pro b/tests/auto/qaudioinput/qaudioinput.pro
index 20a12b8fc..c5a952bf8 100644
--- a/tests/auto/qaudioinput/qaudioinput.pro
+++ b/tests/auto/qaudioinput/qaudioinput.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qaudioinput
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qaudiooutput/qaudiooutput.pro b/tests/auto/qaudiooutput/qaudiooutput.pro
index dcbd4cb99..3693dbbef 100644
--- a/tests/auto/qaudiooutput/qaudiooutput.pro
+++ b/tests/auto/qaudiooutput/qaudiooutput.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qaudiooutput
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qcamera/qcamera.pro b/tests/auto/qcamera/qcamera.pro
index baae9dba0..9e4a7e8ae 100644
--- a/tests/auto/qcamera/qcamera.pro
+++ b/tests/auto/qcamera/qcamera.pro
@@ -1,13 +1,11 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
include (../qmultimedia_common/mock.pri)
include (../qmultimedia_common/mockcamera.pri)
-# TARGET = tst_qcamera
-# CONFIG += testcase
-
SOURCES += tst_qcamera.cpp
maemo*:CONFIG += insignificant_test
diff --git a/tests/auto/qcamera/tst_qcamera.cpp b/tests/auto/qcamera/tst_qcamera.cpp
index 016e738a0..f0962394a 100644
--- a/tests/auto/qcamera/tst_qcamera.cpp
+++ b/tests/auto/qcamera/tst_qcamera.cpp
@@ -58,10 +58,7 @@
#include <qmediaservice.h>
#include <qcamera.h>
#include <qcameraimagecapture.h>
-#include <qgraphicsvideoitem.h>
#include <qvideorenderercontrol.h>
-#include <qvideowidget.h>
-#include <qvideowindowcontrol.h>
#include "mockcameraservice.h"
@@ -1037,39 +1034,10 @@ void tst_QCamera::testCameraEncodingProperyChange()
QCOMPARE(camera.status(), QCamera::ActiveStatus);
QCOMPARE(stateChangedSignal.count(), 0);
QCOMPARE(statusChangedSignal.count(), 1);
- stateChangedSignal.clear();
- statusChangedSignal.clear();
-
- //setting the viewfinder should also trigger backend to be restarted:
- camera.setViewfinder(new QGraphicsVideoItem());
- QCOMPARE(camera.state(), QCamera::ActiveState);
- QCOMPARE(camera.status(), QCamera::LoadedStatus);
-
- QCOMPARE(stateChangedSignal.count(), 0);
- QCOMPARE(statusChangedSignal.count(), 1);
-
- QTest::qWait(10);
-
- service.mockControl->m_propertyChangesSupported = true;
- //the changes to encoding settings,
- //capture mode and encoding parameters should not trigger service restart
- stateChangedSignal.clear();
- statusChangedSignal.clear();
-
- camera.setCaptureMode(QCamera::CaptureVideo);
- camera.setCaptureMode(QCamera::CaptureStillImage);
- imageCapture.setEncodingSettings(QImageEncoderSettings());
- imageCapture.setEncodingSettings(QImageEncoderSettings());
- camera.setViewfinder(new QGraphicsVideoItem());
-
- QCOMPARE(stateChangedSignal.count(), 0);
- QCOMPARE(statusChangedSignal.count(), 0);
}
void tst_QCamera::testSetVideoOutput()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockCameraService service;
@@ -1077,21 +1045,9 @@ void tst_QCamera::testSetVideoOutput()
provider.service = &service;
QCamera camera(0, &provider);
- camera.setViewfinder(&widget);
- QVERIFY(widget.mediaObject() == &camera);
-
- camera.setViewfinder(&item);
- QVERIFY(widget.mediaObject() == 0);
- QVERIFY(item.mediaObject() == &camera);
-
camera.setViewfinder(reinterpret_cast<QVideoWidget *>(0));
- QVERIFY(item.mediaObject() == 0);
-
- camera.setViewfinder(&widget);
- QVERIFY(widget.mediaObject() == &camera);
camera.setViewfinder(reinterpret_cast<QGraphicsVideoItem *>(0));
- QVERIFY(widget.mediaObject() == 0);
camera.setViewfinder(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
@@ -1102,56 +1058,37 @@ void tst_QCamera::testSetVideoOutput()
camera.setViewfinder(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
- camera.setViewfinder(&widget);
+ camera.setViewfinder(reinterpret_cast<QVideoWidget *>(0));
QVERIFY(service.rendererControl->surface() == 0);
- QVERIFY(widget.mediaObject() == &camera);
camera.setViewfinder(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
- QVERIFY(widget.mediaObject() == 0);
}
void tst_QCamera::testSetVideoOutputNoService()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockMediaServiceProvider provider;
provider.service = 0;
QCamera camera(0, &provider);
- camera.setViewfinder(&widget);
- QVERIFY(widget.mediaObject() == 0);
-
- camera.setViewfinder(&item);
- QVERIFY(item.mediaObject() == 0);
-
camera.setViewfinder(&surface);
// Nothing we can verify here other than it doesn't assert.
}
void tst_QCamera::testSetVideoOutputNoControl()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockCameraService service;
service.rendererRef = 1;
- service.windowRef = 1;
MockMediaServiceProvider provider;
provider.service = &service;
QCamera camera(0, &provider);
- camera.setViewfinder(&widget);
- QVERIFY(widget.mediaObject() == 0);
-
- camera.setViewfinder(&item);
- QVERIFY(item.mediaObject() == 0);
-
camera.setViewfinder(&surface);
QVERIFY(service.rendererControl->surface() == 0);
}
diff --git a/tests/auto/qcamerabackend/qcamerabackend.pro b/tests/auto/qcamerabackend/qcamerabackend.pro
index 8debf4134..638c2c368 100644
--- a/tests/auto/qcamerabackend/qcamerabackend.pro
+++ b/tests/auto/qcamerabackend/qcamerabackend.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
-QT += multimediakit-private
-
-# TARGET = tst_qcamerabackend
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qcameraimagecapture/qcameraimagecapture.pro b/tests/auto/qcameraimagecapture/qcameraimagecapture.pro
index 946665951..a69d2f342 100644
--- a/tests/auto/qcameraimagecapture/qcameraimagecapture.pro
+++ b/tests/auto/qcameraimagecapture/qcameraimagecapture.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += \
tst_qcameraimagecapture.cpp
diff --git a/tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp b/tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp
index ab198d553..312def45e 100644
--- a/tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp
+++ b/tests/auto/qcameraimagecapture/tst_qcameraimagecapture.cpp
@@ -63,8 +63,6 @@ Reviewer Name Date Coverage ( Full / Test Case IDs ).
#include <qmediaservice.h>
#include <qcamera.h>
#include <qcameraimagecapture.h>
-#include <qgraphicsvideoitem.h>
-#include <qcameraviewfinder.h>
#include "mockcameraservice.h"
#include "mockmediaserviceprovider.h"
diff --git a/tests/auto/qcameraviewfinder/qcameraviewfinder.pro b/tests/auto/qcameraviewfinder/qcameraviewfinder.pro
index 84228acb6..3f751ac95 100644
--- a/tests/auto/qcameraviewfinder/qcameraviewfinder.pro
+++ b/tests/auto/qcameraviewfinder/qcameraviewfinder.pro
@@ -1,8 +1,10 @@
load(qttest_p4)
-QT += multimediakit-private
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
include (../qmultimedia_common/mock.pri)
include (../qmultimedia_common/mockcamera.pri)
SOURCES += tst_qcameraviewfinder.cpp
+QT+=widgets
diff --git a/tests/auto/qcamerawidgets/qcamerawidgets.pro b/tests/auto/qcamerawidgets/qcamerawidgets.pro
new file mode 100644
index 000000000..220e16d6b
--- /dev/null
+++ b/tests/auto/qcamerawidgets/qcamerawidgets.pro
@@ -0,0 +1,12 @@
+load(qttest_p4)
+
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
+
+include (../qmultimedia_common/mock.pri)
+include (../qmultimedia_common/mockcamera.pri)
+
+SOURCES += tst_qcamerawidgets.cpp
+
+maemo*:CONFIG += insignificant_test
+QT+=widgets
diff --git a/tests/auto/qcamerawidgets/tst_qcamerawidgets.cpp b/tests/auto/qcamerawidgets/tst_qcamerawidgets.cpp
new file mode 100644
index 000000000..c6b448225
--- /dev/null
+++ b/tests/auto/qcamerawidgets/tst_qcamerawidgets.cpp
@@ -0,0 +1,319 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include <qabstractvideosurface.h>
+#include <qcameracontrol.h>
+#include <qcameralockscontrol.h>
+#include <qcameraexposurecontrol.h>
+#include <qcameraflashcontrol.h>
+#include <qcamerafocuscontrol.h>
+#include <qcameraimagecapturecontrol.h>
+#include <qimageencodercontrol.h>
+#include <qcameraimageprocessingcontrol.h>
+#include <qcameracapturebufferformatcontrol.h>
+#include <qcameracapturedestinationcontrol.h>
+#include <qmediaservice.h>
+#include <qcamera.h>
+#include <qcameraimagecapture.h>
+#include <qgraphicsvideoitem.h>
+#include <qvideorenderercontrol.h>
+#include <qvideowidget.h>
+#include <qvideowindowcontrol.h>
+
+#include "mockcameraservice.h"
+
+#include "mockmediaserviceprovider.h"
+#include "mockvideosurface.h"
+#include "mockvideorenderercontrol.h"
+#include "mockvideowindowcontrol.h"
+
+QT_USE_NAMESPACE
+
+Q_DECLARE_METATYPE(QtMultimediaKit::MetaData)
+
+class tst_QCameraWidgets: public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+private slots:
+ void testCameraEncodingProperyChange();
+ void testSetVideoOutput();
+ void testSetVideoOutputNoService();
+ void testSetVideoOutputNoControl();
+
+private:
+ MockSimpleCameraService *mockSimpleCameraService;
+ MockMediaServiceProvider *provider;
+};
+
+void tst_QCameraWidgets::initTestCase()
+{
+ provider = new MockMediaServiceProvider;
+ mockSimpleCameraService = new MockSimpleCameraService;
+ provider->service = mockSimpleCameraService;
+ qRegisterMetaType<QtMultimediaKit::MetaData>("QtMultimediaKit::MetaData");
+}
+
+void tst_QCameraWidgets::cleanupTestCase()
+{
+ delete mockSimpleCameraService;
+ delete provider;
+}
+
+void tst_QCameraWidgets::testCameraEncodingProperyChange()
+{
+ MockCameraService service;
+ provider->service = &service;
+ QCamera camera(0, provider);
+ QCameraImageCapture imageCapture(&camera);
+
+ QSignalSpy stateChangedSignal(&camera, SIGNAL(stateChanged(QCamera::State)));
+ QSignalSpy statusChangedSignal(&camera, SIGNAL(statusChanged(QCamera::Status)));
+
+ camera.start();
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::ActiveStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 1);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+
+ camera.setCaptureMode(QCamera::CaptureVideo);
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::LoadedStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ QTest::qWait(10);
+
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::ActiveStatus);
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ //backens should not be stopped since the capture mode is Video
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 0);
+
+ camera.setCaptureMode(QCamera::CaptureStillImage);
+ QTest::qWait(10);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ //the settings change should trigger camera stop/start
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::LoadedStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ QTest::qWait(10);
+
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::ActiveStatus);
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ //the settings change should trigger camera stop/start only once
+ camera.setCaptureMode(QCamera::CaptureVideo);
+ camera.setCaptureMode(QCamera::CaptureStillImage);
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::LoadedStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ QTest::qWait(10);
+
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::ActiveStatus);
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ //setting the viewfinder should also trigger backend to be restarted:
+ camera.setViewfinder(new QGraphicsVideoItem());
+ QCOMPARE(camera.state(), QCamera::ActiveState);
+ QCOMPARE(camera.status(), QCamera::LoadedStatus);
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 1);
+
+ QTest::qWait(10);
+
+ service.mockControl->m_propertyChangesSupported = true;
+ //the changes to encoding settings,
+ //capture mode and encoding parameters should not trigger service restart
+ stateChangedSignal.clear();
+ statusChangedSignal.clear();
+
+ camera.setCaptureMode(QCamera::CaptureVideo);
+ camera.setCaptureMode(QCamera::CaptureStillImage);
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ imageCapture.setEncodingSettings(QImageEncoderSettings());
+ camera.setViewfinder(new QGraphicsVideoItem());
+
+ QCOMPARE(stateChangedSignal.count(), 0);
+ QCOMPARE(statusChangedSignal.count(), 0);
+}
+
+void tst_QCameraWidgets::testSetVideoOutput()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockCameraService service;
+ MockMediaServiceProvider provider;
+ provider.service = &service;
+ QCamera camera(0, &provider);
+
+ camera.setViewfinder(&widget);
+ qDebug() << widget.mediaObject();
+ QVERIFY(widget.mediaObject() == &camera);
+
+ camera.setViewfinder(&item);
+ QVERIFY(widget.mediaObject() == 0);
+ QVERIFY(item.mediaObject() == &camera);
+
+ camera.setViewfinder(reinterpret_cast<QVideoWidget *>(0));
+ QVERIFY(item.mediaObject() == 0);
+
+ camera.setViewfinder(&widget);
+ QVERIFY(widget.mediaObject() == &camera);
+
+ camera.setViewfinder(reinterpret_cast<QGraphicsVideoItem *>(0));
+ QVERIFY(widget.mediaObject() == 0);
+
+ camera.setViewfinder(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+
+ camera.setViewfinder(reinterpret_cast<QAbstractVideoSurface *>(0));
+ QVERIFY(service.rendererControl->surface() == 0);
+
+ camera.setViewfinder(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+
+ camera.setViewfinder(&widget);
+ QVERIFY(service.rendererControl->surface() == 0);
+ QVERIFY(widget.mediaObject() == &camera);
+
+ camera.setViewfinder(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+ QVERIFY(widget.mediaObject() == 0);
+}
+
+
+void tst_QCameraWidgets::testSetVideoOutputNoService()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockMediaServiceProvider provider;
+ provider.service = 0;
+ QCamera camera(0, &provider);
+
+ camera.setViewfinder(&widget);
+ QVERIFY(widget.mediaObject() == 0);
+
+ camera.setViewfinder(&item);
+ QVERIFY(item.mediaObject() == 0);
+
+ camera.setViewfinder(&surface);
+ // Nothing we can verify here other than it doesn't assert.
+}
+
+void tst_QCameraWidgets::testSetVideoOutputNoControl()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockCameraService service;
+ service.rendererRef = 1;
+ service.windowRef = 1;
+
+ MockMediaServiceProvider provider;
+ provider.service = &service;
+ QCamera camera(0, &provider);
+
+ camera.setViewfinder(&widget);
+ QVERIFY(widget.mediaObject() == 0);
+
+ camera.setViewfinder(&item);
+ QVERIFY(item.mediaObject() == 0);
+
+ camera.setViewfinder(&surface);
+ QVERIFY(service.rendererControl->surface() == 0);
+}
+
+QTEST_MAIN(tst_QCameraWidgets)
+
+#include "tst_qcamerawidgets.moc"
diff --git a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
index a7ab28581..0b9b5e295 100644
--- a/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
+++ b/tests/auto/qdeclarativeaudio/qdeclarativeaudio.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private declarative
-
-# TARGET = tst_qdeclarativeaudio
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
HEADERS += \
$$QT.multimediakit.sources/../imports/multimedia/qdeclarativeaudio_p.h \
diff --git a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
index b75ed8485..ddf3fce13 100644
--- a/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
+++ b/tests/auto/qdeclarativeaudio/tst_qdeclarativeaudio.cpp
@@ -51,7 +51,7 @@
#include <qmediaserviceprovider.h>
#include <qmetadatareadercontrol.h>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
class tst_QDeclarativeAudio : public QObject
{
diff --git a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
index 15e58d8a5..35d7b14cf 100644
--- a/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
+++ b/tests/auto/qdeclarativevideo/qdeclarativevideo.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private declarative
-
-# TARGET = tst_qdeclarativevideo
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
HEADERS += \
$$QT.multimediakit.sources/../imports/multimedia/qdeclarativevideo_p.h \
@@ -16,3 +14,4 @@ SOURCES += \
$$QT.multimediakit.sources/../imports/multimedia/qdeclarativemediabase.cpp
INCLUDEPATH += $$QT.multimediakit.sources/../imports/multimedia
+QT+=widgets
diff --git a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
index 01bc0e769..035310079 100644
--- a/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
+++ b/tests/auto/qdeclarativevideo/tst_qdeclarativevideo.cpp
@@ -55,7 +55,7 @@
#include <qvideowindowcontrol.h>
#include <qvideosurfaceformat.h>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
#include <QtGui/qpainter.h>
class tst_QDeclarativeVideo : public QObject
diff --git a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
index 2db21569f..25ebe0ff2 100644
--- a/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
+++ b/tests/auto/qgraphicsvideoitem/qgraphicsvideoitem.pro
@@ -1,10 +1,10 @@
load(qttest_p4)
-QT += multimediakit-private
-
-# TARGET = tst_qgraphicsvideoitem
-# CONFIG += testcase
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qgraphicsvideoitem.cpp
-maemo*:CONFIG += insignificant_test
+# QPA minimal crashes with this test in QBackingStore
+qpa:CONFIG += insignificant_test
+QT+=widgets
diff --git a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
index f932bfd7d..79b3a0ab3 100644
--- a/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
+++ b/tests/auto/qgraphicsvideoitem/tst_qgraphicsvideoitem.cpp
@@ -52,9 +52,9 @@
#include <qabstractvideosurface.h>
#include <qvideosurfaceformat.h>
-#include <QtGui/qapplication.h>
-#include <QtGui/qgraphicsscene.h>
-#include <QtGui/qgraphicsview.h>
+#include <QtWidgets/qapplication.h>
+#include <QtWidgets/qgraphicsscene.h>
+#include <QtWidgets/qgraphicsview.h>
QT_USE_NAMESPACE
class tst_QGraphicsVideoItem : public QObject
diff --git a/tests/auto/qmediabindableinterface/qmediabindableinterface.pro b/tests/auto/qmediabindableinterface/qmediabindableinterface.pro
index 347c49d62..95e9f24a7 100644
--- a/tests/auto/qmediabindableinterface/qmediabindableinterface.pro
+++ b/tests/auto/qmediabindableinterface/qmediabindableinterface.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += \
tst_qmediabindableinterface.cpp
diff --git a/tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro b/tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro
index db5390233..c9e94711e 100644
--- a/tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro
+++ b/tests/auto/qmediacontainercontrol/qmediacontainercontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediacontainercontrol.cpp
diff --git a/tests/auto/qmediacontent/qmediacontent.pro b/tests/auto/qmediacontent/qmediacontent.pro
index 47d9cea67..a843c30e4 100644
--- a/tests/auto/qmediacontent/qmediacontent.pro
+++ b/tests/auto/qmediacontent/qmediacontent.pro
@@ -1,7 +1,6 @@
load(qttest_p4)
QT += multimediakit-private network
-# TARGET = tst_qmediacontent
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediacontent.cpp
diff --git a/tests/auto/qmediaimageviewer/qmediaimageviewer.pro b/tests/auto/qmediaimageviewer/qmediaimageviewer.pro
index dab1d2462..5372a19d6 100644
--- a/tests/auto/qmediaimageviewer/qmediaimageviewer.pro
+++ b/tests/auto/qmediaimageviewer/qmediaimageviewer.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private network
-
-# TARGET = tst_qmediaimageviewer
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaimageviewer.cpp
diff --git a/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp b/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp
index ff88b9cb3..e1de92a05 100644
--- a/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp
+++ b/tests/auto/qmediaimageviewer/tst_qmediaimageviewer.cpp
@@ -46,14 +46,11 @@
#include <QtCore/qdir.h>
-#include <qgraphicsvideoitem.h>
#include <qmediaimageviewer.h>
#include <private/qmediaimageviewerservice_p.h>
#include <qmediaplaylist.h>
#include <qmediaservice.h>
#include <qvideorenderercontrol.h>
-#include <qvideowidget.h>
-#include <qvideowidgetcontrol.h>
#include <QtCore/qfile.h>
#include <QtNetwork/qnetworkaccessmanager.h>
@@ -998,25 +995,11 @@ void tst_QMediaImageViewer::setVideoOutput()
if (imageViewer.mediaStatus() != QMediaImageViewer::LoadedMedia)
QSKIP("failed to load test image", SkipSingle);
- QVideoWidget widget;
- QGraphicsVideoItem item;
QtTestVideoSurface surface;
- imageViewer.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == &imageViewer);
-
- imageViewer.setVideoOutput(&item);
- QVERIFY(widget.mediaObject() == 0);
- QVERIFY(item.mediaObject() == &imageViewer);
-
imageViewer.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
- QVERIFY(item.mediaObject() == 0);
-
- imageViewer.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == &imageViewer);
imageViewer.setVideoOutput(reinterpret_cast<QGraphicsVideoItem *>(0));
- QVERIFY(widget.mediaObject() == 0);
imageViewer.setVideoOutput(&surface);
QVERIFY(surface.isActive());
@@ -1027,13 +1010,11 @@ void tst_QMediaImageViewer::setVideoOutput()
imageViewer.setVideoOutput(&surface);
QVERIFY(surface.isActive());
- imageViewer.setVideoOutput(&widget);
+ imageViewer.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
QVERIFY(!surface.isActive());
- QVERIFY(widget.mediaObject() == &imageViewer);
imageViewer.setVideoOutput(&surface);
QVERIFY(surface.isActive());
- QVERIFY(widget.mediaObject() == 0);
}
void tst_QMediaImageViewer::debugEnums()
diff --git a/tests/auto/qmediaimageviewerwidgets/images.qrc b/tests/auto/qmediaimageviewerwidgets/images.qrc
new file mode 100644
index 000000000..1d4edce17
--- /dev/null
+++ b/tests/auto/qmediaimageviewerwidgets/images.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>images/image.png</file>
+ </qresource>
+</RCC>
diff --git a/tests/auto/qmediaimageviewerwidgets/images/image.png b/tests/auto/qmediaimageviewerwidgets/images/image.png
new file mode 100644
index 000000000..a24db1b13
--- /dev/null
+++ b/tests/auto/qmediaimageviewerwidgets/images/image.png
Binary files differ
diff --git a/tests/auto/qmediaimageviewerwidgets/qmediaimageviewerwidgets.pro b/tests/auto/qmediaimageviewerwidgets/qmediaimageviewerwidgets.pro
new file mode 100644
index 000000000..f3493685c
--- /dev/null
+++ b/tests/auto/qmediaimageviewerwidgets/qmediaimageviewerwidgets.pro
@@ -0,0 +1,16 @@
+load(qttest_p4)
+
+QT += multimediakit-private multimediakitwidgets-private network
+CONFIG += no_private_qt_headers_warning
+
+SOURCES += tst_qmediaimageviewerwidgets.cpp
+
+RESOURCES += \
+ images.qrc
+
+!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
+
+wince* {
+ !contains(QT_CONFIG, no-jpeg): DEPLOYMENT_PLUGIN += qjpeg
+}
+QT+=widgets
diff --git a/tests/auto/qmediaimageviewerwidgets/tst_qmediaimageviewerwidgets.cpp b/tests/auto/qmediaimageviewerwidgets/tst_qmediaimageviewerwidgets.cpp
new file mode 100644
index 000000000..fd51b0063
--- /dev/null
+++ b/tests/auto/qmediaimageviewerwidgets/tst_qmediaimageviewerwidgets.cpp
@@ -0,0 +1,142 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+#include <qtmultimediakitdefs.h>
+#include <QtTest/QtTest>
+
+#include <QtCore/qdir.h>
+
+#include <qgraphicsvideoitem.h>
+#include <qmediaimageviewer.h>
+#include <private/qmediaimageviewerservice_p.h>
+#include <qmediaplaylist.h>
+#include <qmediaservice.h>
+#include <qvideorenderercontrol.h>
+#include <qvideowidget.h>
+#include <qvideowidgetcontrol.h>
+
+#include <qabstractvideosurface.h>
+#include <qvideosurfaceformat.h>
+
+QT_USE_NAMESPACE
+
+class tst_QMediaImageViewerWidgets : public QObject
+{
+ Q_OBJECT
+private slots:
+ void setVideoOutput();
+};
+
+class QtTestVideoSurface : public QAbstractVideoSurface
+{
+public:
+ QList<QVideoFrame::PixelFormat> supportedPixelFormats(
+ QAbstractVideoBuffer::HandleType handleType) const {
+ QList<QVideoFrame::PixelFormat> formats;
+ if (handleType == QAbstractVideoBuffer::NoHandle) {
+ formats << QVideoFrame::Format_RGB32;
+ }
+ return formats;
+ }
+
+ QVideoFrame frame() const { return m_frame; }
+
+ bool present(const QVideoFrame &frame) { m_frame = frame; return true; }
+
+private:
+ QVideoFrame m_frame;
+};
+
+void tst_QMediaImageViewerWidgets::setVideoOutput()
+{
+ QMediaImageViewer imageViewer;
+ imageViewer.setMedia(QMediaContent(QUrl("qrc:///images/image.png")));
+
+ connect(&imageViewer, SIGNAL(mediaStatusChanged(QMediaImageViewer::MediaStatus)),
+ &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(2);
+
+ if (imageViewer.mediaStatus() != QMediaImageViewer::LoadedMedia)
+ QSKIP("failed to load test image", SkipSingle);
+
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ QtTestVideoSurface surface;
+
+ imageViewer.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == &imageViewer);
+
+ imageViewer.setVideoOutput(&item);
+ QVERIFY(widget.mediaObject() == 0);
+ QVERIFY(item.mediaObject() == &imageViewer);
+
+ imageViewer.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
+ QVERIFY(item.mediaObject() == 0);
+
+ imageViewer.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == &imageViewer);
+
+ imageViewer.setVideoOutput(reinterpret_cast<QGraphicsVideoItem *>(0));
+ QVERIFY(widget.mediaObject() == 0);
+
+ imageViewer.setVideoOutput(&surface);
+ QVERIFY(surface.isActive());
+
+ imageViewer.setVideoOutput(reinterpret_cast<QAbstractVideoSurface *>(0));
+ QVERIFY(!surface.isActive());
+
+ imageViewer.setVideoOutput(&surface);
+ QVERIFY(surface.isActive());
+
+ imageViewer.setVideoOutput(&widget);
+ QVERIFY(!surface.isActive());
+ QVERIFY(widget.mediaObject() == &imageViewer);
+
+ imageViewer.setVideoOutput(&surface);
+ QVERIFY(surface.isActive());
+ QVERIFY(widget.mediaObject() == 0);
+}
+
+QTEST_MAIN(tst_QMediaImageViewerWidgets)
+
+#include "tst_qmediaimageviewerwidgets.moc"
diff --git a/tests/auto/qmediaobject/main.cpp b/tests/auto/qmediaobject/main.cpp
index e99d93eb9..5e822768d 100644
--- a/tests/auto/qmediaobject/main.cpp
+++ b/tests/auto/qmediaobject/main.cpp
@@ -45,7 +45,7 @@
int main(int argc, char**argv)
{
- QApplication app(argc,argv);
+ QCoreApplication app(argc,argv);
int ret;
tst_QMediaObject test_api;
ret = QTest::qExec(&test_api, argc, argv);
diff --git a/tests/auto/qmediaobject/qmediaobject.pro b/tests/auto/qmediaobject/qmediaobject.pro
index e33804456..66f60e1d5 100644
--- a/tests/auto/qmediaobject/qmediaobject.pro
+++ b/tests/auto/qmediaobject/qmediaobject.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaobject
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
include (../qmultimedia_common/mockrecorder.pri)
diff --git a/tests/auto/qmediaobject/tst_qmediaobject.cpp b/tests/auto/qmediaobject/tst_qmediaobject.cpp
index 2c96a393c..6a337ac50 100644
--- a/tests/auto/qmediaobject/tst_qmediaobject.cpp
+++ b/tests/auto/qmediaobject/tst_qmediaobject.cpp
@@ -42,7 +42,6 @@
//TESTED_COMPONENT=src/multimedia
#include "tst_qmediaobject.h"
-#include "qvideowidget.h"
#include "mockmediarecorderservice.h"
#include "mockmediaserviceprovider.h"
diff --git a/tests/auto/qmediaplayer/main.cpp b/tests/auto/qmediaplayer/main.cpp
index de905858f..417dcd3f1 100755
--- a/tests/auto/qmediaplayer/main.cpp
+++ b/tests/auto/qmediaplayer/main.cpp
@@ -45,7 +45,7 @@
int main(int argc, char**argv)
{
- QApplication app(argc,argv);
+ QCoreApplication app(argc,argv);
int ret;
tst_QMediaPlayer test_api;
ret = QTest::qExec(&test_api, argc, argv);
diff --git a/tests/auto/qmediaplayer/qmediaplayer.pro b/tests/auto/qmediaplayer/qmediaplayer.pro
index 26bf81326..bdb616a27 100644
--- a/tests/auto/qmediaplayer/qmediaplayer.pro
+++ b/tests/auto/qmediaplayer/qmediaplayer.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += network multimediakit-private
-
-# TARGET = tst_qmediaplayer
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
HEADERS += tst_qmediaplayer.h
SOURCES += main.cpp tst_qmediaplayer.cpp
diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
index fb438f626..8117ae1aa 100644
--- a/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
+++ b/tests/auto/qmediaplayer/tst_qmediaplayer.cpp
@@ -43,7 +43,6 @@
#include "tst_qmediaplayer.h"
-#include <qgraphicsvideoitem.h>
#include <QtNetwork/qnetworkconfigmanager.h>
// Encouraging successful diversity through copy and paste.
@@ -936,29 +935,14 @@ void tst_QMediaPlayer::testNetworkAccess()
void tst_QMediaPlayer::testSetVideoOutput()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockMediaPlayerService service;
MockMediaServiceProvider provider(&service);
QMediaPlayer player(0, 0, &provider);
- player.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == &player);
-
- player.setVideoOutput(&item);
- QVERIFY(widget.mediaObject() == 0);
- QVERIFY(item.mediaObject() == &player);
-
player.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
- QVERIFY(item.mediaObject() == 0);
-
- player.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == &player);
-
player.setVideoOutput(reinterpret_cast<QGraphicsVideoItem *>(0));
- QVERIFY(widget.mediaObject() == 0);
player.setVideoOutput(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
@@ -969,54 +953,35 @@ void tst_QMediaPlayer::testSetVideoOutput()
player.setVideoOutput(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
- player.setVideoOutput(&widget);
+ player.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
QVERIFY(service.rendererControl->surface() == 0);
- QVERIFY(widget.mediaObject() == &player);
player.setVideoOutput(&surface);
QVERIFY(service.rendererControl->surface() == &surface);
- QVERIFY(widget.mediaObject() == 0);
}
void tst_QMediaPlayer::testSetVideoOutputNoService()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockMediaServiceProvider provider(0, true);
QMediaPlayer player(0, 0, &provider);
- player.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == 0);
-
- player.setVideoOutput(&item);
- QVERIFY(item.mediaObject() == 0);
-
player.setVideoOutput(&surface);
// Nothing we can verify here other than it doesn't assert.
}
void tst_QMediaPlayer::testSetVideoOutputNoControl()
{
- QVideoWidget widget;
- QGraphicsVideoItem item;
MockVideoSurface surface;
MockMediaPlayerService service;
service.rendererRef = 1;
- service.windowRef = 1;
MockMediaServiceProvider provider(&service);
QMediaPlayer player(0, 0, &provider);
- player.setVideoOutput(&widget);
- QVERIFY(widget.mediaObject() == 0);
-
- player.setVideoOutput(&item);
- QVERIFY(item.mediaObject() == 0);
-
player.setVideoOutput(&surface);
QVERIFY(service.rendererControl->surface() == 0);
}
diff --git a/tests/auto/qmediaplayer/tst_qmediaplayer.h b/tests/auto/qmediaplayer/tst_qmediaplayer.h
index c87c65a7d..76a94cccf 100755
--- a/tests/auto/qmediaplayer/tst_qmediaplayer.h
+++ b/tests/auto/qmediaplayer/tst_qmediaplayer.h
@@ -54,7 +54,6 @@
#include <qmediastreamscontrol.h>
#include <qmedianetworkaccesscontrol.h>
#include <qvideorenderercontrol.h>
-#include <qvideowindowcontrol.h>
#include "mockmediaserviceprovider.h"
#include "mockmediaplayerservice.h"
diff --git a/tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro b/tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro
index a14dc3bb4..c89a30f31 100644
--- a/tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro
+++ b/tests/auto/qmediaplayerbackend/qmediaplayerbackend.pro
@@ -1,8 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaplayerbackend
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qmediaplayerwidgets/main.cpp b/tests/auto/qmediaplayerwidgets/main.cpp
new file mode 100755
index 000000000..95903a593
--- /dev/null
+++ b/tests/auto/qmediaplayerwidgets/main.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtCore/qcoreapplication.h>
+#include <QtTest/QtTest>
+
+#include "tst_qmediaplayerwidgets.h"
+
+int main(int argc, char**argv)
+{
+ QApplication app(argc,argv);
+ int ret;
+ tst_QMediaPlayerWidgets test_api;
+ ret = QTest::qExec(&test_api, argc, argv);
+ return ret;
+}
diff --git a/tests/auto/qmediaplayerwidgets/qmediaplayerwidgets.pro b/tests/auto/qmediaplayerwidgets/qmediaplayerwidgets.pro
new file mode 100644
index 000000000..a750ca9fa
--- /dev/null
+++ b/tests/auto/qmediaplayerwidgets/qmediaplayerwidgets.pro
@@ -0,0 +1,10 @@
+load(qttest_p4)
+
+QT += network multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
+
+HEADERS += tst_qmediaplayerwidgets.h
+SOURCES += main.cpp tst_qmediaplayerwidgets.cpp
+
+include (../qmultimedia_common/mock.pri)
+include (../qmultimedia_common/mockplayer.pri)
diff --git a/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.cpp b/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.cpp
new file mode 100644
index 000000000..ac9ffa0ce
--- /dev/null
+++ b/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.cpp
@@ -0,0 +1,162 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+#include "tst_qmediaplayerwidgets.h"
+#include "mockvideosurface.h"
+#include <qgraphicsvideoitem.h>
+
+QT_USE_NAMESPACE
+
+void tst_QMediaPlayerWidgets::initTestCase()
+{
+ qRegisterMetaType<QMediaPlayer::State>("QMediaPlayer::State");
+ qRegisterMetaType<QMediaPlayer::Error>("QMediaPlayer::Error");
+ qRegisterMetaType<QMediaPlayer::MediaStatus>("QMediaPlayer::MediaStatus");
+ qRegisterMetaType<QMediaContent>("QMediaContent");
+
+ mockService = new MockMediaPlayerService;
+ mockProvider = new MockMediaServiceProvider(mockService, true);
+ player = new QMediaPlayer(0, 0, mockProvider);
+}
+
+void tst_QMediaPlayerWidgets::cleanupTestCase()
+{
+ delete player;
+}
+
+void tst_QMediaPlayerWidgets::init()
+{
+ mockService->reset();
+}
+
+void tst_QMediaPlayerWidgets::cleanup()
+{
+}
+
+void tst_QMediaPlayerWidgets::testSetVideoOutput()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockMediaPlayerService service;
+ MockMediaServiceProvider provider(&service);
+ QMediaPlayer player(0, 0, &provider);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == &player);
+
+ player.setVideoOutput(&item);
+ QVERIFY(widget.mediaObject() == 0);
+ QVERIFY(item.mediaObject() == &player);
+
+ player.setVideoOutput(reinterpret_cast<QVideoWidget *>(0));
+ QVERIFY(item.mediaObject() == 0);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == &player);
+
+ player.setVideoOutput(reinterpret_cast<QGraphicsVideoItem *>(0));
+ QVERIFY(widget.mediaObject() == 0);
+
+ player.setVideoOutput(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+
+ player.setVideoOutput(reinterpret_cast<QAbstractVideoSurface *>(0));
+ QVERIFY(service.rendererControl->surface() == 0);
+
+ player.setVideoOutput(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(service.rendererControl->surface() == 0);
+ QVERIFY(widget.mediaObject() == &player);
+
+ player.setVideoOutput(&surface);
+ QVERIFY(service.rendererControl->surface() == &surface);
+ QVERIFY(widget.mediaObject() == 0);
+}
+
+
+void tst_QMediaPlayerWidgets::testSetVideoOutputNoService()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockMediaServiceProvider provider(0, true);
+ QMediaPlayer player(0, 0, &provider);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == 0);
+
+ player.setVideoOutput(&item);
+ QVERIFY(item.mediaObject() == 0);
+
+ player.setVideoOutput(&surface);
+ // Nothing we can verify here other than it doesn't assert.
+}
+
+void tst_QMediaPlayerWidgets::testSetVideoOutputNoControl()
+{
+ QVideoWidget widget;
+ QGraphicsVideoItem item;
+ MockVideoSurface surface;
+
+ MockMediaPlayerService service;
+ service.rendererRef = 1;
+ service.windowRef = 1;
+
+ MockMediaServiceProvider provider(&service);
+ QMediaPlayer player(0, 0, &provider);
+
+ player.setVideoOutput(&widget);
+ QVERIFY(widget.mediaObject() == 0);
+
+ player.setVideoOutput(&item);
+ QVERIFY(item.mediaObject() == 0);
+
+ player.setVideoOutput(&surface);
+ QVERIFY(service.rendererControl->surface() == 0);
+}
+
diff --git a/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.h b/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.h
new file mode 100755
index 000000000..e5f9b674a
--- /dev/null
+++ b/tests/auto/qmediaplayerwidgets/tst_qmediaplayerwidgets.h
@@ -0,0 +1,79 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#ifndef TST_QMEDIAPLAYER_H
+#define TST_QMEDIAPLAYER_H
+
+#include <QtTest/QtTest>
+#include <QtCore/qdebug.h>
+#include <QtCore/qbuffer.h>
+#include <QtNetwork/qnetworkconfiguration.h>
+
+#include <qabstractvideosurface.h>
+#include <qmediaplayer.h>
+#include <qmediaplayercontrol.h>
+
+#include "mockmediaserviceprovider.h"
+#include "mockmediaplayerservice.h"
+
+QT_USE_NAMESPACE
+
+class tst_QMediaPlayerWidgets: public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+
+private slots:
+ void testSetVideoOutput();
+ void testSetVideoOutputNoService();
+ void testSetVideoOutputNoControl();
+
+private:
+ MockMediaServiceProvider *mockProvider;
+ MockMediaPlayerService *mockService;
+ QMediaPlayer *player;
+};
+
+#endif //TST_QMEDIAPLAYER_H
diff --git a/tests/auto/qmediaplaylist/qmediaplaylist.pro b/tests/auto/qmediaplaylist/qmediaplaylist.pro
index 018d7b08d..38bac95ae 100644
--- a/tests/auto/qmediaplaylist/qmediaplaylist.pro
+++ b/tests/auto/qmediaplaylist/qmediaplaylist.pro
@@ -6,9 +6,7 @@ CONFIG += insignificant_test
include (../qmultimedia_common/mockplaylist.pri)
QT += multimediakit-private
-
-# TARGET = tst_qmediaplaylist
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
DEFINES += TESTDATA_DIR=\\\"$$PWD/\\\"
diff --git a/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro b/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
index f5252c63b..488249177 100644
--- a/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
+++ b/tests/auto/qmediaplaylistnavigator/qmediaplaylistnavigator.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaplaylistnavigator
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaplaylistnavigator.cpp
diff --git a/tests/auto/qmediapluginloader/qmediapluginloader.pro b/tests/auto/qmediapluginloader/qmediapluginloader.pro
index 55f134495..3299d50e5 100644
--- a/tests/auto/qmediapluginloader/qmediapluginloader.pro
+++ b/tests/auto/qmediapluginloader/qmediapluginloader.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediapluginloader
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediapluginloader.cpp
diff --git a/tests/auto/qmediarecorder/main.cpp b/tests/auto/qmediarecorder/main.cpp
index 98484e46a..cda3faf21 100755
--- a/tests/auto/qmediarecorder/main.cpp
+++ b/tests/auto/qmediarecorder/main.cpp
@@ -45,7 +45,7 @@
int main(int argc, char**argv)
{
- QApplication app(argc,argv);
+ QCoreApplication app(argc,argv);
int ret;
tst_QMediaRecorder test_api;
ret = QTest::qExec(&test_api, argc, argv);
diff --git a/tests/auto/qmediarecorder/qmediarecorder.pro b/tests/auto/qmediarecorder/qmediarecorder.pro
index c4395dcc0..5243a8206 100644
--- a/tests/auto/qmediarecorder/qmediarecorder.pro
+++ b/tests/auto/qmediarecorder/qmediarecorder.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediarecorder
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
include (../qmultimedia_common/mock.pri)
include (../qmultimedia_common/mockrecorder.pri)
diff --git a/tests/auto/qmediaresource/qmediaresource.pro b/tests/auto/qmediaresource/qmediaresource.pro
index dcd2a2f45..e003c7a1e 100644
--- a/tests/auto/qmediaresource/qmediaresource.pro
+++ b/tests/auto/qmediaresource/qmediaresource.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += network multimediakit-private
-
-# TARGET = tst_qmediaresource
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaresource.cpp
diff --git a/tests/auto/qmediaservice/qmediaservice.pro b/tests/auto/qmediaservice/qmediaservice.pro
index d0397ad66..4d48c4887 100644
--- a/tests/auto/qmediaservice/qmediaservice.pro
+++ b/tests/auto/qmediaservice/qmediaservice.pro
@@ -1,9 +1,6 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaservice
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaservice.cpp
-
diff --git a/tests/auto/qmediaservice/tst_qmediaservice.cpp b/tests/auto/qmediaservice/tst_qmediaservice.cpp
index 8f1dc38d1..3a46c5626 100644
--- a/tests/auto/qmediaservice/tst_qmediaservice.cpp
+++ b/tests/auto/qmediaservice/tst_qmediaservice.cpp
@@ -47,8 +47,7 @@
#include <qmediacontrol.h>
#include <qmediaservice.h>
-#include <QtGui/qapplication.h>
-#include <QtGui/qstyle.h>
+#include <QtCore/qcoreapplication.h>
QT_BEGIN_NAMESPACE
diff --git a/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro b/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
index d107ff74f..f51f84958 100644
--- a/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
+++ b/tests/auto/qmediaserviceprovider/qmediaserviceprovider.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediaserviceprovider
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediaserviceprovider.cpp
diff --git a/tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro b/tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro
index fcd8116a8..3ee331104 100644
--- a/tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro
+++ b/tests/auto/qmediastreamscontrol/qmediastreamscontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += \
tst_qmediastreamscontrol.cpp
diff --git a/tests/auto/qmediatimerange/qmediatimerange.pro b/tests/auto/qmediatimerange/qmediatimerange.pro
index 004bf373d..25f709fae 100644
--- a/tests/auto/qmediatimerange/qmediatimerange.pro
+++ b/tests/auto/qmediatimerange/qmediatimerange.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qmediatimerange
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmediatimerange.cpp
diff --git a/tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro b/tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro
index dc2f05123..675f5b0b2 100644
--- a/tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro
+++ b/tests/auto/qmetadatareadercontrol/qmetadatareadercontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmetadatareadercontrol.cpp
diff --git a/tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro b/tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro
index 601b8d61d..b6da11344 100644
--- a/tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro
+++ b/tests/auto/qmetadatawritercontrol/qmetadatawritercontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qmetadatawritercontrol.cpp
diff --git a/tests/auto/qmultimedia_common/mockcameraservice.h b/tests/auto/qmultimedia_common/mockcameraservice.h
index 591745b51..c51f75f5e 100644
--- a/tests/auto/qmultimedia_common/mockcameraservice.h
+++ b/tests/auto/qmultimedia_common/mockcameraservice.h
@@ -55,7 +55,10 @@
#include "../qmultimedia_common/mockcameracontrol.h"
#include "../qmultimedia_common/mockvideosurface.h"
#include "../qmultimedia_common/mockvideorenderercontrol.h"
+
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
#include "../qmultimedia_common/mockvideowindowcontrol.h"
+#endif
class MockSimpleCameraService : public QMediaService
{
@@ -102,7 +105,9 @@ public:
mockImageProcessingControl = new MockImageProcessingControl(this);
mockImageEncoderControl = new MockImageEncoderControl(this);
rendererControl = new MockVideoRendererControl(this);
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
windowControl = new MockVideoWindowControl(this);
+#endif
rendererRef = 0;
windowRef = 0;
}
@@ -148,12 +153,15 @@ public:
rendererRef += 1;
return rendererControl;
}
- } else if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
+ }
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
if (windowRef == 0) {
windowRef += 1;
return windowControl;
}
}
+#endif
return 0;
}
@@ -161,8 +169,10 @@ public:
{
if (control == rendererControl)
rendererRef -= 1;
- else if (control == windowControl)
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ if (control == windowControl)
windowRef -= 1;
+#endif
}
MockCameraControl *mockControl;
@@ -176,7 +186,9 @@ public:
MockImageProcessingControl *mockImageProcessingControl;
MockImageEncoderControl *mockImageEncoderControl;
MockVideoRendererControl *rendererControl;
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
MockVideoWindowControl *windowControl;
+#endif
int rendererRef;
int windowRef;
};
diff --git a/tests/auto/qmultimedia_common/mockmediaplayerservice.h b/tests/auto/qmultimedia_common/mockmediaplayerservice.h
index ac1e32bc6..57697225c 100644
--- a/tests/auto/qmultimedia_common/mockmediaplayerservice.h
+++ b/tests/auto/qmultimedia_common/mockmediaplayerservice.h
@@ -48,7 +48,9 @@
#include "mockmediastreamscontrol.h"
#include "mockmedianetworkaccesscontrol.h"
#include "mockvideorenderercontrol.h"
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
#include "mockvideowindowcontrol.h"
+#endif
class MockMediaPlayerService : public QMediaService
{
@@ -61,9 +63,11 @@ public:
mockStreamsControl = new MockStreamsControl;
mockNetworkControl = new MockNetworkAccessControl;
rendererControl = new MockVideoRendererControl;
- windowControl = new MockVideoWindowControl;
rendererRef = 0;
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ windowControl = new MockVideoWindowControl;
windowRef = 0;
+#endif
}
~MockMediaPlayerService()
@@ -72,7 +76,9 @@ public:
delete mockStreamsControl;
delete mockNetworkControl;
delete rendererControl;
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
delete windowControl;
+#endif
}
QMediaControl* requestControl(const char *iid)
@@ -84,13 +90,15 @@ public:
rendererRef += 1;
return rendererControl;
}
- } else if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
+ }
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ if (qstrcmp(iid, QVideoWindowControl_iid) == 0) {
if (windowRef == 0) {
windowRef += 1;
return windowControl;
}
}
-
+#endif
if (qstrcmp(iid, QMediaNetworkAccessControl_iid) == 0)
return mockNetworkControl;
@@ -101,8 +109,10 @@ public:
{
if (control == rendererControl)
rendererRef -= 1;
- else if (control == windowControl)
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+ if (control == windowControl)
windowRef -= 1;
+#endif
}
void setState(QMediaPlayer::State state) { emit mockControl->stateChanged(mockControl->_state = state); }
@@ -154,9 +164,11 @@ public:
MockStreamsControl *mockStreamsControl;
MockNetworkAccessControl *mockNetworkControl;
MockVideoRendererControl *rendererControl;
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
MockVideoWindowControl *windowControl;
- int rendererRef;
int windowRef;
+#endif
+ int rendererRef;
};
diff --git a/tests/auto/qmultimedia_common/mockmediaserviceprovider.h b/tests/auto/qmultimedia_common/mockmediaserviceprovider.h
index 3509fea9b..4573d7f96 100644
--- a/tests/auto/qmultimedia_common/mockmediaserviceprovider.h
+++ b/tests/auto/qmultimedia_common/mockmediaserviceprovider.h
@@ -43,6 +43,7 @@
#define MOCKMEDIASERVICEPROVIDER_H
#include "qmediaserviceprovider.h"
+#include "qmediaservice.h"
// Simple provider that lets you set the service
class MockMediaServiceProvider : public QMediaServiceProvider
diff --git a/tests/auto/qmultimedia_common/mockvideo.pri b/tests/auto/qmultimedia_common/mockvideo.pri
index a2492298c..6ffa0366a 100644
--- a/tests/auto/qmultimedia_common/mockvideo.pri
+++ b/tests/auto/qmultimedia_common/mockvideo.pri
@@ -3,8 +3,12 @@ INCLUDEPATH += $$PWD \
../../../src/multimedia \
../../../src/multimedia/video
+contains(QT,multimediakitwidgets)|contains(QT,multimediakitwidgets-private) {
+ HEADERS *= ../qmultimedia_common/mockvideowindowcontrol.h
+ DEFINES *= QT_MULTIMEDIAKIT_MOCK_WIDGETS
+}
+
HEADERS *= \
../qmultimedia_common/mockvideosurface.h \
- ../qmultimedia_common/mockvideorenderercontrol.h \
- ../qmultimedia_common/mockvideowindowcontrol.h
+ ../qmultimedia_common/mockvideorenderercontrol.h
diff --git a/tests/auto/qmultimedia_common/mockvideowindowcontrol.h b/tests/auto/qmultimedia_common/mockvideowindowcontrol.h
index ef8c41d80..981e266c8 100644
--- a/tests/auto/qmultimedia_common/mockvideowindowcontrol.h
+++ b/tests/auto/qmultimedia_common/mockvideowindowcontrol.h
@@ -42,6 +42,8 @@
#ifndef MOCKVIDEOWINDOWCONTROL_H
#define MOCKVIDEOWINDOWCONTROL_H
+#if defined(QT_MULTIMEDIAKIT_MOCK_WIDGETS)
+
#include "qvideowindowcontrol.h"
class MockVideoWindowControl : public QVideoWindowControl
@@ -68,4 +70,5 @@ public:
void setSaturation(int) {}
};
+#endif // QT_MULTIMEDIAKIT_MOCK_WIDGETS
#endif // MOCKVIDEOWINDOWCONTROL_H
diff --git a/tests/auto/qpaintervideosurface/qpaintervideosurface.pro b/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
index 9d14c4aeb..8c109b20a 100644
--- a/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
+++ b/tests/auto/qpaintervideosurface/qpaintervideosurface.pro
@@ -1,16 +1,17 @@
load(qttest_p4)
-QT += multimediakit-private
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
contains(QT_CONFIG, opengl) | contains(QT_CONFIG, opengles2) {
QT += opengl
} else {
DEFINES += QT_NO_OPENGL
}
-# TARGET = tst_qpaintervideosurface
-# CONFIG += testcase
-
contains(QT_CONFIG, opengl): QT += opengl
SOURCES += tst_qpaintervideosurface.cpp
+# QPA-minimal and OpenGL don't get along
+qpa:CONFIG += insignificant_test
+QT+=widgets
diff --git a/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp b/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp
index 66fa43945..53ed906e9 100644
--- a/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp
+++ b/tests/auto/qpaintervideosurface/tst_qpaintervideosurface.cpp
@@ -44,7 +44,7 @@
#include <private/qpaintervideosurface_p.h>
#include <QtTest/QtTest>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
#include <qvideosurfaceformat.h>
#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_1_CL) && !defined(QT_OPENGL_ES_1)
diff --git a/tests/auto/qradiotuner/main.cpp b/tests/auto/qradiotuner/main.cpp
index 8b7f83836..b2d6fd2b1 100755
--- a/tests/auto/qradiotuner/main.cpp
+++ b/tests/auto/qradiotuner/main.cpp
@@ -45,7 +45,7 @@
int main(int argc, char**argv)
{
- QApplication app(argc,argv);
+ QCoreApplication app(argc,argv);
int ret;
tst_QRadioTuner test_api;
ret = QTest::qExec(&test_api, argc, argv);
diff --git a/tests/auto/qradiotuner/qradiotuner.pro b/tests/auto/qradiotuner/qradiotuner.pro
index 8e2a07b02..b04057ba4 100644
--- a/tests/auto/qradiotuner/qradiotuner.pro
+++ b/tests/auto/qradiotuner/qradiotuner.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
-
-# TARGET = tst_qradiotuner
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
HEADERS += tst_qradiotuner.h
SOURCES += main.cpp tst_qradiotuner.cpp
diff --git a/tests/auto/qsoundeffect/qsoundeffect.pro b/tests/auto/qsoundeffect/qsoundeffect.pro
index b5a510a44..c1e317893 100644
--- a/tests/auto/qsoundeffect/qsoundeffect.pro
+++ b/tests/auto/qsoundeffect/qsoundeffect.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += core declarative multimediakit-private
+CONFIG += no_private_qt_headers_warning
# This is more of a system test
CONFIG -= testcase
diff --git a/tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro b/tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro
index 486bc1e7d..e336c6eb9 100644
--- a/tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro
+++ b/tests/auto/qvideodevicecontrol/qvideodevicecontrol.pro
@@ -1,5 +1,6 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qvideodevicecontrol.cpp
diff --git a/tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro b/tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro
index 57e44032f..98b64c17d 100644
--- a/tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro
+++ b/tests/auto/qvideoencodercontrol/qvideoencodercontrol.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
QT += multimediakit-private
+CONFIG += no_private_qt_headers_warning
SOURCES += \
tst_qvideoencodercontrol.cpp
diff --git a/tests/auto/qvideoframe/qvideoframe.pro b/tests/auto/qvideoframe/qvideoframe.pro
index 03af898c8..13bcf1ee1 100644
--- a/tests/auto/qvideoframe/qvideoframe.pro
+++ b/tests/auto/qvideoframe/qvideoframe.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qvideoframe
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qvideoframe.cpp
diff --git a/tests/auto/qvideoframe/tst_qvideoframe.cpp b/tests/auto/qvideoframe/tst_qvideoframe.cpp
index 37f7dc440..f400bfecb 100644
--- a/tests/auto/qvideoframe/tst_qvideoframe.cpp
+++ b/tests/auto/qvideoframe/tst_qvideoframe.cpp
@@ -650,7 +650,7 @@ void tst_QVideoFrame::mapImage()
QVERIFY(frame.map(mode));
QVERIFY(frame.bits());
- QCOMPARE(frame.mappedBytes(), image.numBytes());
+ QCOMPARE(frame.mappedBytes(), image.byteCount());
QCOMPARE(frame.bytesPerLine(), image.bytesPerLine());
QCOMPARE(frame.mapMode(), mode);
diff --git a/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro b/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro
index 472d2cf9c..26ea850fb 100644
--- a/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro
+++ b/tests/auto/qvideosurfaceformat/qvideosurfaceformat.pro
@@ -1,9 +1,7 @@
load(qttest_p4)
QT += core multimediakit-private
-
-# TARGET = tst_qvideosurfaceformat
-# CONFIG += testcase
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qvideosurfaceformat.cpp
diff --git a/tests/auto/qvideowidget/qvideowidget.pro b/tests/auto/qvideowidget/qvideowidget.pro
index 07fd03a02..4a034c17a 100644
--- a/tests/auto/qvideowidget/qvideowidget.pro
+++ b/tests/auto/qvideowidget/qvideowidget.pro
@@ -1,10 +1,10 @@
load(qttest_p4)
-QT += multimediakit-private
-
-# TARGET = tst_qvideowidget
-# CONFIG += testcase
+QT += multimediakit-private multimediakitwidgets-private
+CONFIG += no_private_qt_headers_warning
SOURCES += tst_qvideowidget.cpp
-maemo*:CONFIG += insignificant_test
+# QPA seems to break some assumptions
+qpa:CONFIG += insignificant_test
+QT+=widgets
diff --git a/tests/auto/qvideowidget/tst_qvideowidget.cpp b/tests/auto/qvideowidget/tst_qvideowidget.cpp
index cfcd79927..58ab43eed 100644
--- a/tests/auto/qvideowidget/tst_qvideowidget.cpp
+++ b/tests/auto/qvideowidget/tst_qvideowidget.cpp
@@ -56,7 +56,7 @@
#include <qabstractvideosurface.h>
#include <qvideosurfaceformat.h>
-#include <QtGui/qapplication.h>
+#include <QtWidgets/qapplication.h>
QT_USE_NAMESPACE
class tst_QVideoWidget : public QObject
diff --git a/tests/systemtests/audio/sys_audio.qtt b/tests/systemtests/audio/sys_audio.qtt
new file mode 100644
index 000000000..142a964df
--- /dev/null
+++ b/tests/systemtests/audio/sys_audio.qtt
@@ -0,0 +1,295 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+testcase = {
+
+/* Notes
+Ensure 2 test .mp3 file available on device
+Ensure 2 test .wav file available on device
+Ensure a valid m3u file referring to locations where indicated media is available on the device
+Ensure the device can ping destinations on the network (if applicable)
+Have an audio stream url available (e.g. http://202.6.74.107:8060/triplej.mp3 for example)
+Ensure access to Internet available to device either via 3G and WiFi
+SIM cards from Vodafone and Testra (Australia) needed for 3G streaming testing
+*/
+ initTestCase: function()
+ {
+ },
+
+ play_an_audio_file_data: {
+ mp3:[".mp3", "filename", "mpeg audio layer 3"],
+ wav:[".wav", "filename", "waveform audio"]
+ },
+
+ play_an_audio_file: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Play Audio File";
+ testBinary = "player";
+ testGoal = "Verify that Audio files can be played.";
+ testPreconditions = "Audio files in " + extension + " format are available on device.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select [Open] | |
+ | Click Open, then select desired "+filename+extension+" file to return to player UI | Verify selected file has populated playlist window |
+ | Highlight file in playlist window by clicking on it | |
+ | Select [Play] | Verify that the " + format + " file is audible on device |
+ "));
+ },
+
+ basic_player_controls_for_audio_data: {
+ mp3:[".mp3", "filename", "mpeg audio layer 3"],
+ },
+
+ basic_player_controls_for_audio: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Audio Player Controls";
+ testBinary = "player";
+ testGoal = "Verify basic API for controling audio playback ";
+ testPreconditions = "a test "+extension+" file is available on device";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select Open | |
+ | In [Open Files] either double click the desired "+filename+extension+" or highlight and click Open to be returned to the player UI | |
+ | Highlight and click Play or doubleclick to play the file | Verify that file plays properly from the start |
+ | | Verify that the correct track details are displayed on the application title bar |
+ | Select [Pause] | Verify that file has paused |
+ | | Verify that [Pause] icon has now changed to a [Play] icon |
+ | Select [Play] | Verify that file continues to play properly from where previously paused. |
+ | | Verify that [Play] icon is now a [Pause] icon again |
+ | Select [Next File] control | Verify that next file in playlist is playing from start |
+ | | Verify that the title bar has changed to reflect the seclected audio track |
+ | After some time (10-20 sec) Select [Beginning of File] icon | Verify that current file is being played from start |
+ | Let some arbitrary time pass, then Select [Beginning of File] control twice in quick succession. | Verify that previous file in playlist is playing from start |
+ | Select [Stop] control | Verify that file has stopped playing |
+ | Select [Play] | Verify that file continues to play from start of file. |
+ | Let file play till end | Verify player continues playing the next file in the playlist window |
+ | After some arbitrary time, Select [Stop] | |
+ | Select [Next File] control | Verify that next file in playlist is highlighted |
+ | | Verify that file is not automatically playing |
+ | Select [Beginning of File] control | Verify that previous file in playlist is highlighted |
+ | Select file in playlist | Verify that file plays in player. |
+ | Select number of files greater than can be displayed without scrolling in to playlist | Verify that list can be scrolled through |
+ | With file playing, verify that hardware keys can change volume up and down | |
+ | With file playing, verify that UI volume control slider can change volume up and down | |
+ | Select volume at 50% (or thereabout) | |
+ | Select [Mute] | Verify that sound is muted while file is playing |
+ | | Verify that [Mute] control is displaying the Muted icon |
+ | Select [Mute] control again | Verify that sound has reverted back to level selected prior to muting |
+ | Click on Full Screen | Verify that nothing happens when playing an audio file |
+ | Click Color Option | Verify that this has no effect when playing an audio file |
+ "));
+
+ },
+
+ seek_controls_for_audio_data: {
+ mp3:[".mp3", "filename", "mpeg audio layer 3"],
+ },
+
+ seek_controls_for_audio: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Audio Seek Controls";
+ testBinary = "player";
+ testGoal = "Verify FastForward and Rewind functionality of the API";
+ testPreconditions = "a test "+extension+" file is available on device";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select [Open] | |
+ | In [Open File] select the "+filename+extension+" file to return to player UI | |
+ | Select [Play] to play the file | |
+ | Click on the [1.0x] (Multiplier) dropbox and select 2.0x | Verify that file is playing at double speed |
+ | With multiplier control set on [2.0], select a new file from the playlist window | Verify that the Multiplier control has reverted back to [1.0x] |
+ | | Verify that the audio is playing at normal speed |
+ | Click on the [Multiplier] control and select 0.5x | Verify that file is playing at half speed |
+ | With multiplier control set on [0.5], select a new file from the playlist window | Verify that the Multiplier control has reverted back to [1.0x] |
+ | | Verify that the audio is playing at normal speed |
+ | Drag positional slider to right, then release | Verify that player continues to play file at later part of file |
+ | Drag positional slider to left, then release | Verify that player continues to play file at earlier part of file |
+ | Click on the [1.0x] (Multiplier) dropbox and select 2.0x | Verify that file is playing at double speed |
+ | Drag positional slider to right, then release | Verify that player continues to play file at later part of file at double speed |
+ | Drag positional slider to left, then release | Verify that player continues to play file at earlier part of file at double speed |
+ | Click on the Multiplier dropbox and select 0.5x | Verify that file is playing at half the speed |
+ | Drag positional slider to right, then release | Verify that player continues to play file at later part of file at half speed |
+ | Drag positional slider to left, then release | Verify that player continues to play file at earlier part of file at half speed |
+ "));
+ },
+
+
+
+ basic_controls_for_streamed_audio_content: function()
+ {
+
+//*Note* For this test you need a playlist of streaming media urls. Suggest: http://202.6.74.107:8060/triplej.mp3 ; http://www.abc.net.au/streaming/triplej.asx ; rtsp://media1.abc.net.au/broadcast/triplej.rm ; mms://media3.abc.net.au/triplej ; depending on your platform and backend support.
+
+ // Test meta data
+ testApplication = "Multimedia - Content Streaming";
+ testBinary = "player";
+ testGoal = "Verify playback of streaming audio media";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | In player application, Select or Tap [Open] | |
+ | In [Open File] navigate and highlight test (streaming) playlist file | |
+ | Select or Tap on selected file to return to player UI | Verify selected file has populated playlist |
+ | Highlight file in playlist by selecting or clicking it | |
+ | Select [Play] | Verify that stream is playing on device |
+ | Select [Pause] | Verify that stream is paused on device |
+ | | Verify that the [Pause] button has changed to a [Play] button |
+ | Select [Play] again | Verify that stream is playing on device |
+ | Select [Stop] | |
+ | Open local mp3 file in to play list and select it to play | Verify that the mp3 plays while the stream name is still present in the playlist |
+ | Re-select the stream in the playlist | Verify that the stream starts playing again |
+ | Select [Next File] | Verify that the player started playing the next file in the playlist |
+ | Select [Previous File] | Verify that the original stream is playing again |
+ | During stream playback, have headphones connected to device | Verify that the sound is now playing through the headphones |
+ | Invoke a system notification on the device (such as an incoming SMS) | Verify that the device correctly transmits the audible system notification through the devices speakers and then returns to playing the stream through the headphones |
+ "));
+ },
+
+ record_an_audio_file: function()
+ {
+
+ // Test meta data
+ testApplication = "Multimedia - Recording Audio";
+ testBinary = "audiorecorder";
+ testGoal = "Verify that audio can be recorded.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select Input Device | |
+ | Select Audio Codec | |
+ | Select File Container | |
+ | Select Sample Rate | |
+ | Select Quality and Bitrate | |
+ | Select Output... and select location and name of output file | |
+ | Select Record | Verify that [Record] button has changed in to [Stop] |
+ | | Verify that Duration is counting seconds |
+ | | Verify that Recording is displayed |
+ | Select Stop | Verify that Duration is now 0 |
+ | Select Output File in file browser | Verify that an audio file has been generated |
+ | Play output file in media player | Verify that audible audio is recorded in file |
+ "));
+ },
+
+pause_recording_an_audio_file: function()
+ {
+
+ // Test meta data
+ testApplication = "Multimedia - Pause Recording Audio";
+ testBinary = "audiorecorder";
+ testGoal = "Verify API to be able to pause audio recording without unwanted artifacts.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select Input Device | |
+ | Select Audio Codec | |
+ | Select File Container | |
+ | Select Sample Rate | |
+ | Select Quality and Bitrate | |
+ | Select Output... and select location and name of output file | |
+ | Select Record | Verify that [Record] button has changed in to [Stop] |
+ | | Verify that Duration is counting seconds |
+ | | Verify that Recording is displayed |
+ | Speak in to the microphone. Suggest counting from 1 to 5 | |
+ | Select Pause | Verify that instead of Duration, Paused is displayed |
+ | Keep speaking in to microfon, continue counting from 6 to 10 | |
+ | Select Resume | Verify that the counter has resumed the seconds count from where it was previously paused. |
+ | Continue counting from 11 to 15 in to the microphone | |
+ | After a arbitrary time, Stop the recording. | |
+ | Select Output File in file browser | Verify that an audio file has been generated |
+ | Play output file in media player | Verify that audible audio is recorded in file and that audio is only recorded for period that Pause was not selected |
+ | | Verify that the recording reproduces the counting from 1 to 5 then continues from 11 to 15 and that the counting from 6 - 10 is not recorded |
+ | | Verify there is no audible artifact that separates the two or more recording periods, that is that the joint is seamless |
+ "));
+ },
+}
diff --git a/tests/systemtests/camera/sys_camera.qtt b/tests/systemtests/camera/sys_camera.qtt
new file mode 100644
index 000000000..781e50b5d
--- /dev/null
+++ b/tests/systemtests/camera/sys_camera.qtt
@@ -0,0 +1,181 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+testcase = {
+
+/* Notes
+*/
+ initTestCase: function()
+ {
+ },
+
+ take_a_photo: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Still Camera";
+ testBinary = "declarative camera";
+ testGoal = "Verify that a photo can be taken with the camera.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Image tab to put camera in still mode | Verify the intended scene is reproduced in the preview pane/viewfinder |
+ | Select Capture Photo | Verify that image is shown on screen for preview |
+ | | Verify that a new file is in the Images folder and accessabble with the image viewer |
+ | Select given image | Verify that it is a true representation of the intended sceen |
+ | | Verify the image has no unintended artifacts and noise and is properly formatted |
+ "));
+ },
+
+change_camera_settings: function()
+{
+ // Test meta data
+ testApplication = "Multimedia - Still Camera";
+ testBinary = "declarative camera";
+ testGoal = "Verify that the camera can change its Still Camera settings successfully.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select the primary camera device from Menu/Devices | Verify the viewfinder is displaying the scene from the main camera device |
+ | Select Capture Photo | Verify that a photo was taken and that a preview image is shown on screen |
+ | Select the secandary camera device from Menu/Devices | Verify the viewfinder is displaying the scene from the secondary camera device |
+ | Select Capture Photo | Verify that a photo was taken from the secondary camera device and that a preview image is shown on screen |
+ | Change Exposure Compensatioin on the slider in the main UI | Verify that the change in value affects the picture qwality in expected fashion |
+ | Select Settings/File/Setrtings | Verify that you have an option to change Image Resolution, Image Format and Quality |
+ | Change Image Resolution to another supported resolution | Verify that you can take stills with various resolutions |
+ | Selct Flash always on from the setitngs menu | Verify that when photo is taken, the flash is always triggered |
+ | Select No Flash on from the menu | Verify that despite the lack of natural light, the flash will not trigger when taking photos |
+ | Change Image Format to another supported format | Verify that you can take stills with various Image Formats |
+ | Sellect Settings/Device/Secondary Device | Verify that you can see the view from the Front Facing Camera on the viewfinder |
+ | | Varify that you can take still images from the Front Facing Camera |
+ | Select Settings/File/Exit | Verify that the application has now closed |
+
+ "));
+},
+
+ take_a_video: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Camera";
+ testBinary = "camera";
+ testGoal = "Verify that the camera can capture and save an audio/video file.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Video tab to put camera in video mode | Verify the intended scene is reproduced in the preview/viewfinder |
+ | Select Record Video | Verify that video is shown on screen for preview |
+ | Select Pause | Verify that the Recorded counter has stopped |
+ | Select Record again | Verify that the Recorded counter has continued counting |
+ | Select Stop | Verify that the recording has now stopped |
+ | | Verify that a new file is in the Images folder and accessabble with the player |
+ | Select given video | Verify that it is a true representation of the intended sceen |
+ | | Verify that the Pause in the recording has happened and that recording continued without an issue after that |
+ | | Verify the image has no unintended artifacts and noise and is properly formatted |
+ "));
+ },
+
+ change_video_settings: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Camera";
+ testBinary = "camera";
+ testGoal = "Verify that the camera can change its Video settings successfully.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Video tab to put camera in video mode | Verify the intended scene is reproduced in the preview/viewfinder |
+ | In the Menu Bar, select Settings/Devices | Verify that you can select Primay and Secondary Camera on Device |
+ | Select Secondary Camera | Verify that devise is now showing video stram from Front Facing camera |
+ | Select Settings/File/Settings | Verify that you now have otion to select Audio Codecs, Resolution Sample Rate, Framerate, Quality, Video Codecs and Container Format |
+ | Change Audio Codecs to another supported Codecs | Verify that camera can record |
+ | Change Resolutiuon to another supported Resolution | Verify that camera can record |
+ | Change Sample Rate to another supported Sample Rate | Verify that camera can record |
+ | Change Framerate to another supported Framerate | Verify that camera can record |
+ | Change Quality | Verify that camera can record |
+ | Change Video Codecs to another supported Video Codecs | Verify that camera can record |
+ | Change Container Format | Verify that camera can record |
+ | Change Quality | Verify that camera can record |
+ "));
+ },
+
+
+
+
+
+
+}
diff --git a/tests/systemtests/radio/sys_radio.qtt b/tests/systemtests/radio/sys_radio.qtt
new file mode 100644
index 000000000..0f3a120bb
--- /dev/null
+++ b/tests/systemtests/radio/sys_radio.qtt
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+testcase = {
+
+/* Notes
+Ensure radio reception is available in testing area
+A device specific headset is required to be connected to device for radio testing
+*/
+
+ initTestCase: function()
+ {
+ },
+
+ play_a_radio_transmission: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Play Radio Transmission";
+ testBinary = "radio";
+ testGoal = "Verify that radio stations can be played.";
+ testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antena to the device and must be connected.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | | Verify that 0 KHz and No Signal is displayed |
+ | Select [Scan Up] | Audible white noise should be heard as the radio searches for a frequency lock. Frequency should be increasing in 100 KHz steps until a strong signal is found |
+ | | Verify that a radio signal can be heard. It is possible for the radio to lock on a silent station signal, in that case progress further up the frequencies |
+ | Once a strong audible signal is found | Verify that the stations frequency and Got Signal message is displayed |
+ | Select [Scan Up] | Verify that the radio has moved off the previous station and in progressing through the frequencies |
+ | Once on a radio station, Select [Freq Up] | Verify that the radio frequency has moved off the station by 100KHz and is stationary |
+ | Select [Freq Up] again | Verify that the radio frequency has moved up another 100KHz and is stationary |
+ | Select [Freq Down] twice | Verify that you are now at the frequency of the previous radio station and that the signal is audible |
+ | Select [Scan Down] | Verify that the radio has moved off the previous station, progressing through the frequencies, and finds the original station from this test |
+ | Exit the radio application | Verify that the radio station is no longer heard |
+ "));
+ },
+
+ radio_interrupted_by_system_notification: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Play Radio With Interruptions";
+ testBinary = "radio";
+ testGoal = "Verify that radio playback can be successfuly interrupted by system notifications and resume playback without issues.";
+ testPreconditions = "1. Audible system notifications should be enabled for this test.<br>2. Radio reception should be available in the test area.<br>3. Wired headphones act as an antena to the device and must be connected.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Locate a strong radio station signal by scanning up/down | |
+ | While on a strong and audible radio signal, evoke a system notification on device (eg: incoming SMS, alarm notification) | Verify that after the system notification has been delivered, the radio reverts to outputting the audio signal back through the headphones |
+ "));
+ },
+
+ radio_volume_control: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Radio Volume Control";
+ testBinary = "radio";
+ testGoal = "Verify that the radio volume can be controlled.";
+ testPreconditions = "1. Radio reception should be available in the test area.<br>2. Wired headphones act as an antena to the device and must be connected.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Locate a strong radio station signal by scanning upwards | |
+ | While on a strong and audible radio signal, move volume slider to the right | Verify that the audio volume of the radio station is amplified |
+ | Move volume slider to the left | Verify that the audio volume is lowered |
+ | Move the volume slider all the way to the left | Verify that the sound is now completely muted |
+ "));
+ },
+}
diff --git a/tests/systemtests/video/sys_video.qtt b/tests/systemtests/video/sys_video.qtt
new file mode 100644
index 000000000..5922745ff
--- /dev/null
+++ b/tests/systemtests/video/sys_video.qtt
@@ -0,0 +1,269 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** 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, Nokia gives you certain additional
+** rights. These rights are described in the Nokia 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//TESTED_COMPONENT=src/multimedia
+
+testcase = {
+
+/* Notes
+Ensure 2 test .mp4 files are available on device
+Ensure the device can ping destinations on the network (if applicable)
+Have a video stream url available (e.g. http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4)
+Ensure access to Internet available to device
+Ensure an active SIM card is available on the device. As some video streaming tests are carrier spacific, it is recomended in Australia to have access to Testra, Optus and Vodafone SIM's
+*/
+ initTestCase: function()
+ {
+ },
+
+ play_a_video_file_data: {
+ mp4:[".mp4", "filename", "mpeg video layer 4"]
+ },
+
+ play_a_video_file: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Play Video File";
+ testBinary = "player";
+ testGoal = "Verify that local, networked and carrier streamed video files can be played. ";
+ testPreconditions = "1. A test "+extension+" file is available on device.<br>2. Internet acces is enabled on the device.<br>3. Operator SIM cards are available to the device";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select [Open] | |
+ | In [Open File] select the "+filename+extension+" file to return to player UI | |
+ | Select [Play] to play the file | Verify selected file has populated playlist |
+ | Highlight file in playlist by clicking on it | |
+ | Select [Play] | Verify that .MP4 file is playing on device |
+ "));
+ },
+
+ basic_controls_for_video_data: {
+ mp4:[".mp4", "filename", "mpeg video layer 4"]
+ },
+
+ basic_controls_for_video: function(extension, filename, format)
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Controls";
+ testBinary = "player";
+ testGoal = "Verify the API for basic video playback functionality";
+ testPreconditions = "a test "+extension+" file is available on device.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | Select [Open] | |
+ | In [Open File] select the "+filename+extension+" file to return to player UI | |
+ | Select [Play] to play the file | |
+ | Select [Pause] | Verify that file has paused |
+ | | Verify that the [Pause] icon has changed to a [Play] icon |
+ | Select [Play] | Verify that the [Play] icon has changed to a [Pause] icon |
+ | | Verify that file continues to play from where previously paused. |
+ | Select [Next File] | Verify that next file in playlist is playing from start |
+ | After some time (10-20 sec) Select [Beginning of File] control | Verify that current file is being played from start |
+ | Let arbitrary time pass, then Select [Beginning of File] control twice in quick succession.| Verify that previous file in playlist is playing from start |
+ | Select [Stop] | Verify that file has stopped playing |
+ | Select [Play] | Verify that file continues to play from start of file. |
+ | Let file play till end | Verify player stops at end of file. |
+ | Start playing file. | |
+ | After arbitrary time, Select [Stop] | |
+ | Select [Next File] | Verify that next file in playlist is highlighted |
+ | | Verify that file is not automatically playing |
+ | Select [Beginning of File] | Verify that previous file in playlist is highlighted |
+ | Select file in playlist | Verify that file plays in player. |
+ | Select number of files greater than can be displayed without scrolling in to playlist | Verify that list can be scrolled through |
+ | With file playing, verify that hardware keys can change volume up and down | |
+ | With file playing, verify that UI volume control slider can change volume up and down | |
+ | Select volume at 50% (or thereabout) | |
+ | Select [Mute] control | Verify that sound is muted while file is playing |
+ | | Verify that [Mute] control is displaying the Muted icon |
+ | Select [Mute] control again | Verify that sound has reverted back to level selected prior to muting |
+ | Drag positional slider to right, then release | Verify that player continues to play file at later part of file |
+ | Drag positional slider to left, then release | Verify that player continues to play file at earlier part of file |
+ | Start playing file | |
+ | Select [FullScreen] control | Verify that video is now playing in Fullscreen mode |
+ | When at end of current file | Verify that next file in playlist is being played |
+ | When at last file in playlist and at end of file | Verify that fullscreen mode is exited and user returned to player interface and that [FullScreen] is no longer selected. |
+ "));
+ },
+
+ seek_controls_for_video: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Seek";
+ testBinary = "player";
+ testGoal = "Verify the API for Fast Forward/Rewind functionality.";
+ testPreconditions = "Video files are available for testing on the device.";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | While playing a video file, Select or Tap on [1.0] (Multiplier) control | |
+ | Select [2.0] | Verify that file is playing at double speed |
+ | Select [Multiplier] control | |
+ | Select [0.5] | Verify that file is playing at half speed |
+ "));
+ },
+
+ basic_controls_for_streamed_content: function()
+ {
+
+//*Note* In order to play stream on Maemo, invoke player with following command from console:
+// run-standalone.sh ./player http://202.6.74.107:8060/triplej.mp3
+//*Note* For this test you need a playlist of streaming media urls. Suggest: http://202.6.74.107:8060/triplej.mp3 ; http://www.abc.net.au/streaming/triplej.asx ; rtsp://media1.abc.net.au/broadcast/triplej.rm ; mms://media3.abc.net.au/triplej ; depending on your platform and backend support.
+
+ // Test meta data
+ testApplication = "Multimedia - Content Streaming";
+ testBinary = "player";
+ testGoal = "Verify various forms of video streaming.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | In player application, Select or Tap [Open] | |
+ | In [Open File] navigate and highlight test (streaming) playlist file | |
+ | Select or Tap on selected file to return to player UI | Verify selected file has populated playlist |
+ | Highlight file in playlist by selecting or clicking it | |
+ | Select [Play] | Verify that stream is playing on device |
+ | Select [Pause] | Verify that stream is paused on device |
+ | | Verify that the [Pause] button has changed to a [Play] button |
+ | Select [Play] again | Verify that stream is playing on device |
+ | Select [Stop] | |
+ | Open local mp3 file in to play list and select it to play | Verify that the mp3 plays while the stream name is still present in the playlist |
+ | Re-select the stream in the playlist | Verify that the stream starts playing again |
+ | Select [Next File] | Verify that the player started playing the next file in the playlist |
+ | Select [Previous File] | Verify that the original stream is playing again |
+ | During stream playback, have headphones connected to device | Verify that the sound is now playing through the headphones |
+ | Invoke a system notification on the device (such as an incoming SMS) | Verify that the device correctly transmits the audible system notification through the devices speakers and then returns to playing the stream through the headphones |
+ "));
+ },
+
+ take_a_video: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Camera";
+ testBinary = "camera";
+ testGoal = "Verify that the camera can capture and save an audio/video file.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Video tab to put camera in video mode | Verify the intended scene is reproduced in the preview/viewfinder |
+ | Select Record Video | Verify that video is shown on screen for preview |
+ | Select Pause | Verify that the Recorded counter has stopped |
+ | Select Record again | Verify that the Recorded counter has continued counting |
+ | Select Stop | Verify that the recording has now stopped |
+ | | Verify that a new file is in the Images folder and accessabble with the player |
+ | Select given video | Verify that it is a true representation of the intended sceen |
+ | | Verify that the Pause in the recording has happened and that recording continued without an issue after that |
+ | | Verify the image has no unintended artifacts and noise and is properly formatted |
+ "));
+ },
+
+ change_video_settings: function()
+ {
+ // Test meta data
+ testApplication = "Multimedia - Video Camera";
+ testBinary = "camera";
+ testGoal = "Verify that the camera can change its Video settings successfully.";
+ testPreconditions = "";
+ testGroups = "BAT";
+
+ // Test steps
+ prompt(twiki("---+++ " + testApplication + "<br><br>
+ *Goal:* " + testGoal + "<br>
+ *Pre-Requisites:* " + testPreconditions + "<br>
+ *Tested Binary:* " + testBinary + "<br>
+
+ | *Step* | *Verification* |
+ | Launch " + testBinary + " | App launches normally |
+ | If device has lens cover, make sure it is open | |
+ | Select Video tab to put camera in video mode | Verify the intended scene is reproduced in the preview/viewfinder |
+ | In the Menu Bar, select Settings/Devices | Verify that you can select Primay and Secondary Camera on Device |
+ | Select Secondary Camera | Verify that devise is now showing video stram from Front Facing camera |
+ | Select Settings/File/Settings | Verify that you now have otion to select Audio Codecs, Resolution Sample Rate, Framerate, Quality, Video Codecs and Container Format |
+ | Change Audio Codecs to another supported Codecs | Verify that camera can record |
+ | Change Resolutiuon to another supported Resolution | Verify that camera can record |
+ | Change Sample Rate to another supported Sample Rate | Verify that camera can record |
+ | Change Framerate to another supported Framerate | Verify that camera can record |
+ | Change Quality | Verify that camera can record |
+ | Change Video Codecs to another supported Video Codecs | Verify that camera can record |
+ | Change Container Format | Verify that camera can record |
+ | Change Quality | Verify that camera can record |
+ "));
+ },
+
+}