summaryrefslogtreecommitdiffstats
path: root/examples/multimedia/video
diff options
context:
space:
mode:
Diffstat (limited to 'examples/multimedia/video')
-rw-r--r--examples/multimedia/video/CMakeLists.txt10
-rw-r--r--examples/multimedia/video/android/android.pro5
-rw-r--r--examples/multimedia/video/android/gstreamer/gstreamer.pro23
-rw-r--r--examples/multimedia/video/android/gstreamer/main.cpp115
-rw-r--r--examples/multimedia/video/android/gstreamer/main.qml75
-rw-r--r--examples/multimedia/video/android/gstreamer/qml.qrc5
-rw-r--r--examples/multimedia/video/doc/images/qmlvideofx-camera-glow.jpgbin74914 -> 0 bytes
-rw-r--r--examples/multimedia/video/doc/images/qmlvideofx-camera-wobble.jpgbin62992 -> 0 bytes
-rw-r--r--examples/multimedia/video/doc/images/qmlvideofx-effects-menu.jpgbin84990 -> 0 bytes
-rw-r--r--examples/multimedia/video/doc/images/qmlvideofx-video-edgedetection.jpgbin108916 -> 0 bytes
-rw-r--r--examples/multimedia/video/doc/images/qmlvideofx-video-pagecurl.jpgbin61450 -> 0 bytes
-rw-r--r--examples/multimedia/video/doc/src/qmlvideofx.qdoc207
-rw-r--r--examples/multimedia/video/mediaplayer/CMakeLists.txt69
-rw-r--r--examples/multimedia/video/mediaplayer/Main.qml178
-rw-r--r--examples/multimedia/video/mediaplayer/controls/AudioControl.qml50
-rw-r--r--examples/multimedia/video/mediaplayer/controls/MetadataInfo.qml30
-rw-r--r--examples/multimedia/video/mediaplayer/controls/PlaybackControl.qml318
-rw-r--r--examples/multimedia/video/mediaplayer/controls/PlaybackSeekControl.qml56
-rw-r--r--examples/multimedia/video/mediaplayer/controls/SettingsPopup.qml204
-rw-r--r--examples/multimedia/video/mediaplayer/controls/TracksInfo.qml25
-rw-r--r--examples/multimedia/video/mediaplayer/controls/UrlPopup.qml54
-rw-r--r--examples/multimedia/video/mediaplayer/doc/images/mediaplayer.pngbin0 -> 49506 bytes
-rw-r--r--examples/multimedia/video/mediaplayer/doc/images/settings.pngbin0 -> 33705 bytes
-rw-r--r--examples/multimedia/video/mediaplayer/doc/src/mediaplayer.qdoc151
-rw-r--r--examples/multimedia/video/mediaplayer/images/backward10.svg5
-rw-r--r--examples/multimedia/video/mediaplayer/images/ff.svg4
-rw-r--r--examples/multimedia/video/mediaplayer/images/forward10.svg5
-rw-r--r--examples/multimedia/video/mediaplayer/images/link.svg3
-rw-r--r--examples/multimedia/video/mediaplayer/images/loop.svg3
-rw-r--r--examples/multimedia/video/mediaplayer/images/more.svg5
-rw-r--r--examples/multimedia/video/mediaplayer/images/mute.svg6
-rw-r--r--examples/multimedia/video/mediaplayer/images/open_new.svg6
-rw-r--r--examples/multimedia/video/mediaplayer/images/pause_symbol.svg4
-rw-r--r--examples/multimedia/video/mediaplayer/images/play_symbol.svg3
-rw-r--r--examples/multimedia/video/mediaplayer/images/rewind.svg4
-rw-r--r--examples/multimedia/video/mediaplayer/images/settings.svg4
-rw-r--r--examples/multimedia/video/mediaplayer/images/speaker.svg7
-rw-r--r--examples/multimedia/video/mediaplayer/images/stop_symbol.svg3
-rw-r--r--examples/multimedia/video/mediaplayer/images/url.svg6
-rw-r--r--examples/multimedia/video/mediaplayer/images/volume.svg4
-rw-r--r--examples/multimedia/video/mediaplayer/images/volume_mute.svg4
-rw-r--r--examples/multimedia/video/mediaplayer/images/zoom_maximize.svg4
-rw-r--r--examples/multimedia/video/mediaplayer/images/zoom_minimize.svg4
-rw-r--r--examples/multimedia/video/mediaplayer/main.cpp38
-rw-r--r--examples/multimedia/video/qmlvideo/CMakeLists.txt58
-rw-r--r--examples/multimedia/video/qmlvideo/Info.plist.in48
-rw-r--r--examples/multimedia/video/qmlvideo/doc/images/qmlvideo-menu.jpg (renamed from examples/multimedia/video/doc/images/qmlvideo-menu.jpg)bin21959 -> 21959 bytes
-rw-r--r--examples/multimedia/video/qmlvideo/doc/images/qmlvideo-overlay.jpg (renamed from examples/multimedia/video/doc/images/qmlvideo-overlay.jpg)bin23787 -> 23787 bytes
-rw-r--r--examples/multimedia/video/qmlvideo/doc/src/qmlvideo.qdoc (renamed from examples/multimedia/video/doc/src/qmlvideo.qdoc)50
-rw-r--r--examples/multimedia/video/qmlvideo/frequencymonitor.cpp (renamed from examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.cpp)113
-rw-r--r--examples/multimedia/video/qmlvideo/frequencymonitor.h67
-rw-r--r--examples/multimedia/video/qmlvideo/frequencymonitor/CMakeLists.txt30
-rw-r--r--examples/multimedia/video/qmlvideo/frequencymonitor/FrequencyItem.qml67
-rw-r--r--examples/multimedia/video/qmlvideo/frequencymonitor/qmldir3
-rw-r--r--examples/multimedia/video/qmlvideo/frequencymonitordeclarative.cpp10
-rw-r--r--examples/multimedia/video/qmlvideo/main.cpp143
-rw-r--r--examples/multimedia/video/qmlvideo/performancemonitor.cpp31
-rw-r--r--examples/multimedia/video/qmlvideo/performancemonitor.h33
-rw-r--r--examples/multimedia/video/qmlvideo/performancemonitor/CMakeLists.txt31
-rw-r--r--examples/multimedia/video/qmlvideo/performancemonitor/PerformanceItem.qml100
-rw-r--r--examples/multimedia/video/qmlvideo/performancemonitor/qmldir3
-rw-r--r--examples/multimedia/video/qmlvideo/performancemonitordeclarative.cpp12
-rw-r--r--examples/multimedia/video/qmlvideo/performancemonitordeclarative.h11
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/Button.qml90
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraBasic.qml56
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraDrag.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraDummy.qml78
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraFullScreen.qml56
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraFullScreenInverted.qml56
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml77
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraMove.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraOverlay.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraResize.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraRotate.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraSpin.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml165
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/ErrorDialog.qml118
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml419
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/Scene.qml83
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneBasic.qml94
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneDrag.qml81
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneFullScreen.qml112
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneFullScreenInverted.qml117
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneMove.qml96
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneOverlay.qml130
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneResize.qml88
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneRotate.qml109
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneSelectionPanel.qml151
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneSpin.qml81
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoBasic.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoDrag.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoDummy.qml84
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml95
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFullScreen.qml56
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFullScreenInverted.qml56
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml87
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoMetadata.qml135
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoMove.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoOverlay.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoPlaybackRate.qml115
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoResize.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoRotate.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoSeek.qml81
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoSpin.qml55
-rw-r--r--examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml284
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo.pro88
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo.qrc51
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CMakeLists.txt81
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraBasic.qml7
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraDrag.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraDummy.qml31
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraFullScreen.qml7
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraFullScreenInverted.qml7
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraItem.qml47
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraMove.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraOverlay.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraResize.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraRotate.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/CameraSpin.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/Content.qml125
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/ErrorDialog.qml70
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/Main.qml188
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/Scene.qml31
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneBasic.qml47
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml34
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneFullScreen.qml67
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneFullScreenInverted.qml70
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneMove.qml49
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneMulti.qml (renamed from examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneMulti.qml)110
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneOverlay.qml83
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneResize.qml41
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneRotate.qml57
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml88
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SceneSpin.qml34
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/SeekControl.qml (renamed from examples/multimedia/video/qmlvideo/qml/qmlvideo/SeekControl.qml)73
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoBasic.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoDrag.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoDummy.qml37
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoFillMode.qml49
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoFullScreen.qml7
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoFullScreenInverted.qml7
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoItem.qml42
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoMetadata.qml80
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoMove.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoOverlay.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoPlaybackRate.qml65
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoResize.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoRotate.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml36
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/VideoSpin.qml6
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/images/folder.png (renamed from examples/multimedia/video/qmlvideo/images/folder.png)bin1829 -> 1829 bytes
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/images/leaves.jpg (renamed from examples/multimedia/video/qmlvideo/images/leaves.jpg)bin257378 -> 257378 bytes
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/images/up.png (renamed from examples/multimedia/video/qmlvideo/images/up.png)bin1268 -> 1268 bytes
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/qmldir44
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/qmlvideo_global.h10
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/videosingleton.cpp54
-rw-r--r--examples/multimedia/video/qmlvideo/qmlvideo/videosingleton.h48
-rw-r--r--examples/multimedia/video/qmlvideo/trace.h100
-rw-r--r--examples/multimedia/video/qmlvideofilter_opencl/README15
-rw-r--r--examples/multimedia/video/qmlvideofilter_opencl/main.cpp526
-rw-r--r--examples/multimedia/video/qmlvideofilter_opencl/main.qml131
-rw-r--r--examples/multimedia/video/qmlvideofilter_opencl/qmlvideofilter_opencl.pro17
-rw-r--r--examples/multimedia/video/qmlvideofilter_opencl/qmlvideofilter_opencl.qrc5
-rw-r--r--examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h141
-rw-r--r--examples/multimedia/video/qmlvideofx/Info.plist32
-rw-r--r--examples/multimedia/video/qmlvideofx/filereader.cpp69
-rw-r--r--examples/multimedia/video/qmlvideofx/filereader.h59
-rw-r--r--examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.pngbin1156 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/images/Slider_bar.pngbin1129 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/images/Slider_handle.pngbin2784 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/images/Triangle_Top.pngbin2212 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/images/Triangle_bottom.pngbin2125 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/images/icon_BackArrow.pngbin1268 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/images/icon_Folder.pngbin1829 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/images/icon_Menu.pngbin990 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/images/qt-logo.pngbin9186 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/main.cpp168
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml93
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml164
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentCamera.qml60
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml56
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml85
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml103
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml95
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml84
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml74
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml70
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml55
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml114
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGlow.qml55
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml77
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml111
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml72
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml55
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml71
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml73
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml82
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml76
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSepia.qml55
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml71
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml96
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml74
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml55
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml72
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectVignette.qml55
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml55
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml70
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml392
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml162
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml122
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml296
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml113
-rw-r--r--examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml131
-rw-r--r--examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp138
-rw-r--r--examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h79
-rw-r--r--examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri7
-rw-r--r--examples/multimedia/video/qmlvideofx/qmlvideofx.pngbin3400 -> 0 bytes
-rw-r--r--examples/multimedia/video/qmlvideofx/qmlvideofx.pro24
-rw-r--r--examples/multimedia/video/qmlvideofx/qmlvideofx.qrc71
-rw-r--r--examples/multimedia/video/qmlvideofx/qmlvideofx.svg93
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/billboard.fsh83
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/blackandwhite.fsh71
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/emboss.fsh80
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/gaussianblur_h.fsh76
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/gaussianblur_v.fsh77
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/glow.fsh81
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/isolate.fsh97
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/magnify.fsh80
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/pagecurl.fsh192
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/pixelate.fsh73
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/posterize.fsh77
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/ripple.fsh88
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/selectionpanel.fsh50
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/sepia.fsh68
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/sharpen.fsh84
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/shockwave.fsh82
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection1.fsh92
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/tiltshift.fsh84
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/toon.fsh101
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/vignette.fsh73
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/warhol.fsh75
-rw-r--r--examples/multimedia/video/qmlvideofx/shaders/wobble.fsh71
-rw-r--r--examples/multimedia/video/qmlvideofx/trace.h100
-rw-r--r--examples/multimedia/video/recorder/AudioInputSelect.qml53
-rw-r--r--examples/multimedia/video/recorder/CMakeLists.txt62
-rw-r--r--examples/multimedia/video/recorder/Controls.qml83
-rw-r--r--examples/multimedia/video/recorder/Info.plist.in46
-rw-r--r--examples/multimedia/video/recorder/MediaList.qml67
-rw-r--r--examples/multimedia/video/recorder/Playback.qml55
-rw-r--r--examples/multimedia/video/recorder/RecordButton.qml45
-rw-r--r--examples/multimedia/video/recorder/SettingsEncoder.qml102
-rw-r--r--examples/multimedia/video/recorder/SettingsMetaData.qml145
-rw-r--r--examples/multimedia/video/recorder/Style.qml31
-rw-r--r--examples/multimedia/video/recorder/StyleParameter.qml42
-rw-r--r--examples/multimedia/video/recorder/StyleRectangle.qml11
-rw-r--r--examples/multimedia/video/recorder/StyleSlider.qml35
-rw-r--r--examples/multimedia/video/recorder/VideoSourceSelect.qml165
-rw-r--r--examples/multimedia/video/recorder/doc/images/qml-recorder-control-bar-overview.gifbin0 -> 111693 bytes
-rw-r--r--examples/multimedia/video/recorder/doc/images/qml-recorder-overview.gifbin0 -> 138905 bytes
-rw-r--r--examples/multimedia/video/recorder/doc/images/qmlrecorder.jpgbin0 -> 95965 bytes
-rw-r--r--examples/multimedia/video/recorder/doc/src/recorder.qdoc102
-rw-r--r--examples/multimedia/video/recorder/main.cpp51
-rw-r--r--examples/multimedia/video/recorder/main.qml144
-rw-r--r--examples/multimedia/video/recorder/main_no_permissions.qml26
-rw-r--r--examples/multimedia/video/recorder/qmldir2
-rw-r--r--examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.h111
-rw-r--r--examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.pri5
-rw-r--r--examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.cpp57
-rw-r--r--examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.pri5
-rw-r--r--examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.qrc5
-rw-r--r--examples/multimedia/video/snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml114
-rw-r--r--examples/multimedia/video/snippets/performancemonitor/performancemonitor.cpp78
-rw-r--r--examples/multimedia/video/snippets/performancemonitor/performancemonitor.h77
-rw-r--r--examples/multimedia/video/snippets/performancemonitor/performancemonitor.pri5
-rw-r--r--examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.cpp60
-rw-r--r--examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.h60
-rw-r--r--examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.pri6
-rw-r--r--examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.qrc5
-rw-r--r--examples/multimedia/video/snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml150
-rw-r--r--examples/multimedia/video/video.pro8
280 files changed, 5031 insertions, 12671 deletions
diff --git a/examples/multimedia/video/CMakeLists.txt b/examples/multimedia/video/CMakeLists.txt
new file mode 100644
index 000000000..72e5d7e8a
--- /dev/null
+++ b/examples/multimedia/video/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+qt_internal_add_example(qmlvideo)
+if(TARGET Qt::QuickControls2)
+ if(TARGET Qt::Svg)
+ qt_internal_add_example(mediaplayer)
+ endif()
+ qt_internal_add_example(recorder)
+endif()
diff --git a/examples/multimedia/video/android/android.pro b/examples/multimedia/video/android/android.pro
deleted file mode 100644
index 95ed21e17..000000000
--- a/examples/multimedia/video/android/android.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE = subdirs
-
-QT_FOR_CONFIG += multimedia-private
-
-qtConfig(gstreamer): SUBDIRS += gstreamer
diff --git a/examples/multimedia/video/android/gstreamer/gstreamer.pro b/examples/multimedia/video/android/gstreamer/gstreamer.pro
deleted file mode 100644
index edc040adc..000000000
--- a/examples/multimedia/video/android/gstreamer/gstreamer.pro
+++ /dev/null
@@ -1,23 +0,0 @@
-QT += quick multimedia multimediawidgets
-CONFIG += c++11
-
-SOURCES += main.cpp
-
-RESOURCES += qml.qrc
-
-target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/video/android/gstreamer
-INSTALLS += target
-
-GSTREAMER_ROOT_ANDROID = $$(GSTREAMER_ROOT_ANDROID)
-isEmpty(GSTREAMER_ROOT_ANDROID): error("GSTREAMER_ROOT_ANDROID is empty")
-
-INCLUDEPATH += $(GSTREAMER_ROOT_ANDROID)/armv7/include/ $(GSTREAMER_ROOT_ANDROID)/armv7/include/gstreamer-1.0 $(GSTREAMER_ROOT_ANDROID)/armv7/include/glib-2.0 $(GSTREAMER_ROOT_ANDROID)/armv7/lib/glib-2.0/include
-
-QT+=multimediagsttools-private
-LIBS += -L$(GSTREAMER_ROOT_ANDROID)/armv7/lib/ -L$(GSTREAMER_ROOT_ANDROID)/armv7/lib/gstreamer-1.0 \
--lgstcoreelements -lgstplayback -lgstvideotestsrc -lgstaudioconvert -lgstvideoconvert -lgstautodetect -lgsttypefindfunctions \
-#PLUGINS codecs
--lgstvorbis -lvorbis -lgstivorbisdec -lvorbisenc -lvorbisfile -lgstsubparse -lgstaudioparsers \
--lgstgio -lgstapp -lgstisomp4 -lgstavi -lgstogg -lgstwavenc -lgstwavpack -lgstwavparse -lgsttheora -lgstmpg123 -lgstx264 -lgstlibav \
--lgsttcp -lgstsoup -logg -ltheora -lmpg123 -lx264 -lavfilter -lavformat -lavcodec -lavutil -lbz2 -lswresample \
--lsoup-2.4 -lgio-2.0 -lgstrtp-1.0 -lgstriff-1.0 -lgstnet-1.0
diff --git a/examples/multimedia/video/android/gstreamer/main.cpp b/examples/multimedia/video/android/gstreamer/main.cpp
deleted file mode 100644
index 56037aece..000000000
--- a/examples/multimedia/video/android/gstreamer/main.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 <QQmlApplicationEngine>
-
-#include <private/qgstutils_p.h>
-
-#include <gst/gstplugin.h>
-extern "C" {
-GST_PLUGIN_STATIC_DECLARE(coreelements);
-GST_PLUGIN_STATIC_DECLARE(playback);
-GST_PLUGIN_STATIC_DECLARE(videotestsrc);
-GST_PLUGIN_STATIC_DECLARE(audioconvert);
-GST_PLUGIN_STATIC_DECLARE(videoconvert);
-GST_PLUGIN_STATIC_DECLARE(autodetect);
-GST_PLUGIN_STATIC_DECLARE(gio);
-GST_PLUGIN_STATIC_DECLARE(soup);
-GST_PLUGIN_STATIC_DECLARE(app);
-GST_PLUGIN_STATIC_DECLARE(isomp4);
-GST_PLUGIN_STATIC_DECLARE(avi);
-GST_PLUGIN_STATIC_DECLARE(ogg);
-GST_PLUGIN_STATIC_DECLARE(vorbis);
-GST_PLUGIN_STATIC_DECLARE(tcp);
-GST_PLUGIN_STATIC_DECLARE(audioparsers);
-GST_PLUGIN_STATIC_DECLARE(theora);
-GST_PLUGIN_STATIC_DECLARE(mpg123);
-GST_PLUGIN_STATIC_DECLARE(typefindfunctions);
-GST_PLUGIN_STATIC_DECLARE(x264);
-GST_PLUGIN_STATIC_DECLARE(libav);
-};
-
-int main(int argc, char *argv[])
-{
- QGstUtils::initializeGst();
-
- GST_PLUGIN_STATIC_REGISTER(coreelements);
- GST_PLUGIN_STATIC_REGISTER(playback);
- GST_PLUGIN_STATIC_REGISTER(videotestsrc);
- GST_PLUGIN_STATIC_REGISTER(audioconvert);
- GST_PLUGIN_STATIC_REGISTER(videoconvert);
- GST_PLUGIN_STATIC_REGISTER(autodetect);
- GST_PLUGIN_STATIC_REGISTER(soup);
- GST_PLUGIN_STATIC_REGISTER(gio);
- GST_PLUGIN_STATIC_REGISTER(app);
- GST_PLUGIN_STATIC_REGISTER(isomp4);
- GST_PLUGIN_STATIC_REGISTER(avi);
- GST_PLUGIN_STATIC_REGISTER(ogg);
- GST_PLUGIN_STATIC_REGISTER(vorbis);
- GST_PLUGIN_STATIC_REGISTER(tcp);
- GST_PLUGIN_STATIC_REGISTER(audioparsers);
- GST_PLUGIN_STATIC_REGISTER(theora);
- GST_PLUGIN_STATIC_REGISTER(mpg123);
- GST_PLUGIN_STATIC_REGISTER(typefindfunctions);
- GST_PLUGIN_STATIC_REGISTER(x264);
- GST_PLUGIN_STATIC_REGISTER(libav);
-
- QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-
- QGuiApplication app(argc, argv);
-
- QQmlApplicationEngine engine;
- engine.load(QUrl(QLatin1String("qrc:/main.qml")));
- if (engine.rootObjects().isEmpty())
- return -1;
-
- return app.exec();
-}
diff --git a/examples/multimedia/video/android/gstreamer/main.qml b/examples/multimedia/video/android/gstreamer/main.qml
deleted file mode 100644
index 99acb558c..000000000
--- a/examples/multimedia/video/android/gstreamer/main.qml
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.7
-import QtQuick.Controls 2.0
-import QtQuick.Layouts 1.3
-import QtMultimedia 5.12
-
-ApplicationWindow {
- visible: true
- width: 640
- height: 480
-
- Video {
- id: video
- anchors.fill: parent
- autoPlay: true
- autoLoad: true
- source: "gst-pipeline: videotestsrc ! qtvideosink"
- }
-
- MouseArea {
- anchors.fill: video
- onClicked: {
- video.play()
- }
- }
-}
diff --git a/examples/multimedia/video/android/gstreamer/qml.qrc b/examples/multimedia/video/android/gstreamer/qml.qrc
deleted file mode 100644
index 5f6483ac3..000000000
--- a/examples/multimedia/video/android/gstreamer/qml.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/multimedia/video/doc/images/qmlvideofx-camera-glow.jpg b/examples/multimedia/video/doc/images/qmlvideofx-camera-glow.jpg
deleted file mode 100644
index 777ed4ffc..000000000
--- a/examples/multimedia/video/doc/images/qmlvideofx-camera-glow.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/doc/images/qmlvideofx-camera-wobble.jpg b/examples/multimedia/video/doc/images/qmlvideofx-camera-wobble.jpg
deleted file mode 100644
index 980ab0d15..000000000
--- a/examples/multimedia/video/doc/images/qmlvideofx-camera-wobble.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/doc/images/qmlvideofx-effects-menu.jpg b/examples/multimedia/video/doc/images/qmlvideofx-effects-menu.jpg
deleted file mode 100644
index eb5b90321..000000000
--- a/examples/multimedia/video/doc/images/qmlvideofx-effects-menu.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/doc/images/qmlvideofx-video-edgedetection.jpg b/examples/multimedia/video/doc/images/qmlvideofx-video-edgedetection.jpg
deleted file mode 100644
index 35b36c036..000000000
--- a/examples/multimedia/video/doc/images/qmlvideofx-video-edgedetection.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/doc/images/qmlvideofx-video-pagecurl.jpg b/examples/multimedia/video/doc/images/qmlvideofx-video-pagecurl.jpg
deleted file mode 100644
index 5cd8d2bd2..000000000
--- a/examples/multimedia/video/doc/images/qmlvideofx-video-pagecurl.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/doc/src/qmlvideofx.qdoc b/examples/multimedia/video/doc/src/qmlvideofx.qdoc
deleted file mode 100644
index c52f95f44..000000000
--- a/examples/multimedia/video/doc/src/qmlvideofx.qdoc
+++ /dev/null
@@ -1,207 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\example multimedia/video/qmlvideofx
-\title QML Video Shader Effects Example
-\ingroup multimedia_examples
-
-\brief Applying shader effects on video and camera viewfinder content.
-
-\include examples-run.qdocinc
-
-\section1 Overview
-
-\e{QML Video Shader Effects} demonstrates how a \l ShaderEffect can be used to
-apply postprocessing effects, expressed in GLSL, to QML \l VideoOutput type.
-
-It also shows how native code can be combined with QML to implement more
-advanced functionality - in this case, C++ code is used to calculate the QML
-frame rate. This value is rendered in QML in a semi-transparent item
-overlaid on the video content.
-
-The following screenshots show shader effects being applied. In each case,
-the effect is implemented using a fragment shader.
-
-Here we see an edge detection algorithm being applied to a video clip
-(\l{http://durian.blender.org/}{Sintel from blender.org}).
-\image qmlvideofx-video-edgedetection.jpg
-
-This image shows a page curl effect, applied to the same video clip.
-\image qmlvideofx-video-pagecurl.jpg
-
-Here we see a 'glow' effect (edge detection plus colour quantization) being
-applied to the camera viewfinder.
-\image qmlvideofx-camera-glow.jpg
-
-This image shows a 'wobble' effect applied to the viewfinder.
-\image qmlvideofx-camera-wobble.jpg
-
-The application includes many more effects than the ones shown here - look
-for Effect*.qml files in the list of files below to see the full range.
-
-\section1 Application Structure
-
-Shader effects can be applied to video or viewfinder content using
-\l{ShaderEffect}, as shown in the following example, which applies
-a wiggly effect to the content:
-
-\qml
-import QtQuick 2.0
-import QtMultimedia 5.0
-
-Rectangle {
- width: 300
- height: 300
- color: "black"
-
- MediaPlayer {
- id: mediaPlayer
- source: "test.mp4"
- playing: true
- }
-
- VideoOutput {
- id: video
- anchors.fill: parent
- source: mediaPlayer
- }
-
- ShaderEffect {
- property variant source: ShaderEffectSource { sourceItem: video; hideSource: true }
- property real wiggleAmount: 0.005
- anchors.fill: video
-
- fragmentShader: "
- varying highp vec2 qt_TexCoord0;
- uniform sampler2D source;
- uniform highp float wiggleAmount;
- void main(void)
- {
- highp vec2 wiggledTexCoord = qt_TexCoord0;
- wiggledTexCoord.s += sin(4.0 * 3.14159265358979323846 * wiggledTexCoord.t) * wiggleAmount;
- gl_FragColor = texture2D(source, wiggledTexCoord.st);
- }
- "
- }
-}
-\endqml
-
-In this application, the usage of the \l{ShaderEffect} and \l{VideoOutput}
-types is a bit more complicated, for the following reasons:
-
-\list
- \li Each effect can be applied to either a \l{VideoOutput} or an
- \l{Image} item, so the type of the source item must be abstracted away
- from the effect implementation
- \li For some effects (such as the edge detection and glow examples shown in
- the screenshots above), the transformation is applied only to pixels to
- the left of a dividing line - this allows the effect to be easily
- compared with the untransformed image on the right
- \li Most effects have one or more parameters which can be modified by the
- user - these are controlled by sliders in the UI which are connected
- to uniform values passed into the GLSL code
-\endlist
-
-The abstraction of source item type is achieved by the \c Content, which uses a
-\l[QML]{Loader} to create either a \l[QML]{MediaPlayer}, \l[QML]{Camera}, or an
-\l[QML]{Image}:
-
-\quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml
-\skipto import
-\printuntil {
-\dots
-\skipto Loader {
-\printuntil }
-\dots
-\skipto function openImage
-\printuntil "ContentImage.qml"
-\skipto contentLoader.item.source
-\printuntil path
-\skipto }
-\printuntil }
-\skipto function openVideo
-\printuntil "ContentVideo.qml"
-\skipto contentLoader.item.mediaSource
-\printuntil path
-\skipto }
-\printuntil }
-\skipto function openCamera
-\printuntil "ContentCamera.qml"
-\skipto }
-\printuntil }
-\skipto /^\}/
-\printuntil }
-
-Each effect is implemented as a QML item which is based on the \c Effect, which in
-turn is based on the \l[QML]{ShaderEffect}:
-
-\quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml
-\skipto import
-\printuntil /^\}/
-
-The interface of Effect allows for derived effects to specify the
-number of parameters which they support (and therefore the number of sliders
-which should be displayed), and whether a vertical dividing line should be drawn
-between transformed and untransformed image regions. As an example, here is the
-implementation of the pixelation effect. As you can see, the pixelation effect
-supports one parameter (which controls the pixelation granularity), and states
-that the divider should be displayed.
-
-\quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml
-\skipto import
-\printuntil /^\}/
-
-The main.qml file shows a \c FileOpen item, which allows
-the user to select the input source and an \c EffectSelectionList
-item, which lists each of the available shader effects. As described above, a
-\c Content item is used to load the appropriate input and effect type. A
-\c Divider item draws the vertical dividing line, which can be dragged left or
-right by the user. Finally, a \c ParameterPanel item renders the sliders
-corresponding to each effect parameter.
-
-\image qmlvideofx-effects-menu.jpg
-\caption The effect selection menu
-
-\section1 Calculating and Displaying QML Painting Rate
-
-\input multimedia/doc/src/examples/video-qml-paint-rate.qdocinc
-
-All that remains is to connect the afterRendering() signal of the QQuickView
-object to a JavaScript function, which will eventually call frequencyItem.notify():
-
-\quotefromfile multimedia/video/qmlvideofx/main.cpp
-\skipto QGuiApplication
-\printuntil ;
-\dots
-\skipto QQuickItem
-\printuntil ;
-\dots
-\skipto QObject::connect
-\printuntil SLOT(qmlFramePainted()));
-
-*/
diff --git a/examples/multimedia/video/mediaplayer/CMakeLists.txt b/examples/multimedia/video/mediaplayer/CMakeLists.txt
new file mode 100644
index 000000000..e33a20ad4
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/CMakeLists.txt
@@ -0,0 +1,69 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+
+project(mediaplayer LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/mediaplayer")
+
+find_package(Qt6 REQUIRED COMPONENTS Multimedia Core Quick QuickControls2 Svg)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(mediaplayerexample
+ main.cpp
+)
+
+set_target_properties(mediaplayerexample PROPERTIES
+ MACOSX_BUNDLE TRUE
+)
+
+qt_add_qml_module(mediaplayerexample
+ URI mediaplayer
+ QML_FILES
+ "Main.qml"
+ "controls/PlaybackControl.qml"
+ "controls/AudioControl.qml"
+ "controls/PlaybackSeekControl.qml"
+ "controls/SettingsPopup.qml"
+ "controls/UrlPopup.qml"
+ "controls/MetadataInfo.qml"
+ "controls/TracksInfo.qml"
+ RESOURCES
+ "images/backward10.svg"
+ "images/mute.svg"
+ "images/open_new.svg"
+ "images/pause_symbol.svg"
+ "images/play_symbol.svg"
+ "images/forward10.svg"
+ "images/more.svg"
+ "images/speaker.svg"
+ "images/stop_symbol.svg"
+ "images/volume.svg"
+ "images/volume_mute.svg"
+ "images/zoom_maximize.svg"
+ "images/zoom_minimize.svg"
+ "images/link.svg"
+ "images/loop.svg"
+)
+
+target_link_libraries(mediaplayerexample PRIVATE
+ Qt6::Core
+ Qt6::Multimedia
+ Qt6::Svg
+ Qt6::Quick
+ Qt6::Multimedia
+)
+
+install(TARGETS mediaplayerexample
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/multimedia/video/mediaplayer/Main.qml b/examples/multimedia/video/mediaplayer/Main.qml
new file mode 100644
index 000000000..9ee9cf6c3
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/Main.qml
@@ -0,0 +1,178 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Window
+import QtQuick.Controls
+import QtQuick.Dialogs
+import QtMultimedia
+import "controls"
+
+//! [0]
+ApplicationWindow {
+ id: root
+ title: qsTr("Multimedia Player")
+ width: 1280
+ height: 720
+ //! [0]
+ minimumWidth: 960
+ minimumHeight: 540
+ visible: true
+ color: "black"
+
+ property alias source: mediaPlayer.source
+ property alias playbackRate: mediaPlayer.playbackRate
+ property bool fullScreen: false
+
+ MessageDialog {
+ id: mediaError
+ buttons: MessageDialog.Ok
+ }
+
+ MouseArea {
+ // an activity listener to hide the playback contols when idle
+ id: activityListener
+ anchors.fill: parent
+ z: 1
+ propagateComposedEvents: true
+ hoverEnabled: true
+
+ property bool inactiveMouse: false
+
+ Timer {
+ id: timer
+ interval: 3000 // milliseconds
+ onTriggered: activityListener.inactiveMouse = true
+ }
+
+ function activityHandler(mouse) {
+ if (activityListener.inactiveMouse)
+ activityListener.inactiveMouse = false
+ timer.restart()
+ timer.start()
+ mouse.accepted = false
+ }
+
+ onPositionChanged: mouse => activityHandler(mouse)
+ onPressed: mouse => activityHandler(mouse)
+ onDoubleClicked: mouse => mouse.accepted = false
+ }
+
+ MetadataInfo {
+ id: metadataInfo
+ }
+
+ TracksInfo {
+ id: audioTracksInfo
+ onSelectedTrackChanged: {
+ mediaPlayer.activeAudioTrack = selectedTrack
+ mediaPlayer.updateMetadata()
+ }
+ }
+
+ TracksInfo {
+ id: videoTracksInfo
+ onSelectedTrackChanged: {
+ mediaPlayer.activeVideoTrack = selectedTrack
+ mediaPlayer.updateMetadata()
+ }
+ }
+
+ TracksInfo {
+ id: subtitleTracksInfo
+ onSelectedTrackChanged: {
+ mediaPlayer.activeSubtitleTrack = selectedTrack
+ mediaPlayer.updateMetadata()
+ }
+ }
+
+ //! [1]
+ MediaPlayer {
+ id: mediaPlayer
+ //! [1]
+ function updateMetadata() {
+ metadataInfo.clear()
+ metadataInfo.read(mediaPlayer.metaData)
+ metadataInfo.read(mediaPlayer.audioTracks[mediaPlayer.activeAudioTrack])
+ metadataInfo.read(mediaPlayer.videoTracks[mediaPlayer.activeVideoTrack])
+ metadataInfo.read(mediaPlayer.subtitleTracks[mediaPlayer.activeSubtitleTrack])
+ }
+ //! [2]
+ videoOutput: videoOutput
+ audioOutput: AudioOutput {
+ id: audio
+ muted: playbackController.muted
+ volume: playbackController.volume
+ }
+ //! [2]
+ //! [4]
+ onErrorOccurred: {
+ mediaError.open()
+ mediaError.text = mediaPlayer.errorString
+ }
+ //! [4]
+ onMetaDataChanged: { updateMetadata() }
+ //! [6]
+ onTracksChanged: {
+ audioTracksInfo.read(mediaPlayer.audioTracks)
+ videoTracksInfo.read(mediaPlayer.videoTracks)
+ subtitleTracksInfo.read(mediaPlayer.subtitleTracks, 6) /* QMediaMetaData::Language = 6 */
+ updateMetadata()
+ mediaPlayer.play()
+ }
+ //! [6]
+ source: new URL("https://download.qt.io/learning/videos/media-player-example/Qt_LogoMergeEffect.mp4")
+ }
+
+ //! [3]
+ VideoOutput {
+ id: videoOutput
+ anchors.fill: parent
+ visible: mediaPlayer.mediaStatus > 0
+
+ TapHandler {
+ onDoubleTapped: {
+ root.fullScreen ? root.showNormal() : root.showFullScreen()
+ root.fullScreen = !root.fullScreen
+ }
+ }
+ }
+ //! [3]
+
+ Rectangle {
+ anchors.fill: parent
+ visible: mediaPlayer.mediaStatus === 0
+ color: "black"
+
+ TapHandler {
+ onDoubleTapped: {
+ root.fullScreen ? root.showNormal() : root.showFullScreen()
+ root.fullScreen = !root.fullScreen
+ }
+ }
+ }
+
+ //! [5]
+ PlaybackControl {
+ id: playbackController
+ //! [5]
+
+ property bool showControls: !activityListener.inactiveMouse || busy
+ opacity: showControls
+ // onOpacityChanged can't be used as it is animated and therefore not immediate
+ onShowControlsChanged: activityListener.cursorShape = showControls ?
+ Qt.ArrowCursor : Qt.BlankCursor
+
+ anchors.bottom: parent.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ //! [6]
+ mediaPlayer: mediaPlayer
+ audioTracksInfo: audioTracksInfo
+ videoTracksInfo: videoTracksInfo
+ subtitleTracksInfo: subtitleTracksInfo
+ metadataInfo: metadataInfo
+ }
+ //! [6]
+}
diff --git a/examples/multimedia/video/mediaplayer/controls/AudioControl.qml b/examples/multimedia/video/mediaplayer/controls/AudioControl.qml
new file mode 100644
index 000000000..81ebe7f10
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/controls/AudioControl.qml
@@ -0,0 +1,50 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+
+Item {
+ id: audioController
+
+ property alias busy: slider.pressed
+ //! [0]
+ property alias muted: muteButton.checked
+ property real volume: slider.value
+ //! [0]
+ property alias showSlider: slider.visible
+ property int iconDimension: 24
+
+ implicitHeight: 46
+ implicitWidth: mainLayout.width
+
+ RowLayout {
+ id: mainLayout
+ spacing: 10
+ anchors.verticalCenter: parent.verticalCenter
+
+ RoundButton {
+ id: muteButton
+ implicitHeight: 40
+ implicitWidth: 40
+ radius: 4
+ icon.source: audioController.muted ? "../images/volume_mute.svg" : "../images/volume.svg"
+ icon.width: audioController.iconDimension
+ icon.height: audioController.iconDimension
+ flat: true
+ checkable: true
+ }
+
+ Slider {
+ id: slider
+ visible: !audioController.showSlider
+ implicitWidth: 136
+ Layout.fillWidth: true
+ Layout.alignment: Qt.AlignVCenter
+
+ enabled: !audioController.muted
+ value: 1
+ }
+ }
+}
diff --git a/examples/multimedia/video/mediaplayer/controls/MetadataInfo.qml b/examples/multimedia/video/mediaplayer/controls/MetadataInfo.qml
new file mode 100644
index 000000000..3e68faa8e
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/controls/MetadataInfo.qml
@@ -0,0 +1,30 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ property alias metadata: listModel
+ property alias count: listModel.count
+
+ function clear() {
+ listModel.clear()
+ }
+
+ //! [0]
+ function read(metadata) {
+ if (!metadata)
+ return
+ for (const key of metadata.keys())
+ if (metadata.stringValue(key))
+ listModel.append({
+ name: metadata.metaDataKeyToString(key),
+ value: metadata.stringValue(key)
+ })
+ }
+
+ ListModel {
+ id: listModel
+ }
+ //! [0]
+}
diff --git a/examples/multimedia/video/mediaplayer/controls/PlaybackControl.qml b/examples/multimedia/video/mediaplayer/controls/PlaybackControl.qml
new file mode 100644
index 000000000..056cf50d0
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/controls/PlaybackControl.qml
@@ -0,0 +1,318 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtMultimedia
+import QtQuick.Dialogs
+
+//! [0]
+Item {
+ id: playbackController
+
+ required property MediaPlayer mediaPlayer
+ required property MetadataInfo metadataInfo
+ required property TracksInfo audioTracksInfo
+ required property TracksInfo videoTracksInfo
+ required property TracksInfo subtitleTracksInfo
+ //! [0]
+
+ property alias muted: audioControl.muted
+ property alias volume: audioControl.volume
+
+ property bool landscapePlaybackControls: root.width >= 668
+ property bool busy: fileDialog.visible
+ || urlPopup.visible
+ || settingsPopup.visible
+ || audioControl.busy
+ || playbackSeekControl.busy
+ || !playbackController.mediaPlayer.playing
+
+ implicitHeight: landscapePlaybackControls ? 168 : 208
+
+ Behavior on opacity { NumberAnimation { duration: 300 } }
+
+ FileDialog {
+ id: fileDialog
+ title: "Please choose a file"
+ onAccepted: {
+ playbackController.mediaPlayer.stop()
+ playbackController.mediaPlayer.source = fileDialog.currentFile
+ playbackController.mediaPlayer.play()
+ }
+ }
+
+ UrlPopup {
+ id: urlPopup
+ anchors.centerIn: Overlay.overlay
+ mediaPlayer: playbackController.mediaPlayer
+ }
+
+ SettingsPopup {
+ id: settingsPopup
+ anchors.centerIn: Overlay.overlay
+
+ metadataInfo: playbackController.metadataInfo
+ mediaPlayer: playbackController.mediaPlayer
+ audioTracksInfo: playbackController.audioTracksInfo
+ videoTracksInfo: playbackController.videoTracksInfo
+ subtitleTracksInfo: playbackController.subtitleTracksInfo
+ }
+
+ component CustomButton: RoundButton {
+ implicitWidth: 40
+ implicitHeight: 40
+ radius: 4
+ icon.width: 24
+ icon.height: 24
+ flat: true
+ }
+
+ component CustomRoundButton: RoundButton {
+ property int diameter: 40
+ Layout.preferredWidth: diameter
+ Layout.preferredHeight: diameter
+ radius: diameter / 2
+ icon.width: 24
+ icon.height: 24
+ }
+
+ //! [1]
+ CustomButton {
+ id: fileDialogButton
+ icon.source: "../images/open_new.svg"
+ flat: false
+ onClicked: fileDialog.open()
+ }
+
+ CustomButton {
+ id: openUrlButton
+ icon.source: "../images/link.svg"
+ flat: false
+ onClicked: urlPopup.open()
+ }
+ //! [1]
+
+ CustomButton {
+ id: loopButton
+ icon.source: "../images/loop.svg"
+ icon.color: playbackController.mediaPlayer.loops === MediaPlayer.Once ? palette.buttonText : palette.accent
+ onClicked: playbackController.mediaPlayer.loops = playbackController.mediaPlayer.loops === MediaPlayer.Once
+ ? MediaPlayer.Infinite
+ : MediaPlayer.Once
+ }
+
+ CustomButton {
+ id: settingsButton
+ icon.source: "../images/more.svg"
+ onClicked: settingsPopup.open()
+ }
+
+ CustomButton {
+ id: fullScreenButton
+ icon.source: root.fullScreen ? "../images/zoom_minimize.svg"
+ : "../images/zoom_maximize.svg"
+ onClicked: {
+ root.fullScreen ? root.showNormal() : root.showFullScreen()
+ root.fullScreen = !root.fullScreen
+ }
+ }
+
+ RowLayout {
+ id: controlButtons
+ spacing: 16
+
+ CustomRoundButton {
+ id: backward10Button
+ icon.source: "../images/backward10.svg"
+ onClicked: {
+ const pos = Math.max(0, playbackController.mediaPlayer.position - 10000)
+ playbackController.mediaPlayer.setPosition(pos)
+ }
+ }
+
+ //! [2]
+ CustomRoundButton {
+ id: playButton
+ visible: playbackController.mediaPlayer.playbackState !== MediaPlayer.PlayingState
+ icon.source: "../images/play_symbol.svg"
+ onClicked: playbackController.mediaPlayer.play()
+ }
+
+ CustomRoundButton {
+ id: pauseButton
+ visible: playbackController.mediaPlayer.playbackState === MediaPlayer.PlayingState
+ icon.source: "../images/pause_symbol.svg"
+ onClicked: playbackController.mediaPlayer.pause()
+ }
+ //! [2]
+
+ //! [3]
+ CustomRoundButton {
+ id: forward10Button
+ icon.source: "../images/forward10.svg"
+ onClicked: {
+ const pos = Math.min(playbackController.mediaPlayer.duration,
+ playbackController.mediaPlayer.position + 10000)
+ playbackController.mediaPlayer.setPosition(pos)
+ }
+ }
+ //! [3]
+ } // RowLayout controlButtons
+
+ AudioControl {
+ id: audioControl
+ showSlider: root.width >= 960
+ }
+
+ PlaybackSeekControl {
+ id: playbackSeekControl
+ Layout.fillWidth: true
+ mediaPlayer: playbackController.mediaPlayer
+ }
+
+ Frame {
+ id: landscapeLayout
+ anchors.fill: parent
+ padding: 32
+ topPadding: 28
+ visible: landscapePlaybackControls
+ background: Rectangle {
+ color: "#F6F6F6"
+ }
+
+ ColumnLayout {
+ anchors.fill: parent
+ spacing: 16
+
+ Item {
+ Layout.fillWidth: true
+ implicitHeight: 40
+
+ LayoutItemProxy {
+ id: fdbProxy
+ target: fileDialogButton
+ anchors.left: parent.left
+ }
+
+ LayoutItemProxy {
+ target: openUrlButton
+ anchors.left: fdbProxy.right
+ anchors.leftMargin: 12
+ }
+
+ LayoutItemProxy {
+ target: controlButtons
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ LayoutItemProxy {
+ target: loopButton
+ anchors.right: acProxy.left
+ anchors.rightMargin: 12
+ }
+
+ LayoutItemProxy {
+ id: acProxy
+ target: audioControl
+ anchors.right: sbProxy.left
+ anchors.rightMargin: 30
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ LayoutItemProxy {
+ id: sbProxy
+ target: settingsButton
+ anchors.right: fbProxy.left
+ anchors.rightMargin: 12
+ }
+
+ LayoutItemProxy {
+ id: fbProxy
+ target: fullScreenButton
+ anchors.right: parent.right
+ }
+ } // Item
+
+ LayoutItemProxy {
+ target: playbackSeekControl
+ Layout.topMargin: 16
+ Layout.bottomMargin: 16
+ }
+ }
+ } // Frame frame
+
+ Frame {
+ id: portraitLayout
+ anchors.fill: parent
+ padding: 32
+ topPadding: 28
+ visible: !landscapePlaybackControls
+ background: Rectangle {
+ color: "#F6F6F6"
+ }
+
+ ColumnLayout {
+ anchors.fill: parent
+ spacing: 16
+
+ Item {
+ Layout.fillWidth: true
+ implicitHeight: 40
+
+ LayoutItemProxy {
+ target: loopButton
+ anchors.right: cbProxy.left
+ anchors.rightMargin: 16
+ }
+
+ LayoutItemProxy {
+ id: cbProxy
+ target: controlButtons
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+
+ LayoutItemProxy {
+ target: audioControl
+ anchors.left: cbProxy.right
+ anchors.leftMargin: 16
+ }
+ }
+ Item {
+ Layout.fillWidth: true
+ implicitHeight: 40
+
+ LayoutItemProxy {
+ id: fdbProxy_
+ target: fileDialogButton
+ anchors.left: parent.left
+ }
+
+ LayoutItemProxy {
+ target: openUrlButton
+ anchors.left: fdbProxy_.right
+ anchors.leftMargin: 12
+ }
+
+ LayoutItemProxy {
+ target: settingsButton
+ anchors.right: fbProxy_.left
+ anchors.rightMargin: 12
+ }
+
+ LayoutItemProxy {
+ id: fbProxy_
+ target: fullScreenButton
+ anchors.right: parent.right
+ }
+ }
+
+ LayoutItemProxy {
+ target: playbackSeekControl
+ Layout.topMargin: 8
+ Layout.bottomMargin: 8
+ }
+ }
+ }
+}
diff --git a/examples/multimedia/video/mediaplayer/controls/PlaybackSeekControl.qml b/examples/multimedia/video/mediaplayer/controls/PlaybackSeekControl.qml
new file mode 100644
index 000000000..c94d844f8
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/controls/PlaybackSeekControl.qml
@@ -0,0 +1,56 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtMultimedia
+
+Item {
+ id: seekController
+ required property MediaPlayer mediaPlayer
+ property alias busy: slider.pressed
+
+ implicitHeight: 20
+
+ function formatToMinutes(milliseconds) {
+ const min = Math.floor(milliseconds / 60000)
+ const sec = ((milliseconds - min * 60000) / 1000).toFixed(1)
+ return `${min}:${sec.padStart(4, 0)}`
+ }
+
+ RowLayout {
+ anchors.fill: parent
+ spacing: 22
+
+ //! [0]
+ Text {
+ id: currentTime
+ Layout.preferredWidth: 45
+ text: seekController.formatToMinutes(seekController.mediaPlayer.position)
+ horizontalAlignment: Text.AlignLeft
+ font.pixelSize: 11
+ }
+ //! [0]
+
+ Slider {
+ id: slider
+ Layout.fillWidth: true
+ //! [2]
+ enabled: seekController.mediaPlayer.seekable
+ value: seekController.mediaPlayer.position / seekController.mediaPlayer.duration
+ //! [2]
+ onMoved: seekController.mediaPlayer.setPosition(value * seekController.mediaPlayer.duration)
+ }
+
+ //! [1]
+ Text {
+ id: remainingTime
+ Layout.preferredWidth: 45
+ text: seekController.formatToMinutes(seekController.mediaPlayer.duration - seekController.mediaPlayer.position)
+ horizontalAlignment: Text.AlignRight
+ font.pixelSize: 11
+ }
+ //! [1]
+ }
+}
diff --git a/examples/multimedia/video/mediaplayer/controls/SettingsPopup.qml b/examples/multimedia/video/mediaplayer/controls/SettingsPopup.qml
new file mode 100644
index 000000000..0f24c8503
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/controls/SettingsPopup.qml
@@ -0,0 +1,204 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtMultimedia
+
+Popup {
+ id: settingsController
+ focus: true
+ closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
+
+ background: Rectangle {
+ color: "#F6F6F6"
+ }
+
+
+ required property MetadataInfo metadataInfo
+ required property MediaPlayer mediaPlayer
+ required property TracksInfo audioTracksInfo
+ required property TracksInfo videoTracksInfo
+ required property TracksInfo subtitleTracksInfo
+
+ property int vPadding: 20
+ property int hPadding: 26
+ property bool landscapeSettingsPopup: root.width >= settingsLayout.width + metadataLayout.width + 2 * hPadding + 20 + 24
+
+ padding: {
+ top: vPadding
+ bottom: vPadding
+ left: hPadding
+ right: hPadding
+ }
+
+ Flickable {
+ id: flickable
+ implicitWidth: mainLayout.width
+ implicitHeight: landscapeSettingsPopup ? 200 : 340
+ contentWidth: mainLayout.width
+ contentHeight: mainLayout.height
+ flickableDirection: Flickable.VerticalFlick
+ clip: true
+
+ GridLayout {
+ id: mainLayout
+
+ columns: landscapeSettingsPopup ? 2 : 1
+ columnSpacing: 24
+ rowSpacing: 24
+
+ ColumnLayout {
+ id: settingsLayout
+ spacing: 16
+ Layout.alignment: Qt.AlignTop
+
+ Label {
+ id: settingsLabel
+ text: qsTr("Settings")
+ font.pixelSize: 16
+ font.bold: true
+ }
+
+ GridLayout {
+ id: gridLayout
+ columns: 2
+ rowSpacing: 16
+ columnSpacing: 16
+
+ component CustomComboBox: ComboBox {
+ required property TracksInfo tracksInfo
+
+ model: tracksInfo.model
+ enabled: model.count > 0
+ textRole: "data"
+ currentIndex: model.count > 0 ? 0 : -1
+
+ onActivated: {
+ //! [1]
+ settingsController.mediaPlayer.pause()
+ tracksInfo.selectedTrack = currentIndex
+ settingsController.mediaPlayer.play()
+ //! [1]
+ }
+ }
+
+ Label {
+ text: qsTr("Playback Speed")
+ Layout.fillWidth: true
+ font.pixelSize: 14
+ }
+
+ ComboBox {
+ id: rateCb
+ model: ["0.25", "0.5", "0.75", "Normal", "1.25", "1.5", "1.75", "2"]
+ currentIndex: 3
+
+ onCurrentIndexChanged: {
+ //! [0]
+ settingsController.mediaPlayer.playbackRate = (currentIndex + 1) * 0.25
+ //! [0]
+ }
+ }
+
+ Label {
+ text: qsTr("Audio Tracks")
+ enabled: audioCb.enabled
+ Layout.fillWidth: true
+ font.pixelSize: 14
+ }
+
+ CustomComboBox {
+ id: audioCb
+ tracksInfo: settingsController.audioTracksInfo
+
+ }
+
+ Label {
+ text: qsTr("Video Tracks")
+ enabled: videoCb.enabled
+ Layout.fillWidth: true
+ font.pixelSize: 14
+ }
+
+ CustomComboBox {
+ id: videoCb
+ tracksInfo: settingsController.videoTracksInfo
+ }
+
+ Label {
+ text: qsTr("Subtitle Tracks")
+ enabled: subtitlesCb.enabled
+ font.pixelSize: 14
+ }
+
+ CustomComboBox {
+ id: subtitlesCb
+ tracksInfo: settingsController.subtitleTracksInfo
+ }
+ }
+ }
+
+ ColumnLayout {
+ id: metadataLayout
+ spacing: 16
+ Layout.alignment: Qt.AlignTop
+
+ Label {
+ id: metadataLabel
+ text: qsTr("Metadata")
+ font.pixelSize: 16
+ font.bold: true
+ }
+
+ Rectangle {
+ id: metadataRect
+ implicitWidth: 240
+ implicitHeight: metadataList.height
+ border.color: "#8E8E93"
+ radius: 6
+
+ Column {
+ id: metadataList
+ visible: settingsController.metadataInfo.count > 0
+
+ padding: 10
+ Repeater {
+ Row {
+ spacing: metadataList.padding
+ Text {
+ text: model.name
+ font.bold: true
+ width: (metadataRect.width - 3 * metadataList.padding) / 2
+ horizontalAlignment: Text.AlignRight
+ wrapMode: Text.WordWrap
+ font.pixelSize: 12
+ }
+
+ Text {
+ text: model.value
+ width: (metadataRect.width - 3 * metadataList.padding) / 2
+ horizontalAlignment: Text.AlignLeft
+ anchors.verticalCenter: parent.verticalCenter
+ wrapMode: Text.WrapAnywhere
+ font.pixelSize: 12
+ }
+ }
+ model: settingsController.metadataInfo.metadata
+ }
+ }
+
+ Text {
+ id: metadataNoList
+ visible: settingsController.metadataInfo.count === 0
+ anchors.centerIn: parent
+ text: qsTr("No metadata present")
+ font.pixelSize: 14
+ }
+ }
+ }
+ }
+ }
+
+}
diff --git a/examples/multimedia/video/mediaplayer/controls/TracksInfo.qml b/examples/multimedia/video/mediaplayer/controls/TracksInfo.qml
new file mode 100644
index 000000000..a2ae96f02
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/controls/TracksInfo.qml
@@ -0,0 +1,25 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Item {
+ property alias model: model
+ property int selectedTrack: 0
+
+ function read(tracks, key = 0) {
+ // language is the 6th index in the enum QMediaMetaData::Key
+ model.clear()
+
+ if (!tracks)
+ return
+
+ tracks.forEach((metadata, index) => {
+ const data = metadata.stringValue(key)
+ const label = data ? data : qsTr("track ") + (index + 1)
+ model.append({data: label, index: index})
+ })
+ }
+
+ ListModel { id: model }
+}
diff --git a/examples/multimedia/video/mediaplayer/controls/UrlPopup.qml b/examples/multimedia/video/mediaplayer/controls/UrlPopup.qml
new file mode 100644
index 000000000..5bc304178
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/controls/UrlPopup.qml
@@ -0,0 +1,54 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtMultimedia
+
+
+Popup {
+ id: popupController
+ width: Math.min(500, root.width - 40)
+
+ required property MediaPlayer mediaPlayer
+
+ function loadUrl(url) {
+ popupController.mediaPlayer.stop()
+ popupController.mediaPlayer.source = url
+ popupController.mediaPlayer.play()
+ }
+
+ RowLayout {
+ id: rowOpenUrl
+ anchors.fill: parent
+ Label {
+ text: qsTr("URL:");
+ }
+
+ TextField {
+ id: urlText
+ Layout.fillWidth: true
+ focus: true
+
+ placeholderText: qsTr("Enter text here...")
+ wrapMode: TextInput.WrapAnywhere
+
+ Keys.onReturnPressed: {
+ popupController.loadUrl(text)
+ urlText.text = ""
+ popupController.close()
+ }
+ }
+
+ Button {
+ text: qsTr("Load")
+ enabled: urlText.text !== ""
+ onClicked: {
+ popupController.loadUrl(urlText.text)
+ urlText.text = ""
+ popupController.close()
+ }
+ }
+ }
+ onOpened: { popupController.forceActiveFocus() }
+}
diff --git a/examples/multimedia/video/mediaplayer/doc/images/mediaplayer.png b/examples/multimedia/video/mediaplayer/doc/images/mediaplayer.png
new file mode 100644
index 000000000..857e70abd
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/doc/images/mediaplayer.png
Binary files differ
diff --git a/examples/multimedia/video/mediaplayer/doc/images/settings.png b/examples/multimedia/video/mediaplayer/doc/images/settings.png
new file mode 100644
index 000000000..5cf175795
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/doc/images/settings.png
Binary files differ
diff --git a/examples/multimedia/video/mediaplayer/doc/src/mediaplayer.qdoc b/examples/multimedia/video/mediaplayer/doc/src/mediaplayer.qdoc
new file mode 100644
index 000000000..1cc681f8f
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/doc/src/mediaplayer.qdoc
@@ -0,0 +1,151 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example video/mediaplayer
+ \title QML Media Player Example
+ \ingroup multimedia_examples
+ \ingroup video_examples_qml
+ \examplecategory {Graphics & Multimedia}
+ \brief Playing audio and video using the QML \c MediaPlayer type.
+ \meta {tag} {quick}
+ \meta {tag} {player}
+ \image mediaplayer.png
+
+ This example demonstrates a simple multimedia player that can play
+ audio and video files using various codecs.
+
+ \include examples-run.qdocinc
+
+ \section1 Instantiating the MediaPlayer
+ The entry point for the QML code in this example is \c Main.qml. Here
+ an \c ApplicationWindow is created and properties such as the \c id, \c title,
+ \c width and \c height are set.
+
+ \snippet video/mediaplayer/Main.qml 0
+
+ Next the \c MediaPlayer is created and the two properties that are responsible for the video and
+ audio output are defined.
+ Firstly, \c videoOutput which renders the video viewfinder and secondly \c audioOutput which provides
+ the audio output for the player.
+
+ \snippet video/mediaplayer/Main.qml 1
+ \dots
+ \snippet video/mediaplayer/Main.qml 2
+ \dots
+ \snippet video/mediaplayer/Main.qml 3
+
+ The \c visible property of the \c VideoOutput type is set to \c true when the \c mediaStatus
+ property of the \c MediaPlayer is greater than 0. \c mediaStatus is of enumeration type
+ and is equal to 0 when \e {No media has been set}, and greater than 0 otherwise. Therefore,
+ the \c VideoOutput is visible when media has been set.
+
+ The \c MediaPlayer type has a signal property called \c onErrorOccurred that can be
+ overridden specifically to handle errors. In this case the signal opens a \c MessageDialog using
+ the method \c {open()} and sets its \c text property to a \c MediaPlayer property called
+ \c errorString.
+
+ \snippet video/mediaplayer/Main.qml 4
+
+ \section1 Playback Controls
+
+ In order to have a useable media player, there needs to be an interface to control the playback.
+ This is created in its own component file, \c PlaybackControl.qml, and instantiated in
+ \c Main.qml.
+
+ \snippet video/mediaplayer/Main.qml 5
+ \dots
+ \snippet video/mediaplayer/Main.qml 6
+
+ When created, objects are forwarded to this type such as track information,
+ metadata information and the \c MediaPlayer object itself. In \c PlaybackControl.qml,
+ each one of these objects have a \c {required property}, meaning that these properties must
+ be set when the \c PlaybackControl object is created.
+
+ \snippet video/mediaplayer/controls/PlaybackControl.qml 0
+
+ These playback controls can be broken down into sections. In the top left of the panel lies
+ a collection of buttons used to open a file, either by selecting a file from a file explorer or
+ entering a URL. The file is loaded into the \c MediaPlayer by setting the \c source property.
+ Both buttons are instantiated using a \c CustomButton \c {custom component}.
+
+ \snippet video/mediaplayer/controls/PlaybackControl.qml 1
+
+ Three buttons are created and centered on this panel, handling play, pause and seeking ten
+ seconds backwards or forwards. The media is played and paused using the methods \c {play()}
+ and \c {pause()}, respectively. To know when to draw a play or pause button, the \c playbackState
+ property is queried. For example, when it is equal to the enum value \c MediaPlayer.PlayingState
+ then the pause button is drawn.
+
+ \snippet video/mediaplayer/controls/PlaybackControl.qml 2
+
+ To navigate ten seconds forward or backwards, the \c position of the \c MediaPlayer type is
+ incremented by 10,000 milliseconds and set using the method \c {setPosition()}.
+
+ \snippet video/mediaplayer/controls/PlaybackControl.qml 3
+
+ \section1 Playback Seeking and Audio
+
+ In \c {PlaybackControl.qml}, an \c AudioControl and a \c PlaybackSeekControl type are instantiated.
+ These are both defined in their own component file and are responsible for volume control and
+ playback seeking, respectively. The \c AudioControl type defines a button to mute and a \c Slider,
+ from \c {QtQuick Controls}, to set the volume of the player. Both of these attributes are exposed by
+ defining a \c mute and \c volume property and are accessed from the \c AudioOutput definition in
+ \c {Main.qml}.
+
+ \snippet video/mediaplayer/controls/AudioControl.qml 0
+
+ The \c PlaybackSeekControl uses a \c RowLayout containing a \c Slider with a \c Text item either side.
+ The two \c Text items display the current time and the remaining time of the media being played. These
+ are both calculated using two properties of the \c MediaPlayer type, \c {position}, which gives the
+ current playback position in milliseconds, and \c {duration}, which gives the duration of the media
+ in milliseconds.
+
+ \snippet video/mediaplayer/controls/PlaybackSeekControl.qml 0
+ \dots
+ \snippet video/mediaplayer/controls/PlaybackSeekControl.qml 1
+
+ The \c Slider is only enabled when the media player is seekable and not, for example, live media.
+ The \c MediaPlayer type has a property for this called \c seekable. The \c value of the \c Slider
+ is calculated using the \c position and \c duration properties of the \c MediaPlayer.
+
+ \snippet video/mediaplayer/controls/PlaybackSeekControl.qml 2
+
+ \section1 Metadata and Track Information
+
+ The \c PlaybackControl type instantiates a \c SettingsPopup, which contains information about the
+ metadata of the currently loaded media and track selection, as well as the ability to update the
+ playback rate. This \c Popup is defined in \c SettingsPopup.qml.
+
+ \image settings.png
+
+ The metadata is contained in its own component file, \c MetadataInfo.qml. It contains a \c ListModel,
+ a function to clear it, \c {clear()}, and a function to populate it, \c {read(MediaMetadata metadata)}.
+ The \c {read(MediaMetadata metadata)} function takes as a parameter an object of type \c MediaMetaData,
+ and navigates its key-value structure to extract its data into the \c model of the \c {ListView}. The
+ methods used to do this are \c {keys()}, which returns all the keys of the \c MediaMetaData, and
+ {stringValue(Key key)}, which returns the \c value for a given \c key.
+
+ \snippet video/mediaplayer/controls/MetadataInfo.qml 0
+
+ The data is then displayed in \c {SettingsPopup.qml} in a \c ListView type. The \c delegate of this
+ \c ListView is a row of two \c Text items, corresponding to the key-value pairs abstracted from the
+ \c MediaMetaData item.
+
+ On the other side of the \c Popup there is playback rate controls and track selection for audio, video and
+ subtitles. The playback rate is chosen from a \c ComboBox and set using the property \c playbackRate.
+
+ \snippet video/mediaplayer/controls/SettingsPopup.qml 0
+
+ The type called \c TracksInfo, defined in \c {TracksInfo.qml}, contains the data about the tracks.
+ More specifically, a \c ListModel containing the titles of the tracks, or for subtitles specifically, the
+ langauges. This information is populated in \c Main.qml by calling the \c {read(MediaMetadata mediaMetadata)}
+ function defined in the \c TracksInfo type.
+
+ \snippet video/mediaplayer/Main.qml 6
+
+ The \c model defined in \c TracksInfo is then queried in the \c {ComboBox}es in the
+ \c SettingsPopup to select the current track.
+
+ \snippet video/mediaplayer/controls/SettingsPopup.qml 1
+*/
diff --git a/examples/multimedia/video/mediaplayer/images/backward10.svg b/examples/multimedia/video/mediaplayer/images/backward10.svg
new file mode 100644
index 000000000..9166343bd
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/backward10.svg
@@ -0,0 +1,5 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M4 13.2001C4 14.7428 4.46919 16.2508 5.34824 17.5335C6.22729 18.8162 7.47672 19.816 8.93853 20.4063C10.4003 20.9967 12.0089 21.1511 13.5607 20.8502C15.1126 20.5492 16.538 19.8063 17.6569 18.7155C18.7757 17.6247 19.5376 16.2348 19.8463 14.7218C20.155 13.2088 19.9965 11.6404 19.391 10.2152C18.7855 8.78993 17.7602 7.57175 16.4446 6.71468C15.129 5.85761 13.5822 5.40015 12 5.40015" stroke="black" stroke-width="2" stroke-linecap="round"/>
+<path d="M12.6152 3L10.1537 5.39999L12.6152 7.79997" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9.16406 16V11.4766H9.09375L7.71094 12.4375V11.375L9.16797 10.3633H10.3438V16H9.16406ZM14.0469 16.1445C13.5833 16.1445 13.1836 16.0247 12.8477 15.7852C12.5143 15.543 12.2578 15.2005 12.0781 14.7578C11.8984 14.3151 11.8086 13.7904 11.8086 13.1836V13.1758C11.8086 12.5664 11.8984 12.0417 12.0781 11.6016C12.2578 11.1589 12.5143 10.8177 12.8477 10.5781C13.1836 10.3385 13.5833 10.2188 14.0469 10.2188C14.513 10.2188 14.9128 10.3385 15.2461 10.5781C15.5794 10.8177 15.8359 11.1589 16.0156 11.6016C16.1953 12.0417 16.2852 12.5664 16.2852 13.1758V13.1836C16.2852 13.7904 16.1953 14.3151 16.0156 14.7578C15.8359 15.2005 15.5794 15.543 15.2461 15.7852C14.9128 16.0247 14.513 16.1445 14.0469 16.1445ZM14.0469 15.2109C14.2708 15.2109 14.4596 15.1302 14.6133 14.9688C14.7695 14.8073 14.888 14.5755 14.9688 14.2734C15.0521 13.9714 15.0938 13.6081 15.0938 13.1836V13.1758C15.0938 12.7487 15.0521 12.3854 14.9688 12.0859C14.888 11.7839 14.7695 11.5534 14.6133 11.3945C14.4596 11.2331 14.2708 11.1523 14.0469 11.1523C13.8255 11.1523 13.6367 11.2331 13.4805 11.3945C13.3268 11.5534 13.2083 11.7839 13.125 12.0859C13.0443 12.3854 13.0039 12.7487 13.0039 13.1758V13.1836C13.0039 13.6081 13.0443 13.9714 13.125 14.2734C13.2083 14.5755 13.3268 14.8073 13.4805 14.9688C13.6367 15.1302 13.8255 15.2109 14.0469 15.2109Z" fill="black"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/ff.svg b/examples/multimedia/video/mediaplayer/images/ff.svg
new file mode 100644
index 000000000..7c907c4fa
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/ff.svg
@@ -0,0 +1,4 @@
+<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.19465 16.8817C5.5198 17.0557 5.91435 17.0366 6.2212 16.832L12.2212 12.832C12.4994 12.6466 12.6665 12.3344 12.6665 12C12.6665 11.6656 12.4994 11.3534 12.2212 11.1679L6.2212 7.16795C5.91435 6.96338 5.5198 6.9443 5.19465 7.11832C4.86949 7.29234 4.6665 7.6312 4.6665 8V16C4.6665 16.3688 4.86949 16.7077 5.19465 16.8817ZM6.6665 14.1315V9.86852L9.86373 12L6.6665 14.1315Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M13.1946 16.8817C13.5198 17.0557 13.9143 17.0366 14.2212 16.832L20.2212 12.832C20.4994 12.6466 20.6665 12.3344 20.6665 12C20.6665 11.6656 20.4994 11.3534 20.2212 11.1679L14.2212 7.16795C13.9143 6.96338 13.5198 6.9443 13.1946 7.11832C12.8695 7.29234 12.6665 7.6312 12.6665 8V16C12.6665 16.3688 12.8695 16.7077 13.1946 16.8817ZM14.6665 14.1315V9.86852L17.8637 12L14.6665 14.1315Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/forward10.svg b/examples/multimedia/video/mediaplayer/images/forward10.svg
new file mode 100644
index 000000000..190a5aaab
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/forward10.svg
@@ -0,0 +1,5 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M20 13.2001C20 14.7428 19.5308 16.2508 18.6518 17.5335C17.7727 18.8162 16.5233 19.816 15.0615 20.4063C13.5997 20.9967 11.9911 21.1511 10.4393 20.8502C8.88743 20.5492 7.46197 19.8063 6.34315 18.7155C5.22433 17.6247 4.4624 16.2348 4.15372 14.7218C3.84504 13.2088 4.00347 11.6404 4.60897 10.2152C5.21447 8.78993 6.23985 7.57175 7.55544 6.71468C8.87103 5.85761 10.4178 5.40015 12 5.40015" stroke="black" stroke-width="2" stroke-linecap="round"/>
+<path d="M11.3838 3L13.8453 5.39999L11.3838 7.79997" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
+<path d="M9.16406 16V11.4766H9.09375L7.71094 12.4375V11.375L9.16797 10.3633H10.3438V16H9.16406ZM14.0469 16.1445C13.5833 16.1445 13.1836 16.0247 12.8477 15.7852C12.5143 15.543 12.2578 15.2005 12.0781 14.7578C11.8984 14.3151 11.8086 13.7904 11.8086 13.1836V13.1758C11.8086 12.5664 11.8984 12.0417 12.0781 11.6016C12.2578 11.1589 12.5143 10.8177 12.8477 10.5781C13.1836 10.3385 13.5833 10.2188 14.0469 10.2188C14.513 10.2188 14.9128 10.3385 15.2461 10.5781C15.5794 10.8177 15.8359 11.1589 16.0156 11.6016C16.1953 12.0417 16.2852 12.5664 16.2852 13.1758V13.1836C16.2852 13.7904 16.1953 14.3151 16.0156 14.7578C15.8359 15.2005 15.5794 15.543 15.2461 15.7852C14.9128 16.0247 14.513 16.1445 14.0469 16.1445ZM14.0469 15.2109C14.2708 15.2109 14.4596 15.1302 14.6133 14.9688C14.7695 14.8073 14.888 14.5755 14.9688 14.2734C15.0521 13.9714 15.0938 13.6081 15.0938 13.1836V13.1758C15.0938 12.7487 15.0521 12.3854 14.9688 12.0859C14.888 11.7839 14.7695 11.5534 14.6133 11.3945C14.4596 11.2331 14.2708 11.1523 14.0469 11.1523C13.8255 11.1523 13.6367 11.2331 13.4805 11.3945C13.3268 11.5534 13.2083 11.7839 13.125 12.0859C13.0443 12.3854 13.0039 12.7487 13.0039 13.1758V13.1836C13.0039 13.6081 13.0443 13.9714 13.125 14.2734C13.2083 14.5755 13.3268 14.8073 13.4805 14.9688C13.6367 15.1302 13.8255 15.2109 14.0469 15.2109Z" fill="black"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/link.svg b/examples/multimedia/video/mediaplayer/images/link.svg
new file mode 100644
index 000000000..6ce1b983d
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/link.svg
@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M11 16C11 16.5523 10.5523 17 10 17H7C5.61667 17 4.4375 16.5125 3.4625 15.5375C2.4875 14.5625 2 13.3833 2 12C2 10.6167 2.4875 9.4375 3.4625 8.4625C4.4375 7.4875 5.61667 7 7 7H10C10.5523 7 11 7.44772 11 8C11 8.55228 10.5523 9 10 9H7C6.16667 9 5.45833 9.29167 4.875 9.875C4.29167 10.4583 4 11.1667 4 12C4 12.8333 4.29167 13.5417 4.875 14.125C5.45833 14.7083 6.16667 15 7 15H10C10.5523 15 11 15.4477 11 16ZM9 13C8.44772 13 8 12.5523 8 12C8 11.4477 8.44772 11 9 11H15C15.5523 11 16 11.4477 16 12C16 12.5523 15.5523 13 15 13H9ZM14 17C13.4477 17 13 16.5523 13 16C13 15.4477 13.4477 15 14 15H17C17.8333 15 18.5417 14.7083 19.125 14.125C19.7083 13.5417 20 12.8333 20 12C20 11.1667 19.7083 10.4583 19.125 9.875C18.5417 9.29167 17.8333 9 17 9H14C13.4477 9 13 8.55228 13 8C13 7.44772 13.4477 7 14 7H17C18.3833 7 19.5625 7.4875 20.5375 8.4625C21.5125 9.4375 22 10.6167 22 12C22 13.3833 21.5125 14.5625 20.5375 15.5375C19.5625 16.5125 18.3833 17 17 17H14Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/loop.svg b/examples/multimedia/video/mediaplayer/images/loop.svg
new file mode 100644
index 000000000..8161ca867
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/loop.svg
@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7 17.5C5 17.5 7 17.5 5 17.5C3 17.5 3 17.5 3 15.5C3 13.5 3 8 3 6C3 4 3 4 5 4C7 4 17 4 19 4C21 4 21 4 21 6C21 8 21 13.5 21 15.5C21 17.5 21 17.5 19 17.5C17 17.5 11 17.5 11 17.5M11 17.5L13 15M11 17.5L13 20" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/more.svg b/examples/multimedia/video/mediaplayer/images/more.svg
new file mode 100644
index 000000000..fa8bddec8
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/more.svg
@@ -0,0 +1,5 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M14 12C14 13.1046 13.1046 14 12 14C10.8954 14 10 13.1046 10 12C10 10.8954 10.8954 10 12 10C13.1046 10 14 10.8954 14 12Z" fill="black"/>
+<path d="M22 12C22 13.1046 21.1046 14 20 14C18.8954 14 18 13.1046 18 12C18 10.8954 18.8954 10 20 10C21.1046 10 22 10.8954 22 12Z" fill="black"/>
+<path d="M6 12C6 13.1046 5.10457 14 4 14C2.89543 14 2 13.1046 2 12C2 10.8954 2.89543 10 4 10C5.10457 10 6 10.8954 6 12Z" fill="black"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/mute.svg b/examples/multimedia/video/mediaplayer/images/mute.svg
new file mode 100644
index 000000000..b66b6d311
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/mute.svg
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="500" height="500" viewBox="0 0 75 75"
+stroke="#111" stroke-width="5">
+<path d="m39,14-17,15H6V48H22l17,15z" fill="#111" stroke-linejoin="round"/>
+<path d="m49,26 20,24m0-24-20,24" fill="none" stroke-linecap="round"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/open_new.svg b/examples/multimedia/video/mediaplayer/images/open_new.svg
new file mode 100644
index 000000000..6c62237f1
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/open_new.svg
@@ -0,0 +1,6 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<g id="File /open_new">
+<path id="Layer01" d="M2 5C2 3.34315 3.34315 2 5 2H11C11.5523 2 12 2.44772 12 3C12 3.55228 11.5523 4 11 4H5C4.44772 4 4 4.44772 4 5V19C4 19.5523 4.44772 20 5 20H19C19.5523 20 20 19.5523 20 19V13.125C20 12.5727 20.4477 12.125 21 12.125C21.5523 12.125 22 12.5727 22 13.125V19C22 20.6569 20.6569 22 19 22H5C3.34315 22 2 20.6569 2 19V5Z" fill="#0D0D0D"/>
+<path id="Layer02" fill-rule="evenodd" clip-rule="evenodd" d="M15 4C14.4477 4 14 3.55228 14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55228 21.5523 10 21 10C20.4477 10 20 9.55228 20 9V5.41421L8.76961 16.6446C8.37908 17.0351 7.74592 17.0351 7.35539 16.6446C6.96487 16.2541 6.96487 15.6209 7.35539 15.2304L18.5858 4H15Z" fill="#0D0D0D"/>
+</g>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/pause_symbol.svg b/examples/multimedia/video/mediaplayer/images/pause_symbol.svg
new file mode 100644
index 000000000..bdf6a9047
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/pause_symbol.svg
@@ -0,0 +1,4 @@
+<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.3335 7C8.3335 6.44772 8.66928 6 9.0835 6H10.5835C10.9977 6 11.3335 6.44772 11.3335 7V17C11.3335 17.5523 10.9977 18 10.5835 18H9.0835C8.66928 18 8.3335 17.5523 8.3335 17V7Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M13.3335 7C13.3335 6.44772 13.6693 6 14.0835 6H15.5835C15.9977 6 16.3335 6.44772 16.3335 7V17C16.3335 17.5523 15.9977 18 15.5835 18H14.0835C13.6693 18 13.3335 17.5523 13.3335 17V7Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/play_symbol.svg b/examples/multimedia/video/mediaplayer/images/play_symbol.svg
new file mode 100644
index 000000000..edb567226
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/play_symbol.svg
@@ -0,0 +1,3 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M16.8182 12L6.89091 6.14985L6.89091 17.8501L16.8182 12ZM18.2 13.4143C19.2667 12.7857 19.2667 11.2143 18.2 10.5857L7.4 4.22123C6.33333 3.59264 5 4.37838 5 5.63555L5 18.3644C5 19.6216 6.33333 20.4074 7.4 19.7788L18.2 13.4143Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/rewind.svg b/examples/multimedia/video/mediaplayer/images/rewind.svg
new file mode 100644
index 000000000..e9b34122c
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/rewind.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M19.4719 16.8817C19.1467 17.0557 18.7522 17.0366 18.4453 16.832L12.4453 12.832C12.1671 12.6466 12 12.3344 12 12C12 11.6656 12.1671 11.3534 12.4453 11.1679L18.4453 7.16795C18.7522 6.96338 19.1467 6.9443 19.4719 7.11832C19.797 7.29234 20 7.6312 20 8V16C20 16.3688 19.797 16.7077 19.4719 16.8817ZM18 14.1315V9.86852L14.8028 12L18 14.1315Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M11.4719 16.8817C11.1467 17.0557 10.7522 17.0366 10.4453 16.832L4.4453 12.832C4.1671 12.6466 4 12.3344 4 12C4 11.6656 4.1671 11.3534 4.4453 11.1679L10.4453 7.16795C10.7522 6.96338 11.1467 6.9443 11.4719 7.11832C11.797 7.29234 12 7.6312 12 8V16C12 16.3688 11.797 16.7077 11.4719 16.8817ZM10 14.1315V9.86852L6.80278 12L10 14.1315Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/settings.svg b/examples/multimedia/video/mediaplayer/images/settings.svg
new file mode 100644
index 000000000..3a13ccae1
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/settings.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M8.84998 4C8.84998 2.89543 9.74541 2 10.85 2H13.1222C14.2268 2 15.1222 2.89543 15.1222 4V4.59509C15.1229 4.59732 15.125 4.6023 15.1306 4.61031C15.1434 4.62838 15.1691 4.65242 15.2077 4.66935C15.852 4.95163 16.4515 5.31609 16.9931 5.74921C17.0261 5.77554 17.0594 5.787 17.0815 5.78982C17.0912 5.79106 17.0966 5.79055 17.0989 5.79008L17.9363 5.33741C18.8691 4.8332 20.0332 5.14455 20.5897 6.04706L21.6744 7.80604C22.2777 8.78435 21.9342 10.0686 20.9231 10.6152L19.9875 11.1209C19.9859 11.1226 19.9824 11.1269 19.9781 11.1358C19.9683 11.156 19.9595 11.1904 19.9636 11.2327C19.9877 11.4855 20 11.7414 20 12C20 12.2586 19.9877 12.5145 19.9636 12.7673C19.9595 12.8096 19.9683 12.844 19.9781 12.8642C19.9824 12.8732 19.9859 12.8774 19.9875 12.8791L20.923 13.3848C21.9341 13.9314 22.2776 15.2157 21.6743 16.194L20.5897 17.9529C20.0331 18.8554 18.869 19.1668 17.9362 18.6626L17.0989 18.2099C17.0966 18.2095 17.0912 18.209 17.0815 18.2102C17.0594 18.213 17.026 18.2245 16.9931 18.2508C16.4515 18.6839 15.852 19.0484 15.2077 19.3306C15.1691 19.3476 15.1434 19.3716 15.1306 19.3897C15.125 19.3977 15.1229 19.4027 15.1222 19.4049V20C15.1222 21.1046 14.2268 22 13.1222 22H10.85C9.74541 22 8.84998 21.1046 8.84998 20V19.3928C8.84931 19.3906 8.84725 19.3857 8.84163 19.3777C8.82894 19.3597 8.80351 19.3357 8.76508 19.3187C8.12675 19.0362 7.53272 18.6729 6.99586 18.242C6.96292 18.2156 6.92951 18.2041 6.90737 18.2012C6.89759 18.2 6.8922 18.2005 6.8899 18.201L6.03592 18.6626C5.10317 19.1668 3.93904 18.8554 3.38251 17.9529L2.29784 16.194C1.69457 15.2156 2.03805 13.9314 3.04914 13.3848L4.01099 12.8649C4.01265 12.8632 4.01607 12.859 4.02042 12.85C4.03023 12.8299 4.03897 12.7956 4.03503 12.7534C4.0118 12.5051 3.99995 12.2538 3.99995 12C3.99995 11.7462 4.0118 11.4949 4.03503 11.2466C4.03897 11.2045 4.03022 11.1701 4.02042 11.15C4.01607 11.1411 4.01265 11.1368 4.01098 11.1352L3.04909 10.6152C2.038 10.0686 1.69452 8.78435 2.29779 7.80604L3.38245 6.04707C3.93898 5.14456 5.10312 4.83322 6.03587 5.33742L6.88988 5.79907C6.89218 5.79953 6.89757 5.80005 6.90735 5.79879C6.92949 5.79594 6.9629 5.78441 6.99584 5.75797C7.53271 5.32709 8.12674 4.96379 8.76508 4.68128C8.80351 4.66427 8.82894 4.64029 8.84163 4.62231C8.84725 4.61434 8.84931 4.60938 8.84998 4.60716V4ZM8.85024 4.60578C8.85029 4.60578 8.85026 4.60619 8.85001 4.60703L8.85024 4.60578ZM6.88852 5.79864C6.88854 5.7986 6.88898 5.79869 6.88977 5.79904L6.88852 5.79864ZM4.00988 11.1343C4.00991 11.1342 4.01026 11.1344 4.0109 11.1351L4.00988 11.1343ZM4.00989 12.8658C4.00988 12.8657 4.01021 12.8654 4.01091 12.865L4.00989 12.8658ZM6.88854 18.2014C6.88851 18.2013 6.8889 18.2012 6.88979 18.201L6.88854 18.2014ZM19.9886 12.88C19.9885 12.88 19.9881 12.8797 19.9876 12.8792L19.9886 12.88ZM19.9886 11.12C19.9887 11.12 19.9883 11.1204 19.9876 11.1208L19.9886 11.12ZM17.1003 5.78965C17.1003 5.78968 17.0999 5.78986 17.099 5.79006L17.1003 5.78965ZM15.122 4.5937C15.122 4.59371 15.1221 4.59414 15.1222 4.59496L15.122 4.5937ZM13.1222 4L10.85 4V4.60808C10.85 5.49562 10.2774 6.19908 9.57449 6.51017C9.09654 6.7217 8.65096 6.99408 8.24769 7.31774C7.63839 7.80676 6.73261 7.98755 5.93958 7.55888L5.08481 7.09682L4.00015 8.8558L4.9628 9.37617C5.7538 9.80375 6.09888 10.6574 6.02633 11.4329C6.00889 11.6193 5.99995 11.8085 5.99995 12C5.99995 12.1915 6.00889 12.3807 6.02633 12.5671C6.09889 13.3426 5.75381 14.1963 4.9628 14.6239L4.0002 15.1442L5.08486 16.9032L5.9396 16.4411C6.73263 16.0125 7.63841 16.1933 8.2477 16.6823C8.65097 17.0059 9.09654 17.2783 9.57449 17.4898C10.2774 17.8009 10.85 18.5044 10.85 19.3919V20H13.1222V19.404C13.1222 18.5133 13.6987 17.8083 14.4051 17.4988C14.8875 17.2874 15.3372 17.0142 15.744 16.6889C16.3532 16.2017 17.2575 16.0222 18.0492 16.4501L18.8873 16.9032L19.972 15.1442L19.0357 14.6381C18.2434 14.2098 17.8986 13.3541 17.9726 12.5776C17.9907 12.3878 18 12.1951 18 12C18 11.8049 17.9907 11.6123 17.9726 11.4224C17.8986 10.6459 18.2434 9.79023 19.0357 9.36192L19.972 8.85579L18.8874 7.09681L18.0492 7.54989C17.2575 7.97786 16.3532 7.79836 15.744 7.31116C15.3372 6.98582 14.8875 6.71259 14.4051 6.50124C13.6987 6.19173 13.1222 5.48675 13.1222 4.596L13.1222 4Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M12 14C13.1046 14 14 13.1046 14 12C14 10.8954 13.1046 10 12 10C10.8954 10 10 10.8954 10 12C10 13.1046 10.8954 14 12 14ZM12 16C14.2091 16 16 14.2091 16 12C16 9.79086 14.2091 8 12 8C9.79086 8 8 9.79086 8 12C8 14.2091 9.79086 16 12 16Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/speaker.svg b/examples/multimedia/video/mediaplayer/images/speaker.svg
new file mode 100644
index 000000000..723e48b66
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/speaker.svg
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="500" height="500" viewBox="0 0 75 75">
+<path d="M39.389,13.769 L22.235,28.606 L6,28.606 L6,47.699 L21.989,47.699 L39.389,62.75 L39.389,13.769z"
+style="stroke:#111;stroke-width:5;stroke-linejoin:round;fill:#111;"
+/>
+<path d="M48,27.6a19.5,19.5 0 0 1 0,21.4M55.1,20.5a30,30 0 0 1 0,35.6M61.6,14a38.8,38.8 0 0 1 0,48.6" style="fill:none;stroke:#111;stroke-width:5;stroke-linecap:round"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/stop_symbol.svg b/examples/multimedia/video/mediaplayer/images/stop_symbol.svg
new file mode 100644
index 000000000..99f00162f
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/stop_symbol.svg
@@ -0,0 +1,3 @@
+<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M17.6665 7H7.6665L7.6665 17H17.6665V7ZM7.6665 5C6.56193 5 5.6665 5.89543 5.6665 7V17C5.6665 18.1046 6.56193 19 7.6665 19H17.6665C18.7711 19 19.6665 18.1046 19.6665 17V7C19.6665 5.89543 18.7711 5 17.6665 5H7.6665Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/url.svg b/examples/multimedia/video/mediaplayer/images/url.svg
new file mode 100644
index 000000000..44942911f
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/url.svg
@@ -0,0 +1,6 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path d="M7 10C7 10.5523 6.55228 11 6 11C5.44772 11 5 10.5523 5 10C5 9.44772 5.44772 9 6 9C6.55228 9 7 9.44772 7 10Z" fill="black"/>
+<path d="M7 14C7 14.5523 6.55228 15 6 15C5.44772 15 5 14.5523 5 14C5 13.4477 5.44772 13 6 13C6.55228 13 7 13.4477 7 14Z" fill="black"/>
+<path d="M13 6L9 18" stroke="black" stroke-width="2" stroke-linecap="round"/>
+<path d="M18 6L14 18" stroke="black" stroke-width="2" stroke-linecap="round"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/volume.svg b/examples/multimedia/video/mediaplayer/images/volume.svg
new file mode 100644
index 000000000..2cdc4df6b
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/volume.svg
@@ -0,0 +1,4 @@
+<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M9.98759 5.1163C11.1732 3.91192 13.2226 4.75139 13.2226 6.44139V17.5587C13.2226 19.2487 11.1732 20.0882 9.98759 18.8838L6.74406 15.5888C6.72318 15.5675 6.69465 15.5556 6.66488 15.5556H4.33371C3.29051 15.5556 2.44482 14.7099 2.44482 13.6667L2.44482 10.3334C2.44482 9.29016 3.29051 8.44448 4.33371 8.44448H6.66488C6.69465 8.44448 6.72318 8.43253 6.74406 8.41131L9.98759 5.1163ZM11.3101 6.32964C11.2992 6.3316 11.2809 6.33666 11.2545 6.36344L8.011 9.65845C7.65595 10.0191 7.171 10.2223 6.66488 10.2223H4.33371C4.27235 10.2223 4.2226 10.272 4.2226 10.3334L4.2226 13.6667C4.2226 13.7281 4.27235 13.7778 4.33371 13.7778H6.66488C7.171 13.7778 7.65595 13.9809 8.011 14.3416L11.2545 17.6366C11.2809 17.6634 11.2992 17.6685 11.3101 17.6704C11.326 17.6733 11.3496 17.6723 11.3758 17.6615C11.4021 17.6507 11.4196 17.6349 11.4289 17.6218C11.4353 17.6127 11.4448 17.5963 11.4448 17.5587V6.44139C11.4448 6.40381 11.4353 6.38737 11.4289 6.37829C11.4196 6.36513 11.4021 6.34932 11.3758 6.33857C11.3496 6.32781 11.326 6.3268 11.3101 6.32964Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M19.0329 4.37143C18.6857 4.0243 18.1229 4.0243 17.7758 4.37143C17.4287 4.71857 17.4287 5.28138 17.7758 5.62851C21.3339 9.18662 21.3339 14.9555 17.7758 18.5136C17.4287 18.8607 17.4287 19.4235 17.7758 19.7706C18.1229 20.1178 18.6857 20.1178 19.0329 19.7706C23.2852 15.5183 23.2852 8.62381 19.0329 4.37143ZM16.2044 7.37146C15.8573 7.02433 15.2945 7.02433 14.9474 7.37146C14.6002 7.71859 14.6002 8.28141 14.9474 8.62854C16.9434 10.6246 16.9434 13.8607 14.9474 15.8567C14.6002 16.2039 14.6002 16.7667 14.9474 17.1138C15.2945 17.461 15.8573 17.461 16.2044 17.1138C18.8947 14.4235 18.8947 10.0617 16.2044 7.37146Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/volume_mute.svg b/examples/multimedia/video/mediaplayer/images/volume_mute.svg
new file mode 100644
index 000000000..635c308e9
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/volume_mute.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M9.6541 5.1163C10.8397 3.91192 12.8891 4.75139 12.8891 6.44139V17.5587C12.8891 19.2487 10.8397 20.0882 9.6541 18.8838L6.41057 15.5888C6.38968 15.5675 6.36116 15.5556 6.33138 15.5556H4.00022C2.95701 15.5556 2.11133 14.7099 2.11133 13.6667L2.11133 10.3334C2.11133 9.29016 2.95701 8.44448 4.00022 8.44448H6.33138C6.36116 8.44448 6.38968 8.43253 6.41057 8.41131L9.6541 5.1163ZM10.9766 6.32964C10.9657 6.3316 10.9474 6.33666 10.921 6.36344L7.67751 9.65845C7.32245 10.0191 6.8375 10.2223 6.33138 10.2223H4.00022C3.93885 10.2223 3.88911 10.272 3.88911 10.3334L3.88911 13.6667C3.88911 13.7281 3.93885 13.7778 4.00022 13.7778H6.33138C6.8375 13.7778 7.32245 13.9809 7.67751 14.3416L10.921 17.6366C10.9474 17.6634 10.9657 17.6685 10.9766 17.6704C10.9925 17.6733 11.0161 17.6723 11.0423 17.6615C11.0686 17.6507 11.0861 17.6349 11.0954 17.6218C11.1018 17.6127 11.1113 17.5963 11.1113 17.5587V6.44139C11.1113 6.40381 11.1018 6.38737 11.0954 6.37829C11.0861 6.36513 11.0686 6.34932 11.0423 6.33857C11.0161 6.32781 10.9925 6.3268 10.9766 6.32964Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071C13.9024 15.3166 13.9024 14.6834 14.2929 14.2929L16.5858 12L14.2929 9.70711C13.9024 9.31658 13.9024 8.68342 14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289L18 10.5858L20.2929 8.29289C20.6834 7.90237 21.3166 7.90237 21.7071 8.29289C22.0976 8.68342 22.0976 9.31658 21.7071 9.70711L19.4142 12L21.7071 14.2929C22.0976 14.6834 22.0976 15.3166 21.7071 15.7071C21.3166 16.0976 20.6834 16.0976 20.2929 15.7071L18 13.4142L15.7071 15.7071Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/zoom_maximize.svg b/examples/multimedia/video/mediaplayer/images/zoom_maximize.svg
new file mode 100644
index 000000000..9c7fb8ebb
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/zoom_maximize.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M19.071 3.92892C19.6233 3.92892 20.071 4.37664 20.071 4.92892V9.17157C20.071 9.72385 19.6233 10.1716 19.071 10.1716C18.5188 10.1716 18.071 9.72385 18.071 9.17157V7.34314L16.1716 9.24263C15.781 9.63315 15.1479 9.63315 14.7573 9.24263C14.3668 8.8521 14.3668 8.21894 14.7573 7.82841L16.6568 5.92892L14.8284 5.92892C14.2761 5.92892 13.8284 5.48121 13.8284 4.92892C13.8284 4.37664 14.2761 3.92892 14.8284 3.92892H19.071ZM4.92892 13.8284C5.48121 13.8284 5.92892 14.2761 5.92892 14.8284V16.6569L8.29289 14.2929C8.68342 13.9024 9.31658 13.9024 9.70711 14.2929C10.0976 14.6834 10.0976 15.3166 9.70711 15.7071L7.34314 18.0711L9.17157 18.0711C9.72385 18.0711 10.1716 18.5188 10.1716 19.0711C10.1716 19.6234 9.72385 20.0711 9.17157 20.0711H4.92892C4.37664 20.0711 3.92892 19.6234 3.92892 19.0711V14.8284C3.92892 14.2761 4.37664 13.8284 4.92892 13.8284Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M10.1716 4.92892C10.1716 5.48121 9.72388 5.92892 9.1716 5.92892L7.34316 5.92892L9.24265 7.82841C9.63318 8.21894 9.63318 8.8521 9.24265 9.24263C8.85213 9.63315 8.21896 9.63315 7.82844 9.24263L5.92896 7.34314V9.17157C5.92896 9.72385 5.48124 10.1716 4.92896 10.1716C4.37667 10.1716 3.92896 9.72385 3.92896 9.17157V4.92892C3.92896 4.37664 4.37667 3.92892 4.92896 3.92892H9.1716C9.72388 3.92892 10.1716 4.37664 10.1716 4.92892ZM19.0711 13.8284C19.6234 13.8284 20.0711 14.2761 20.0711 14.8284V19.0711C20.0711 19.6234 19.6234 20.0711 19.0711 20.0711H14.8284C14.2761 20.0711 13.8284 19.6234 13.8284 19.0711C13.8284 18.5188 14.2761 18.0711 14.8284 18.0711H16.6569L14.2929 15.7071C13.9024 15.3166 13.9024 14.6834 14.2929 14.2929C14.6834 13.9024 15.3166 13.9024 15.7071 14.2929L18.0711 16.6569V14.8284C18.0711 14.2761 18.5188 13.8284 19.0711 13.8284Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/images/zoom_minimize.svg b/examples/multimedia/video/mediaplayer/images/zoom_minimize.svg
new file mode 100644
index 000000000..3d6ae65aa
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/images/zoom_minimize.svg
@@ -0,0 +1,4 @@
+<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
+<path fill-rule="evenodd" clip-rule="evenodd" d="M15.1213 10C14.502 10 14 9.49797 14 8.87868L14 4.12132C14 3.50203 14.502 3 15.1213 3C15.7406 3 16.2426 3.50203 16.2426 4.12132V6.17158L18.3726 4.04163C18.8105 3.60372 19.5205 3.60372 19.9584 4.04163C20.3963 4.47953 20.3963 5.18951 19.9584 5.62741L17.8284 7.75736L19.8787 7.75736C20.498 7.75736 21 8.25939 21 8.87868C21 9.49797 20.498 10 19.8787 10L15.1213 10ZM8.87868 21C8.25939 21 7.75736 20.498 7.75736 19.8787V17.8284L5.10659 20.4792C4.66869 20.9171 3.95871 20.9171 3.52081 20.4792C3.0829 20.0413 3.0829 19.3313 3.52081 18.8934L6.17157 16.2426H4.12132C3.50203 16.2426 3 15.7406 3 15.1213C3 14.502 3.50203 14 4.12132 14L8.87868 14C9.49797 14 10 14.502 10 15.1213L10 19.8787C10 20.498 9.49797 21 8.87868 21Z" fill="#0D0D0D"/>
+<path fill-rule="evenodd" clip-rule="evenodd" d="M3.00002 8.87867C3.00002 8.25939 3.50205 7.75735 4.12134 7.75735H6.1716L4.04166 5.62741C3.60375 5.1895 3.60375 4.47952 4.04166 4.04162C4.47956 3.60372 5.18954 3.60372 5.62744 4.04162L7.75737 6.17155V4.12131C7.75737 3.50203 8.25941 2.99999 8.87869 2.99999C9.49798 2.99999 10 3.50203 10 4.12131L10 8.87867C10 9.49796 9.49798 9.99999 8.87869 9.99999L4.12134 9.99999C3.50205 9.99999 3.00002 9.49796 3.00002 8.87867ZM15.1213 21C14.502 21 14 20.498 14 19.8787V15.1213C14 14.502 14.502 14 15.1213 14L19.8787 14C20.498 14 21 14.502 21 15.1213C21 15.7406 20.498 16.2426 19.8787 16.2426H17.8284L20.4792 18.8934C20.9171 19.3313 20.9171 20.0413 20.4792 20.4792C20.0413 20.9171 19.3313 20.9171 18.8934 20.4792L16.2426 17.8284V19.8787C16.2426 20.498 15.7406 21 15.1213 21Z" fill="#0D0D0D"/>
+</svg>
diff --git a/examples/multimedia/video/mediaplayer/main.cpp b/examples/multimedia/video/mediaplayer/main.cpp
new file mode 100644
index 000000000..3df4d6027
--- /dev/null
+++ b/examples/multimedia/video/mediaplayer/main.cpp
@@ -0,0 +1,38 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QCommandLineParser>
+#include <QDir>
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QCoreApplication::setApplicationName("MediaPlayer Example");
+ QCoreApplication::setOrganizationName("QtProject");
+ QCoreApplication::setApplicationVersion(QT_VERSION_STR);
+ QCommandLineParser parser;
+ parser.setApplicationDescription("Qt Quick MediaPlayer Example");
+ parser.addHelpOption();
+ parser.addVersionOption();
+ parser.addPositionalArgument("url", "The URL(s) to open.");
+ parser.process(app);
+
+ QQmlApplicationEngine engine;
+ const QUrl url(QStringLiteral("qrc:/Main.qml"));
+
+ if (!parser.positionalArguments().isEmpty()) {
+ QUrl source = QUrl::fromUserInput(parser.positionalArguments().at(0), QDir::currentPath());
+ QObject::connect(&engine, &QQmlApplicationEngine::objectCreated,
+ &engine, [source](QObject *object, const QUrl &) {
+ qDebug() << "setting source";
+ object->setProperty("source", source);
+ });
+ }
+
+ engine.loadFromModule("mediaplayer", "Main");
+
+ return app.exec();
+}
diff --git a/examples/multimedia/video/qmlvideo/CMakeLists.txt b/examples/multimedia/video/qmlvideo/CMakeLists.txt
new file mode 100644
index 000000000..43975d584
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/CMakeLists.txt
@@ -0,0 +1,58 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+project(qmlvideoexample LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/qmlvideo")
+
+find_package(Qt6 REQUIRED COMPONENTS Core Gui Multimedia Qml Quick)
+
+qt_standard_project_setup(REQUIRES 6.5)
+
+qt_add_executable(qmlvideoexample
+ frequencymonitor.cpp frequencymonitor.h
+ frequencymonitordeclarative.cpp
+ performancemonitor.cpp performancemonitor.h
+ performancemonitordeclarative.cpp performancemonitordeclarative.h
+ main.cpp
+ trace.h
+)
+
+set_target_properties(qmlvideoexample PROPERTIES
+ WIN32_EXECUTABLE TRUE
+ MACOSX_BUNDLE TRUE
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
+)
+
+target_compile_definitions(qmlvideoexample PUBLIC
+ FREQUENCYMONITOR_SUPPORT
+ PERFORMANCEMONITOR_SUPPORT
+)
+
+add_subdirectory(qmlvideo)
+add_subdirectory(performancemonitor)
+add_subdirectory(frequencymonitor)
+
+target_link_libraries(qmlvideoexample PRIVATE
+ Qt::Core
+ Qt::Gui
+ Qt::Multimedia
+ Qt::Qml
+ Qt::Quick
+ qmlvideo
+ performancemonitor
+ frequencymonitor
+)
+
+install(TARGETS qmlvideoexample
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/multimedia/video/qmlvideo/Info.plist.in b/examples/multimedia/video/qmlvideo/Info.plist.in
new file mode 100644
index 000000000..85aa9c26e
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/Info.plist.in
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+
+ <key>CFBundleName</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+ <key>CFBundleExecutable</key>
+ <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+
+ <key>CFBundleVersion</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
+ <key>CFBundleLongVersionString</key>
+ <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
+
+ <key>LSMinimumSystemVersion</key>
+ <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
+
+ <key>CFBundleGetInfoString</key>
+ <string>${MACOSX_BUNDLE_INFO_STRING}</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
+
+ <key>CFBundleIconFile</key>
+ <string>${MACOSX_BUNDLE_ICON_FILE}</string>
+
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+
+ <key>NSCameraUsageDescription</key>
+ <string>Qt Multimedia Example</string>
+ <key>NSMicrophoneUsageDescription</key>
+ <string>Qt Multimedia Example</string>
+ <key>NSSupportsAutomaticGraphicsSwitching</key>
+ <true/>
+</dict>
+</plist>
diff --git a/examples/multimedia/video/doc/images/qmlvideo-menu.jpg b/examples/multimedia/video/qmlvideo/doc/images/qmlvideo-menu.jpg
index 54ab877a1..54ab877a1 100644
--- a/examples/multimedia/video/doc/images/qmlvideo-menu.jpg
+++ b/examples/multimedia/video/qmlvideo/doc/images/qmlvideo-menu.jpg
Binary files differ
diff --git a/examples/multimedia/video/doc/images/qmlvideo-overlay.jpg b/examples/multimedia/video/qmlvideo/doc/images/qmlvideo-overlay.jpg
index 6a0d48ae6..6a0d48ae6 100644
--- a/examples/multimedia/video/doc/images/qmlvideo-overlay.jpg
+++ b/examples/multimedia/video/qmlvideo/doc/images/qmlvideo-overlay.jpg
Binary files differ
diff --git a/examples/multimedia/video/doc/src/qmlvideo.qdoc b/examples/multimedia/video/qmlvideo/doc/src/qmlvideo.qdoc
index b8ab25d03..81f7cf05c 100644
--- a/examples/multimedia/video/doc/src/qmlvideo.qdoc
+++ b/examples/multimedia/video/qmlvideo/doc/src/qmlvideo.qdoc
@@ -1,34 +1,11 @@
-/****************************************************************************
-**
-** Copyright (C) 2015 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2015 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
-\example multimedia/video/qmlvideo
+\example video/qmlvideo
\title QML Video Example
\ingroup multimedia_examples
+\examplecategory {Multimedia}
\brief Transforming video and camera viewfinder content.
\e{QML Video} demonstrates the various transformations (move; resize; rotate;
@@ -50,11 +27,11 @@ which moves across the \l{VideoOutput} item.
\section1 Application Structure
-The \c main.qml file creates a UI which includes the following items:
+The \c Main.qml file creates a UI which includes the following items:
\list
\li Two \c Button instances, each of which displays a filename, and can be
- used to launch a \c FileBrowser.
+ used to launch a \c FileDialog.
\li An exit \c Button.
\li A \c SceneSelectionPanel, which is a flickable list displaying the
available scenes.
@@ -71,13 +48,13 @@ in the center of the screen) is implemented in the \c VideoBasic.qml file. As
you can see from the code, this makes use of a type of inheritance; a
\c VideoBasic item ...
-\quotefromfile multimedia/video/qmlvideo/qml/qmlvideo/VideoBasic.qml
-\skipto import
+\quotefromfile video/qmlvideo/qmlvideo/VideoBasic.qml
+\skipto SceneBasic
\printuntil /^\}/
... is of type \c SceneBasic ...
-\quotefromfile multimedia/video/qmlvideo/qml/qmlvideo/SceneBasic.qml
+\quotefromfile video/qmlvideo/qmlvideo/SceneBasic.qml
\skipto import
\printuntil contentType
\dots
@@ -89,7 +66,7 @@ you can see from the code, this makes use of a type of inheritance; a
... which itself is a \c Scene:
-\quotefromfile multimedia/video/qmlvideo/qml/qmlvideo/Scene.qml
+\quotefromfile video/qmlvideo/qmlvideo/Scene.qml
\skipto import
\printuntil root
\dots
@@ -122,8 +99,11 @@ All that remains is to connect the afterRendering() signal of the QQuickView
object to a JavaScript function, which will eventually call
\c frequencyItem.notify():
-\quotefromfile multimedia/video/qmlvideo/main.cpp
-\skipto QGuiApplication
+\quotefromfile video/qmlvideo/main.cpp
+\skipto int main(
+\printuntil ;
+\dots
+\skipto QQuickView
\printuntil ;
\dots
\skipto QQuickItem
diff --git a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.cpp b/examples/multimedia/video/qmlvideo/frequencymonitor.cpp
index d611497fe..d6f1953f6 100644
--- a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.cpp
+++ b/examples/multimedia/video/qmlvideo/frequencymonitor.cpp
@@ -1,54 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#include "frequencymonitor.h"
+
#include <QDebug>
#include <QElapsedTimer>
#include <QString>
@@ -57,11 +11,20 @@
//#define VERBOSE_TRACE
-inline QDebug qtTrace() { return qDebug() << "[frequencymonitor]"; }
+inline QDebug qtTrace()
+{
+ return qDebug() << "[frequencymonitor]";
+}
#ifdef VERBOSE_TRACE
-inline QDebug qtVerboseTrace() { return qtTrace(); }
+inline QDebug qtVerboseTrace()
+{
+ return qtTrace();
+}
#else
-inline QNoDebug qtVerboseTrace() { return QNoDebug(); }
+inline QNoDebug qtVerboseTrace()
+{
+ return QNoDebug();
+}
#endif
static const int DefaultSamplingInterval = 100;
@@ -94,29 +57,27 @@ public:
};
FrequencyMonitorPrivate::FrequencyMonitorPrivate(FrequencyMonitor *parent)
-: QObject(parent)
-, q_ptr(parent)
-, m_active(false)
-, m_instantaneousFrequency(0)
-, m_averageTimer(new QTimer(this))
-, m_count(0)
-, m_averageFrequency(0)
-, m_traceTimer(new QTimer(this))
-, m_stalledTimer(new QTimer(this))
+ : QObject(parent),
+ q_ptr(parent),
+ m_active(false),
+ m_instantaneousFrequency(0),
+ m_averageTimer(new QTimer(this)),
+ m_count(0),
+ m_averageFrequency(0),
+ m_traceTimer(new QTimer(this)),
+ m_stalledTimer(new QTimer(this))
{
m_instantaneousElapsed.start();
- connect(m_averageTimer, &QTimer::timeout,
- this, &FrequencyMonitorPrivate::calculateAverageFrequency);
+ connect(m_averageTimer, &QTimer::timeout, this,
+ &FrequencyMonitorPrivate::calculateAverageFrequency);
if (DefaultSamplingInterval)
m_averageTimer->start(DefaultSamplingInterval);
m_averageElapsed.start();
- connect(m_traceTimer, &QTimer::timeout,
- q_ptr, &FrequencyMonitor::trace);
+ connect(m_traceTimer, &QTimer::timeout, q_ptr, &FrequencyMonitor::trace);
if (DefaultTraceInterval)
m_traceTimer->start(DefaultTraceInterval);
m_stalledTimer->setSingleShot(true);
- connect(m_stalledTimer, &QTimer::timeout,
- this, &FrequencyMonitorPrivate::stalled);
+ connect(m_stalledTimer, &QTimer::timeout, this, &FrequencyMonitorPrivate::stalled);
}
void FrequencyMonitorPrivate::calculateInstantaneousFrequency()
@@ -148,16 +109,12 @@ void FrequencyMonitorPrivate::stalled()
}
}
-FrequencyMonitor::FrequencyMonitor(QObject *parent)
-: QObject(parent)
+FrequencyMonitor::FrequencyMonitor(QObject *parent) : QObject(parent)
{
d_ptr = new FrequencyMonitorPrivate(this);
}
-FrequencyMonitor::~FrequencyMonitor()
-{
-
-}
+FrequencyMonitor::~FrequencyMonitor() = default;
QString FrequencyMonitor::label() const
{
@@ -199,13 +156,14 @@ void FrequencyMonitor::notify()
void FrequencyMonitor::trace()
{
Q_D(FrequencyMonitor);
- const QString value = QString::fromLatin1("instant %1 average %2")
- .arg(d->m_instantaneousFrequency, 0, 'f', 2)
- .arg(d->m_averageFrequency, 0, 'f', 2);
+ const QString value = QStringLiteral("instant %1 average %2")
+ .arg(d->m_instantaneousFrequency, 0, 'f', 2)
+ .arg(d->m_averageFrequency, 0, 'f', 2);
if (d->m_label.isEmpty())
qtTrace() << "FrequencyMonitor::trace" << value;
else
- qtTrace() << "FrequencyMonitor::trace" << "label" << d->m_label << value;
+ qtTrace() << "FrequencyMonitor::trace"
+ << "label" << d->m_label << value;
}
void FrequencyMonitor::setLabel(const QString &value)
@@ -255,3 +213,4 @@ void FrequencyMonitor::setTraceInterval(int value)
}
#include "frequencymonitor.moc"
+#include "moc_frequencymonitor.cpp"
diff --git a/examples/multimedia/video/qmlvideo/frequencymonitor.h b/examples/multimedia/video/qmlvideo/frequencymonitor.h
new file mode 100644
index 000000000..a1756dc88
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/frequencymonitor.h
@@ -0,0 +1,67 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef FREQUENCYMONITOR_H
+#define FREQUENCYMONITOR_H
+
+#include <QObject>
+#include <QTimer>
+
+class FrequencyMonitorPrivate;
+
+/**
+ * Class for measuring frequency of events
+ *
+ * Occurrence of the event is notified by the client via the notify() slot.
+ * On a regular interval, both an instantaneous and a rolling average
+ * event frequency are calculated.
+ */
+class FrequencyMonitor : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(FrequencyMonitor)
+ Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged)
+ Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged)
+ Q_PROPERTY(int samplingInterval READ samplingInterval WRITE setSamplingInterval NOTIFY
+ samplingIntervalChanged)
+ Q_PROPERTY(
+ int traceInterval READ traceInterval WRITE setTraceInterval NOTIFY traceIntervalChanged)
+ Q_PROPERTY(qreal instantaneousFrequency READ instantaneousFrequency NOTIFY
+ instantaneousFrequencyChanged)
+ Q_PROPERTY(qreal averageFrequency READ averageFrequency NOTIFY averageFrequencyChanged)
+
+public:
+ FrequencyMonitor(QObject *parent = nullptr);
+ ~FrequencyMonitor();
+
+ static void qmlRegisterType();
+
+ QString label() const;
+ bool active() const;
+ int samplingInterval() const;
+ int traceInterval() const;
+ qreal instantaneousFrequency() const;
+ qreal averageFrequency() const;
+
+signals:
+ void labelChanged(const QString &value);
+ void activeChanged(bool);
+ void samplingIntervalChanged(int value);
+ void traceIntervalChanged(int value);
+ void frequencyChanged();
+ void instantaneousFrequencyChanged(qreal value);
+ void averageFrequencyChanged(qreal value);
+
+public slots:
+ Q_INVOKABLE void notify();
+ Q_INVOKABLE void trace();
+ void setActive(bool value);
+ void setLabel(const QString &value);
+ void setSamplingInterval(int value);
+ void setTraceInterval(int value);
+
+private:
+ FrequencyMonitorPrivate *d_ptr;
+};
+
+#endif // FREQUENCYMONITOR_H
diff --git a/examples/multimedia/video/qmlvideo/frequencymonitor/CMakeLists.txt b/examples/multimedia/video/qmlvideo/frequencymonitor/CMakeLists.txt
new file mode 100644
index 000000000..4a205fa28
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/frequencymonitor/CMakeLists.txt
@@ -0,0 +1,30 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ message(FATAL_ERROR "This module is part of the 'qmlvideo' example, and should not be built independently.")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/qmlvideo/frequencymonitor")
+
+qt_add_qml_module(frequencymonitor
+ URI frequencymonitor
+ QML_FILES
+ "FrequencyItem.qml"
+)
+
+target_link_libraries(frequencymonitor PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+)
+
+install(TARGETS frequencymonitor
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
+ DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/multimedia/video/qmlvideo/frequencymonitor/FrequencyItem.qml b/examples/multimedia/video/qmlvideo/frequencymonitor/FrequencyItem.qml
new file mode 100644
index 000000000..49a7eea9b
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/frequencymonitor/FrequencyItem.qml
@@ -0,0 +1,67 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import FrequencyMonitor 1.0
+
+Rectangle {
+ id: root
+ property bool logging: true
+ property bool displayed: true
+ property bool enabled: logging || displayed
+ property alias active: monitor.active
+ property int samplingInterval: 500
+ property color textColor: "yellow"
+ property int textSize: 20
+ property alias label: monitor.label
+
+ border.width: 1
+ border.color: "yellow"
+ width: 5.5 * root.textSize
+ height: 3.0 * root.textSize
+ color: "black"
+ opacity: 0.5
+ radius: 10
+ visible: displayed && active
+
+ // This should ensure that the monitor is on top of all other content
+ z: 999
+
+ function notify() {
+ monitor.notify()
+ }
+
+ FrequencyMonitor {
+ id: monitor
+ samplingInterval: root.enabled ? root.samplingInterval : 0
+ onAverageFrequencyChanged: {
+ if (root.logging) trace()
+ averageFrequencyText.text = monitor.averageFrequency.toFixed(2)
+ }
+ }
+
+ Text {
+ id: labelText
+ anchors {
+ left: parent.left
+ top: parent.top
+ margins: 10
+ }
+ color: root.textColor
+ font.pixelSize: 0.6 * root.textSize
+ text: root.label
+ width: root.width - 2*anchors.margins
+ elide: Text.ElideRight
+ }
+
+ Text {
+ id: averageFrequencyText
+ anchors {
+ right: parent.right
+ bottom: parent.bottom
+ margins: 10
+ }
+ color: root.textColor
+ font.pixelSize: root.textSize
+ }
+}
diff --git a/examples/multimedia/video/qmlvideo/frequencymonitor/qmldir b/examples/multimedia/video/qmlvideo/frequencymonitor/qmldir
new file mode 100644
index 000000000..a935d2c53
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/frequencymonitor/qmldir
@@ -0,0 +1,3 @@
+module frequencymonitor
+
+FrequencyItem 1.0 FrequencyItem.qml
diff --git a/examples/multimedia/video/qmlvideo/frequencymonitordeclarative.cpp b/examples/multimedia/video/qmlvideo/frequencymonitordeclarative.cpp
new file mode 100644
index 000000000..6ed2019ff
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/frequencymonitordeclarative.cpp
@@ -0,0 +1,10 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "frequencymonitor.h"
+#include <qqml.h>
+
+void FrequencyMonitor::qmlRegisterType()
+{
+ ::qmlRegisterType<FrequencyMonitor>("FrequencyMonitor", 1, 0, "FrequencyMonitor");
+}
diff --git a/examples/multimedia/video/qmlvideo/main.cpp b/examples/multimedia/video/qmlvideo/main.cpp
index 01178acaa..94c5bfea0 100644
--- a/examples/multimedia/video/qmlvideo/main.cpp
+++ b/examples/multimedia/video/qmlvideo/main.cpp
@@ -1,82 +1,24 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-#include <QtCore/QStandardPaths>
-#include <QtCore/QString>
-#include <QtCore/QStringList>
-#include <QtQml/QQmlContext>
-#include <QtQml/QQmlEngine>
-#include <QtGui/QGuiApplication>
-#include <QtQuick/QQuickItem>
-#include <QtQuick/QQuickView>
+#include "performancemonitor.h"
#include "trace.h"
-
+#include "qmlvideo/videosingleton.h"
#ifdef PERFORMANCEMONITOR_SUPPORT
-#include "performancemonitordeclarative.h"
+# include "performancemonitordeclarative.h"
#endif
-#ifdef REQUEST_PERMISSIONS_ON_ANDROID
-#include <QtAndroid>
-
-bool requestStoragePermission() {
- using namespace QtAndroid;
-
- QString permission = QStringLiteral("android.permission.WRITE_EXTERNAL_STORAGE");
- const QHash<QString, PermissionResult> results = requestPermissionsSync(QStringList({permission}));
- if (!results.contains(permission) || results[permission] == PermissionResult::Denied) {
- qWarning() << "Couldn't get permission: " << permission;
- return false;
- }
-
- return true;
-}
+#include <QGuiApplication>
+#include <QQmlContext>
+#include <QQmlEngine>
+#include <QQuickItem>
+#include <QQuickView>
+#include <QStandardPaths>
+#include <QString>
+#include <QStringList>
+
+#if QT_CONFIG(permissions)
+ #include <QPermission>
#endif
static const QString DefaultFileName1 = "";
@@ -89,10 +31,6 @@ int main(int argc, char *argv[])
#ifdef PERFORMANCEMONITOR_SUPPORT
PerformanceMonitor::qmlRegisterTypes();
#endif
-#ifdef REQUEST_PERMISSIONS_ON_ANDROID
- if (!requestStoragePermission())
- return -1;
-#endif
QString source1, source2;
qreal volume = 0.5;
@@ -105,7 +43,7 @@ int main(int argc, char *argv[])
const QByteArray arg = args.at(i).toUtf8();
if (arg.startsWith('-')) {
if ("-volume" == arg) {
- if (i+1 < args.count())
+ if (i + 1 < args.count())
volume = 0.01 * args.at(++i).toInt();
else
qtTrace() << "Option \"-volume\" takes a value";
@@ -141,36 +79,47 @@ int main(int argc, char *argv[])
url2 = QUrl::fromLocalFile(source2);
}
+ const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation);
+ const QUrl videoPath = QUrl::fromLocalFile(moviesLocation.isEmpty() ? app.applicationDirPath()
+ : moviesLocation.front());
+
QQuickView viewer;
- viewer.setSource(QUrl("qrc:///qml/qmlvideo/main.qml"));
+ VideoSingleton* singleton = viewer.engine()->singletonInstance<VideoSingleton*>("qmlvideo", "VideoSingleton");
+ singleton->setVideoPath(videoPath);
+ singleton->setSource1(source1);
+ singleton->setSource2(source2);
+ singleton->setVolume(volume);
+ viewer.loadFromModule("qmlvideo", "Main");
QObject::connect(viewer.engine(), &QQmlEngine::quit, &viewer, &QQuickView::close);
- QQuickItem *rootObject = viewer.rootObject();
- rootObject->setProperty("source1", url1);
- rootObject->setProperty("source2", url2);
- rootObject->setProperty("volume", volume);
-
#ifdef PERFORMANCEMONITOR_SUPPORT
+ QQuickItem *rootObject = viewer.rootObject();
if (performanceMonitorState.valid) {
rootObject->setProperty("perfMonitorsLogging", performanceMonitorState.logging);
rootObject->setProperty("perfMonitorsVisible", performanceMonitorState.visible);
}
- QObject::connect(&viewer, SIGNAL(afterRendering()),
- rootObject, SLOT(qmlFramePainted()));
+ QObject::connect(&viewer, SIGNAL(afterRendering()), rootObject, SLOT(qmlFramePainted()));
#endif
- const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation);
- const QUrl videoPath =
- QUrl::fromLocalFile(moviesLocation.isEmpty() ?
- app.applicationDirPath() :
- moviesLocation.front());
- viewer.rootContext()->setContextProperty("videoPath", videoPath);
-
QMetaObject::invokeMethod(rootObject, "init");
- viewer.setMinimumSize(QSize(640, 360));
- viewer.show();
+ auto setupView = [&viewer]() {
+ viewer.setMinimumSize(QSize(640, 360));
+ viewer.show();
+ };
+
+#if QT_CONFIG(permissions)
+ QCameraPermission cameraPermission;
+ qApp->requestPermission(cameraPermission, [&setupView](const QPermission &permission) {
+ // Show UI in any case. If there is no permission, the UI will just
+ // be disabled.
+ if (permission.status() != Qt::PermissionStatus::Granted)
+ qWarning("Camera permission is not granted! Camera will not be available.");
+ setupView();
+ });
+#else
+ setupView();
+#endif
return app.exec();
}
-
diff --git a/examples/multimedia/video/qmlvideo/performancemonitor.cpp b/examples/multimedia/video/qmlvideo/performancemonitor.cpp
new file mode 100644
index 000000000..26f0fae2a
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/performancemonitor.cpp
@@ -0,0 +1,31 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "performancemonitor.h"
+
+namespace PerformanceMonitor {
+
+bool State::parseArgument(const QByteArray &arg)
+{
+ bool result = false;
+ if (arg == "-log-perf") {
+ logging = true;
+ valid = true;
+ result = true;
+ } else if (arg == "-no-log-perf") {
+ logging = false;
+ valid = true;
+ result = true;
+ } else if (arg == "-show-perf") {
+ visible = true;
+ valid = true;
+ result = true;
+ } else if (arg == "-hide-perf") {
+ visible = false;
+ valid = true;
+ result = true;
+ }
+ return result;
+}
+
+} // namespace PerformanceMonitor
diff --git a/examples/multimedia/video/qmlvideo/performancemonitor.h b/examples/multimedia/video/qmlvideo/performancemonitor.h
new file mode 100644
index 000000000..683468619
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/performancemonitor.h
@@ -0,0 +1,33 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef PERFORMANCEMONITOR_H
+#define PERFORMANCEMONITOR_H
+
+#include <QByteArray>
+
+namespace PerformanceMonitor {
+
+struct State
+{
+ State() : valid(true), logging(false), visible(true) { }
+ State(bool l, bool v) : valid(true), logging(l), visible(v) { }
+ bool operator==(const State &other) const
+ {
+ return logging == other.logging && visible == other.visible;
+ }
+ bool operator!=(const State &other) const
+ {
+ return logging != other.logging || visible != other.visible;
+ }
+
+ bool parseArgument(const QByteArray &arg);
+
+ bool valid;
+ bool logging;
+ bool visible;
+};
+
+} // namespace PerformanceMonitor
+
+#endif // PERFORMANCEMONITOR_H
diff --git a/examples/multimedia/video/qmlvideo/performancemonitor/CMakeLists.txt b/examples/multimedia/video/qmlvideo/performancemonitor/CMakeLists.txt
new file mode 100644
index 000000000..beb9e2e08
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/performancemonitor/CMakeLists.txt
@@ -0,0 +1,31 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ message(FATAL_ERROR "This module is part of the 'qmlvideo' example, and should not be built independently.")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/qmlvideo/performancemonitor")
+
+qt_add_qml_module(performancemonitor
+ URI performancemonitor
+ QML_FILES
+ "PerformanceItem.qml"
+)
+
+target_link_libraries(performancemonitor PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+)
+
+install(TARGETS performancemonitor
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
+ DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+
diff --git a/examples/multimedia/video/qmlvideo/performancemonitor/PerformanceItem.qml b/examples/multimedia/video/qmlvideo/performancemonitor/PerformanceItem.qml
new file mode 100644
index 000000000..5b501b104
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/performancemonitor/PerformanceItem.qml
@@ -0,0 +1,100 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: root
+ property bool logging: true
+ property bool displayed: true
+ property bool videoActive
+ property int margins: 5
+ property bool enabled: true
+
+ color: "transparent"
+
+ // This should ensure that the monitor is on top of all other content
+ z: 999
+
+ Column {
+ id: column
+ anchors {
+ fill: root
+ margins: 10
+ }
+ spacing: 10
+ }
+
+ QtObject {
+ id: d
+ property Item qmlFrameRateItem: null
+ property Item videoFrameRateItem: null
+ }
+
+ Connections {
+ id: videoFrameRateActiveConnections
+ ignoreUnknownSignals: true
+ function onActiveChanged() { root.videoActive = videoFrameRateActiveConnections.target.active }
+ }
+
+ states: [
+ State {
+ name: "hidden"
+ PropertyChanges {
+ root.opacity: 0
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "*"
+ to: "*"
+ NumberAnimation {
+ properties: "opacity"
+ easing.type: Easing.OutQuart
+ duration: 500
+ }
+ }
+ ]
+
+ state: enabled ? "baseState" : "hidden"
+
+ function createQmlFrameRateItem() {
+ let component = Qt.createComponent("frequencymonitor", "FrequencyItem")
+ if (component.status === Component.Ready)
+ d.qmlFrameRateItem = component.createObject(column, { label: qsTr("QML frame rate"),
+ displayed: root.displayed,
+ logging: root.logging
+ });
+ }
+
+ function createVideoFrameRateItem() {
+ let component = Qt.createComponent("frequencymonitor", "FrequencyItem")
+ if (component.status === Component.Ready)
+ d.videoFrameRateItem = component.createObject(column, { label: qsTr("Video frame rate"),
+ displayed: root.displayed,
+ logging: root.logging
+ });
+ videoFrameRateActiveConnections.target = d.videoFrameRateItem
+ }
+
+
+ function init() {
+ createQmlFrameRateItem()
+ createVideoFrameRateItem()
+ }
+
+ function videoFramePainted() {
+ d.videoFrameRateItem?.notify()
+ }
+
+ function qmlFramePainted() {
+ d.qmlFrameRateItem?.notify()
+ }
+
+ onVideoActiveChanged: {
+ if (d.videoFrameRateItem)
+ d.videoFrameRateItem.active = root.videoActive
+ }
+}
diff --git a/examples/multimedia/video/qmlvideo/performancemonitor/qmldir b/examples/multimedia/video/qmlvideo/performancemonitor/qmldir
new file mode 100644
index 000000000..636abaf99
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/performancemonitor/qmldir
@@ -0,0 +1,3 @@
+module performancemonitor
+
+PerformanceItem 1.0 PerformanceItem.qml
diff --git a/examples/multimedia/video/qmlvideo/performancemonitordeclarative.cpp b/examples/multimedia/video/qmlvideo/performancemonitordeclarative.cpp
new file mode 100644
index 000000000..a2ad1ca82
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/performancemonitordeclarative.cpp
@@ -0,0 +1,12 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "frequencymonitor.h"
+
+namespace PerformanceMonitor {
+
+void qmlRegisterTypes()
+{
+ FrequencyMonitor::qmlRegisterType();
+}
+}
diff --git a/examples/multimedia/video/qmlvideo/performancemonitordeclarative.h b/examples/multimedia/video/qmlvideo/performancemonitordeclarative.h
new file mode 100644
index 000000000..4514d5041
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/performancemonitordeclarative.h
@@ -0,0 +1,11 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef PERFORMANCEMONITORDECLARATIVE_H
+#define PERFORMANCEMONITORDECLARATIVE_H
+
+namespace PerformanceMonitor {
+void qmlRegisterTypes();
+}
+
+#endif // PERFORMANCEMONITORDECLARATIVE_H
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/Button.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/Button.qml
deleted file mode 100644
index e2d296e98..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/Button.qml
+++ /dev/null
@@ -1,90 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Item {
- id: root
-
- property string text
- property color bgColor: "#757575"
- property color bgColorSelected: "#bdbdbd"
- property color textColor: "white"
- property color textColorSelected: "black"
- property alias enabled: mouseArea.enabled
- property alias radius: bgr.radius
-
- signal clicked
-
- Rectangle {
- id: bgr
- anchors.fill: parent
- color: mouseArea.pressed ? bgColorSelected : bgColor
- radius: height / 15
-
- Text {
- id: text
- anchors.centerIn: parent
- text: root.text
- font.pixelSize: 0.4 * parent.height
- color: mouseArea.pressed ? textColorSelected : textColor
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- root.clicked()
- }
- }
- }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraBasic.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraBasic.qml
deleted file mode 100644
index c17f90162..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraBasic.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneBasic {
- contentType: "camera"
- started: true
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraDrag.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraDrag.qml
deleted file mode 100644
index 395261c1b..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraDrag.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneDrag {
- contentType: "camera"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraDummy.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraDummy.qml
deleted file mode 100644
index 6439bea16..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraDummy.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-// Item which is loaded by CameraItem if Qt Multimedia is not available
-Rectangle {
- id: root
- color: "grey"
- height: width
-
- signal fatalError
- signal sizeChanged
- signal framePainted
-
- Text {
- anchors.fill: parent
- anchors.margins: 10
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- text: "Failed to create Camera item\n\nCheck that Qt Multimedia is installed"
- verticalAlignment: Text.AlignVCenter
- wrapMode: Text.Wrap
- }
-
- onWidthChanged: height = width
- onHeightChanged: root.sizeChanged()
-
- function start() { }
- function stop() { }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraFullScreen.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraFullScreen.qml
deleted file mode 100644
index 125d18246..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraFullScreen.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneFullScreen {
- contentType: "camera"
-}
-
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraFullScreenInverted.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraFullScreenInverted.qml
deleted file mode 100644
index e7372b2c3..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraFullScreenInverted.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneFullScreenInverted {
- contentType: "camera"
-}
-
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml
deleted file mode 100644
index 9fd3f9cfa..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraItem.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 QtMultimedia 5.0
-
-VideoOutput {
- id: root
- height: width
- source: camera
-
- signal fatalError
- signal sizeChanged
-
- onHeightChanged: root.sizeChanged()
-
- Camera {
- id: camera
-
- onError: {
- if (Camera.NoError != error) {
- console.log("[qmlvideo] CameraItem.onError error " + error + " errorString " + errorString)
- root.fatalError()
- }
- }
- }
-
- function start() { camera.start() }
- function stop() { camera.stop() }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraMove.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraMove.qml
deleted file mode 100644
index 39d18cf4f..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraMove.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneMove {
- contentType: "camera"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraOverlay.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraOverlay.qml
deleted file mode 100644
index 5401a51f2..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraOverlay.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneOverlay {
- contentType: "camera"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraResize.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraResize.qml
deleted file mode 100644
index d9719659c..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraResize.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneResize {
- contentType: "camera"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraRotate.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraRotate.qml
deleted file mode 100644
index 5b02392b7..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraRotate.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneRotate {
- contentType: "camera"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraSpin.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraSpin.qml
deleted file mode 100644
index a81652e7c..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/CameraSpin.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneSpin {
- contentType: "camera"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml
deleted file mode 100644
index ffa04e200..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/Content.qml
+++ /dev/null
@@ -1,165 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- border.color: "white"
- border.width: showBorder ? 1 : 0
- color: "transparent"
- property string contentType // "camera" or "video"
- property string source
- property real volume
- property bool dummy: false
- property bool autoStart: true
- property bool started: false
- property bool showFrameRate: false
- property bool showBorder: false
-
- signal initialized
- signal error
- signal videoFramePainted
-
- Loader {
- id: contentLoader
- }
-
- Connections {
- id: framePaintedConnection
- onFramePainted: {
- if (frameRateLoader.item)
- frameRateLoader.item.notify()
- root.videoFramePainted()
- }
- ignoreUnknownSignals: true
- }
-
- Connections {
- id: errorConnection
- onFatalError: {
- console.log("[qmlvideo] Content.onFatalError")
- stop()
- root.error()
- }
- ignoreUnknownSignals: true
- }
-
- Loader {
- id: frameRateLoader
- source: root.showFrameRate ? "../frequencymonitor/FrequencyItem.qml" : ""
- onLoaded: {
- item.parent = root
- item.anchors.top = root.top
- item.anchors.right = root.right
- item.anchors.margins = 10
- }
- }
-
- onWidthChanged: {
- if (contentItem())
- contentItem().width = width
- }
-
- onHeightChanged: {
- if (contentItem())
- contentItem().height = height
- }
-
- function initialize() {
- if ("video" == contentType) {
- contentLoader.source = "VideoItem.qml"
- if (Loader.Error == contentLoader.status) {
- contentLoader.source = "VideoDummy.qml"
- dummy = true
- }
- contentLoader.item.volume = volume
- } else if ("camera" == contentType) {
- contentLoader.source = "CameraItem.qml"
- if (Loader.Error == contentLoader.status) {
- contentLoader.source = "CameraDummy.qml"
- dummy = true
- }
- } else {
- console.log("[qmlvideo] Content.initialize: error: invalid contentType")
- }
- if (contentLoader.item) {
- contentLoader.item.sizeChanged.connect(updateRootSize)
- contentLoader.item.parent = root
- contentLoader.item.width = root.width
- framePaintedConnection.target = contentLoader.item
- errorConnection.target = contentLoader.item
- if (root.autoStart)
- root.start()
- }
- root.initialized()
- }
-
- function start() {
- if (contentLoader.item) {
- if (root.contentType == "video")
- contentLoader.item.mediaSource = root.source
- contentLoader.item.start()
- root.started = true
- }
- }
-
- function stop() {
- if (contentLoader.item) {
- contentLoader.item.stop()
- if (root.contentType == "video")
- contentLoader.item.mediaSource = ""
- root.started = false
- }
- }
-
- function contentItem() { return contentLoader.item }
- function updateRootSize() { root.height = contentItem().height }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/ErrorDialog.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/ErrorDialog.qml
deleted file mode 100644
index 442eb42c1..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/ErrorDialog.qml
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- color: "transparent"
- opacity: 0.0
- property alias enabled: mouseArea.enabled
- property int dialogWidth: 300
- property int dialogHeight: 200
- state: enabled ? "on" : "baseState"
-
- states: [
- State {
- name: "on"
- PropertyChanges {
- target: root
- opacity: 1.0
- }
- }
- ]
-
- transitions: [
- Transition {
- from: "*"
- to: "*"
- NumberAnimation {
- properties: "opacity"
- easing.type: Easing.OutQuart
- duration: 500
- }
- }
- ]
-
- Rectangle {
- anchors.fill: parent
- color: "black"
- opacity: 0.75
- }
-
- Rectangle {
- anchors.centerIn: parent
- width: dialogWidth
- height: dialogHeight
- radius: 5
- color: "white"
-
- Text {
- id: text
- anchors.fill: parent
- anchors.margins: 10
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- color: "black"
- wrapMode: Text.WordWrap
- }
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: root.enabled = false
- }
-
- function show(msg) {
- text.text = "<b>Error</b><br><br>" + msg
- root.enabled = true
- }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml
deleted file mode 100644
index 3fe5a5204..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/FileBrowser.qml
+++ /dev/null
@@ -1,419 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.labs.folderlistmodel 2.0
-
-Rectangle {
- id: fileBrowser
- color: "transparent"
-
- property string folder
-
- property int itemHeight: Math.min(parent.width, parent.height) / 15
- property int buttonHeight: Math.min(parent.width, parent.height) / 12
-
- signal fileSelected(string file)
-
- function selectFile(file) {
- if (file !== "") {
- folder = loader.item.folders.folder
- fileBrowser.fileSelected(file)
- }
- loader.sourceComponent = undefined
- }
-
- Loader {
- id: loader
- }
-
- function show() {
- loader.sourceComponent = fileBrowserComponent
- loader.item.parent = fileBrowser
- loader.item.anchors.fill = fileBrowser
- loader.item.folder = fileBrowser.folder
- }
-
- Component {
- id: fileBrowserComponent
-
- Rectangle {
- id: root
- color: "black"
- property bool showFocusHighlight: false
- property variant folders: folders1
- property variant view: view1
- property alias folder: folders1.folder
- property color textColor: "white"
-
- FolderListModel {
- id: folders1
- folder: folder
- }
-
- FolderListModel {
- id: folders2
- folder: folder
- }
-
- SystemPalette {
- id: palette
- }
-
- Component {
- id: folderDelegate
-
- Rectangle {
- id: wrapper
- function launch() {
- var path = "file://";
- if (filePath.length > 2 && filePath[1] === ':') // Windows drive logic, see QUrl::fromLocalFile()
- path += '/';
- path += filePath;
- if (folders.isFolder(index))
- down(path);
- else
- fileBrowser.selectFile(path)
- }
- width: root.width
- height: folderImage.height
- color: "transparent"
-
- Rectangle {
- id: highlight
- visible: false
- anchors.fill: parent
- anchors.leftMargin: 5
- anchors.rightMargin: 5
- color: "#212121"
- }
-
- Item {
- id: folderImage
- width: itemHeight
- height: itemHeight
- Image {
- id: folderPicture
- source: "qrc:/folder.png"
- width: itemHeight * 0.9
- height: itemHeight * 0.9
- anchors.left: parent.left
- anchors.margins: 5
- visible: folders.isFolder(index)
- }
- }
-
- Text {
- id: nameText
- anchors.fill: parent;
- verticalAlignment: Text.AlignVCenter
- text: fileName
- anchors.leftMargin: itemHeight + 10
- color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : textColor
- elide: Text.ElideRight
- }
-
- MouseArea {
- id: mouseRegion
- anchors.fill: parent
- onPressed: {
- root.showFocusHighlight = false;
- wrapper.ListView.view.currentIndex = index;
- }
- onClicked: { if (folders === wrapper.ListView.view.model) launch() }
- }
-
- states: [
- State {
- name: "pressed"
- when: mouseRegion.pressed
- PropertyChanges { target: highlight; visible: true }
- PropertyChanges { target: nameText; color: palette.highlightedText }
- }
- ]
- }
- }
-
- ListView {
- id: view1
- anchors.top: titleBar.bottom
- anchors.bottom: cancelButton.top
- width: parent.width
- model: folders1
- delegate: folderDelegate
- highlight: Rectangle {
- color: "#212121"
- visible: root.showFocusHighlight && view1.count != 0
- width: view1.currentItem == null ? 0 : view1.currentItem.width
- }
- highlightMoveVelocity: 1000
- pressDelay: 100
- focus: true
- state: "current"
- states: [
- State {
- name: "current"
- PropertyChanges { target: view1; x: 0 }
- },
- State {
- name: "exitLeft"
- PropertyChanges { target: view1; x: -root.width }
- },
- State {
- name: "exitRight"
- PropertyChanges { target: view1; x: root.width }
- }
- ]
- transitions: [
- Transition {
- to: "current"
- SequentialAnimation {
- NumberAnimation { properties: "x"; duration: 250 }
- }
- },
- Transition {
- NumberAnimation { properties: "x"; duration: 250 }
- NumberAnimation { properties: "x"; duration: 250 }
- }
- ]
- Keys.onPressed: root.keyPressed(event.key)
- }
-
- ListView {
- id: view2
- anchors.top: titleBar.bottom
- anchors.bottom: parent.bottom
- x: parent.width
- width: parent.width
- model: folders2
- delegate: folderDelegate
- highlight: Rectangle {
- color: "#212121"
- visible: root.showFocusHighlight && view2.count != 0
- width: view1.currentItem == null ? 0 : view1.currentItem.width
- }
- highlightMoveVelocity: 1000
- pressDelay: 100
- states: [
- State {
- name: "current"
- PropertyChanges { target: view2; x: 0 }
- },
- State {
- name: "exitLeft"
- PropertyChanges { target: view2; x: -root.width }
- },
- State {
- name: "exitRight"
- PropertyChanges { target: view2; x: root.width }
- }
- ]
- transitions: [
- Transition {
- to: "current"
- SequentialAnimation {
- NumberAnimation { properties: "x"; duration: 250 }
- }
- },
- Transition {
- NumberAnimation { properties: "x"; duration: 250 }
- }
- ]
- Keys.onPressed: root.keyPressed(event.key)
- }
-
- Rectangle {
- width: parent.width
- height: buttonHeight + 10
- anchors.bottom: parent.bottom
- color: "black"
- }
-
- Rectangle {
- id: cancelButton
- width: parent.width
- height: buttonHeight
- color: "#212121"
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 5
- radius: buttonHeight / 15
-
- Text {
- anchors.fill: parent
- text: "Cancel"
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- verticalAlignment: Text.AlignVCenter
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: fileBrowser.selectFile("")
- }
- }
-
- Keys.onPressed: {
- root.keyPressed(event.key);
- if (event.key === Qt.Key_Return || event.key === Qt.Key_Select || event.key === Qt.Key_Right) {
- view.currentItem.launch();
- event.accepted = true;
- } else if (event.key === Qt.Key_Left) {
- up();
- }
- }
-
-
- Rectangle {
- id: titleBar
- width: parent.width
- height: buttonHeight + 10
- anchors.top: parent.top
- color: "black"
-
- Rectangle {
- width: parent.width;
- height: buttonHeight
- color: "#212121"
- anchors.margins: 5
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- radius: buttonHeight / 15
-
- Rectangle {
- id: upButton
- width: buttonHeight
- height: buttonHeight
- color: "transparent"
- Image {
- width: itemHeight
- height: itemHeight
- anchors.centerIn: parent
- source: "qrc:/up.png"
- }
- MouseArea { id: upRegion; anchors.centerIn: parent
- width: buttonHeight
- height: buttonHeight
- onClicked: up()
- }
- states: [
- State {
- name: "pressed"
- when: upRegion.pressed
- PropertyChanges { target: upButton; color: palette.highlight }
- }
- ]
- }
-
- Text {
- anchors.left: upButton.right; anchors.right: parent.right; height: parent.height
- anchors.leftMargin: 5; anchors.rightMargin: 5
- text: folders.folder
- color: "white"
- elide: Text.ElideLeft;
- horizontalAlignment: Text.AlignLeft;
- verticalAlignment: Text.AlignVCenter
- }
- }
- }
-
- function down(path) {
- if (folders == folders1) {
- view = view2
- folders = folders2;
- view1.state = "exitLeft";
- } else {
- view = view1
- folders = folders1;
- view2.state = "exitLeft";
- }
- view.x = root.width;
- view.state = "current";
- view.focus = true;
- folders.folder = path;
- }
-
- function up() {
- var path = folders.parentFolder;
- if (path.toString().length === 0 || path.toString() === 'file:')
- return;
- if (folders == folders1) {
- view = view2
- folders = folders2;
- view1.state = "exitRight";
- } else {
- view = view1
- folders = folders1;
- view2.state = "exitRight";
- }
- view.x = -root.width;
- view.state = "current";
- view.focus = true;
- folders.folder = path;
- }
-
- function keyPressed(key) {
- switch (key) {
- case Qt.Key_Up:
- case Qt.Key_Down:
- case Qt.Key_Left:
- case Qt.Key_Right:
- root.showFocusHighlight = true;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/Scene.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/Scene.qml
deleted file mode 100644
index 4f98241a6..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/Scene.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- color: "black"
- property alias buttonHeight: closeButton.height
- property string source1
- property string source2
- property int contentWidth: parent.width / 2
- property real volume: 0.25
- property int margins: 5
- property QtObject content
-
- signal close
- signal videoFramePainted
-
- Button {
- id: closeButton
- anchors {
- top: parent.top
- right: parent.right
- margins: root.margins
- }
- width: Math.max(parent.width, parent.height) / 12
- height: Math.min(parent.width, parent.height) / 12
- z: 2.0
- bgColor: "#212121"
- bgColorSelected: "#757575"
- textColorSelected: "white"
- text: "Back"
- onClicked: root.close()
- }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneBasic.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneBasic.qml
deleted file mode 100644
index 6c9c3ae2a..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneBasic.qml
+++ /dev/null
@@ -1,94 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property string contentType
- property bool autoStart: false
- property bool started: false
-
- Content {
- id: content
- autoStart: parent.autoStart
- started: parent.started
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: parent.contentType
- source: parent.source1
- volume: parent.volume
- onVideoFramePainted: root.videoFramePainted()
- }
-
- Text {
- anchors {
- horizontalCenter: parent.horizontalCenter
- bottom: parent.bottom
- margins: 20
- }
- text: content.started ? "Tap the screen to stop content"
- : "Tap the screen to start content"
- color: "#e0e0e0"
- z: 2.0
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (content.started)
- content.stop()
- else
- content.start()
- }
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneDrag.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneDrag.qml
deleted file mode 100644
index 0c7444e02..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneDrag.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property int margin: 20
- property string contentType
-
- Image {
- id: background
- source: "qrc:/images/leaves.jpg"
- x: (parent.width - width) / 2
- y: (parent.height - height) / 2
-
- Content {
- id: content
- anchors.centerIn: parent
- width: root.contentWidth
- contentType: root.contentType
- source: root.source1
- volume: root.volume
- onVideoFramePainted: root.videoFramePainted()
- }
- }
-
- MouseArea {
- anchors.fill: parent
- drag.target: background
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneFullScreen.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneFullScreen.qml
deleted file mode 100644
index 2ce10ce39..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneFullScreen.qml
+++ /dev/null
@@ -1,112 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property string contentType
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: root.contentType
- source: parent.source1
- volume: parent.volume
- state: "left"
-
- states: [
- State {
- name: "fullScreen"
- PropertyChanges { target: content; width: content.parent.width }
- PropertyChanges { target: content; height: content.parent.height }
- }
- ]
-
- transitions: [
- Transition {
- ParallelAnimation {
- PropertyAnimation {
- property: "width"
- easing.type: Easing.Linear
- duration: 250
- }
- PropertyAnimation {
- property: "height"
- easing.type: Easing.Linear
- duration: 250
- }
- }
- }
- ]
-
- MouseArea {
- anchors.fill: parent
- onClicked: content.state = (content.state == "fullScreen") ? "baseState" : "fullScreen"
- }
-
- onVideoFramePainted: root.videoFramePainted()
- }
-
- Text {
- anchors {
- horizontalCenter: parent.horizontalCenter
- bottom: parent.bottom
- margins: 20
- }
- text: "Tap on the content to toggle full-screen mode"
- color: "#e0e0e0"
- z: 2.0
- }
-
- Component.onCompleted: root.content = content
-}
-
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneFullScreenInverted.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneFullScreenInverted.qml
deleted file mode 100644
index 7e7eb7039..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneFullScreenInverted.qml
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property string contentType
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.width
- height: parent.height
- contentType: root.contentType
- source: parent.source1
- volume: parent.volume
- state: "left"
-
- states: [
- State {
- name: "nonFullScreen"
- PropertyChanges { target: content; width: content.parent.contentWidth }
- }
- ]
-
- transitions: [
- Transition {
- ParallelAnimation {
- PropertyAnimation {
- property: "width"
- easing.type: Easing.Linear
- duration: 250
- }
- PropertyAnimation {
- property: "height"
- easing.type: Easing.Linear
- duration: 250
- }
- }
- }
- ]
-
- MouseArea {
- anchors.fill: parent
- onClicked: content.state = (content.state == "nonFullScreen") ? "baseState" : "nonFullScreen"
- }
-
- onVideoFramePainted: root.videoFramePainted()
-
- onInitialized: {
- width = parent.width
- height = parent.height
- }
- }
-
- Text {
- anchors {
- horizontalCenter: parent.horizontalCenter
- bottom: parent.bottom
- margins: 20
- }
- text: "Tap on the content to toggle full-screen mode"
- color: "#e0e0e0"
- z: 2.0
- }
-
- Component.onCompleted: root.content = content
-}
-
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneMove.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneMove.qml
deleted file mode 100644
index adf414daa..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneMove.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property int margin: 20
- property string contentType
-
- Content {
- id: content
- anchors.verticalCenter: parent.verticalCenter
- width: parent.contentWidth
- contentType: root.contentType
- source: parent.source1
- volume: parent.volume
-
- SequentialAnimation on x {
- id: animation
- loops: Animation.Infinite
- property int from: margin
- property int to: 100
- property int duration: 1500
- running: false
- PropertyAnimation {
- from: animation.from
- to: animation.to
- duration: animation.duration
- easing.type: Easing.InOutCubic
- }
- PropertyAnimation {
- from: animation.to
- to: animation.from
- duration: animation.duration
- easing.type: Easing.InOutCubic
- }
- }
-
- onVideoFramePainted: root.videoFramePainted()
- }
-
- onWidthChanged: {
- animation.to = root.width - content.width - margin
- animation.start()
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneOverlay.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneOverlay.qml
deleted file mode 100644
index b3f7350eb..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneOverlay.qml
+++ /dev/null
@@ -1,130 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property int margin: 20
- property string contentType
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: root.contentType
- source: parent.source1
- volume: parent.volume
- onVideoFramePainted: root.videoFramePainted()
- }
-
- Rectangle {
- id: overlay
- y: 0.5 * parent.height
- width: content.width
- height: content.height
- color: "#e0e0e0"
- opacity: 0.5
-
- SequentialAnimation on x {
- id: xAnimation
- loops: Animation.Infinite
- property int from: margin
- property int to: 100
- property int duration: 1500
- running: false
- PropertyAnimation {
- from: xAnimation.from
- to: xAnimation.to
- duration: xAnimation.duration
- easing.type: Easing.InOutCubic
- }
- PropertyAnimation {
- from: xAnimation.to
- to: xAnimation.from
- duration: xAnimation.duration
- easing.type: Easing.InOutCubic
- }
- }
-
- SequentialAnimation on y {
- id: yAnimation
- loops: Animation.Infinite
- property int from: margin
- property int to: 180
- property int duration: 1500
- running: false
- PropertyAnimation {
- from: yAnimation.from
- to: yAnimation.to
- duration: yAnimation.duration
- easing.type: Easing.InOutCubic
- }
- PropertyAnimation {
- from: yAnimation.to
- to: yAnimation.from
- duration: yAnimation.duration
- easing.type: Easing.InOutCubic
- }
- }
- }
-
- onWidthChanged: {
- xAnimation.to = root.width - content.width - margin
- xAnimation.start()
- }
-
- onHeightChanged: {
- //yAnimation.to = root.height - content.height - margin
- yAnimation.start()
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneResize.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneResize.qml
deleted file mode 100644
index 778d81dd5..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneResize.qml
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property string contentType
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: root.contentType
- source: parent.source1
- volume: parent.volume
-
- SequentialAnimation on scale {
- id: animation
- loops: Animation.Infinite
- property int duration: 1500
- running: true
- PropertyAnimation {
- from: 1.5
- to: 0.5
- duration: animation.duration
- easing.type: Easing.InOutCubic
- }
- PropertyAnimation {
- from: 0.5
- to: 1.5
- duration: animation.duration
- easing.type: Easing.InOutCubic
- }
- }
-
- onVideoFramePainted: root.videoFramePainted()
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneRotate.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneRotate.qml
deleted file mode 100644
index f9549fdca..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneRotate.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property int margin: 20
- property int delta: 30
- property string contentType
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: root.contentType
- source: parent.source1
- volume: parent.volume
- onVideoFramePainted: root.videoFramePainted()
- }
-
- Button {
- id: rotatePositiveButton
- anchors {
- right: parent.right
- bottom: rotateNegativeButton.top
- margins: parent.margins
- }
- width: Math.max(parent.width, parent.height) / 10
- height: root.buttonHeight
- text: "Rotate +" + delta
- onClicked: content.rotation = content.rotation + delta
- }
-
- Button {
- id: rotateNegativeButton
- anchors {
- right: parent.right
- verticalCenter: parent.verticalCenter
- margins: parent.margins
- }
- width: Math.max(parent.width, parent.height) / 10
- height: root.buttonHeight
- text: "Rotate -" + delta
- onClicked: content.rotation = content.rotation - delta
- }
-
- Button {
- id: rotateValueButton
- anchors {
- left: parent.left
- verticalCenter: parent.verticalCenter
- margins: parent.margins
- }
- width: Math.max(parent.width, parent.height) / 25
- height: root.buttonHeight
- enabled: false
- text: content.rotation % 360
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneSelectionPanel.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneSelectionPanel.qml
deleted file mode 100644
index e36fe6045..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneSelectionPanel.qml
+++ /dev/null
@@ -1,151 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- property int itemHeight: 25
- property string sceneSource: ""
-
- ListModel {
- id: videolist
- ListElement { name: "Multi"; source: "SceneMulti.qml" }
- ListElement { name: "Video"; source: "VideoBasic.qml" }
- ListElement { name: "Drag"; source: "VideoDrag.qml" }
- ListElement { name: "Fillmode"; source: "VideoFillMode.qml" }
- ListElement { name: "Fullscreen"; source: "VideoFullScreen.qml" }
- ListElement { name: "Fullscreen-inverted"; source: "VideoFullScreenInverted.qml" }
- ListElement { name: "Metadata"; source: "VideoMetadata.qml" }
- ListElement { name: "Move"; source: "VideoMove.qml" }
- ListElement { name: "Overlay"; source: "VideoOverlay.qml" }
- ListElement { name: "Playback Rate"; source: "VideoPlaybackRate.qml" }
- ListElement { name: "Resize"; source: "VideoResize.qml" }
- ListElement { name: "Rotate"; source: "VideoRotate.qml" }
- ListElement { name: "Spin"; source: "VideoSpin.qml" }
- ListElement { name: "Seek"; source: "VideoSeek.qml" }
- }
-
- ListModel {
- id: cameralist
- ListElement { name: "Camera"; source: "CameraBasic.qml" }
- ListElement { name: "Drag"; source: "CameraDrag.qml" }
- ListElement { name: "Fullscreen"; source: "CameraFullScreen.qml" }
- ListElement { name: "Fullscreen-inverted"; source: "CameraFullScreenInverted.qml" }
- ListElement { name: "Move"; source: "CameraMove.qml" }
- ListElement { name: "Overlay"; source: "CameraOverlay.qml" }
- ListElement { name: "Resize"; source: "CameraResize.qml" }
- ListElement { name: "Rotate"; source: "CameraRotate.qml" }
- ListElement { name: "Spin"; source: "CameraSpin.qml" }
- }
-
- Component {
- id: leftDelegate
- Item {
- width: root.width / 2
- height: 0.8 * itemHeight
-
- Button {
- anchors.fill: parent
- anchors.margins: 5
- anchors.rightMargin: 2.5
- anchors.bottomMargin: 0
- text: name
- onClicked: root.sceneSource = source
- }
- }
- }
-
- Component {
- id: rightDelegate
- Item {
- width: root.width / 2
- height: 0.8 * itemHeight
-
- Button {
- anchors.fill: parent
- anchors.margins: 5
- anchors.leftMargin: 2.5
- anchors.bottomMargin: 0
- text: name
- onClicked: root.sceneSource = source
- }
- }
- }
-
- Flickable {
- anchors.fill: parent
- contentHeight: (itemHeight * videolist.count) + 10
- clip: true
-
- Row {
- id: layout
- anchors {
- fill: parent
- topMargin: 5
- bottomMargin: 5
- }
-
- Column {
- Repeater {
- model: videolist
- delegate: leftDelegate
- }
- }
-
- Column {
- Repeater {
- model: cameralist
- delegate: rightDelegate
- }
- }
- }
- }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneSpin.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneSpin.qml
deleted file mode 100644
index 925b92566..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneSpin.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property int margin: 20
- property string contentType
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: root.contentType
- source: parent.source1
- volume: parent.volume
-
- PropertyAnimation on rotation {
- id: animation
- loops: Animation.Infinite
- running: true
- from: 0
- to: 360
- duration: 3000
- easing.type: Easing.Linear
- }
-
- onVideoFramePainted: root.videoFramePainted()
- }
-
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoBasic.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoBasic.qml
deleted file mode 100644
index 09f890670..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoBasic.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneBasic {
- contentType: "video"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoDrag.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoDrag.qml
deleted file mode 100644
index b24bb4517..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoDrag.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneDrag {
- contentType: "video"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoDummy.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoDummy.qml
deleted file mode 100644
index 371173973..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoDummy.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-// Item which is loaded by VideoItem if Qt Multimedia is not available
-Rectangle {
- id: root
- color: "grey"
- height: width
- property int duration: 0
- property int position: 0
- property string source
- property real volume: 1.0
- property real playbackRate: 1.0
-
- signal fatalError
- signal sizeChanged
- signal framePainted
-
- Text {
- anchors.fill: parent
- anchors.margins: 10
- color: "white"
- horizontalAlignment: Text.AlignHCenter
- text: "Failed to create Video item\n\nCheck that Qt Multimedia is installed"
- verticalAlignment: Text.AlignVCenter
- wrapMode: Text.Wrap
- }
-
- onWidthChanged: height = width
- onHeightChanged: root.sizeChanged()
-
- function start() { }
- function stop() { }
- function seek() { }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml
deleted file mode 100644
index 68157584e..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFillMode.qml
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 QtMultimedia 5.0
-
-Scene {
- id: root
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: "video"
- source: parent.source1
- volume: parent.volume
- onVideoFramePainted: root.videoFramePainted()
- }
-
- Button {
- id: button
- anchors {
- right: parent.right
- verticalCenter: parent.verticalCenter
- margins: parent.margins
- }
- width: Math.max(parent.width, parent.height) / 5
- height: root.buttonHeight
- text: "PreserveAspectFit"
- onClicked: {
- if (!content.dummy) {
- var video = content.contentItem()
- if (video.fillMode === VideoOutput.Stretch) {
- video.fillMode = VideoOutput.PreserveAspectFit
- text = "PreserveAspectFit"
- } else if (video.fillMode === VideoOutput.PreserveAspectFit) {
- video.fillMode = VideoOutput.PreserveAspectCrop
- text = "PreserveAspectCrop"
- } else {
- video.fillMode = VideoOutput.Stretch
- text = "Stretch"
- }
- }
- }
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFullScreen.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFullScreen.qml
deleted file mode 100644
index 480d6824d..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFullScreen.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneFullScreen {
- contentType: "video"
-}
-
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFullScreenInverted.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFullScreenInverted.qml
deleted file mode 100644
index c65c33872..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoFullScreenInverted.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneFullScreenInverted {
- contentType: "video"
-}
-
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml
deleted file mode 100644
index 8372acb7e..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoItem.qml
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 QtMultimedia 5.0
-
-VideoOutput {
- id: root
- height: width
- source: mediaPlayer
-
- property alias duration: mediaPlayer.duration
- property alias mediaSource: mediaPlayer.source
- property alias metaData: mediaPlayer.metaData
- property alias playbackRate: mediaPlayer.playbackRate
- property alias position: mediaPlayer.position
- property alias volume: mediaPlayer.volume
-
- signal sizeChanged
- signal fatalError
-
- onHeightChanged: root.sizeChanged()
-
- MediaPlayer {
- id: mediaPlayer
- autoLoad: false
- loops: Audio.Infinite
-
- onError: {
- if (MediaPlayer.NoError != error) {
- console.log("[qmlvideo] VideoItem.onError error " + error + " errorString " + errorString)
- root.fatalError()
- }
- }
- }
-
- function start() { mediaPlayer.play() }
- function stop() { mediaPlayer.stop() }
- function seek(position) { mediaPlayer.seek(position); }
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoMetadata.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoMetadata.qml
deleted file mode 100644
index b9672f1c5..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoMetadata.qml
+++ /dev/null
@@ -1,135 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property string contentType: "video"
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: "video"
- source: parent.source1
- volume: parent.volume
- onInitialized: {
- if (!dummy)
- metadata.createObject(root)
- }
- onVideoFramePainted: root.videoFramePainted()
- }
-
- Component {
- id: metadata
- Column {
- anchors.fill: parent
- Text {
- color: "#e0e0e0"
- text: "Title:" + content.contentItem().metaData.title
- }
- Text {
- color: "#e0e0e0"
- text: "Size:" + content.contentItem().metaData.size
- }
- Text {
- color: "#e0e0e0"
- text: "Resolution:" + content.contentItem().metaData.resolution
- }
- Text {
- color: "#e0e0e0"
- text: "Media type:" + content.contentItem().metaData.mediaType
- }
- Text {
- color: "#e0e0e0"
- text: "Video codec:" + content.contentItem().metaData.videoCodec
- }
- Text {
- color: "#e0e0e0"
- text: "Video bit rate:" + content.contentItem().metaData.videoBitRate
- }
- Text {
- color: "#e0e0e0"
- text: "Video frame rate:" +content.contentItem().metaData.videoFrameRate
- }
- Text {
- color: "#e0e0e0"
- text: "Audio codec:" + content.contentItem().metaData.audioCodec
- }
- Text {
- color: "#e0e0e0"
- text: "Audio bit rate:" + content.contentItem().metaData.audioBitRate
- }
- Text {
- color: "#e0e0e0"
- text: "Date:" + content.contentItem().metaData.date
- }
- Text {
- color: "#e0e0e0"
- text: "Description:" + content.contentItem().metaData.description
- }
- Text {
- color: "#e0e0e0"
- text: "Copyright:" + content.contentItem().metaData.copyright
- }
- Text {
- color: "#e0e0e0"
- text: "Seekable:" + content.contentItem().metaData.seekable
- }
- Text {
- color: "#e0e0e0"
- text: "Orientation:" + content.contentItem().metaData.orientation
- }
- }
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoMove.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoMove.qml
deleted file mode 100644
index 56e3a96b9..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoMove.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneMove {
- contentType: "video"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoOverlay.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoOverlay.qml
deleted file mode 100644
index 4313a33db..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoOverlay.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneOverlay {
- contentType: "video"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoPlaybackRate.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoPlaybackRate.qml
deleted file mode 100644
index 80a12d3db..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoPlaybackRate.qml
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property int margin: 20
- property real delta: 0.1
- property string contentType: "video"
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: "video"
- source: parent.source1
- volume: parent.volume
- onVideoFramePainted: root.videoFramePainted()
- }
-
- Button {
- id: increaseButton
- anchors {
- right: parent.right
- bottom: decreaseButton.top
- margins: parent.margins
- }
- width: Math.max(parent.width, parent.height) / 10
- height: root.buttonHeight
- text: "Increase"
- onClicked: {
- var video = content.contentItem()
- video.playbackRate += delta
- }
- }
-
- Button {
- id: decreaseButton
- anchors {
- right: parent.right
- verticalCenter: parent.verticalCenter
- margins: parent.margins
- }
- width: Math.max(parent.width, parent.height) / 10
- height: root.buttonHeight
- text: "Decrease"
- onClicked: {
- var video = content.contentItem()
- video.playbackRate -= delta
- }
- }
-
- Button {
- id: valueButton
- anchors {
- left: parent.left
- verticalCenter: parent.verticalCenter
- margins: parent.margins
- }
- width: Math.max(parent.width, parent.height) / 25
- height: root.buttonHeight
- enabled: false
- text: Math.round(10 * content.contentItem().playbackRate) / 10
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoResize.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoResize.qml
deleted file mode 100644
index f83465f48..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoResize.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneResize {
- contentType: "video"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoRotate.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoRotate.qml
deleted file mode 100644
index 0eb198d20..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoRotate.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneRotate {
- contentType: "video"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoSeek.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoSeek.qml
deleted file mode 100644
index 8e3575920..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoSeek.qml
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Scene {
- id: root
- property string contentType: "video"
- contentWidth: parent.width
-
- Content {
- id: content
- anchors.centerIn: parent
- width: parent.contentWidth
- contentType: "video"
- source: parent.source1
- volume: parent.volume
- onVideoFramePainted: root.videoFramePainted()
- }
-
- SeekControl {
- anchors {
- left: parent.left
- right: parent.right
- margins: 10
- bottom: parent.bottom
- }
- duration: content.contentItem() ? content.contentItem().duration : 0
- playPosition: content.contentItem() ? content.contentItem().position : 0
- onSeekPositionChanged: content.contentItem().seek(seekPosition);
- }
-
- Component.onCompleted: root.content = content
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoSpin.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoSpin.qml
deleted file mode 100644
index cb46797f6..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/VideoSpin.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-SceneSpin {
- contentType: "video"
-}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml b/examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml
deleted file mode 100644
index 43f827e97..000000000
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/main.qml
+++ /dev/null
@@ -1,284 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- anchors.fill: parent
- color: "black"
-
- property string source1
- property string source2
- property color bgColor: "black"
- property real volume: 0.25
- property bool perfMonitorsLogging: false
- property bool perfMonitorsVisible: false
-
- QtObject {
- id: d
- property int itemHeight: root.height > root.width ? root.width / 10 : root.height / 10
- property int buttonHeight: 0.8 * itemHeight
- property int margins: 5
- }
-
- Loader {
- id: performanceLoader
-
- Connections {
- target: inner
- onVisibleChanged:
- if (performanceLoader.item)
- performanceLoader.item.enabled = !inner.visible
- ignoreUnknownSignals: true
- }
-
- function init() {
- var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible
- source = enabled ? "../performancemonitor/PerformanceItem.qml" : ""
- }
-
- onLoaded: {
- item.parent = root
- item.anchors.fill = root
- item.logging = root.perfMonitorsLogging
- item.displayed = root.perfMonitorsVisible
- item.enabled = false
- item.init()
- }
- }
-
- Rectangle {
- id: inner
- anchors.fill: parent
- color: root.bgColor
-
- Button {
- id: openFile1Button
- anchors {
- top: parent.top
- left: parent.left
- right: exitButton.left
- margins: d.margins
- }
- bgColor: "#212121"
- bgColorSelected: "#757575"
- textColorSelected: "white"
- height: d.buttonHeight
- text: (root.source1 == "") ? "Select file 1" : root.source1
- onClicked: fileBrowser1.show()
- }
-
- Button {
- id: openFile2Button
- anchors {
- top: openFile1Button.bottom
- left: parent.left
- right: exitButton.left
- margins: d.margins
- }
- bgColor: "#212121"
- bgColorSelected: "#757575"
- textColorSelected: "white"
- height: d.buttonHeight
- text: (root.source2 == "") ? "Select file 2" : root.source2
- onClicked: fileBrowser2.show()
- }
-
- Button {
- id: exitButton
- anchors {
- top: parent.top
- right: parent.right
- margins: d.margins
- }
- bgColor: "#212121"
- bgColorSelected: "#757575"
- textColorSelected: "white"
- width: parent.width / 10
- height: d.buttonHeight
- text: "Exit"
- onClicked: Qt.quit()
- }
-
- Row {
- id: modes
- anchors.top: openFile2Button.bottom
- anchors.margins: 0
- anchors.topMargin: 5
- Button {
- width: root.width / 2
- height: 0.8 * d.itemHeight
- bgColor: "#212121"
- radius: 0
- text: "Video Modes"
- enabled: false
- }
- Button {
- width: root.width / 2
- height: 0.8 * d.itemHeight
- bgColor: "#212121"
- radius: 0
- text: "Camera Modes"
- enabled: false
- }
- }
-
- Rectangle {
- id: divider
- height: 1
- width: parent.width
- color: "black"
- anchors.top: modes.bottom
- }
-
- SceneSelectionPanel {
- id: sceneSelectionPanel
- itemHeight: d.itemHeight
- color: "#212121"
- anchors {
- top: divider.bottom
- left: parent.left
- right: parent.right
- bottom: parent.bottom
- }
- radius: 0
- onSceneSourceChanged: {
- sceneLoader.source = sceneSource
- var scene = null
- var innerVisible = true
- if (sceneSource == "") {
- if (performanceLoader.item)
- performanceLoader.item.videoActive = false
- } else {
- scene = sceneLoader.item
- if (scene) {
- if (scene.contentType === "video" && source1 === "") {
- errorDialog.show("You must first select a video file")
- sceneSource = ""
- } else {
- scene.parent = root
- scene.color = root.bgColor
- scene.buttonHeight = d.buttonHeight
- scene.source1 = source1
- scene.source2 = source2
- scene.volume = volume
- scene.anchors.fill = root
- scene.close.connect(closeScene)
- scene.content.initialize()
- innerVisible = false
- }
- }
- }
- videoFramePaintedConnection.target = scene
- inner.visible = innerVisible
- }
- }
- }
-
- Loader {
- id: sceneLoader
- }
-
- Connections {
- id: videoFramePaintedConnection
- onVideoFramePainted: {
- if (performanceLoader.item)
- performanceLoader.item.videoFramePainted()
- }
- ignoreUnknownSignals: true
- }
-
- FileBrowser {
- id: fileBrowser1
- anchors.fill: root
- onFolderChanged: fileBrowser2.folder = folder
- Component.onCompleted: fileSelected.connect(root.openFile1)
- }
-
- FileBrowser {
- id: fileBrowser2
- anchors.fill: root
- onFolderChanged: fileBrowser1.folder = folder
- Component.onCompleted: fileSelected.connect(root.openFile2)
- }
-
- function openFile1(path) {
- root.source1 = path
- }
-
- function openFile2(path) {
- root.source2 = path
- }
-
- ErrorDialog {
- id: errorDialog
- anchors.fill: root
- dialogWidth: d.itemHeight * 5
- dialogHeight: d.itemHeight * 3
- enabled: false
- }
-
- // Called from main() once root properties have been set
- function init() {
- performanceLoader.init()
- fileBrowser1.folder = videoPath
- fileBrowser2.folder = videoPath
- }
-
- function qmlFramePainted() {
- if (performanceLoader.item)
- performanceLoader.item.qmlFramePainted()
- }
-
- function closeScene() {
- sceneSelectionPanel.sceneSource = ""
- }
-}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo.pro b/examples/multimedia/video/qmlvideo/qmlvideo.pro
index dbd3a42a1..b61339264 100644
--- a/examples/multimedia/video/qmlvideo/qmlvideo.pro
+++ b/examples/multimedia/video/qmlvideo/qmlvideo.pro
@@ -7,15 +7,88 @@ android: qtHaveModule(androidextras) {
DEFINES += REQUEST_PERMISSIONS_ON_ANDROID
}
-LOCAL_SOURCES = main.cpp
-LOCAL_HEADERS = trace.h
+DEFINES += \
+ FREQUENCYMONITOR_SUPPORT \
+ PERFORMANCEMONITOR_SUPPORT
-SOURCES += $$LOCAL_SOURCES
-HEADERS += $$LOCAL_HEADERS
-RESOURCES += qmlvideo.qrc
+SOURCES += \
+ frequencymonitor.cpp \
+ frequencymonitordeclarative.cpp \
+ main.cpp \
+ performancemonitor.cpp \
+ performancemonitordeclarative.cpp \
+ qmlvideo/videosingleton.cpp
-SNIPPETS_PATH = ../snippets
-include($$SNIPPETS_PATH/performancemonitor/performancemonitordeclarative.pri)
+INCLUDEPATH += qmlvideo
+
+DEFINES += QMLVIDEO_LIB
+
+HEADERS += \
+ frequencymonitor.h \
+ performancemonitor.h \
+ performancemonitordeclarative.h \
+ trace.h \
+ qmlvideo/videosingleton.h
+
+resources.files = \
+ frequencymonitor/FrequencyItem.qml \
+ frequencymonitor/qmldir \
+ performancemonitor/PerformanceItem.qml \
+ performancemonitor/qmldir \
+ qmlvideo/CameraBasic.qml \
+ qmlvideo/CameraDrag.qml \
+ qmlvideo/CameraDummy.qml \
+ qmlvideo/CameraFullScreen.qml \
+ qmlvideo/CameraFullScreenInverted.qml \
+ qmlvideo/CameraItem.qml \
+ qmlvideo/CameraMove.qml \
+ qmlvideo/CameraOverlay.qml \
+ qmlvideo/CameraResize.qml \
+ qmlvideo/CameraRotate.qml \
+ qmlvideo/CameraSpin.qml \
+ qmlvideo/Content.qml \
+ qmlvideo/ErrorDialog.qml \
+ qmlvideo/Main.qml \
+ qmlvideo/Scene.qml \
+ qmlvideo/SceneBasic.qml \
+ qmlvideo/SceneDrag.qml \
+ qmlvideo/SceneFullScreen.qml \
+ qmlvideo/SceneFullScreenInverted.qml \
+ qmlvideo/SceneMove.qml \
+ qmlvideo/SceneMulti.qml \
+ qmlvideo/SceneOverlay.qml \
+ qmlvideo/SceneResize.qml \
+ qmlvideo/SceneRotate.qml \
+ qmlvideo/SceneSelectionPanel.qml \
+ qmlvideo/SceneSpin.qml \
+ qmlvideo/SeekControl.qml \
+ qmlvideo/VideoBasic.qml \
+ qmlvideo/VideoDrag.qml \
+ qmlvideo/VideoDummy.qml \
+ qmlvideo/VideoFillMode.qml \
+ qmlvideo/VideoFullScreen.qml \
+ qmlvideo/VideoFullScreenInverted.qml \
+ qmlvideo/VideoItem.qml \
+ qmlvideo/VideoMetadata.qml \
+ qmlvideo/VideoMove.qml \
+ qmlvideo/VideoOverlay.qml \
+ qmlvideo/VideoPlaybackRate.qml \
+ qmlvideo/VideoResize.qml \
+ qmlvideo/VideoRotate.qml \
+ qmlvideo/VideoSeek.qml \
+ qmlvideo/VideoSpin.qml \
+ qmlvideo/images/folder.png \
+ qmlvideo/images/leaves.jpg \
+ qmlvideo/images/up.png \
+ qmlvideo/qmldir
+
+resources.prefix = /qt/qml/
+
+RESOURCES += resources
+
+CONFIG += qmltypes
+QML_IMPORT_NAME = qmlvideo
+QML_IMPORT_MAJOR_VERSION = 1
target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/video/qmlvideo
INSTALLS += target
@@ -23,3 +96,4 @@ INSTALLS += target
EXAMPLE_FILES += \
qmlvideo.png \
qmlvideo.svg
+
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo.qrc b/examples/multimedia/video/qmlvideo/qmlvideo.qrc
deleted file mode 100644
index 6418215d0..000000000
--- a/examples/multimedia/video/qmlvideo/qmlvideo.qrc
+++ /dev/null
@@ -1,51 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file alias="leaves.jpg">images/leaves.jpg</file>
- <file alias="folder.png">images/folder.png</file>
- <file alias="up.png">images/up.png</file>
- <file>qml/qmlvideo/Button.qml</file>
- <file>qml/qmlvideo/CameraBasic.qml</file>
- <file>qml/qmlvideo/CameraDrag.qml</file>
- <file>qml/qmlvideo/CameraDummy.qml</file>
- <file>qml/qmlvideo/CameraFullScreen.qml</file>
- <file>qml/qmlvideo/CameraFullScreenInverted.qml</file>
- <file>qml/qmlvideo/CameraItem.qml</file>
- <file>qml/qmlvideo/CameraMove.qml</file>
- <file>qml/qmlvideo/CameraOverlay.qml</file>
- <file>qml/qmlvideo/CameraResize.qml</file>
- <file>qml/qmlvideo/CameraRotate.qml</file>
- <file>qml/qmlvideo/CameraSpin.qml</file>
- <file>qml/qmlvideo/Content.qml</file>
- <file>qml/qmlvideo/ErrorDialog.qml</file>
- <file>qml/qmlvideo/FileBrowser.qml</file>
- <file>qml/qmlvideo/main.qml</file>
- <file>qml/qmlvideo/Scene.qml</file>
- <file>qml/qmlvideo/SceneBasic.qml</file>
- <file>qml/qmlvideo/SceneDrag.qml</file>
- <file>qml/qmlvideo/SceneFullScreen.qml</file>
- <file>qml/qmlvideo/SceneFullScreenInverted.qml</file>
- <file>qml/qmlvideo/SceneMove.qml</file>
- <file>qml/qmlvideo/SceneMulti.qml</file>
- <file>qml/qmlvideo/SceneOverlay.qml</file>
- <file>qml/qmlvideo/SceneResize.qml</file>
- <file>qml/qmlvideo/SceneRotate.qml</file>
- <file>qml/qmlvideo/SceneSelectionPanel.qml</file>
- <file>qml/qmlvideo/SceneSpin.qml</file>
- <file>qml/qmlvideo/SeekControl.qml</file>
- <file>qml/qmlvideo/VideoBasic.qml</file>
- <file>qml/qmlvideo/VideoDrag.qml</file>
- <file>qml/qmlvideo/VideoDummy.qml</file>
- <file>qml/qmlvideo/VideoFillMode.qml</file>
- <file>qml/qmlvideo/VideoFullScreen.qml</file>
- <file>qml/qmlvideo/VideoFullScreenInverted.qml</file>
- <file>qml/qmlvideo/VideoItem.qml</file>
- <file>qml/qmlvideo/VideoMetadata.qml</file>
- <file>qml/qmlvideo/VideoMove.qml</file>
- <file>qml/qmlvideo/VideoOverlay.qml</file>
- <file>qml/qmlvideo/VideoPlaybackRate.qml</file>
- <file>qml/qmlvideo/VideoResize.qml</file>
- <file>qml/qmlvideo/VideoRotate.qml</file>
- <file>qml/qmlvideo/VideoSeek.qml</file>
- <file>qml/qmlvideo/VideoSpin.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CMakeLists.txt b/examples/multimedia/video/qmlvideo/qmlvideo/CMakeLists.txt
new file mode 100644
index 000000000..84a65710e
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CMakeLists.txt
@@ -0,0 +1,81 @@
+# Copyright (C) 2023 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
+ message(FATAL_ERROR "This module is part of the 'qmlvideo' example, and should not be built independently.")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/qmlvideo/qmlvideo")
+
+qt_add_qml_module(qmlvideo
+ URI qmlvideo
+ SOURCES
+ videosingleton.cpp
+ videosingleton.h
+ qmlvideo_global.h
+ QML_FILES
+ "CameraBasic.qml"
+ "CameraDrag.qml"
+ "CameraDummy.qml"
+ "CameraFullScreen.qml"
+ "CameraFullScreenInverted.qml"
+ "CameraItem.qml"
+ "CameraMove.qml"
+ "CameraOverlay.qml"
+ "CameraResize.qml"
+ "CameraRotate.qml"
+ "CameraSpin.qml"
+ "Content.qml"
+ "ErrorDialog.qml"
+ "Main.qml"
+ "Scene.qml"
+ "SceneBasic.qml"
+ "SceneDrag.qml"
+ "SceneFullScreen.qml"
+ "SceneFullScreenInverted.qml"
+ "SceneMove.qml"
+ "SceneMulti.qml"
+ "SceneOverlay.qml"
+ "SceneResize.qml"
+ "SceneRotate.qml"
+ "SceneSelectionPanel.qml"
+ "SceneSpin.qml"
+ "SeekControl.qml"
+ "VideoBasic.qml"
+ "VideoDrag.qml"
+ "VideoDummy.qml"
+ "VideoFillMode.qml"
+ "VideoFullScreen.qml"
+ "VideoFullScreenInverted.qml"
+ "VideoItem.qml"
+ "VideoMetadata.qml"
+ "VideoMove.qml"
+ "VideoOverlay.qml"
+ "VideoPlaybackRate.qml"
+ "VideoResize.qml"
+ "VideoRotate.qml"
+ "VideoSeek.qml"
+ "VideoSpin.qml"
+ RESOURCES
+ "images/folder.png"
+ "images/leaves.jpg"
+ "images/up.png"
+)
+
+target_compile_definitions(qmlvideo PRIVATE QMLVIDEO_LIB)
+
+target_link_libraries(qmlvideo PRIVATE
+ Qt6::Core
+ Qt6::Gui
+ Qt6::Quick
+)
+
+install(TARGETS qmlvideo
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
+
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qmldir
+ DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraBasic.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraBasic.qml
new file mode 100644
index 000000000..77072c6c9
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraBasic.qml
@@ -0,0 +1,7 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneBasic {
+ contentType: "camera"
+ started: true
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraDrag.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraDrag.qml
new file mode 100644
index 000000000..2ea3672c6
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraDrag.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneDrag {
+ contentType: "camera"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraDummy.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraDummy.qml
new file mode 100644
index 000000000..c9d14e595
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraDummy.qml
@@ -0,0 +1,31 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+// Item which is loaded by CameraItem if Qt Multimedia is not available
+Rectangle {
+ id: root
+ color: "grey"
+ height: width
+
+ signal fatalError
+ signal sizeChanged
+ signal framePainted
+
+ Label {
+ anchors.fill: parent
+ anchors.margins: 10
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("Failed to create Camera item\n\nCheck that Qt Multimedia is installed")
+ verticalAlignment: Text.AlignVCenter
+ wrapMode: Text.Wrap
+ }
+
+ onWidthChanged: height = width
+ onHeightChanged: root.sizeChanged()
+
+ function start() { }
+ function stop() { }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraFullScreen.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraFullScreen.qml
new file mode 100644
index 000000000..b204e74ab
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraFullScreen.qml
@@ -0,0 +1,7 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneFullScreen {
+ contentType: "camera"
+}
+
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraFullScreenInverted.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraFullScreenInverted.qml
new file mode 100644
index 000000000..ff7a40253
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraFullScreenInverted.qml
@@ -0,0 +1,7 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneFullScreenInverted {
+ contentType: "camera"
+}
+
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraItem.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraItem.qml
new file mode 100644
index 000000000..d6e4b85b5
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraItem.qml
@@ -0,0 +1,47 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtMultimedia
+
+Item {
+ id: root
+ height: width
+
+ signal fatalError
+ signal sizeChanged
+
+ onHeightChanged: root.sizeChanged()
+
+ CaptureSession {
+ camera: Camera {
+ id: camera
+
+ onErrorOccurred: function(error, errorString) {
+ if (Camera.NoError !== error) {
+ console.log("[qmlvideo] CameraItem.onError error " + error + " errorString " + errorString)
+ root.fatalError()
+ }
+ }
+ }
+ imageCapture: ImageCapture {
+ id: imageCapture
+ }
+
+ recorder: MediaRecorder {
+ id: recorder
+// resolution: "640x480"
+// frameRate: 30
+ }
+ videoOutput: videoOutput
+ }
+
+ VideoOutput {
+ id: videoOutput
+ anchors.fill: parent
+ }
+
+
+ function start() { camera.start() }
+ function stop() { camera.stop() }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraMove.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraMove.qml
new file mode 100644
index 000000000..c4c5da914
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraMove.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneMove {
+ contentType: "camera"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraOverlay.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraOverlay.qml
new file mode 100644
index 000000000..13136be00
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraOverlay.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneOverlay {
+ contentType: "camera"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraResize.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraResize.qml
new file mode 100644
index 000000000..d89eef3ad
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraResize.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneResize {
+ contentType: "camera"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraRotate.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraRotate.qml
new file mode 100644
index 000000000..8394fb6fd
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraRotate.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneRotate {
+ contentType: "camera"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/CameraSpin.qml b/examples/multimedia/video/qmlvideo/qmlvideo/CameraSpin.qml
new file mode 100644
index 000000000..642a0edfd
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/CameraSpin.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneSpin {
+ contentType: "camera"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/Content.qml b/examples/multimedia/video/qmlvideo/qmlvideo/Content.qml
new file mode 100644
index 000000000..b08d19325
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/Content.qml
@@ -0,0 +1,125 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import frequencymonitor
+
+Rectangle {
+ id: root
+ border.color: palette.window
+ border.width: showBorder ? 1 : 0
+ color: "transparent"
+ property string contentType // "camera" or "video"
+ property string source
+ property real volume
+ property bool dummy: false
+ property bool autoStart: true
+ property bool started: false
+ property bool showFrameRate: false
+ property bool showBorder: false
+ property alias contentItem: contentLoader.item
+
+ signal initialized
+ signal error
+ signal videoFramePainted
+
+ Loader {
+ id: contentLoader
+ }
+
+ Connections {
+ id: framePaintedConnection
+ function onFramePainted() {
+ (frameRateLoader.item as FrequencyItem)?.notify()
+ root.videoFramePainted()
+ }
+ ignoreUnknownSignals: true
+ }
+
+ Connections {
+ id: errorConnection
+ function onFatalError() {
+ console.log("[qmlvideo] Content.onFatalError")
+ root.stop()
+ root.error()
+ }
+ ignoreUnknownSignals: true
+ }
+
+ Component {
+ id: frequencyItem
+ FrequencyItem {}
+ }
+
+ Loader {
+ id: frameRateLoader
+ sourceComponent: root.showFrameRate ? frequencyItem : undefined
+ onLoaded: {
+ item.parent = root
+ item.anchors.top = root.top
+ item.anchors.right = root.right
+ item.anchors.margins = 10
+ }
+ }
+
+ onWidthChanged: {
+ if (root.contentItem)
+ root.contentItem.width = width
+ }
+
+ onHeightChanged: {
+ if (root.contentItem)
+ root.contentItem.height = height
+ }
+
+ function initialize() {
+ if ("video" == contentType) {
+ contentLoader.source = "VideoItem.qml"
+ if (Loader.Error == contentLoader.status) {
+ contentLoader.source = "VideoDummy.qml"
+ dummy = true
+ }
+ contentLoader.item.volume = volume
+ } else if ("camera" == contentType) {
+ contentLoader.source = "CameraItem.qml"
+ if (Loader.Error == contentLoader.status) {
+ contentLoader.source = "CameraDummy.qml"
+ dummy = true
+ }
+ } else {
+ console.log("[qmlvideo] Content.initialize: error: invalid contentType")
+ }
+ if (contentLoader.item) {
+ contentLoader.item.sizeChanged.connect(updateRootSize)
+ contentLoader.item.parent = root
+ contentLoader.item.width = root.width
+ framePaintedConnection.target = contentLoader.item
+ errorConnection.target = contentLoader.item
+ if (root.autoStart)
+ root.start()
+ }
+ root.initialized()
+ }
+
+ function start() {
+ if (contentLoader.item) {
+ if (root.contentType == "video")
+ contentLoader.item.mediaSource = root.source
+ contentLoader.item.start()
+ root.started = true
+ }
+ }
+
+ // qmllint disable
+ function stop() {
+ if (contentLoader.item) {
+ contentLoader.item.stop()
+ if (root.contentType == "video")
+ contentLoader.item.mediaSource = ""
+ root.started = false
+ }
+ }
+ // qmllint enable
+
+ function updateRootSize() { root.height = (root.contentItem as Item).height }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/ErrorDialog.qml b/examples/multimedia/video/qmlvideo/qmlvideo/ErrorDialog.qml
new file mode 100644
index 000000000..f06079a35
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/ErrorDialog.qml
@@ -0,0 +1,70 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ id: root
+ color: "transparent"
+ opacity: 0.0
+ property alias enabled: mouseArea.enabled
+ property int dialogWidth: 300
+ property int dialogHeight: 200
+ state: enabled ? "on" : "baseState"
+
+ states: [
+ State {
+ name: "on"
+ PropertyChanges {
+ root.opacity: 1.0
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "*"
+ to: "*"
+ NumberAnimation {
+ properties: "opacity"
+ easing.type: Easing.OutQuart
+ duration: 500
+ }
+ }
+ ]
+
+ Rectangle {
+ anchors.fill: parent
+ color: "black"
+ opacity: 0.75
+ }
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: root.dialogWidth
+ height: root.dialogHeight
+ radius: 5
+ color: "white"
+
+ Text {
+ id: text
+ anchors.fill: parent
+ anchors.margins: 10
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "black"
+ wrapMode: Text.WordWrap
+ }
+ }
+
+ MouseArea {
+ id: mouseArea
+ anchors.fill: parent
+ onClicked: root.enabled = false
+ }
+
+ function show(msg) {
+ text.text = "<b>Error</b><br><br>" + msg
+ root.enabled = true
+ }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/Main.qml b/examples/multimedia/video/qmlvideo/qmlvideo/Main.qml
new file mode 100644
index 000000000..49b94590c
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/Main.qml
@@ -0,0 +1,188 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtQuick.Dialogs
+import performancemonitor
+
+Rectangle {
+ id: root
+ anchors.fill: parent
+ color: palette.window
+
+ property bool perfMonitorsLogging: false
+ property bool perfMonitorsVisible: false
+
+ Loader {
+ id: performanceLoader
+
+ Connections {
+ target: columnLayout
+ function onVisibleChanged() {
+ if (performanceLoader.item)
+ performanceLoader.item.enabled = !columnLayout.visible
+ }
+ ignoreUnknownSignals: true
+ }
+
+ Component {
+ id: performanceItem
+ PerformanceItem {}
+ }
+
+ function init() {
+ var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible
+ sourceComponent = enabled ? performanceItem : undefined
+ }
+
+ onLoaded: {
+ item.parent = root
+ item.anchors.fill = root
+ item.logging = root.perfMonitorsLogging
+ item.displayed = root.perfMonitorsVisible
+ item.enabled = false
+ item.init()
+ }
+ }
+
+ ColumnLayout {
+ id: columnLayout
+ anchors.fill: parent
+ spacing: 5
+
+ Button {
+ id: openFile1Button
+ text: (VideoSingleton.source1 == '') ? qsTr("Select file 1") : VideoSingleton.source1
+ Component.onCompleted: console.log("source1: " + VideoSingleton.source1)
+ onClicked: {
+ fileDialog.setFirstSource = true
+ fileDialog.open()
+ }
+
+ Layout.fillWidth: true
+ }
+
+ Button {
+ id: openFile2Button
+ text: (VideoSingleton.source2 == '') ? qsTr("Select file 2") : VideoSingleton.source2
+ Component.onCompleted: console.log("source2: " + VideoSingleton.source2)
+ onClicked: {
+ fileDialog.setFirstSource = false
+ fileDialog.open()
+ }
+
+ Layout.fillWidth: true
+ }
+
+ RowLayout {
+ Layout.fillWidth: true
+
+ Label {
+ text: qsTr("Video Modes")
+
+ horizontalAlignment: Qt.AlignHCenter
+ Layout.preferredWidth: 50
+ Layout.fillWidth: true
+ }
+ Label {
+ text: qsTr("Camera Modes")
+
+ horizontalAlignment: Qt.AlignHCenter
+ Layout.preferredWidth: 50
+ Layout.fillWidth: true
+ }
+ }
+
+ SceneSelectionPanel {
+ id: sceneSelectionPanel
+ itemHeight: Math.min(width / 10, height / 10)
+ color: palette.dark
+ radius: 0
+ onSceneSourceChanged: {
+ sceneLoader.source = sceneSource
+ var scene = null
+ var innerVisible = true
+ if (sceneSource == "") {
+ if (performanceLoader.item)
+ performanceLoader.item.videoActive = false
+ } else {
+ scene = sceneLoader.item
+ if (scene) {
+ if (scene.contentType === "video" && VideoSingleton.source1 === "") {
+ errorDialog.show(qsTr("You must first select a video file"))
+ sceneSource = ""
+ } else {
+ scene.parent = root
+ scene.color = root.palette.window
+ scene.source1 = VideoSingleton.source1
+ scene.source2 = VideoSingleton.source2
+ scene.volume = VideoSingleton.volume
+ scene.anchors.fill = root
+ scene.close.connect(closeScene)
+ scene.content.initialize()
+ innerVisible = false
+ }
+ }
+ }
+ videoFramePaintedConnection.target = scene
+ columnLayout.visible = innerVisible
+ }
+
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ }
+ }
+
+ Loader {
+ id: sceneLoader
+ }
+
+ Connections {
+ id: videoFramePaintedConnection
+ // qmllint disable
+ function onVideoFramePainted() {
+ if (performanceLoader.item)
+ performanceLoader.item.videoFramePainted()
+ }
+ // qmllint enable
+ ignoreUnknownSignals: true
+ }
+
+ FileDialog {
+ id: fileDialog
+ property bool setFirstSource
+ onAccepted: function() {
+ if (setFirstSource)
+ VideoSingleton.source1 = selectedFile
+ else
+ VideoSingleton.source2 = selectedFile
+ }
+ }
+
+ ErrorDialog {
+ id: errorDialog
+ anchors.fill: root
+ dialogWidth: Math.min(root.width, root.height) * 0.5
+ dialogHeight: Math.min(root.width, root.height) * 0.3
+ enabled: false
+ }
+
+ // Called from main() once root properties have been set
+ function init() {
+ performanceLoader.init()
+ fileDialog.currentFolder = VideoSingleton.videoPath
+ }
+
+ // qmllint disable
+ function qmlFramePainted() {
+ if (performanceLoader.item)
+ performanceLoader.item.qmlFramePainted()
+ }
+ // qmllint enable
+
+ function closeScene() {
+ sceneSelectionPanel.sceneSource = ""
+ }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/Scene.qml b/examples/multimedia/video/qmlvideo/qmlvideo/Scene.qml
new file mode 100644
index 000000000..e16478d41
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/Scene.qml
@@ -0,0 +1,31 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Rectangle {
+ id: root
+ color: palette.window
+ property string source1
+ property string source2
+ property int contentWidth: parent.width / 2
+ property real volume: 0.25
+ property int margins: 5
+ property QtObject content
+
+ signal close
+ signal videoFramePainted
+
+ Button {
+ id: closeButton
+ anchors {
+ top: parent.top
+ right: parent.right
+ margins: root.margins
+ }
+ z: 2.0
+ text: qsTr("Back")
+ onClicked: root.close()
+ }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneBasic.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneBasic.qml
new file mode 100644
index 000000000..8ad6c99b8
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneBasic.qml
@@ -0,0 +1,47 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Scene {
+ id: root
+ property string contentType
+ property bool autoStart: false
+ property bool started: false
+
+ Content {
+ id: content
+ autoStart: parent.autoStart
+ started: parent.started
+ anchors.fill: parent
+ width: parent.contentWidth
+ contentType: parent.contentType
+ source: parent.source1
+ volume: parent.volume
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ Label {
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: parent.bottom
+ margins: 20
+ }
+ text: content.started ? qsTr("Tap the screen to stop content")
+ : qsTr("Tap the screen to start content")
+ z: 2.0
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (content.started)
+ content.stop()
+ else
+ content.start()
+ }
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml
new file mode 100644
index 000000000..99a7cb7f1
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneDrag.qml
@@ -0,0 +1,34 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Scene {
+ id: root
+ property int margin: 20
+ property string contentType
+
+ Image {
+ id: background
+ source: "images/leaves.jpg"
+ x: (parent.width - width) / 2
+ y: (parent.height - height) / 2
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: root.contentWidth
+ contentType: root.contentType
+ source: root.source1
+ volume: root.volume
+ onVideoFramePainted: root.videoFramePainted()
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ drag.target: background
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneFullScreen.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneFullScreen.qml
new file mode 100644
index 000000000..ec8564311
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneFullScreen.qml
@@ -0,0 +1,67 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Scene {
+ id: root
+ property string contentType
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: root.contentType
+ source: parent.source1
+ volume: parent.volume
+ state: "left"
+
+ states: [
+ State {
+ name: "fullScreen"
+ PropertyChanges {
+ content.width: content.parent.width
+ content.height: content.parent.height
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ ParallelAnimation {
+ PropertyAnimation {
+ property: "width"
+ easing.type: Easing.Linear
+ duration: 250
+ }
+ PropertyAnimation {
+ property: "height"
+ easing.type: Easing.Linear
+ duration: 250
+ }
+ }
+ }
+ ]
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: content.state = (content.state == "fullScreen") ? "baseState" : "fullScreen"
+ }
+
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ Label {
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: parent.bottom
+ margins: 20
+ }
+ text: qsTr("Tap on the content to toggle full-screen mode")
+ z: 2.0
+ }
+
+ Component.onCompleted: root.content = content
+}
+
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneFullScreenInverted.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneFullScreenInverted.qml
new file mode 100644
index 000000000..cb96ac134
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneFullScreenInverted.qml
@@ -0,0 +1,70 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Scene {
+ id: root
+ property string contentType
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.width
+ height: parent.height
+ contentType: root.contentType
+ source: parent.source1
+ volume: parent.volume
+ state: "left"
+
+ states: [
+ State {
+ name: "nonFullScreen"
+ PropertyChanges { content.width: root.contentWidth }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ ParallelAnimation {
+ PropertyAnimation {
+ property: "width"
+ easing.type: Easing.Linear
+ duration: 250
+ }
+ PropertyAnimation {
+ property: "height"
+ easing.type: Easing.Linear
+ duration: 250
+ }
+ }
+ }
+ ]
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: content.state = (content.state === "nonFullScreen") ? "baseState" : "nonFullScreen"
+ }
+
+ onVideoFramePainted: root.videoFramePainted()
+
+ onInitialized: {
+ width = parent.width
+ height = parent.height
+ }
+ }
+
+ Label {
+ anchors {
+ horizontalCenter: parent.horizontalCenter
+ bottom: parent.bottom
+ margins: 20
+ }
+ text: qsTr("Tap on the content to toggle full-screen mode")
+ z: 2.0
+ }
+
+ Component.onCompleted: root.content = content
+}
+
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneMove.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneMove.qml
new file mode 100644
index 000000000..d1512831e
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneMove.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Scene {
+ id: root
+ property int margin: 20
+ property string contentType
+
+ Content {
+ id: content
+ anchors.verticalCenter: parent.verticalCenter
+ width: parent.contentWidth
+ contentType: root.contentType
+ source: parent.source1
+ volume: parent.volume
+
+ SequentialAnimation on x {
+ id: animation
+ loops: Animation.Infinite
+ property int from: root.margin
+ property int to: 100
+ property int duration: 1500
+ running: false
+ PropertyAnimation {
+ from: animation.from
+ to: animation.to
+ duration: animation.duration
+ easing.type: Easing.InOutCubic
+ }
+ PropertyAnimation {
+ from: animation.to
+ to: animation.from
+ duration: animation.duration
+ easing.type: Easing.InOutCubic
+ }
+ }
+
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ onWidthChanged: {
+ animation.to = root.width - content.width - margin
+ animation.start()
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneMulti.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneMulti.qml
index 01d82ac33..f93dabcdd 100644
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SceneMulti.qml
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneMulti.qml
@@ -1,54 +1,8 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
Scene {
id: root
@@ -71,28 +25,30 @@ Scene {
id: root
color: "transparent"
- function content() {
- return root.parent
- }
+ signal start
+ signal stop
- Text {
+ Label {
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
margins: 20
}
- text: content() ? content().started ? "Tap to stop" : "Tap to start" : ""
- color: "#e0e0e0"
+ // qmllint disable
+ text: root.started ? qsTr("Tap to stop") : qsTr("Tap to start")
+ // qmllint enable
}
MouseArea {
anchors.fill: parent
+ // qmllint disable
onClicked: {
- if (content().started)
- content().stop()
+ if (root.started)
+ root.stop()
else
- content().start()
+ root.start()
}
+ // qmllint enable
}
}
}
@@ -110,14 +66,19 @@ Scene {
showBorder: true
showFrameRate: started
source: parent.source1
- width: itemWidth
+ width: root.itemWidth
volume: parent.volume
Loader {
id: video1StartStopLoader
+
+ property bool started: parent.started
+
onLoaded: {
item.parent = video1
item.anchors.fill = video1
+ item.start.connect(video1.start)
+ item.stop.connect(video1.stop)
}
}
@@ -126,26 +87,28 @@ Scene {
Rectangle {
id: cameraHolder
+
+ property bool started: false
+
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
topMargin: root.itemTopMargin
}
border.width: 1
- border.color: "white"
+ border.color: palette.base
color: "transparent"
- width: itemWidth
+ width: root.itemWidth
height: width
- property bool started: false
Loader {
id: cameraLoader
onLoaded: {
item.parent = cameraHolder
- item.centerIn = cameraHolder
+ item.anchors.centerIn = cameraHolder
item.contentType = "camera"
item.showFrameRate = true
- item.width = itemWidth
+ item.width = root.itemWidth
item.z = 1.0
cameraErrorConnection.target = item
item.initialize()
@@ -154,20 +117,26 @@ Scene {
Loader {
id: cameraStartStopLoader
+
+ property bool started: parent.started
+
sourceComponent: startStopComponent
onLoaded: {
item.parent = cameraHolder
item.anchors.fill = cameraHolder
item.z = 2.0
+ item.start.connect(cameraHolder.start)
+ item.stop.connect(cameraHolder.stop)
}
}
Connections {
id: cameraErrorConnection
- onError: {
+ function onError() {
console.log("[qmlvideo] SceneMulti.camera.onError")
cameraHolder.stop()
}
+ ignoreUnknownSignals: true
}
function start() {
@@ -194,14 +163,19 @@ Scene {
showBorder: true
showFrameRate: started
source: parent.source2
- width: itemWidth
+ width: root.itemWidth
volume: parent.volume
Loader {
id: video2StartStopLoader
+
+ property bool started: parent.started
+
onLoaded: {
item.parent = video2
item.anchors.fill = video2
+ item.start.connect(video2.start)
+ item.stop.connect(video2.stop)
}
}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneOverlay.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneOverlay.qml
new file mode 100644
index 000000000..5863d618c
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneOverlay.qml
@@ -0,0 +1,83 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Scene {
+ id: root
+ property int margin: 20
+ property string contentType
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: root.contentType
+ source: parent.source1
+ volume: parent.volume
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ Rectangle {
+ id: overlay
+ y: 0.5 * parent.height
+ width: content.width
+ height: content.height
+ color: "#e0e0e0"
+ opacity: 0.5
+
+ SequentialAnimation on x {
+ id: xAnimation
+ loops: Animation.Infinite
+ property int from: root.margin
+ property int to: 100
+ property int duration: 1500
+ running: false
+ PropertyAnimation {
+ from: xAnimation.from
+ to: xAnimation.to
+ duration: xAnimation.duration
+ easing.type: Easing.InOutCubic
+ }
+ PropertyAnimation {
+ from: xAnimation.to
+ to: xAnimation.from
+ duration: xAnimation.duration
+ easing.type: Easing.InOutCubic
+ }
+ }
+
+ SequentialAnimation on y {
+ id: yAnimation
+ loops: Animation.Infinite
+ property int from: root.margin
+ property int to: 180
+ property int duration: 1500
+ running: false
+ PropertyAnimation {
+ from: yAnimation.from
+ to: yAnimation.to
+ duration: yAnimation.duration
+ easing.type: Easing.InOutCubic
+ }
+ PropertyAnimation {
+ from: yAnimation.to
+ to: yAnimation.from
+ duration: yAnimation.duration
+ easing.type: Easing.InOutCubic
+ }
+ }
+ }
+
+ onWidthChanged: {
+ xAnimation.to = root.width - content.width - margin
+ xAnimation.start()
+ }
+
+ onHeightChanged: {
+ //yAnimation.to = root.height - content.height - margin
+ yAnimation.start()
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneResize.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneResize.qml
new file mode 100644
index 000000000..4e2f15588
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneResize.qml
@@ -0,0 +1,41 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Scene {
+ id: root
+ property string contentType
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: root.contentType
+ source: parent.source1
+ volume: parent.volume
+
+ SequentialAnimation on scale {
+ id: animation
+ loops: Animation.Infinite
+ property int duration: 1500
+ running: true
+ PropertyAnimation {
+ from: 1.5
+ to: 0.5
+ duration: animation.duration
+ easing.type: Easing.InOutCubic
+ }
+ PropertyAnimation {
+ from: 0.5
+ to: 1.5
+ duration: animation.duration
+ easing.type: Easing.InOutCubic
+ }
+ }
+
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneRotate.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneRotate.qml
new file mode 100644
index 000000000..1362522e6
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneRotate.qml
@@ -0,0 +1,57 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Scene {
+ id: root
+ property int margin: 20
+ property int delta: 30
+ property string contentType
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: root.contentType
+ source: parent.source1
+ volume: parent.volume
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ Button {
+ id: rotatePositiveButton
+ anchors {
+ right: parent.right
+ bottom: rotateNegativeButton.top
+ margins: parent.margins
+ }
+ text: qsTr("Rotate +%1").arg(root.delta)
+ onClicked: content.rotation = content.rotation + root.delta
+ }
+
+ Button {
+ id: rotateNegativeButton
+ anchors {
+ right: parent.right
+ verticalCenter: parent.verticalCenter
+ margins: parent.margins
+ }
+ text: qsTr("Rotate -%1").arg(root.delta)
+ onClicked: content.rotation = content.rotation - root.delta
+ }
+
+ Button {
+ id: rotateValueButton
+ anchors {
+ left: parent.left
+ verticalCenter: parent.verticalCenter
+ margins: parent.margins
+ }
+ enabled: false
+ text: content.rotation % 360
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml
new file mode 100644
index 000000000..91e7c6ad4
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneSelectionPanel.qml
@@ -0,0 +1,88 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+pragma ComponentBehavior: Bound
+
+Rectangle {
+ id: root
+ property int itemHeight: 25
+ property string sceneSource: ""
+
+ ListModel {
+ id: videolist
+ ListElement { name: qsTr("Multi"); source: "SceneMulti.qml" }
+ ListElement { name: qsTr("Video"); source: "VideoBasic.qml" }
+ ListElement { name: qsTr("Drag"); source: "VideoDrag.qml" }
+ ListElement { name: qsTr("Fillmode"); source: "VideoFillMode.qml" }
+ ListElement { name: qsTr("Fullscreen"); source: "VideoFullScreen.qml" }
+ ListElement { name: qsTr("Fullscreen-inverted"); source: "VideoFullScreenInverted.qml" }
+ ListElement { name: qsTr("Metadata"); source: "VideoMetadata.qml" }
+ ListElement { name: qsTr("Move"); source: "VideoMove.qml" }
+ ListElement { name: qsTr("Overlay"); source: "VideoOverlay.qml" }
+ ListElement { name: qsTr("Playback Rate"); source: "VideoPlaybackRate.qml" }
+ ListElement { name: qsTr("Resize"); source: "VideoResize.qml" }
+ ListElement { name: qsTr("Rotate"); source: "VideoRotate.qml" }
+ ListElement { name: qsTr("Spin"); source: "VideoSpin.qml" }
+ ListElement { name: qsTr("Seek"); source: "VideoSeek.qml" }
+ }
+
+ ListModel {
+ id: cameralist
+ ListElement { name: qsTr("Camera"); source: "CameraBasic.qml" }
+ ListElement { name: qsTr("Drag"); source: "CameraDrag.qml" }
+ ListElement { name: qsTr("Fullscreen"); source: "CameraFullScreen.qml" }
+ ListElement { name: qsTr("Fullscreen-inverted"); source: "CameraFullScreenInverted.qml" }
+ ListElement { name: qsTr("Move"); source: "CameraMove.qml" }
+ ListElement { name: qsTr("Overlay"); source: "CameraOverlay.qml" }
+ ListElement { name: qsTr("Resize"); source: "CameraResize.qml" }
+ ListElement { name: qsTr("Rotate"); source: "CameraRotate.qml" }
+ ListElement { name: qsTr("Spin"); source: "CameraSpin.qml" }
+ }
+
+ Component {
+ id: buttonDelegate
+ Button {
+ required property string name
+ required property string source
+
+ width: root.width / 2
+ height: root.itemHeight
+
+ text: name
+ padding: 3
+ onClicked: root.sceneSource = source
+ }
+ }
+
+ Flickable {
+ anchors.fill: parent
+ contentHeight: (root.itemHeight * videolist.count) + 10
+ clip: true
+
+ Row {
+ id: layout
+ anchors {
+ fill: parent
+ topMargin: 5
+ bottomMargin: 5
+ }
+
+ Column {
+ Repeater {
+ model: videolist
+ delegate: buttonDelegate
+ }
+ }
+
+ Column {
+ Repeater {
+ model: cameralist
+ delegate: buttonDelegate
+ }
+ }
+ }
+ }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/SceneSpin.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SceneSpin.qml
new file mode 100644
index 000000000..3e280d3b1
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SceneSpin.qml
@@ -0,0 +1,34 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Scene {
+ id: root
+ property int margin: 20
+ property string contentType
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: root.contentType
+ source: parent.source1
+ volume: parent.volume
+
+ PropertyAnimation on rotation {
+ id: animation
+ loops: Animation.Infinite
+ running: true
+ from: 0
+ to: 360
+ duration: 3000
+ easing.type: Easing.Linear
+ }
+
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SeekControl.qml b/examples/multimedia/video/qmlvideo/qmlvideo/SeekControl.qml
index fbba32903..646e5e8ef 100644
--- a/examples/multimedia/video/qmlvideo/qml/qmlvideo/SeekControl.qml
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/SeekControl.qml
@@ -1,54 +1,7 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-import QtQuick 2.0
+import QtQuick
Item {
id: seekControl
@@ -62,7 +15,7 @@ Item {
Rectangle {
id: background
anchors.fill: parent
- color: "white"
+ color: palette.base
opacity: 0.3
radius: parent.height / 15
}
@@ -71,7 +24,7 @@ Item {
id: progressBar
anchors { left: parent.left; top: parent.top; bottom: parent.bottom }
width: seekControl.duration == 0 ? 0 : background.width * seekControl.playPosition / seekControl.duration
- color: "black"
+ color: palette.highlight
opacity: 0.7
}
@@ -80,9 +33,9 @@ Item {
anchors { left: parent.left; top: parent.top; bottom: parent.bottom; leftMargin: 10 }
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
- color: "white"
+ color: palette.windowText
smooth: true
- text: formatTime(playPosition)
+ text: seekControl.formatTime(seekControl.playPosition)
}
Text {
@@ -90,16 +43,16 @@ Item {
anchors { right: parent.right; top: parent.top; bottom: parent.bottom; rightMargin: 10 }
horizontalAlignment: Text.AlignRight
verticalAlignment: Text.AlignVCenter
- color: "white"
+ color: palette.windowText
smooth: true
- text: formatTime(duration)
+ text: seekControl.formatTime(seekControl.duration)
}
Rectangle {
id: progressHandle
height: parent.height
width: parent.height / 2
- color: "white"
+ color: palette.accent
opacity: 0.5
anchors.verticalCenter: progressBar.verticalCenter
x: seekControl.duration == 0 ? 0 : seekControl.playPosition / seekControl.duration * background.width
@@ -123,7 +76,7 @@ Item {
seekControl.seekPosition = progressHandle.x * seekControl.duration / background.width
seekControl.seeking = false
}
- onReleased: {
+ onReleased: (mouse) => {
seekControl.seekPosition = progressHandle.x * seekControl.duration / background.width
seekControl.seeking = false
mouse.accepted = true
@@ -143,8 +96,8 @@ Item {
function formatTime(timeInMs) {
if (!timeInMs || timeInMs <= 0) return "0:00"
- var seconds = timeInMs / 1000;
- var minutes = Math.floor(seconds / 60)
+ let seconds = timeInMs / 1000;
+ let minutes = Math.floor(seconds / 60)
seconds = Math.floor(seconds % 60)
if (seconds < 10) seconds = "0" + seconds;
return minutes + ":" + seconds
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoBasic.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoBasic.qml
new file mode 100644
index 000000000..15c25c978
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoBasic.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneBasic {
+ contentType: "video"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoDrag.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoDrag.qml
new file mode 100644
index 000000000..4a5c5d49b
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoDrag.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneDrag {
+ contentType: "video"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoDummy.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoDummy.qml
new file mode 100644
index 000000000..a30b9ebf6
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoDummy.qml
@@ -0,0 +1,37 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+// Item which is loaded by VideoItem if Qt Multimedia is not available
+Rectangle {
+ id: root
+ color: "grey"
+ height: width
+ property int duration: 0
+ property int position: 0
+ property string source
+ property real volume: 1.0
+ property real playbackRate: 1.0
+
+ signal fatalError
+ signal sizeChanged
+ signal framePainted
+
+ Label {
+ anchors.fill: parent
+ anchors.margins: 10
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("Failed to create Video item\n\nCheck that Qt Multimedia is installed")
+ verticalAlignment: Text.AlignVCenter
+ wrapMode: Text.Wrap
+ }
+
+ onWidthChanged: height = width
+ onHeightChanged: root.sizeChanged()
+
+ function start() { }
+ function stop() { }
+ function seek() { }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoFillMode.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoFillMode.qml
new file mode 100644
index 000000000..af950c735
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoFillMode.qml
@@ -0,0 +1,49 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtMultimedia
+
+Scene {
+ id: root
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: "video"
+ source: parent.source1
+ volume: parent.volume
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ Button {
+ id: button
+ anchors {
+ right: parent.right
+ verticalCenter: parent.verticalCenter
+ margins: parent.margins
+ }
+ text: qsTr("PreserveAspectFit")
+ // qmllint disable
+ onClicked: {
+ if (!content.dummy) {
+ let video = content.contentItem
+ if (video.fillMode === VideoOutput.Stretch) {
+ video.fillMode = VideoOutput.PreserveAspectFit
+ text = qsTr("PreserveAspectFit")
+ } else if (video.fillMode === VideoOutput.PreserveAspectFit) {
+ video.fillMode = VideoOutput.PreserveAspectCrop
+ text = qsTr("PreserveAspectCrop")
+ } else {
+ video.fillMode = VideoOutput.Stretch
+ text = qsTr("Stretch")
+ }
+ }
+ }
+ // qmllint enable
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoFullScreen.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoFullScreen.qml
new file mode 100644
index 000000000..e49faadb6
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoFullScreen.qml
@@ -0,0 +1,7 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneFullScreen {
+ contentType: "video"
+}
+
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoFullScreenInverted.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoFullScreenInverted.qml
new file mode 100644
index 000000000..0bf82941e
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoFullScreenInverted.qml
@@ -0,0 +1,7 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneFullScreenInverted {
+ contentType: "video"
+}
+
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoItem.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoItem.qml
new file mode 100644
index 000000000..2ea796de8
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoItem.qml
@@ -0,0 +1,42 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtMultimedia
+
+VideoOutput {
+ id: root
+ height: width
+
+ property alias duration: mediaPlayer.duration
+ property alias mediaSource: mediaPlayer.source
+ property alias metaData: mediaPlayer.metaData
+ property alias playbackRate: mediaPlayer.playbackRate
+ property alias position: mediaPlayer.position
+ property alias seekable: mediaPlayer.seekable
+ property alias volume: audioOutput.volume
+
+ signal sizeChanged
+ signal fatalError
+
+ onHeightChanged: root.sizeChanged()
+
+ MediaPlayer {
+ id: mediaPlayer
+ videoOutput: root;
+ audioOutput: AudioOutput {
+ id: audioOutput
+ }
+
+ onErrorOccurred: function(error, errorString) {
+ if (MediaPlayer.NoError !== error) {
+ console.log("[qmlvideo] VideoItem.onError error " + error + " errorString " + errorString)
+ root.fatalError()
+ }
+ }
+ }
+
+ function start() { mediaPlayer.play() }
+ function stop() { mediaPlayer.stop() }
+ function seek(position) { mediaPlayer.setPosition(position); }
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoMetadata.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoMetadata.qml
new file mode 100644
index 000000000..f83cbffe9
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoMetadata.qml
@@ -0,0 +1,80 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtMultimedia
+
+pragma ComponentBehavior: Bound
+
+Scene {
+ id: root
+ property string contentType: "video"
+
+ Content {
+ id: videoContent
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: "video"
+ source: parent.source1
+ volume: parent.volume
+ onInitialized: {
+ if (!dummy)
+ metadata.createObject(root)
+ }
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ Component {
+ id: metadata
+ Column {
+ anchors.fill: parent
+ // qmllint disable
+ property var videoMetaData: videoContent.contentItem?.metaData
+ // qmllint enable
+ Label {
+ text: qsTr("Title: %1").arg(parent.videoMetaData?.value(MediaMetaData.Title) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Resolution: %1").arg(parent.videoMetaData?.value(MediaMetaData.Resolution) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Media type: %1").arg(parent.videoMetaData?.value(MediaMetaData.MediaType) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Video codec: %1").arg(parent.videoMetaData?.value(MediaMetaData.VideoCodec) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Video bit rate: %1").arg(parent.videoMetaData?.value(MediaMetaData.VideoBitRate) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Video frame rate: %1").arg(parent.videoMetaData?.value(MediaMetaData.VideoFrameRate) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Audio codec: %1").arg(parent.videoMetaData?.value(MediaMetaData.AudioCodec) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Audio bit rate: %1").arg(parent.videoMetaData?.value(MediaMetaData.AudioBitRate) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Date: %1").arg(parent.videoMetaData?.value(MediaMetaData.Date) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Description: %1").arg(parent.videoMetaData?.value(MediaMetaData.Description) ?? qsTr("Unknown"))
+ }
+ Label {
+ text: qsTr("Copyright: %1").arg(parent.videoMetaData?.value(MediaMetaData.Copyright) ?? qsTr("Unknown"))
+ }
+ Label {
+ // qmllint disable
+ text: qsTr("Seekable: %1").arg(videoContent.contentItem?.seekable ?? qsTr("Unknown"))
+ // qmllint enable
+ }
+ Label {
+ text: qsTr("Orientation: %1").arg(parent.videoMetaData?.value(MediaMetaData.Orientation) ?? qsTr("Unknown"))
+ }
+ }
+ }
+
+ Component.onCompleted: root.content = videoContent
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoMove.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoMove.qml
new file mode 100644
index 000000000..2b9230f3c
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoMove.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneMove {
+ contentType: "video"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoOverlay.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoOverlay.qml
new file mode 100644
index 000000000..576b33ff9
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoOverlay.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneOverlay {
+ contentType: "video"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoPlaybackRate.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoPlaybackRate.qml
new file mode 100644
index 000000000..55e38ef19
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoPlaybackRate.qml
@@ -0,0 +1,65 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Scene {
+ id: root
+ property int margin: 20
+ property real delta: 0.1
+ property string contentType: "video"
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: "video"
+ source: parent.source1
+ volume: parent.volume
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ Button {
+ id: increaseButton
+ anchors {
+ right: parent.right
+ bottom: decreaseButton.top
+ margins: parent.margins
+ }
+ text: qsTr("Increase")
+ onClicked: {
+ let video = (content.contentItem as VideoItem)
+ video.playbackRate += root.delta
+ }
+ }
+
+ Button {
+ id: decreaseButton
+ anchors {
+ right: parent.right
+ verticalCenter: parent.verticalCenter
+ margins: parent.margins
+ }
+ text: qsTr("Decrease")
+ onClicked: {
+ let video = (content.contentItem as VideoItem)
+ video.playbackRate -= root.delta
+ }
+ }
+
+ Button {
+ id: valueButton
+ anchors {
+ left: parent.left
+ verticalCenter: parent.verticalCenter
+ margins: parent.margins
+ }
+ enabled: false
+ // qmllint disable
+ text: Math.round(10 * content.contentItem?.playbackRate ?? 1) / 10
+ // qmllint enable
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoResize.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoResize.qml
new file mode 100644
index 000000000..88fe7a2d2
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoResize.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneResize {
+ contentType: "video"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoRotate.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoRotate.qml
new file mode 100644
index 000000000..d429ec413
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoRotate.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneRotate {
+ contentType: "video"
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml
new file mode 100644
index 000000000..5e2584fb6
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoSeek.qml
@@ -0,0 +1,36 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Scene {
+ id: root
+ property string contentType: "video"
+ contentWidth: parent.width
+
+ Content {
+ id: content
+ anchors.centerIn: parent
+ width: parent.contentWidth
+ contentType: "video"
+ source: parent.source1
+ volume: parent.volume
+ onVideoFramePainted: root.videoFramePainted()
+ }
+
+ SeekControl {
+ anchors {
+ left: parent.left
+ right: parent.right
+ margins: 10
+ bottom: parent.bottom
+ }
+ // qmllint disable
+ duration: content.contentItem?.duration ?? 0
+ playPosition: content.contentItem?.position ?? 0
+ onSeekPositionChanged: content.contentItem?.seek(seekPosition);
+ // qmllint enable
+ }
+
+ Component.onCompleted: root.content = content
+}
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/VideoSpin.qml b/examples/multimedia/video/qmlvideo/qmlvideo/VideoSpin.qml
new file mode 100644
index 000000000..7c365ddc7
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/VideoSpin.qml
@@ -0,0 +1,6 @@
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+SceneSpin {
+ contentType: "video"
+}
diff --git a/examples/multimedia/video/qmlvideo/images/folder.png b/examples/multimedia/video/qmlvideo/qmlvideo/images/folder.png
index 62d97004f..62d97004f 100644
--- a/examples/multimedia/video/qmlvideo/images/folder.png
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/images/folder.png
Binary files differ
diff --git a/examples/multimedia/video/qmlvideo/images/leaves.jpg b/examples/multimedia/video/qmlvideo/qmlvideo/images/leaves.jpg
index 66533b34a..66533b34a 100644
--- a/examples/multimedia/video/qmlvideo/images/leaves.jpg
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/images/leaves.jpg
Binary files differ
diff --git a/examples/multimedia/video/qmlvideo/images/up.png b/examples/multimedia/video/qmlvideo/qmlvideo/images/up.png
index 6823de004..6823de004 100644
--- a/examples/multimedia/video/qmlvideo/images/up.png
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/images/up.png
Binary files differ
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/qmldir b/examples/multimedia/video/qmlvideo/qmlvideo/qmldir
new file mode 100644
index 000000000..1cba13d95
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/qmldir
@@ -0,0 +1,44 @@
+module qmlvideo
+
+CameraBasic 1.0 CameraBasic.qml
+CameraDrag 1.0 CameraDrag.qml
+CameraDummy 1.0 CameraDummy.qml
+CameraFullScreen 1.0 CameraFullScreen.qml
+CameraFullScreenInverted 1.0 CameraFullScreenInverted.qml
+CameraItem 1.0 CameraItem.qml
+CameraMove 1.0 CameraMove.qml
+CameraOverlay 1.0 CameraOverlay.qml
+CameraResize 1.0 CameraResize.qml
+CameraRotate 1.0 CameraRotate.qml
+CameraSpin 1.0 CameraSpin.qml
+CameraContent 1.0 Content.qml
+ErrorDialog 1.0 ErrorDialog.qml
+Scene 1.0 Scene.qml
+SceneBasic 1.0 SceneBasic.qml
+SceneDrag 1.0 SceneDrag.qml
+SceneFullScreen 1.0 SceneFullScreen.qml
+SceneFullScreeninverted 1.0 SceneFullScreenInverted.qml
+SceneMoved 1.0 SceneMove.qml
+SceneMulti 1.0 SceneMulti.qml
+SceneOverlay 1.0 SceneOverlay.qml
+SceneResize 1.0 SceneResize.qml
+SceneRotate 1.0 SceneRotate.qml
+SceneSelectionPanel 1.0 SceneSelectionPanel.qml
+SceneSpin 1.0 SceneSpin.qml
+SeekControl 1.0 SeekControl.qml
+VideoBasic 1.0 VideoBasic.qml
+VideoDrag 1.0 VideoDrag.qml
+VideoDummy 1.0 VideoDummy.qml
+VideoFillMode 1.0 VideoFillMode.qml
+VideoFullScreen 1.0 VideoFullScreen.qml
+VideoFullScreenInverted 1.0 VideoFullScreenInverted.qml
+VideoItem 1.0 VideoItem.qml
+VideoMetadata 1.0 VideoMetadata.qml
+VideoMove 1.0 VideoMove.qml
+VideoOverlay 1.0 VideoOverlay.qml
+VideoPlaybackRate 1.0 VideoPlaybackRate.qml
+VideoResize 1.0 VideoResize.qml
+VideoRotate 1.0 VideoRotate.qml
+VideoSeek 1.0 VideoSeek.qml
+VideoSpin 1.0 VideoSpin.qml
+Main 1.0 Main.qml
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/qmlvideo_global.h b/examples/multimedia/video/qmlvideo/qmlvideo/qmlvideo_global.h
new file mode 100644
index 000000000..8df5b5b64
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/qmlvideo_global.h
@@ -0,0 +1,10 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QtCore/QtGlobal>
+
+#if defined(QMLVIDEO_LIB)
+#define QMLVIDEO_LIB_EXPORT Q_DECL_EXPORT
+#else
+#define QMLVIDEO_LIB_EXPORT Q_DECL_IMPORT
+#endif
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/videosingleton.cpp b/examples/multimedia/video/qmlvideo/qmlvideo/videosingleton.cpp
new file mode 100644
index 000000000..2b02fa505
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/videosingleton.cpp
@@ -0,0 +1,54 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include "videosingleton.h"
+
+VideoSingleton::VideoSingleton(QObject * parent) : QObject(parent)
+{ }
+
+QUrl VideoSingleton::source1() const
+{
+ return m_source1;
+}
+void VideoSingleton::setSource1(const QUrl &source1)
+{
+ if (source1 == m_source1)
+ return;
+ m_source1 = source1;
+ emit source1Changed();
+}
+QUrl VideoSingleton::source2() const
+{
+ return m_source2;
+}
+void VideoSingleton::setSource2(const QUrl &source2)
+{
+ if (source2 == m_source2)
+ return;
+ m_source2 = source2;
+ emit source2Changed();
+}
+qreal VideoSingleton::volume() const
+{
+ return m_volume;
+}
+void VideoSingleton::setVolume(qreal volume)
+{
+ if (volume == m_volume)
+ return;
+ m_volume = volume;
+ emit volumeChanged();
+}
+QUrl VideoSingleton::videoPath() const
+{
+ return m_videoPath;
+}
+void VideoSingleton::setVideoPath(const QUrl &videoPath)
+{
+ if (m_videoPath == videoPath)
+ return;
+ m_videoPath = videoPath;
+ emit videoPathChanged();
+}
+
+#include "moc_videosingleton.cpp"
diff --git a/examples/multimedia/video/qmlvideo/qmlvideo/videosingleton.h b/examples/multimedia/video/qmlvideo/qmlvideo/videosingleton.h
new file mode 100644
index 000000000..3e0d56247
--- /dev/null
+++ b/examples/multimedia/video/qmlvideo/qmlvideo/videosingleton.h
@@ -0,0 +1,48 @@
+// Copyright (C) 2024 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#ifndef QMLVIDEOSINGLETON_H
+#define QMLVIDEOSINGLETON_H
+
+#include "qmlvideo_global.h"
+
+#include <QtQml/qqml.h>
+
+class QMLVIDEO_LIB_EXPORT VideoSingleton : public QObject
+{
+ Q_OBJECT
+ Q_PROPERTY(QUrl source1 READ source1 WRITE setSource1 NOTIFY source1Changed FINAL)
+ Q_PROPERTY(QUrl source2 READ source2 WRITE setSource2 NOTIFY source2Changed FINAL)
+ Q_PROPERTY(QUrl videoPath READ videoPath WRITE setVideoPath NOTIFY videoPathChanged FINAL)
+ Q_PROPERTY(qreal volume READ volume WRITE setVolume NOTIFY volumeChanged FINAL)
+ QML_SINGLETON
+ QML_ELEMENT
+
+public:
+ explicit VideoSingleton(QObject *parent = nullptr);
+
+ QUrl source1() const;
+ void setSource1(const QUrl &source1);
+ QUrl source2() const;
+ void setSource2(const QUrl &source2);
+ QUrl videoPath() const;
+ void setVideoPath(const QUrl &videoPath);
+ qreal volume() const;
+ void setVolume(qreal volume);
+
+Q_SIGNALS:
+ void source1Changed();
+ void source2Changed();
+ void volumeChanged();
+ void videoPathChanged();
+
+private:
+ QUrl m_source1;
+ QUrl m_source2;
+ QUrl m_videoPath;
+ qreal m_volume = 0.5;
+};
+
+QML_DECLARE_TYPE(VideoSingleton);
+
+#endif // QMLVIDEOSINGLETON_H
diff --git a/examples/multimedia/video/qmlvideo/trace.h b/examples/multimedia/video/qmlvideo/trace.h
index 0ad9b5167..bd7f63b68 100644
--- a/examples/multimedia/video/qmlvideo/trace.h
+++ b/examples/multimedia/video/qmlvideo/trace.h
@@ -1,57 +1,10 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef TRACE_H
#define TRACE_H
-#include <QtCore/QDebug>
+#include <QDebug>
#define ENABLE_TRACE
//#define VERBOSE_TRACE
@@ -61,13 +14,19 @@ namespace Trace {
class NullDebug
{
public:
- template <typename T>
- NullDebug& operator<<(const T&) { return *this; }
+ template<typename T>
+ NullDebug &operator<<(const T &)
+ {
+ return *this;
+ }
};
-inline NullDebug nullDebug() { return NullDebug(); }
+inline NullDebug nullDebug()
+{
+ return NullDebug();
+}
-template <typename T>
+template<typename T>
struct PtrWrapper
{
PtrWrapper(const T *ptr) : m_ptr(ptr) { }
@@ -76,8 +35,8 @@ struct PtrWrapper
} // namespace Trace
-template <typename T>
-inline QDebug& operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper)
+template<typename T>
+inline QDebug &operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper)
{
QDebugStateSaver saver(debug);
debug.nospace() << '[' << static_cast<const void *>(wrapper.m_ptr) << ']';
@@ -86,20 +45,37 @@ inline QDebug& operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper)
template<typename T>
inline const void *qtVoidPtr(const T *ptr)
-{ return static_cast<const void *>(ptr); }
+{
+ return static_cast<const void *>(ptr);
+}
#define qtThisPtr() qtVoidPtr(this)
#ifdef ENABLE_TRACE
- inline QDebug qtTrace() { return qDebug() << "[qmlvideo]"; }
+inline QDebug qtTrace()
+{
+ return qDebug() << "[qmlvideo]";
+}
# ifdef VERBOSE_TRACE
- inline QDebug qtVerboseTrace() { return qtTrace(); }
+inline QDebug qtVerboseTrace()
+{
+ return qtTrace();
+}
# else
- inline Trace::NullDebug qtVerboseTrace() { return Trace::nullDebug(); }
+inline Trace::NullDebug qtVerboseTrace()
+{
+ return Trace::nullDebug();
+}
# endif
#else
- inline Trace::NullDebug qtTrace() { return Trace::nullDebug(); }
- inline Trace::NullDebug qtVerboseTrace() { return Trace::nullDebug(); }
+inline Trace::NullDebug qtTrace()
+{
+ return Trace::nullDebug();
+}
+inline Trace::NullDebug qtVerboseTrace()
+{
+ return Trace::nullDebug();
+}
#endif
#endif // TRACE_H
diff --git a/examples/multimedia/video/qmlvideofilter_opencl/README b/examples/multimedia/video/qmlvideofilter_opencl/README
deleted file mode 100644
index cc351e430..000000000
--- a/examples/multimedia/video/qmlvideofilter_opencl/README
+++ /dev/null
@@ -1,15 +0,0 @@
-This example performs some simple OpenCL operations on camera or video input
-which is assumed to be provided in RGB format. The OpenCL operation is done on
-an OpenGL texture using CL-GL interop, without any further readbacks or copies
-(except for the initial texture upload, when necessary).
-
-Currently OS X, Windows with real OpenGL (opengl32.dll) and Linux (GLX) are
-supported. Note that an OpenCL implementation with GPU support is required. The
-platform and device selection logic supports NVIDIA, AMD and Intel. Porting to
-other platforms is probably simple, see clCreateContextFromType.
-
-YUV formats are not supported in this example. This is probably not an issue an
-OS X and Windows, but will most likely disable the example on Linux.
-
-Pass the name of a video file to perform video playback or launch without
-arguments to use the camera.
diff --git a/examples/multimedia/video/qmlvideofilter_opencl/main.cpp b/examples/multimedia/video/qmlvideofilter_opencl/main.cpp
deleted file mode 100644
index 255c0b61b..000000000
--- a/examples/multimedia/video/qmlvideofilter_opencl/main.cpp
+++ /dev/null
@@ -1,526 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Multimedia module.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 <QQuickView>
-#include <QOpenGLContext>
-#include <QOpenGLFunctions>
-#include <QAbstractVideoFilter>
-#include <QQmlContext>
-#include <QFileInfo>
-
-#ifdef Q_OS_OSX
-#include <OpenCL/opencl.h>
-#include <OpenGL/OpenGL.h>
-#else
-#include <CL/opencl.h>
-#endif
-
-#ifdef Q_OS_LINUX
-#include <QtPlatformHeaders/QGLXNativeContext>
-#endif
-
-#include "rgbframehelper.h"
-
-static const char *openclSrc =
- "__constant sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_CLAMP_TO_EDGE | CLK_FILTER_NEAREST;\n"
- "__kernel void Emboss(__read_only image2d_t imgIn, __write_only image2d_t imgOut, float factor) {\n"
- " const int2 pos = { get_global_id(0), get_global_id(1) };\n"
- " float4 diff = read_imagef(imgIn, sampler, pos + (int2)(1,1)) - read_imagef(imgIn, sampler, pos - (int2)(1,1));\n"
- " float color = (diff.x + diff.y + diff.z) / factor + 0.5f;\n"
- " write_imagef(imgOut, pos, (float4)(color, color, color, 1.0f));\n"
- "}\n";
-
-class CLFilter : public QAbstractVideoFilter
-{
- Q_OBJECT
- Q_PROPERTY(qreal factor READ factor WRITE setFactor NOTIFY factorChanged)
-
-public:
- CLFilter() : m_factor(1) { }
- qreal factor() const { return m_factor; }
- void setFactor(qreal v);
-
- QVideoFilterRunnable *createFilterRunnable() override;
-
-signals:
- void factorChanged();
-
-private:
- qreal m_factor;
-};
-
-class CLFilterRunnable : public QVideoFilterRunnable
-{
-public:
- CLFilterRunnable(CLFilter *filter);
- ~CLFilterRunnable();
- QVideoFrame run(QVideoFrame *input, const QVideoSurfaceFormat &surfaceFormat, RunFlags flags) override;
-
-private:
- void releaseTextures();
- uint newTexture();
-
- CLFilter *m_filter;
- QSize m_size;
- uint m_tempTexture;
- uint m_outTexture;
- uint m_lastInputTexture;
- cl_context m_clContext;
- cl_device_id m_clDeviceId;
- cl_mem m_clImage[2];
- cl_command_queue m_clQueue;
- cl_program m_clProgram;
- cl_kernel m_clKernel;
-};
-
-QVideoFilterRunnable *CLFilter::createFilterRunnable()
-{
- return new CLFilterRunnable(this);
-}
-
-CLFilterRunnable::CLFilterRunnable(CLFilter *filter) :
- m_filter(filter),
- m_tempTexture(0),
- m_outTexture(0),
- m_lastInputTexture(0),
- m_clContext(0),
- m_clQueue(0),
- m_clProgram(0),
- m_clKernel(0)
-{
- m_clImage[0] = m_clImage[1] = 0;
-
- // Set up OpenCL.
- QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
- cl_uint n;
- cl_int err = clGetPlatformIDs(0, 0, &n);
- if (err != CL_SUCCESS) {
- qWarning("Failed to get platform ID count (error %d)", err);
- if (err == -1001) {
- qDebug("Could not find OpenCL implementation. ICD missing?"
-#ifdef Q_OS_LINUX
- " Check /etc/OpenCL/vendors."
-#endif
- );
- }
- return;
- }
- if (n == 0) {
- qWarning("No OpenCL platform found");
- return;
- }
- QList<cl_platform_id> platformIds;
- platformIds.resize(n);
- if (clGetPlatformIDs(n, platformIds.data(), 0) != CL_SUCCESS) {
- qWarning("Failed to get platform IDs");
- return;
- }
- cl_platform_id platform = platformIds[0];
- const char *vendor = (const char *) f->glGetString(GL_VENDOR);
- qDebug("GL_VENDOR: %s", vendor);
- const bool isNV = vendor && strstr(vendor, "NVIDIA");
- const bool isIntel = vendor && strstr(vendor, "Intel");
- const bool isAMD = vendor && strstr(vendor, "ATI");
- qDebug("Found %u OpenCL platforms:", n);
- for (cl_uint i = 0; i < n; ++i) {
- QByteArray name;
- name.resize(1024);
- clGetPlatformInfo(platformIds[i], CL_PLATFORM_NAME, name.size(), name.data(), 0);
- qDebug("Platform %p: %s", platformIds[i], name.constData());
- // Running with an OpenCL platform without GPU support is not going
- // to cut it. In practice we want the platform for the GPU which we
- // are using with OpenGL.
- if (isNV && name.contains(QByteArrayLiteral("NVIDIA")))
- platform = platformIds[i];
- else if (isIntel && name.contains(QByteArrayLiteral("Intel")))
- platform = platformIds[i];
- else if (isAMD && name.contains(QByteArrayLiteral("AMD")))
- platform = platformIds[i];
- }
- qDebug("Using platform %p", platform);
-
- // Set up the context with OpenCL/OpenGL interop.
-#if defined (Q_OS_OSX)
- cl_context_properties contextProps[] = { CL_CONTEXT_PROPERTY_USE_CGL_SHAREGROUP_APPLE,
- (cl_context_properties) CGLGetShareGroup(CGLGetCurrentContext()),
- 0 };
-#elif defined(Q_OS_WIN)
- cl_context_properties contextProps[] = { CL_CONTEXT_PLATFORM, (cl_context_properties) platform,
- CL_GL_CONTEXT_KHR, (cl_context_properties) wglGetCurrentContext(),
- CL_WGL_HDC_KHR, (cl_context_properties) wglGetCurrentDC(),
- 0 };
-#elif defined(Q_OS_LINUX)
- QVariant nativeGLXHandle = QOpenGLContext::currentContext()->nativeHandle();
- QGLXNativeContext nativeGLXContext;
- if (!nativeGLXHandle.isNull() && nativeGLXHandle.canConvert<QGLXNativeContext>())
- nativeGLXContext = nativeGLXHandle.value<QGLXNativeContext>();
- else
- qWarning("Failed to get the underlying GLX context from the current QOpenGLContext");
- cl_context_properties contextProps[] = { CL_CONTEXT_PLATFORM, (cl_context_properties) platform,
- CL_GL_CONTEXT_KHR, (cl_context_properties) nativeGLXContext.context(),
- CL_GLX_DISPLAY_KHR, (cl_context_properties) glXGetCurrentDisplay(),
- 0 };
-#endif
-
- m_clContext = clCreateContextFromType(contextProps, CL_DEVICE_TYPE_GPU, 0, 0, &err);
- if (!m_clContext) {
- qWarning("Failed to create OpenCL context: %d", err);
- return;
- }
-
- // Get the GPU device id
-#if defined(Q_OS_OSX)
- // On OS X, get the "online" device/GPU. This is required for OpenCL/OpenGL context sharing.
- err = clGetGLContextInfoAPPLE(m_clContext, CGLGetCurrentContext(),
- CL_CGL_DEVICE_FOR_CURRENT_VIRTUAL_SCREEN_APPLE,
- sizeof(cl_device_id), &m_clDeviceId, 0);
- if (err != CL_SUCCESS) {
- qWarning("Failed to get OpenCL device for current screen: %d", err);
- return;
- }
-#else
- clGetGLContextInfoKHR_fn getGLContextInfo = (clGetGLContextInfoKHR_fn) clGetExtensionFunctionAddress("clGetGLContextInfoKHR");
- if (!getGLContextInfo || getGLContextInfo(contextProps, CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR,
- sizeof(cl_device_id), &m_clDeviceId, 0) != CL_SUCCESS) {
- err = clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 1, &m_clDeviceId, 0);
- if (err != CL_SUCCESS) {
- qWarning("Failed to get OpenCL device: %d", err);
- return;
- }
- }
-#endif
-
- m_clQueue = clCreateCommandQueue(m_clContext, m_clDeviceId, 0, &err);
- if (!m_clQueue) {
- qWarning("Failed to create OpenCL command queue: %d", err);
- return;
- }
- // Build the program.
- m_clProgram = clCreateProgramWithSource(m_clContext, 1, &openclSrc, 0, &err);
- if (!m_clProgram) {
- qWarning("Failed to create OpenCL program: %d", err);
- return;
- }
- if (clBuildProgram(m_clProgram, 1, &m_clDeviceId, 0, 0, 0) != CL_SUCCESS) {
- qWarning("Failed to build OpenCL program");
- QByteArray log;
- log.resize(2048);
- clGetProgramBuildInfo(m_clProgram, m_clDeviceId, CL_PROGRAM_BUILD_LOG, log.size(), log.data(), 0);
- qDebug("Build log: %s", log.constData());
- return;
- }
- m_clKernel = clCreateKernel(m_clProgram, "Emboss", &err);
- if (!m_clKernel) {
- qWarning("Failed to create emboss OpenCL kernel: %d", err);
- return;
- }
-}
-
-CLFilterRunnable::~CLFilterRunnable()
-{
- releaseTextures();
- if (m_clKernel)
- clReleaseKernel(m_clKernel);
- if (m_clProgram)
- clReleaseProgram(m_clProgram);
- if (m_clQueue)
- clReleaseCommandQueue(m_clQueue);
- if (m_clContext)
- clReleaseContext(m_clContext);
-}
-
-void CLFilterRunnable::releaseTextures()
-{
- QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
- if (m_tempTexture)
- f->glDeleteTextures(1, &m_tempTexture);
- if (m_outTexture)
- f->glDeleteTextures(1, &m_outTexture);
- m_tempTexture = m_outTexture = m_lastInputTexture = 0;
- if (m_clImage[0])
- clReleaseMemObject(m_clImage[0]);
- if (m_clImage[1])
- clReleaseMemObject(m_clImage[1]);
- m_clImage[0] = m_clImage[1] = 0;
-}
-
-uint CLFilterRunnable::newTexture()
-{
- QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
- GLuint texture;
- f->glGenTextures(1, &texture);
- f->glBindTexture(GL_TEXTURE_2D, texture);
- f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
- f->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
- f->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, m_size.width(), m_size.height(),
- 0, GL_RGBA, GL_UNSIGNED_BYTE, 0);
- return texture;
-}
-
-QVideoFrame CLFilterRunnable::run(QVideoFrame *input, const QVideoSurfaceFormat &surfaceFormat, RunFlags flags)
-{
- Q_UNUSED(surfaceFormat);
- Q_UNUSED(flags);
-
- // This example supports RGB data only, either in system memory (typical with cameras on all
- // platforms) or as an OpenGL texture (e.g. video playback on OS X).
- // The latter is the fast path where everything happens on GPU. THe former involves a texture upload.
-
- if (!input->isValid()
- || (input->handleType() != QAbstractVideoBuffer::NoHandle
- && input->handleType() != QAbstractVideoBuffer::GLTextureHandle)) {
- qWarning("Invalid input format");
- return *input;
- }
-
- if (input->pixelFormat() == QVideoFrame::Format_YUV420P
- || input->pixelFormat() == QVideoFrame::Format_YV12) {
- qWarning("YUV data is not supported");
- return *input;
- }
-
- if (m_size != input->size()) {
- releaseTextures();
- m_size = input->size();
- }
-
- // Create a texture from the image data.
- QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
- GLuint texture;
- if (input->handleType() == QAbstractVideoBuffer::NoHandle) {
- // Upload.
- if (m_tempTexture)
- f->glBindTexture(GL_TEXTURE_2D, m_tempTexture);
- else
- m_tempTexture = newTexture();
- input->map(QAbstractVideoBuffer::ReadOnly);
- // glTexImage2D only once and use TexSubImage later on. This avoids the need
- // to recreate the CL image object on every frame.
- f->glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, m_size.width(), m_size.height(),
- GL_RGBA, GL_UNSIGNED_BYTE, input->bits());
- input->unmap();
- texture = m_tempTexture;
- } else {
- // Already an OpenGL texture.
- texture = input->handle().toUInt();
- f->glBindTexture(GL_TEXTURE_2D, texture);
- // Unlike on the other branch, the input texture may change, so m_clImage[0] may need to be recreated.
- if (m_lastInputTexture && m_lastInputTexture != texture && m_clImage[0]) {
- clReleaseMemObject(m_clImage[0]);
- m_clImage[0] = 0;
- }
- m_lastInputTexture = texture;
- }
-
- // OpenCL image objects cannot be read and written at the same time. So use
- // a separate texture for the result.
- if (!m_outTexture)
- m_outTexture = newTexture();
-
- // Create the image objects if not yet done.
- cl_int err;
- if (!m_clImage[0]) {
- m_clImage[0] = clCreateFromGLTexture2D(m_clContext, CL_MEM_READ_ONLY, GL_TEXTURE_2D, 0, texture, &err);
- if (!m_clImage[0]) {
- qWarning("Failed to create OpenGL image object from OpenGL texture: %d", err);
- return *input;
- }
- cl_image_format fmt;
- if (clGetImageInfo(m_clImage[0], CL_IMAGE_FORMAT, sizeof(fmt), &fmt, 0) != CL_SUCCESS) {
- qWarning("Failed to query image format");
- return *input;
- }
- if (fmt.image_channel_order != CL_RGBA)
- qWarning("OpenCL image is not RGBA, expect errors");
- }
- if (!m_clImage[1]) {
- m_clImage[1] = clCreateFromGLTexture2D(m_clContext, CL_MEM_WRITE_ONLY, GL_TEXTURE_2D, 0, m_outTexture, &err);
- if (!m_clImage[1]) {
- qWarning("Failed to create output OpenGL image object from OpenGL texture: %d", err);
- return *input;
- }
- }
-
- // We are all set. Queue acquiring the image objects.
- f->glFinish();
- clEnqueueAcquireGLObjects(m_clQueue, 2, m_clImage, 0, 0, 0);
-
- // Set up the kernel arguments.
- clSetKernelArg(m_clKernel, 0, sizeof(cl_mem), &m_clImage[0]);
- clSetKernelArg(m_clKernel, 1, sizeof(cl_mem), &m_clImage[1]);
- // Accessing dynamic properties on the filter element is simple:
- cl_float factor = m_filter->factor();
- clSetKernelArg(m_clKernel, 2, sizeof(cl_float), &factor);
-
- // And queue the kernel.
- const size_t workSize[] = { size_t(m_size.width()), size_t(m_size.height()) };
- err = clEnqueueNDRangeKernel(m_clQueue, m_clKernel, 2, 0, workSize, 0, 0, 0, 0);
- if (err != CL_SUCCESS)
- qWarning("Failed to enqueue kernel: %d", err);
-
- // Return the texture from our output image object.
- // We return a texture even when the original video frame had pixel data in system memory.
- // Qt Multimedia is smart enough to handle this. Once the data is on the GPU, it stays there. No readbacks, no copies.
- clEnqueueReleaseGLObjects(m_clQueue, 2, m_clImage, 0, 0, 0);
- clFinish(m_clQueue);
- return frameFromTexture(m_outTexture, m_size, input->pixelFormat());
-}
-
-// InfoFilter will just provide some information about the video frame, to demonstrate
-// passing arbitrary data to QML via its finished() signal.
-class InfoFilter : public QAbstractVideoFilter
-{
- Q_OBJECT
-
-public:
- QVideoFilterRunnable *createFilterRunnable() override;
-
-signals:
- void finished(QObject *result);
-
-private:
- friend class InfoFilterRunnable;
-};
-
-class InfoFilterRunnable : public QVideoFilterRunnable
-{
-public:
- InfoFilterRunnable(InfoFilter *filter) : m_filter(filter) { }
- QVideoFrame run(QVideoFrame *input, const QVideoSurfaceFormat &surfaceFormat, RunFlags flags) override;
-
-private:
- InfoFilter *m_filter;
-};
-
-class InfoFilterResult : public QObject
-{
- Q_OBJECT
- Q_PROPERTY(QSize frameResolution READ frameResolution)
- Q_PROPERTY(QString handleType READ handleType)
- Q_PROPERTY(int pixelFormat READ pixelFormat)
-
-public:
- InfoFilterResult() : m_pixelFormat(0) { }
- QSize frameResolution() const { return m_frameResolution; }
- QString handleType() const { return m_handleType; }
- int pixelFormat() const { return m_pixelFormat; }
-
-private:
- QSize m_frameResolution;
- QString m_handleType;
- int m_pixelFormat;
- friend class InfoFilterRunnable;
-};
-
-void CLFilter::setFactor(qreal v)
-{
- if (m_factor != v) {
- m_factor = v;
- emit factorChanged();
- }
-}
-
-QVideoFilterRunnable *InfoFilter::createFilterRunnable()
-{
- return new InfoFilterRunnable(this);
-}
-
-QVideoFrame InfoFilterRunnable::run(QVideoFrame *input, const QVideoSurfaceFormat &surfaceFormat, RunFlags flags)
-{
- Q_UNUSED(surfaceFormat);
- Q_UNUSED(flags);
- InfoFilterResult *result = new InfoFilterResult;
- result->m_frameResolution = input->size();
- switch (input->handleType()) {
- case QAbstractVideoBuffer::NoHandle:
- result->m_handleType = QLatin1String("pixel data");
- result->m_pixelFormat = input->pixelFormat();
- break;
- case QAbstractVideoBuffer::GLTextureHandle:
- result->m_handleType = QLatin1String("OpenGL texture");
- break;
- default:
- result->m_handleType = QLatin1String("unknown");
- break;
- }
- emit m_filter->finished(result); // parent-less QObject -> ownership transferred to the JS engine
- return *input;
-}
-
-int main(int argc, char **argv)
-{
-#ifdef Q_OS_WIN // avoid ANGLE on Windows
- QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
-#endif
- QGuiApplication app(argc, argv);
-
- qmlRegisterType<CLFilter>("qmlvideofilter.cl.test", 1, 0, "CLFilter");
- qmlRegisterType<InfoFilter>("qmlvideofilter.cl.test", 1, 0, "InfoFilter");
-
- QQuickView view;
- QString fn;
- if (argc > 1) {
- fn = QUrl::fromLocalFile(QFileInfo(QString::fromUtf8(argv[1])).absoluteFilePath()).toString();
- qDebug("Playing video %s", qPrintable(fn));
- } else {
- qDebug("No video file specified, using camera instead.");
- }
- view.rootContext()->setContextProperty("videoFilename", fn);
- view.setSource(QUrl("qrc:///main.qml"));
-
- view.show();
-
- return app.exec();
-}
-
-#include "main.moc"
diff --git a/examples/multimedia/video/qmlvideofilter_opencl/main.qml b/examples/multimedia/video/qmlvideofilter_opencl/main.qml
deleted file mode 100644
index 3d3205398..000000000
--- a/examples/multimedia/video/qmlvideofilter_opencl/main.qml
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Multimedia module.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 QtMultimedia 5.5
-import qmlvideofilter.cl.test 1.0
-
-Item {
- width: 1024
- height: 768
-
- Camera {
- id: camera
- }
-
- MediaPlayer {
- id: player
- autoPlay: true
- source: videoFilename
- }
-
- VideoOutput {
- id: output
- source: videoFilename !== "" ? player : camera
- filters: [ infofilter, clfilter ]
- anchors.fill: parent
- }
-
- CLFilter {
- id: clfilter
- // Animate a property which is passed to the OpenCL kernel.
- SequentialAnimation on factor {
- loops: Animation.Infinite
- NumberAnimation {
- from: 1
- to: 20
- duration: 6000
- }
- NumberAnimation {
- from: 20
- to: 1
- duration: 3000
- }
- }
- }
-
- InfoFilter {
- // This filter does not change the image. Instead, it provides some results calculated from the frame.
- id: infofilter
- onFinished: {
- info.res = result.frameResolution.width + "x" + result.frameResolution.height;
- info.type = result.handleType;
- info.fmt = result.pixelFormat;
- }
- }
-
- Column {
- Text {
- font.pointSize: 20
- color: "green"
- text: "Transformed with OpenCL on GPU\nClick to disable and enable the emboss filter"
- }
- Text {
- font.pointSize: 12
- color: "green"
- text: "Emboss factor " + Math.round(clfilter.factor)
- visible: clfilter.active
- }
- Text {
- id: info
- font.pointSize: 12
- color: "green"
- property string res
- property string type
- property int fmt
- text: "Input resolution: " + res + " Input frame type: " + type + (fmt ? " Pixel format: " + fmt : "")
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: clfilter.active = !clfilter.active
- }
-}
diff --git a/examples/multimedia/video/qmlvideofilter_opencl/qmlvideofilter_opencl.pro b/examples/multimedia/video/qmlvideofilter_opencl/qmlvideofilter_opencl.pro
deleted file mode 100644
index f7f191d2b..000000000
--- a/examples/multimedia/video/qmlvideofilter_opencl/qmlvideofilter_opencl.pro
+++ /dev/null
@@ -1,17 +0,0 @@
-TEMPLATE = app
-TARGET = qmlvideofilter_opencl
-
-QT += quick multimedia
-
-SOURCES = main.cpp
-HEADERS = rgbframehelper.h
-
-RESOURCES = qmlvideofilter_opencl.qrc
-OTHER_FILES = main.qml
-
-target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/video/qmlvideofilter_opencl
-INSTALLS += target
-
-osx: LIBS += -framework OpenCL
-unix: !osx: LIBS += -lOpenCL
-win32:!winrt: LIBS += -lopengl32 -lOpenCL
diff --git a/examples/multimedia/video/qmlvideofilter_opencl/qmlvideofilter_opencl.qrc b/examples/multimedia/video/qmlvideofilter_opencl/qmlvideofilter_opencl.qrc
deleted file mode 100644
index 5f6483ac3..000000000
--- a/examples/multimedia/video/qmlvideofilter_opencl/qmlvideofilter_opencl.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>main.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h b/examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h
deleted file mode 100644
index 1c8dbd857..000000000
--- a/examples/multimedia/video/qmlvideofilter_opencl/rgbframehelper.h
+++ /dev/null
@@ -1,141 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the examples of the Qt Multimedia module.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-#ifndef RGBFRAMEHELPER_H
-#define RGBFRAMEHELPER_H
-
-#include <QImage>
-#include <QAbstractVideoBuffer>
-#include <QOpenGLContext>
-#include <QOpenGLFunctions>
-#include <QOpenGLFramebufferObject>
-
-/*
- Returns a QImage that wraps the given video frame.
-
- This is suitable only for QAbstractVideoBuffer::NoHandle frames with RGB (or BGR)
- data. YUV is not supported here.
-
- The QVideoFrame must be mapped and kept mapped as long as the wrapping QImage
- exists.
-
- As a convenience the function also supports frames with a handle type of
- QAbstractVideoBuffer::GLTextureHandle. This allows creating a system memory backed
- QVideoFrame containing the image data from an OpenGL texture. However, readback is a
- slow operation and may stall the GPU pipeline and should be avoided in production code.
-*/
-QImage imageWrapper(const QVideoFrame &frame)
-{
-#ifndef QT_NO_OPENGL
- if (frame.handleType() == QAbstractVideoBuffer::GLTextureHandle) {
- // Slow and inefficient path. Ideally what's on the GPU should remain on the GPU, instead of readbacks like this.
- QImage img(frame.width(), frame.height(), QImage::Format_RGBA8888);
- GLuint textureId = frame.handle().toUInt();
- QOpenGLContext *ctx = QOpenGLContext::currentContext();
- QOpenGLFunctions *f = ctx->functions();
- GLuint fbo;
- f->glGenFramebuffers(1, &fbo);
- GLuint prevFbo;
- f->glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *) &prevFbo);
- f->glBindFramebuffer(GL_FRAMEBUFFER, fbo);
- f->glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, textureId, 0);
- f->glReadPixels(0, 0, frame.width(), frame.height(), GL_RGBA, GL_UNSIGNED_BYTE, img.bits());
- f->glBindFramebuffer(GL_FRAMEBUFFER, prevFbo);
- return img;
- } else
-#endif // QT_NO_OPENGL
- {
- if (!frame.isReadable()) {
- qWarning("imageFromVideoFrame: No mapped image data available for read");
- return QImage();
- }
-
- QImage::Format fmt = QVideoFrame::imageFormatFromPixelFormat(frame.pixelFormat());
- if (fmt != QImage::Format_Invalid)
- return QImage(frame.bits(), frame.width(), frame.height(), fmt);
-
- qWarning("imageFromVideoFrame: No matching QImage format");
- }
-
- return QImage();
-}
-
-#ifndef QT_NO_OPENGL
-class TextureBuffer : public QAbstractVideoBuffer
-{
-public:
- TextureBuffer(uint id) : QAbstractVideoBuffer(GLTextureHandle), m_id(id) { }
- MapMode mapMode() const { return NotMapped; }
- uchar *map(MapMode, int *, int *) { return 0; }
- void unmap() { }
- QVariant handle() const { return QVariant::fromValue<uint>(m_id); }
-
-private:
- GLuint m_id;
-};
-#endif // QT_NO_OPENGL
-
-/*
- Creates and returns a new video frame wrapping the OpenGL texture textureId. The size
- must be passed in size, together with the format of the underlying image data in
- format. When the texture originates from a QImage, use
- QVideoFrame::imageFormatFromPixelFormat() to get a suitable format. Ownership is not
- altered, the new QVideoFrame will not destroy the texture.
-*/
-QVideoFrame frameFromTexture(uint textureId, const QSize &size, QVideoFrame::PixelFormat format)
-{
-#ifndef QT_NO_OPENGL
- return QVideoFrame(new TextureBuffer(textureId), size, format);
-#else
- return QVideoFrame();
-#endif // QT_NO_OPENGL
-}
-
-#endif
diff --git a/examples/multimedia/video/qmlvideofx/Info.plist b/examples/multimedia/video/qmlvideofx/Info.plist
deleted file mode 100644
index 5fbe35f1c..000000000
--- a/examples/multimedia/video/qmlvideofx/Info.plist
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>UISupportedInterfaceOrientations</key>
- <array>
- <string>UIInterfaceOrientationLandscapeRight</string>
- </array>
- <key>UIInterfaceOrientation</key>
- <string>UIInterfaceOrientationLandscapeRight</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleExecutable</key>
- <string>qmlvideofx</string>
- <key>CFBundleIdentifier</key>
- <string>com.digia.${PRODUCT_NAME:rfc1034identifier}</string>
- <key>CFBundleDisplayName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundleName</key>
- <string>${PRODUCT_NAME}</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>NSCameraUsageDescription</key>
- <string>Qt Multimedia Example</string>
-</dict>
-</plist>
diff --git a/examples/multimedia/video/qmlvideofx/filereader.cpp b/examples/multimedia/video/qmlvideofx/filereader.cpp
deleted file mode 100644
index af74899f9..000000000
--- a/examples/multimedia/video/qmlvideofx/filereader.cpp
+++ /dev/null
@@ -1,69 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 "filereader.h"
-
-#include <QCoreApplication>
-#include <QDir>
-#include <QFile>
-#include <QFileInfo>
-#include <QTextStream>
-
-QString FileReader::readFile(const QString &fileName)
-{
- QString content;
- QFile file(fileName);
- if (file.open(QIODevice::ReadOnly)) {
- QTextStream stream(&file);
- content = stream.readAll();
- }
- return content;
-}
-
diff --git a/examples/multimedia/video/qmlvideofx/filereader.h b/examples/multimedia/video/qmlvideofx/filereader.h
deleted file mode 100644
index 019317a1a..000000000
--- a/examples/multimedia/video/qmlvideofx/filereader.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 <QObject>
-
-class FileReader : public QObject
-{
- Q_OBJECT
-public:
- Q_INVOKABLE QString readFile(const QString &fileName);
-};
-
diff --git a/examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png b/examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png
deleted file mode 100644
index 0a9e25ce2..000000000
--- a/examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/images/Slider_bar.png b/examples/multimedia/video/qmlvideofx/images/Slider_bar.png
deleted file mode 100644
index 84be50fae..000000000
--- a/examples/multimedia/video/qmlvideofx/images/Slider_bar.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/images/Slider_handle.png b/examples/multimedia/video/qmlvideofx/images/Slider_handle.png
deleted file mode 100644
index aebecdf19..000000000
--- a/examples/multimedia/video/qmlvideofx/images/Slider_handle.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/images/Triangle_Top.png b/examples/multimedia/video/qmlvideofx/images/Triangle_Top.png
deleted file mode 100644
index 5768e9536..000000000
--- a/examples/multimedia/video/qmlvideofx/images/Triangle_Top.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png b/examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png
deleted file mode 100644
index 509409666..000000000
--- a/examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png b/examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png
deleted file mode 100644
index 6823de004..000000000
--- a/examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/images/icon_Folder.png b/examples/multimedia/video/qmlvideofx/images/icon_Folder.png
deleted file mode 100644
index 62d97004f..000000000
--- a/examples/multimedia/video/qmlvideofx/images/icon_Folder.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/images/icon_Menu.png b/examples/multimedia/video/qmlvideofx/images/icon_Menu.png
deleted file mode 100644
index bc078612e..000000000
--- a/examples/multimedia/video/qmlvideofx/images/icon_Menu.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/images/qt-logo.png b/examples/multimedia/video/qmlvideofx/images/qt-logo.png
deleted file mode 100644
index ecbff0ca3..000000000
--- a/examples/multimedia/video/qmlvideofx/images/qt-logo.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/main.cpp b/examples/multimedia/video/qmlvideofx/main.cpp
deleted file mode 100644
index ec547795f..000000000
--- a/examples/multimedia/video/qmlvideofx/main.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 <QtCore/QStandardPaths>
-#include <QtCore/QStringList>
-#include <QtQml/QQmlContext>
-#include <QtGui/QGuiApplication>
-#include <QtQuick/QQuickItem>
-#include <QtQuick/QQuickView>
-#include "filereader.h"
-#include "trace.h"
-
-#ifdef PERFORMANCEMONITOR_SUPPORT
-#include "performancemonitordeclarative.h"
-#endif
-
-#ifdef REQUEST_PERMISSIONS_ON_ANDROID
-#include <QtAndroid>
-
-bool requestStoragePermission() {
- using namespace QtAndroid;
-
- QString permission = QStringLiteral("android.permission.WRITE_EXTERNAL_STORAGE");
- const QHash<QString, PermissionResult> results = requestPermissionsSync(QStringList({permission}));
- if (!results.contains(permission) || results[permission] == PermissionResult::Denied) {
- qWarning() << "Couldn't get permission: " << permission;
- return false;
- }
-
- return true;
-}
-#endif
-
-int main(int argc, char *argv[])
-{
- QGuiApplication app(argc, argv);
-
-#ifdef PERFORMANCEMONITOR_SUPPORT
- PerformanceMonitor::qmlRegisterTypes();
-#endif
-#ifdef REQUEST_PERMISSIONS_ON_ANDROID
- if (!requestStoragePermission())
- return -1;
-#endif
-
- QUrl fileName;
- qreal volume = 0.5;
- QStringList args = app.arguments();
-#ifdef PERFORMANCEMONITOR_SUPPORT
- PerformanceMonitor::State performanceMonitorState;
-#endif
- for (int i = 1; i < args.size(); ++i) {
- const QByteArray arg = args.at(i).toUtf8();
- if (arg.startsWith('-')) {
- if ("-volume" == arg) {
- if (i + 1 < args.size())
- volume = 0.01 * args.at(++i).toInt();
- else
- qtTrace() << "Option \"-volume\" takes a value";
- }
-#ifdef PERFORMANCEMONITOR_SUPPORT
- else if (performanceMonitorState.parseArgument(arg)) {
- // Do nothing
- }
-#endif
- else {
- qtTrace() << "Option" << arg << "ignored";
- }
- } else {
- if (fileName.isEmpty())
- fileName = QUrl::fromLocalFile(arg);
- else
- qtTrace() << "Argument" << arg << "ignored";
- }
- }
-
- QQuickView viewer;
-
- viewer.setSource(QUrl(QLatin1String("qrc:///qml/qmlvideofx/Main.qml")));
- QQuickItem *rootObject = viewer.rootObject();
- rootObject->setProperty("fileName", fileName);
- viewer.rootObject()->setProperty("volume", volume);
-
-#ifdef PERFORMANCEMONITOR_SUPPORT
- if (performanceMonitorState.valid) {
- rootObject->setProperty("perfMonitorsLogging", performanceMonitorState.logging);
- rootObject->setProperty("perfMonitorsVisible", performanceMonitorState.visible);
- }
- QObject::connect(&viewer, SIGNAL(afterRendering()),
- rootObject, SLOT(qmlFramePainted()));
-#endif
-
- FileReader fileReader;
- viewer.rootContext()->setContextProperty("fileReader", &fileReader);
-
- const QUrl appPath(QUrl::fromLocalFile(app.applicationDirPath()));
- const QStringList picturesLocation = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation);
- const QUrl imagePath = picturesLocation.isEmpty() ? appPath : QUrl::fromLocalFile(picturesLocation.first());
- viewer.rootContext()->setContextProperty("imagePath", imagePath);
-
- const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation);
- const QUrl videoPath = moviesLocation.isEmpty() ? appPath : QUrl::fromLocalFile(moviesLocation.first());
- viewer.rootContext()->setContextProperty("videoPath", videoPath);
-
- viewer.setTitle("qmlvideofx");
- viewer.setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint |
- Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint);
- viewer.setMinimumSize(QSize(1280, 720));
- viewer.setResizeMode(QQuickView::SizeRootObjectToView);
-
- viewer.show();
-
- // Delay invocation of init until the event loop has started, to work around
- // a GL context issue on Harmattan: without this, we get the following error
- // when the first ShaderEffectItem is created:
- // "QGLShaderProgram::addShader: Program and shader are not associated with same context"
- QMetaObject::invokeMethod(viewer.rootObject(), "init", Qt::QueuedConnection);
-
- return app.exec();
-}
-
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml
deleted file mode 100644
index 326c64ace..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- color: "transparent"
- height: itemHeight
- width: itemWidth
-
- property string text
- property color bgColor: "transparent"
- property color bgColorSelected: "#14aaff"
- property color textColor: "white"
- property alias enabled: mouseArea.enabled
- property bool active: true
- property alias horizontalAlign: text.horizontalAlignment
-
- signal clicked
-
- Rectangle {
- anchors { fill: parent; margins: 1 }
- color: mouseArea.pressed ? bgColorSelected : bgColor
-
- Text {
- id: text
- clip: true
- text: root.text
- anchors { fill: parent; margins: scaledMargin }
- font.pixelSize: fontSize
- color: textColor
- horizontalAlignment: Text.AlignLeft
- verticalAlignment: Text.AlignVCenter
- }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: {
- root.clicked()
- }
- enabled: active
- }
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml
deleted file mode 100644
index 8e109b9be..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-
-Rectangle {
- id: root
- property alias effect: effectLoader.item
- property alias gripSize: divider.gripSize
- property string effectSource
- property real volume: 0.5
-
- signal videoFramePainted
-
- Divider {
- id: divider
- visible: false
- z: 1.0
- onValueChanged: updateDivider()
- }
-
- ShaderEffectSource {
- id: theSource
- smooth: true
- hideSource: true
- }
-
- Loader {
- id: contentLoader
- }
-
- Loader {
- id: effectLoader
- source: effectSource
- }
-
- Connections {
- id: videoFramePaintedConnection
- onFramePainted: {
- if (performanceLoader.item)
- root.videoFramePainted()
- }
- ignoreUnknownSignals: true
- }
-
- onWidthChanged: {
- if (effectLoader.item)
- effectLoader.item.targetWidth = root.width
- }
-
- onHeightChanged: {
- if (effectLoader.item)
- effectLoader.item.targetHeight = root.height
- }
-
- onEffectSourceChanged: {
- effectLoader.source = effectSource
- effectLoader.item.parent = root
- effectLoader.item.targetWidth = root.width
- effectLoader.item.targetHeight = root.height
- updateSource()
- effectLoader.item.source = theSource
- divider.visible = effectLoader.item.divider
- updateDivider()
- }
-
- function init() {
- openImage("qrc:/images/qt-logo.png")
- root.effectSource = "EffectPassThrough.qml"
- }
-
- function updateDivider() {
- if (effectLoader.item && effectLoader.item.divider)
- effectLoader.item.dividerValue = divider.value
- }
-
- function updateSource() {
- if (contentLoader.item) {
- contentLoader.item.parent = root
- contentLoader.item.anchors.fill = root
- theSource.sourceItem = contentLoader.item
- if (effectLoader.item)
- effectLoader.item.anchors.fill = contentLoader.item
- }
- }
-
- function openImage(path) {
- stop()
- contentLoader.source = "ContentImage.qml"
- videoFramePaintedConnection.target = null
- contentLoader.item.source = path
- updateSource()
- }
-
- function openVideo(path) {
- stop()
- contentLoader.source = "ContentVideo.qml"
- videoFramePaintedConnection.target = contentLoader.item
- contentLoader.item.mediaSource = path
- contentLoader.item.volume = volume
- contentLoader.item.play()
- updateSource()
- }
-
- function openCamera() {
- stop()
- contentLoader.source = "ContentCamera.qml"
- videoFramePaintedConnection.target = contentLoader.item
- updateSource()
- }
-
- function stop() {
- if (contentLoader.source == "ContentVideo.qml")
- contentLoader.item.stop()
- theSource.sourceItem = null
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentCamera.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentCamera.qml
deleted file mode 100644
index c448a5fe4..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentCamera.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-import QtMultimedia 5.0
-
-VideoOutput {
- source: camera
-
- Camera {
- id: camera
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml
deleted file mode 100644
index d243c8b3e..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-
-Image {
- fillMode: Image.PreserveAspectFit
- smooth: true
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml
deleted file mode 100644
index ade7012b1..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-import QtMultimedia 5.0
-
-VideoOutput {
- source: mediaPlayer
- property alias mediaSource: mediaPlayer.source
- property alias volume: mediaPlayer.volume
- property bool isRunning: true
-
- MediaPlayer {
- id: mediaPlayer
- autoPlay: true
- volume: 0.5
- loops: Audio.Infinite
- }
-
- function play() { mediaPlayer.play() }
- function pause() { mediaPlayer.pause() }
- function stop() { mediaPlayer.stop() }
-
- function toggleplay() {
- if (isRunning) {
- pause()
- isRunning = false
- } else {
- play()
- isRunning = true
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: toggleplay()
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml
deleted file mode 100644
index 691db5c6d..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- color: "transparent"
- radius: 5
- property alias value: grip.value
- property color gripColor: "transparent"
- property real gripSize: 20
- property real gripTolerance: 3.0
- property real increment: 0.1
- property bool enabled: true
- property string imageSource: "qrc:/images/Triangle_Top.png"
-
- Rectangle {
- id: grip
- property real value: 0.5
- x: (value * parent.width) - width/2
- anchors.verticalCenter: parent.verticalCenter
- width: root.gripTolerance * root.gripSize
- height: width
- radius: width/2
- color: "transparent"
-
- Image {
- id: sliderhandleimage
- source: imageSource
- anchors.centerIn: parent
- }
-
- MouseArea {
- id: mouseArea
- enabled: root.enabled
- anchors.fill: parent
- drag {
- target: grip
- axis: Drag.XAxis
- minimumX: -parent.width/2
- maximumX: root.width - parent.width/2
- }
- onPositionChanged: {
- if (drag.active)
- updatePosition()
- }
- onReleased: {
- updatePosition()
- }
- function updatePosition() {
- value = (grip.x + grip.width/2) / grip.parent.width
- }
- }
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml
deleted file mode 100644
index e098d4861..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-
-Rectangle {
- id: root
- anchors.fill: parent
- color: "transparent"
- property alias value: slider.value
- property alias lineWidth: line.width
- property alias gripSize: slider.gripSize
-
- Rectangle {
- id: line
- anchors { top: parent.top; bottom: parent.bottom }
- x: parent.value * parent.width - (width / 2)
- width: 4
- color: "#14aaff"
- }
-
- // topgrip
- Curtain {
- id: slider
- increment: 0.0
- anchors {
- top: parent.top
- topMargin: (gripSize / 2) + 5
- left: parent.left
- right: parent.right
- }
- onValueChanged: slider2.value = slider.value
- }
-
- // bottomgrip
- Curtain {
- id: slider2
- increment: 0.0
- anchors {
- bottom: parent.bottom
- bottomMargin: (gripSize / 2) + 5
- left: parent.left
- right: parent.right
- }
- imageSource: "qrc:/images/Triangle_bottom.png"
- onValueChanged: slider.value = slider2.value
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml
deleted file mode 100644
index 66a6b919f..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-ShaderEffect {
- property variant source
- property ListModel parameters: ListModel { }
- property bool divider: true
- property real dividerValue: 0.5
- property real targetWidth: 0
- property real targetHeight: 0
- property string fragmentShaderFilename
- property string vertexShaderFilename
-
- QtObject {
- id: d
- property string fragmentShaderCommon: "
- #ifdef GL_ES
- precision mediump float;
- #else
- # define lowp
- # define mediump
- # define highp
- #endif // GL_ES
- "
- }
-
- // The following is a workaround for the fact that ShaderEffect
- // doesn't provide a way for shader programs to be read from a file,
- // rather than being inline in the QML file
-
- onFragmentShaderFilenameChanged:
- fragmentShader = d.fragmentShaderCommon + fileReader.readFile(":shaders/" + fragmentShaderFilename)
- onVertexShaderFilenameChanged:
- vertexShader = fileReader.readFile(vertexShaderFilename)
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml
deleted file mode 100644
index 4087c8520..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Grid Spacing"
- value: 0.5
- }
- onDataChanged: updateGrid()
- }
-
- function updateGrid()
- {
- grid = parameters.get(0).value * 10;
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real grid: 5.0
-
- property real step_x: 0.0015625
- property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0
-
- fragmentShaderFilename: "billboard.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml
deleted file mode 100644
index 90e27184d..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Threshold"
- value: 0.5
- }
- onDataChanged: updateThreshold()
- }
-
- function updateThreshold()
- {
- threshold = parameters.get(0).value;
- }
- // Transform slider values, and bind result to shader uniforms
- property real threshold: 0.5
-
- fragmentShaderFilename: "blackandwhite.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml
deleted file mode 100644
index a4e981917..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- fragmentShaderFilename: "emboss.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml
deleted file mode 100644
index 6a0c711f5..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://www.geeks3d.com/20100909/shader-library-gaussian-blur-post-processing-filter-in-glsl/
-
-import QtQuick 2.0
-
-Item {
- id: root
- property bool divider: true
- property real dividerValue: 0.5
- property ListModel parameters: ListModel {
- ListElement {
- name: "Radius"
- value: 0.5
- }
- onDataChanged: updateBlurSize()
- }
-
- function updateBlurSize()
- {
- if ((targetHeight > 0) && (targetWidth > 0))
- {
- verticalBlurSize = 4.0 * parameters.get(0).value / targetHeight;
- horizontalBlurSize = 4.0 * parameters.get(0).value / targetWidth;
- }
- }
-
- property alias targetWidth: verticalShader.targetWidth
- property alias targetHeight: verticalShader.targetHeight
- property alias source: verticalShader.source
- property alias horizontalBlurSize: horizontalShader.blurSize
- property alias verticalBlurSize: verticalShader.blurSize
-
-
- Effect {
- id: verticalShader
- anchors.fill: parent
- dividerValue: parent.dividerValue
- property real blurSize: 0.0
-
- onTargetHeightChanged: {
- updateBlurSize()
- }
- onTargetWidthChanged: {
- updateBlurSize()
- }
- fragmentShaderFilename: "gaussianblur_v.fsh"
- }
-
- Effect {
- id: horizontalShader
- anchors.fill: parent
- dividerValue: parent.dividerValue
- property real blurSize: 0.0
- fragmentShaderFilename: "gaussianblur_h.fsh"
- source: horizontalShaderSource
-
- ShaderEffectSource {
- id: horizontalShaderSource
- sourceItem: verticalShader
- smooth: true
- hideSource: true
- }
- }
-}
-
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGlow.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGlow.qml
deleted file mode 100644
index 3f9e3e771..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGlow.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- fragmentShaderFilename: "glow.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml
deleted file mode 100644
index f04e29deb..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Hue"
- value: 0.5
- }
- ListElement {
- name: "Width"
- value: 0.5
- }
- onDataChanged: updateParameters()
- }
-
- function updateParameters()
- {
- targetHue = parameters.get(0).value * 360
- windowWidth = parameters.get(1).value * 60
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real targetHue: 0.5 * 360
- property real windowWidth: 0.5 * 60
-
- fragmentShaderFilename: "isolate.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml
deleted file mode 100644
index ae21d93e4..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-import QtQuick.Window 2.1
-
-Effect {
- id: root
- divider: false
- parameters: ListModel {
- ListElement {
- name: "Radius"
- value: 0.5
- }
- ListElement {
- name: "Diffraction"
- value: 0.5
- }
- onDataChanged: updateParameters()
- }
-
- function updateParameters()
- {
- radius = parameters.get(0).value * 100;
- diffractionIndex = parameters.get(1).value;
- }
-
- property real posX: -1
- property real posY: -1
- property real pixDens: Screen.pixelDensity
-
- QtObject {
- id: d
- property real oldTargetWidth: root.targetWidth
- property real oldTargetHeight: root.targetHeight
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real radius: 0.5 * 100
- property real diffractionIndex: 0.5
-
- onTargetWidthChanged: {
- if (posX == -1)
- posX = targetWidth / 2
- else if (d.oldTargetWidth != 0)
- posX *= (targetWidth / d.oldTargetWidth)
- d.oldTargetWidth = targetWidth
- }
-
- onTargetHeightChanged: {
- if (posY == -1)
- posY = targetHeight / 2
- else if (d.oldTargetHeight != 0)
- posY *= (targetHeight / d.oldTargetHeight)
- d.oldTargetHeight = targetHeight
- }
-
- fragmentShaderFilename: "magnify.fsh"
-
- MouseArea {
- anchors.fill: parent
- onPositionChanged: { root.posX = mouse.x; root.posY = root.targetHeight - mouse.y }
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml
deleted file mode 100644
index 4a208a95f..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- divider: false
- parameters: ListModel {
- ListElement {
- name: "Extent"
- value: 0.5
- }
- onDataChanged: updateParameters()
- }
-
- function updateParameters()
- {
- curlExtent = 1.0 - parameters.get(0).value;
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real curlExtent: 0.5
-
- fragmentShaderFilename: "pagecurl.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml
deleted file mode 100644
index 20395a967..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- divider: false
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml
deleted file mode 100644
index 79c1f21e2..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Granularity"
- value: 0.5
- }
- onDataChanged: updateParameters()
- }
-
- function updateParameters()
- {
- granularity = parameters.get(0).value * 20.0;
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real granularity: 0.5 * 20
-
- fragmentShaderFilename: "pixelate.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml
deleted file mode 100644
index 90c531d2c..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Gamma"
- value: 0.5
- }
- onDataChanged: updateParameters()
- }
-
- function updateParameters()
- {
- gamma = parameters.get(0).value;
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real gamma: 0.5
-
- property real numColors: 8.0
-
- fragmentShaderFilename: "posterize.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml
deleted file mode 100644
index 0fe25b61d..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-import QtQuick.Window 2.1
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Amplitude"
- value: 0.5
- }
- ListElement {
- name: "Frequency"
- value: 0.5
- }
- onDataChanged: updateParameters()
- }
-
- function updateParameters()
- {
- amplitude = parameters.get(0).value * 0.03;
- n = parameters.get(1).value * 7;
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real amplitude: 0.5 * 0.03
- property real n: 0.5 * 7
- property real pixDens: Screen.pixelDensity
-
- property real time: 0
- NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 }
-
- fragmentShaderFilename: "ripple.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml
deleted file mode 100644
index 593b764a8..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-ListModel {
- id: sources
- ListElement { name: "No effect"; source: "EffectPassThrough.qml" }
- ListElement { name: "Billboard"; source: "EffectBillboard.qml" }
- ListElement { name: "Black & white"; source: "EffectBlackAndWhite.qml" }
- ListElement { name: "Blur"; source: "EffectGaussianBlur.qml" }
- ListElement { name: "Edge detection"; source: "EffectSobelEdgeDetection1.qml" }
- ListElement { name: "Emboss"; source: "EffectEmboss.qml" }
- ListElement { name: "Glow"; source: "EffectGlow.qml" }
- ListElement { name: "Isolate"; source: "EffectIsolate.qml" }
- ListElement { name: "Magnify"; source: "EffectMagnify.qml" }
- ListElement { name: "Page curl"; source: "EffectPageCurl.qml" }
- ListElement { name: "Pixelate"; source: "EffectPixelate.qml" }
- ListElement { name: "Posterize"; source: "EffectPosterize.qml" }
- ListElement { name: "Ripple"; source: "EffectRipple.qml" }
- ListElement { name: "Sepia"; source: "EffectSepia.qml" }
- ListElement { name: "Sharpen"; source: "EffectSharpen.qml" }
- ListElement { name: "Shockwave"; source: "EffectShockwave.qml" }
- ListElement { name: "Tilt shift"; source: "EffectTiltShift.qml" }
- ListElement { name: "Toon"; source: "EffectToon.qml" }
- ListElement { name: "Warhol"; source: "EffectWarhol.qml" }
- ListElement { name: "Wobble"; source: "EffectWobble.qml" }
- ListElement { name: "Vignette"; source: "EffectVignette.qml" }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSepia.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSepia.qml
deleted file mode 100644
index ffacb1d01..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSepia.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- fragmentShaderFilename: "sepia.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml
deleted file mode 100644
index bfcfa8b80..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Sharpness"
- value: 0.5
- }
- onDataChanged: updateParameters()
- }
-
- function updateParameters()
- {
- amount = parameters.get(0).value * 18;
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real amount: 0.5 * 18
-
- fragmentShaderFilename: "sharpen.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml
deleted file mode 100644
index 875c23b79..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml
+++ /dev/null
@@ -1,96 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- id: root
- parameters: ListModel {
- ListElement {
- name: "Amplitude"
- value: 0.5
- }
- onDataChanged: updateParameters()
- }
-
- function updateParameters()
- {
- granularity = parameters.get(0).value * 20;
- weight = parameters.get(0).value;
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real granularity: 0.5 * 20
- property real weight: 0.5
-
- property real centerX
- property real centerY
- property real time
-
- SequentialAnimation {
- running: true
- loops: Animation.Infinite
- ScriptAction {
- script: {
- centerX = Math.random()
- centerY = Math.random()
- }
- }
- NumberAnimation {
- target: root
- property: "time"
- from: 0
- to: 1
- duration: 1000
- }
- }
-
- fragmentShaderFilename: "shockwave.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml
deleted file mode 100644
index babd09afa..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml
+++ /dev/null
@@ -1,74 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Threshold"
- value: 0.5
- }
- onDataChanged: updateMixLevel()
- }
-
- function updateMixLevel()
- {
- mixLevel = parameters.get(0).value;
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real mixLevel: 0.5
- property real targetSize: 250 - (200 * mixLevel) // TODO: fix ...
- property real resS: targetSize
- property real resT: targetSize
-
- fragmentShaderFilename: "sobeledgedetection1.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml
deleted file mode 100644
index cdc7713f0..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- fragmentShaderFilename: "tiltshift.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml
deleted file mode 100644
index 244d465a5..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Threshold"
- value: 0.5
- }
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real threshold: parameters.get(0).value
- property real targetSize: 250 - (200 * threshold) // TODO: fix ...
- property real resS: targetSize
- property real resT: targetSize
-
- // TODO
- property real magTol: 0.3
- property real quantize: 8.0
-
- fragmentShaderFilename: "toon.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectVignette.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectVignette.qml
deleted file mode 100644
index 2b16c2a01..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectVignette.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- fragmentShaderFilename: "vignette.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml
deleted file mode 100644
index 2b88b8409..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- fragmentShaderFilename: "warhol.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml
deleted file mode 100644
index f4640be1e..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Effect {
- parameters: ListModel {
- ListElement {
- name: "Amplitude"
- value: 0.5
- }
- }
-
- // Transform slider values, and bind result to shader uniforms
- property real amplitude: parameters.get(0).value * 0.05
-
- property real frequency: 20
- property real time: 0
-
- NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 }
-
- fragmentShaderFilename: "wobble.fsh"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml
deleted file mode 100644
index 003f8736b..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml
+++ /dev/null
@@ -1,392 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-import Qt.labs.folderlistmodel 2.1
-
-Rectangle {
- id: fileBrowser
- color: "transparent"
- z: 4
-
- property string folder
- property bool shown: loader.sourceComponent
-
- signal fileSelected(string file)
-
- function selectFile(file) {
- if (file !== "") {
- folder = loader.item.folders.folder
- fileBrowser.fileSelected(file)
- }
- loader.sourceComponent = undefined
- }
-
- Loader {
- id: loader
- }
-
- function show() {
- loader.sourceComponent = fileBrowserComponent
- loader.item.parent = fileBrowser
- loader.item.anchors.fill = fileBrowser
- loader.item.folder = fileBrowser.folder
- }
-
- Component {
- id: fileBrowserComponent
-
- Rectangle {
- id: root
- color: "black"
- property bool showFocusHighlight: false
- property variant folders: folders1
- property variant view: view1
- property alias folder: folders1.folder
- property color textColor: "white"
-
- FolderListModel {
- id: folders1
- folder: folder
- }
-
- FolderListModel {
- id: folders2
- folder: folder
- }
-
- SystemPalette {
- id: palette
- }
-
- Component {
- id: folderDelegate
-
- Rectangle {
- id: wrapper
- function launch() {
- var path = "file://";
- if (filePath.length > 2 && filePath[1] === ':') // Windows drive logic, see QUrl::fromLocalFile()
- path += '/';
- path += filePath;
- if (folders.isFolder(index))
- down(path);
- else
- fileBrowser.selectFile(path)
- }
- width: root.width
- height: itemHeight
- color: "transparent"
-
- Rectangle {
- id: highlight; visible: false
- anchors.fill: parent
- color: palette.highlight
- gradient: Gradient {
- GradientStop { id: t1; position: 0.0; color: palette.highlight }
- GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) }
- }
- }
-
- Item {
- width: itemHeight; height: itemHeight
- Image {
- source: "qrc:/images/icon_Folder.png"
- fillMode: Image.PreserveAspectFit
- anchors.fill: parent
- anchors.margins: scaledMargin
- visible: folders.isFolder(index)
- }
- }
-
- Text {
- id: nameText
- anchors.fill: parent; verticalAlignment: Text.AlignVCenter
- text: fileName
- anchors.leftMargin: itemHeight + scaledMargin
- font.pixelSize: fontSize
- color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : textColor
- elide: Text.ElideRight
- }
-
- MouseArea {
- id: mouseRegion
- anchors.fill: parent
- onPressed: {
- root.showFocusHighlight = false;
- wrapper.ListView.view.currentIndex = index;
- }
- onClicked: { if (folders == wrapper.ListView.view.model) launch() }
- }
-
- states: [
- State {
- name: "pressed"
- when: mouseRegion.pressed
- PropertyChanges { target: highlight; visible: true }
- PropertyChanges { target: nameText; color: palette.highlightedText }
- }
- ]
- }
- }
-
- ListView {
- id: view1
- anchors.top: titleBar.bottom
- anchors.bottom: cancelButton.top
- x: 0
- width: parent.width
- model: folders1
- delegate: folderDelegate
- highlight: Rectangle {
- color: palette.highlight
- visible: root.showFocusHighlight && view1.count != 0
- gradient: Gradient {
- GradientStop { id: t1; position: 0.0; color: palette.highlight }
- GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) }
- }
- width: view1.currentItem == null ? 0 : view1.currentItem.width
- }
- highlightMoveVelocity: 1000
- pressDelay: 100
- focus: true
- state: "current"
- states: [
- State {
- name: "current"
- PropertyChanges { target: view1; x: 0 }
- },
- State {
- name: "exitLeft"
- PropertyChanges { target: view1; x: -root.width }
- },
- State {
- name: "exitRight"
- PropertyChanges { target: view1; x: root.width }
- }
- ]
- transitions: [
- Transition {
- to: "current"
- SequentialAnimation {
- NumberAnimation { properties: "x"; duration: 250 }
- }
- },
- Transition {
- NumberAnimation { properties: "x"; duration: 250 }
- NumberAnimation { properties: "x"; duration: 250 }
- }
- ]
- Keys.onPressed: root.keyPressed(event.key)
- }
-
- ListView {
- id: view2
- anchors.top: titleBar.bottom
- anchors.bottom: parent.bottom
- x: parent.width
- width: parent.width
- model: folders2
- delegate: folderDelegate
- highlight: Rectangle {
- color: palette.highlight
- visible: root.showFocusHighlight && view2.count != 0
- gradient: Gradient {
- GradientStop { id: t1; position: 0.0; color: palette.highlight }
- GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) }
- }
- width: view1.currentItem == null ? 0 : view1.currentItem.width
- }
- highlightMoveVelocity: 1000
- pressDelay: 100
- states: [
- State {
- name: "current"
- PropertyChanges { target: view2; x: 0 }
- },
- State {
- name: "exitLeft"
- PropertyChanges { target: view2; x: -root.width }
- },
- State {
- name: "exitRight"
- PropertyChanges { target: view2; x: root.width }
- }
- ]
- transitions: [
- Transition {
- to: "current"
- SequentialAnimation {
- NumberAnimation { properties: "x"; duration: 250 }
- }
- },
- Transition {
- NumberAnimation { properties: "x"; duration: 250 }
- }
- ]
- Keys.onPressed: root.keyPressed(event.key)
- }
-
- Button {
- id: cancelButton
- width: itemWidth
- height: itemHeight
- color: "#353535"
- anchors { bottom: parent.bottom; right: parent.right; margins: 5 * scaledMargin }
- text: "Cancel"
- horizontalAlign: Text.AlignHCenter
- onClicked: fileBrowser.selectFile("")
- }
-
- Keys.onPressed: {
- root.keyPressed(event.key);
- if (event.key === Qt.Key_Return || event.key === Qt.Key_Select || event.key === Qt.Key_Right) {
- view.currentItem.launch();
- event.accepted = true;
- } else if (event.key === Qt.Key_Left) {
- up();
- }
- }
-
- // titlebar
- Rectangle {
- color: "black"
- width: parent.width;
- height: itemHeight
- id: titleBar
-
- Rectangle {
- id: upButton
- width: titleBar.height
- height: titleBar.height
- color: "transparent"
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- anchors.margins: scaledMargin
-
- Image { anchors.fill: parent; anchors.margins: scaledMargin; source: "qrc:/images/icon_BackArrow.png" }
- MouseArea { id: upRegion; anchors.fill: parent; onClicked: up() }
- states: [
- State {
- name: "pressed"
- when: upRegion.pressed
- PropertyChanges { target: upButton; color: palette.highlight }
- }
- ]
- }
-
- Text {
- anchors.left: upButton.right; anchors.right: parent.right; height: parent.height
- anchors.leftMargin: 10; anchors.rightMargin: 4
- text: folders.folder
- color: "white"
- elide: Text.ElideLeft; horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter
- font.pixelSize: fontSize
- }
- }
-
- Rectangle {
- color: "#353535"
- width: parent.width
- height: 1
- anchors.top: titleBar.bottom
- }
-
- function down(path) {
- if (folders == folders1) {
- view = view2
- folders = folders2;
- view1.state = "exitLeft";
- } else {
- view = view1
- folders = folders1;
- view2.state = "exitLeft";
- }
- view.x = root.width;
- view.state = "current";
- view.focus = true;
- folders.folder = path;
- }
-
- function up() {
- var path = folders.parentFolder;
- if (path.toString().length === 0 || path.toString() === 'file:')
- return;
- if (folders == folders1) {
- view = view2
- folders = folders2;
- view1.state = "exitRight";
- } else {
- view = view1
- folders = folders1;
- view2.state = "exitRight";
- }
- view.x = -root.width;
- view.state = "current";
- view.focus = true;
- folders.folder = path;
- }
-
- function keyPressed(key) {
- switch (key) {
- case Qt.Key_Up:
- case Qt.Key_Down:
- case Qt.Key_Left:
- case Qt.Key_Right:
- root.showFocusHighlight = true;
- break;
- default:
- // do nothing
- break;
- }
- }
- }
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml
deleted file mode 100644
index 62b60765e..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml
+++ /dev/null
@@ -1,162 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-
-Rectangle {
- id: root
- color: "#151515"
- signal openCamera
- signal openImage
- signal openVideo
- signal close
-
-
- Rectangle {
- id: menuField
- height: itemHeight
- width: itemHeight
- color: "transparent"
- anchors.right: parent.right
- Image {
- id: menu
- source: "qrc:///images/icon_Menu.png"
- anchors {
- right: parent.right
- top: parent.top
- margins: scaledMargin
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: fileOpen.state == "expanded" ? fileOpen.state = "collapsed" : fileOpen.state = "expanded"
- }
- }
-
- Column {
- anchors {
- top: menuField.bottom
- right: parent.right
- left: parent.left
- bottom: parent.bottom
- topMargin: 10
- }
-
- spacing: 10
- visible: fileOpen.state == "expanded"
-
- Rectangle {
- width: 0.9 * parent.width
- height: 1
- color: "#353535"
- anchors.left: parent.left
- }
- Button {
- text: "Start camera"
- height: itemHeight
- width: parent.width
- onClicked: {
- fileOpen.state = "collapsed"
- root.openCamera()
- }
- }
- Rectangle {
- width: 0.9 * parent.width
- height: 1
- color: "#353535"
- anchors.left: parent.left
- }
- Button {
- text: "Open image"
- height: itemHeight
- width: parent.width
- onClicked: {
- fileOpen.state = "collapsed"
- root.openImage()
- }
- }
- Rectangle {
- width: 0.9 * parent.width
- height: 1
- color: "#353535"
- anchors.left: parent.left
- }
- Button {
- text: "Open video"
- height: itemHeight
- width: parent.width
- onClicked: {
- fileOpen.state = "collapsed"
- root.openVideo()
- }
- }
- Rectangle {
- width: 0.9 * parent.width
- height: 1
- color: "#353535"
- anchors.left: parent.left
- }
- Button {
- text: "Reset"
- height: itemHeight
- width: parent.width
- onClicked: {
- fileOpen.state = "collapsed"
- root.close()
- }
- }
- Rectangle {
- width: 0.9 * parent.width
- height: 1
- color: "#353535"
- anchors.left: parent.left
- }
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml
deleted file mode 100644
index 86750ff90..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml
+++ /dev/null
@@ -1,122 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Mouse area which flashes to indicate its location on the screen
-
-import QtQuick 2.0
-
-MouseArea {
- property alias hintColor: hintRect.color
- property bool hintEnabled: true
-
- Rectangle {
- id: hintRect
- anchors.fill: parent
- color: "yellow"
- opacity: 0
-
- states: [
- State {
- name: "high"
- PropertyChanges {
- target: hintRect
- opacity: 0.8
- }
- },
- State {
- name: "low"
- PropertyChanges {
- target: hintRect
- opacity: 0.4
- }
- }
- ]
-
- transitions: [
- Transition {
- from: "low"
- to: "high"
- SequentialAnimation {
- NumberAnimation {
- properties: "opacity"
- easing.type: Easing.InOutSine
- duration: 500
- }
- ScriptAction { script: hintRect.state = "low" }
- }
- },
- Transition {
- from: "*"
- to: "low"
- SequentialAnimation {
- NumberAnimation {
- properties: "opacity"
- easing.type: Easing.InOutSine
- duration: 500
- }
- ScriptAction { script: hintRect.state = "high" }
- }
- },
- Transition {
- from: "*"
- to: "baseState"
- NumberAnimation {
- properties: "opacity"
- easing.type: Easing.InOutSine
- duration: 500
- }
- }
- ]
- }
-
- onHintEnabledChanged: hintRect.state = hintEnabled ? "low" : "baseState"
-
- Component.onCompleted: hintRect.state = "low"
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml
deleted file mode 100644
index e6da715f4..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml
+++ /dev/null
@@ -1,296 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-import QtQuick.Window 2.1
-
-Rectangle {
- id: root
- color: "black"
- property string fileName
- property alias volume: content.volume
- property bool perfMonitorsLogging: false
- property bool perfMonitorsVisible: false
- property int pixDens: Math.ceil(Screen.pixelDensity)
- property int itemWidth: 25 * pixDens
- property int itemHeight: 10 * pixDens
- property int windowWidth: Screen.desktopAvailableWidth
- property int windowHeight: Screen.desktopAvailableHeight
- property int scaledMargin: 2 * pixDens
- property int fontSize: 5 * pixDens
-
- QtObject {
- id: d
- property real gripSize: 20
- }
-
- Content {
- id: content
- color: "transparent"
- anchors {
- top: parent.top
- left: parent.left
- right: parent.right
- bottom: parameterPanel.top
- margins: scaledMargin
- leftMargin: scaledMargin + itemHeight
- }
- gripSize: d.gripSize
- }
-
- ParameterPanel {
- id: parameterPanel
- anchors {
- left: parent.left
- right: effectName.left
- bottom: parent.bottom
- margins: scaledMargin
- leftMargin: scaledMargin + itemHeight
- }
- gripSize: d.gripSize
- height: root.itemHeight * 2.5
- width: root.itemWidth * 3
- }
-
- Button {
- id: effectName
- anchors {
- right: parent.right
- bottom: perfHolder.top
- margins: scaledMargin
- }
-
- text: "No effect"
- width: itemWidth * 2
- height: itemHeight
- onClicked: {
- effectName.visible = false
- listview.visible = true
- lvbg.visible = true
- }
- color: "#303030"
- }
-
- Rectangle {
- id: lvbg
- width: itemWidth * 2
- color: "black"
- opacity: 0.8
- visible: false
-
- anchors {
- right: parent.right
- bottom: perfHolder.top
- top: parent.top
- margins: scaledMargin
- }
-
- ListView {
- id: listview
- width: itemWidth * 2
- anchors.fill: parent
- visible: false
-
- model: EffectSelectionList {}
- delegate: effectDelegate
-
- clip: true
- focus: true
-
- Component {
- id: effectDelegate
- Button {
- text: name
- width: itemWidth * 2
- onClicked: {
- content.effectSource = source
- listview.visible = false
- lvbg.visible = false
- effectName.text = name
- effectName.visible = true
- parameterPanel.model = content.effect.parameters
-
- }
- }
- }
- }
- }
-
- Rectangle {
- id: perfHolder
- color: "transparent"
- anchors {
- right: parent.right
- bottom: parent.bottom
- margins: scaledMargin
- }
- height: root.itemHeight * 1.5
- width: root.itemWidth
-
- Loader {
- id: performanceLoader
- function init() {
- var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible
- source = enabled ? "../performancemonitor/PerformanceItem.qml" : ""
- }
- onLoaded: {
- item.parent = perfHolder
- item.anchors.top = perfHolder.top
- item.anchors.bottom = perfHolder.bottom
- item.anchors.left = perfHolder.left
- item.anchors.right = perfHolder.right
- item.logging = root.perfMonitorsLogging
- item.displayed = root.perfMonitorsVisible
- item.init()
- }
- }
- }
-
- FileOpen {
- id: fileOpen
- state: "collapsed"
- anchors {
- left: parent.left
- top: parent.top
- bottom: parent.bottom
- margins: scaledMargin
- }
- width: itemHeight + scaledMargin
- z: 2
- opacity: 0.9
-
- states: [
- State {
- name: "expanded"
- PropertyChanges {
- target: fileOpen
- width: itemWidth * 1.5
- opacity: 0.8
- }
- },
- State {
- name: "collapsed"
- PropertyChanges {
- target: fileOpen
- width: itemHeight + scaledMargin
- opacity: 0.9
- }
- }
- ]
-
- transitions: [
- Transition {
- NumberAnimation { target: fileOpen; property: "width"; duration: 100 }
- NumberAnimation { target: fileOpen; property: "opacity"; duration: 100 }
- }
- ]
- }
-
- FileBrowser {
- id: imageFileBrowser
- anchors.fill: root
- Component.onCompleted: fileSelected.connect(content.openImage)
- }
-
- FileBrowser {
- id: videoFileBrowser
- anchors.fill: root
- Component.onCompleted: fileSelected.connect(content.openVideo)
- }
-
- Component.onCompleted: {
- fileOpen.openImage.connect(openImage)
- fileOpen.openVideo.connect(openVideo)
- fileOpen.openCamera.connect(openCamera)
- fileOpen.close.connect(close)
- }
-
- function init() {
- if (Qt.platform.os === "linux" || Qt.platform.os === "windows" || Qt.platform.os === "osx" || Qt.platform.os === "unix") {
- if (Screen.desktopAvailableWidth > 1280) {
- windowWidth = 1280
- }
- if (Screen.desktopAvailableHeight > 720) {
- windowHeight = 720
- }
- }
-
- height = windowHeight
- width = windowWidth
-
- imageFileBrowser.folder = imagePath
- videoFileBrowser.folder = videoPath
- content.init()
- performanceLoader.init()
- if (fileName != "")
- content.openVideo(fileName)
- }
-
- function qmlFramePainted() {
- if (performanceLoader.item)
- performanceLoader.item.qmlFramePainted()
- }
-
- function openImage() {
- imageFileBrowser.show()
- }
-
- function openVideo() {
- videoFileBrowser.show()
- }
-
- function openCamera() {
- content.openCamera()
- }
-
- function close() {
- content.init()
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml
deleted file mode 100644
index 7d6b2af97..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml
+++ /dev/null
@@ -1,113 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- color: "transparent"
- height: view.model.count * sliderHeight
- property color lineColor: "black"
- property real gripSize: 25
- property real spacing: 20
- property real sliderHeight: 60
-
- property ListModel model: ListModel { }
-
- anchors.topMargin: 10
-
- Component {
- id: editDelegate
-
- Rectangle {
- id: delegate
- width: parent.width
- height: root.sliderHeight
- color: "transparent"
-
- Text {
- id: text
- text: name
- color: "white"
- anchors {
- top: parent.top
- bottom: parent.bottom
- left: parent.left
- }
- font.pixelSize: fontSize
- horizontalAlignment: Text.AlignRight
- verticalAlignment: Text.AlignVCenter
- width: 8 * fontSize
- }
-
- Slider {
- anchors {
- top: parent.top
- bottom: parent.bottom
- left: text.right
- leftMargin: 20
- right: parent.right
- rightMargin: 20
- }
- gripSize: root.gripSize
- value: model.value
- onValueChanged: view.model.setProperty(index, "value", value)
- }
- }
- }
-
- ListView {
- id: view
- anchors.fill: parent
- model: root.model
- delegate: editDelegate
- interactive: false
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml
deleted file mode 100644
index e359c639d..000000000
--- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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.1
-
-Rectangle {
- id: root
- color: "transparent"
- radius: 5
- property alias value: grip.value
- property color fillColor: "#14aaff"
- property real gripSize: 40
- property real gripTolerance: 3.0
- property real increment: 0.1
- property bool enabled: true
-
- Rectangle {
- id: slider
- anchors {
- left: parent.left
- right: parent.right
- verticalCenter: parent.verticalCenter
- }
- height: 10
- color: "transparent"
-
- BorderImage {
- id: sliderbarimage
- source: "qrc:/images/Slider_bar.png"
- anchors { fill: parent; margins: 1 }
- border.right: 5
- border.left: 5
- }
- Rectangle {
- height: parent.height -2
- anchors.left: parent.left
- anchors.right: grip.horizontalCenter
- color: root.fillColor
- radius: 3
- border.width: 1
- border.color: Qt.darker(color, 1.3)
- opacity: 0.8
- }
- Rectangle {
- id: grip
- property real value: 0.5
- x: (value * parent.width) - width/2
- anchors.verticalCenter: parent.verticalCenter
- width: root.gripTolerance * root.gripSize
- height: width
- radius: width/2
- color: "transparent"
-
- Image {
- id: sliderhandleimage
- source: "qrc:/images/Slider_handle.png"
- anchors.centerIn: parent
- }
-
- MouseArea {
- id: mouseArea
- enabled: root.enabled
- anchors.fill: parent
- drag {
- target: grip
- axis: Drag.XAxis
- minimumX: -parent.width/2
- maximumX: root.width - parent.width/2
- }
- onPositionChanged: {
- if (drag.active)
- updatePosition()
- }
- onReleased: {
- updatePosition()
- }
- function updatePosition() {
- value = (grip.x + grip.width/2) / slider.width
- }
- }
- }
-
- }
-}
diff --git a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp
deleted file mode 100644
index 27102b0c5..000000000
--- a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 "qmlapplicationviewer.h"
-
-#include <QtCore/QDir>
-#include <QtCore/QFileInfo>
-#include <QtQml/QQmlComponent>
-#include <QtQml/QQmlEngine>
-#include <QtQml/QQmlContext>
-#include <QtGui/QGuiApplication>
-
-class QmlApplicationViewerPrivate
-{
- QmlApplicationViewerPrivate(QQuickView *view_) : view(view_) {}
-
- QString mainQmlFile;
- QQuickView *view;
- friend class QmlApplicationViewer;
- QString adjustPath(const QString &path);
-};
-
-QString QmlApplicationViewerPrivate::adjustPath(const QString &path)
-{
-#ifdef Q_OS_UNIX
-#ifdef Q_OS_MAC
- if (!QDir::isAbsolutePath(path))
- return QCoreApplication::applicationDirPath()
- + QLatin1String("/../Resources/") + path;
-#else
- QString pathInInstallDir;
- const QString applicationDirPath = QCoreApplication::applicationDirPath();
- pathInInstallDir = QString::fromLatin1("%1/../%2").arg(applicationDirPath, path);
-
- if (QFileInfo(pathInInstallDir).exists())
- return pathInInstallDir;
-#endif
-#endif
- return path;
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QWindow *parent)
- : QQuickView(parent)
- , d(new QmlApplicationViewerPrivate(this))
-{
- connect(engine(), &QQmlEngine::quit, QCoreApplication::instance(), &QCoreApplication::quit);
- setResizeMode(QQuickView::SizeRootObjectToView);
-}
-
-QmlApplicationViewer::QmlApplicationViewer(QQuickView *view, QWindow *parent)
- : QQuickView(parent)
- , d(new QmlApplicationViewerPrivate(view))
-{
- connect(view->engine(), &QQmlEngine::quit, QCoreApplication::instance(), &QCoreApplication::quit);
- view->setResizeMode(QQuickView::SizeRootObjectToView);
-}
-
-QmlApplicationViewer::~QmlApplicationViewer()
-{
- delete d;
-}
-
-QmlApplicationViewer *QmlApplicationViewer::create()
-{
- return new QmlApplicationViewer();
-}
-
-void QmlApplicationViewer::setMainQmlFile(const QString &file)
-{
- d->mainQmlFile = d->adjustPath(file);
- d->view->setSource(QUrl::fromLocalFile(d->mainQmlFile));
-}
-
-void QmlApplicationViewer::addImportPath(const QString &path)
-{
- d->view->engine()->addImportPath(d->adjustPath(path));
-}
-
-void QmlApplicationViewer::showExpanded()
-{
-#if defined(Q_WS_SIMULATOR)
- d->view->showFullScreen();
-#else
- d->view->show();
-#endif
-}
-
-QGuiApplication *createApplication(int &argc, char **argv)
-{
- return new QGuiApplication(argc, argv);
-}
diff --git a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h b/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h
deleted file mode 100644
index 8af12477f..000000000
--- a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-#ifndef QMLAPPLICATIONVIEWER_H
-#define QMLAPPLICATIONVIEWER_H
-
-#include <QtQuick/QQuickView>
-#include <QtGui/QGuiApplication>
-
-class QmlApplicationViewer : public QQuickView
-{
- Q_OBJECT
-
-public:
- explicit QmlApplicationViewer(QWindow *parent = 0);
- virtual ~QmlApplicationViewer();
-
- static QmlApplicationViewer *create();
-
- void setMainQmlFile(const QString &file);
- void addImportPath(const QString &path);
-
- void showExpanded();
-
-private:
- explicit QmlApplicationViewer(QQuickView *view, QWindow *parent);
- class QmlApplicationViewerPrivate *d;
-};
-
-QGuiApplication *createApplication(int &argc, char **argv);
-
-#endif // QMLAPPLICATIONVIEWER_H
diff --git a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri
deleted file mode 100644
index d9807943e..000000000
--- a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri
+++ /dev/null
@@ -1,7 +0,0 @@
-QT += quick
-
-SOURCES += $$PWD/qmlapplicationviewer.cpp
-HEADERS += $$PWD/qmlapplicationviewer.h
-INCLUDEPATH += $$PWD
-
-
diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.png b/examples/multimedia/video/qmlvideofx/qmlvideofx.png
deleted file mode 100644
index 707d5c4e8..000000000
--- a/examples/multimedia/video/qmlvideofx/qmlvideofx.png
+++ /dev/null
Binary files differ
diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.pro b/examples/multimedia/video/qmlvideofx/qmlvideofx.pro
deleted file mode 100644
index 07047aec8..000000000
--- a/examples/multimedia/video/qmlvideofx/qmlvideofx.pro
+++ /dev/null
@@ -1,24 +0,0 @@
-TEMPLATE = app
-TARGET = qmlvideofx
-
-QT += quick multimedia
-android: qtHaveModule(androidextras) {
- QT += androidextras
- DEFINES += REQUEST_PERMISSIONS_ON_ANDROID
-}
-
-SOURCES += filereader.cpp main.cpp
-HEADERS += filereader.h trace.h
-
-RESOURCES += qmlvideofx.qrc
-
-include($$PWD/../snippets/performancemonitor/performancemonitordeclarative.pri)
-
-target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/video/qmlvideofx
-INSTALLS += target
-
-QMAKE_INFO_PLIST = Info.plist
-
-EXAMPLE_FILES += \
- qmlvideofx.png \
- qmlvideofx.svg
diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.qrc b/examples/multimedia/video/qmlvideofx/qmlvideofx.qrc
deleted file mode 100644
index f3ad27704..000000000
--- a/examples/multimedia/video/qmlvideofx/qmlvideofx.qrc
+++ /dev/null
@@ -1,71 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>images/qt-logo.png</file>
- <file>qml/qmlvideofx/Button.qml</file>
- <file>qml/qmlvideofx/Content.qml</file>
- <file>qml/qmlvideofx/ContentCamera.qml</file>
- <file>qml/qmlvideofx/ContentImage.qml</file>
- <file>qml/qmlvideofx/ContentVideo.qml</file>
- <file>qml/qmlvideofx/Divider.qml</file>
- <file>qml/qmlvideofx/Effect.qml</file>
- <file>qml/qmlvideofx/EffectBillboard.qml</file>
- <file>qml/qmlvideofx/EffectBlackAndWhite.qml</file>
- <file>qml/qmlvideofx/EffectEmboss.qml</file>
- <file>qml/qmlvideofx/EffectGaussianBlur.qml</file>
- <file>qml/qmlvideofx/EffectGlow.qml</file>
- <file>qml/qmlvideofx/EffectIsolate.qml</file>
- <file>qml/qmlvideofx/EffectMagnify.qml</file>
- <file>qml/qmlvideofx/EffectPageCurl.qml</file>
- <file>qml/qmlvideofx/EffectPassThrough.qml</file>
- <file>qml/qmlvideofx/EffectPixelate.qml</file>
- <file>qml/qmlvideofx/EffectPosterize.qml</file>
- <file>qml/qmlvideofx/EffectRipple.qml</file>
- <file>qml/qmlvideofx/EffectSepia.qml</file>
- <file>qml/qmlvideofx/EffectSharpen.qml</file>
- <file>qml/qmlvideofx/EffectShockwave.qml</file>
- <file>qml/qmlvideofx/EffectSobelEdgeDetection1.qml</file>
- <file>qml/qmlvideofx/EffectTiltShift.qml</file>
- <file>qml/qmlvideofx/EffectToon.qml</file>
- <file>qml/qmlvideofx/EffectVignette.qml</file>
- <file>qml/qmlvideofx/EffectWarhol.qml</file>
- <file>qml/qmlvideofx/EffectWobble.qml</file>
- <file>qml/qmlvideofx/FileBrowser.qml</file>
- <file>qml/qmlvideofx/FileOpen.qml</file>
- <file>qml/qmlvideofx/HintedMouseArea.qml</file>
- <file>qml/qmlvideofx/ParameterPanel.qml</file>
- <file>qml/qmlvideofx/Slider.qml</file>
- <file>shaders/billboard.fsh</file>
- <file>shaders/blackandwhite.fsh</file>
- <file>shaders/emboss.fsh</file>
- <file>shaders/gaussianblur_h.fsh</file>
- <file>shaders/gaussianblur_v.fsh</file>
- <file>shaders/glow.fsh</file>
- <file>shaders/isolate.fsh</file>
- <file>shaders/magnify.fsh</file>
- <file>shaders/pagecurl.fsh</file>
- <file>shaders/pixelate.fsh</file>
- <file>shaders/posterize.fsh</file>
- <file>shaders/ripple.fsh</file>
- <file>shaders/selectionpanel.fsh</file>
- <file>shaders/sepia.fsh</file>
- <file>shaders/sharpen.fsh</file>
- <file>shaders/shockwave.fsh</file>
- <file>shaders/sobeledgedetection1.fsh</file>
- <file>shaders/tiltshift.fsh</file>
- <file>shaders/toon.fsh</file>
- <file>shaders/vignette.fsh</file>
- <file>shaders/warhol.fsh</file>
- <file>shaders/wobble.fsh</file>
- <file>images/Slider_handle.png</file>
- <file>images/Slider_bar.png</file>
- <file>qml/qmlvideofx/Curtain.qml</file>
- <file>images/Triangle_bottom.png</file>
- <file>images/Triangle_Top.png</file>
- <file>images/Dropdown_arrows.png</file>
- <file>images/icon_Folder.png</file>
- <file>images/icon_BackArrow.png</file>
- <file>qml/qmlvideofx/Main.qml</file>
- <file>images/icon_Menu.png</file>
- <file>qml/qmlvideofx/EffectSelectionList.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.svg b/examples/multimedia/video/qmlvideofx/qmlvideofx.svg
deleted file mode 100644
index 566acfada..000000000
--- a/examples/multimedia/video/qmlvideofx/qmlvideofx.svg
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- height="44px"
- version="1.1"
- viewBox="0 0 44 44"
- width="44px"
- x="0px"
- y="0px"
- id="svg2"
- inkscape:version="0.47 r22583"
- sodipodi:docname="qt.svg">
- <metadata
- id="metadata18">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <defs
- id="defs16">
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 22 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="44 : 22 : 1"
- inkscape:persp3d-origin="22 : 14.666667 : 1"
- id="perspective2836" />
- </defs>
- <sodipodi:namedview
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1"
- objecttolerance="10"
- gridtolerance="10"
- guidetolerance="10"
- inkscape:pageopacity="0"
- inkscape:pageshadow="2"
- inkscape:window-width="1920"
- inkscape:window-height="1020"
- id="namedview14"
- showgrid="false"
- inkscape:zoom="21.454545"
- inkscape:cx="49.412871"
- inkscape:cy="21.894358"
- inkscape:window-x="-4"
- inkscape:window-y="-4"
- inkscape:window-maximized="1"
- inkscape:current-layer="g3" />
- <g
- transform="matrix(0.18308778,0,0,0.18308778,6.6100946,3.2385199)"
- id="g3">
- <path
- d="M 43.09,0.3586 C 40.94,0.0036 38.84,-0.0824 36.81,0.0776 31.968136,0.39505671 27.122677,0.73638425 22.28,1.0696 9.62,2.0816 0,12.4996 0,26.8896 l 0,169.7 14.19,13.2 28.87,-209.42 0.03,-0.011 z"
- style="fill:#006225"
- id="path5"
- sodipodi:nodetypes="cccccccc" />
- <path
- d="m 174.4,160 c 0,12.5 -7.75,24.07 -17.57,25.77 L 14.23,209.73 V 25.93 C 14.23,9.21 27.57,-2.27 43.12,0.3 l 131.3,21.52 v 138.2 z"
- style="fill:#80c342"
- id="path7" />
- <path
- d="m 154.9,80.96 -12.96,-0.598 0,0.278 6.945,0.32 6.016,0 z"
- style="fill:#006225"
- id="path11" />
- <path
- d="m 144.6,135.6 c 0.66,0.328 1.43,0.476 2.351,0.476 0.161,0 0.329,-0.004 0.497,-0.016 2.55,-0.148 5.32,-0.933 8.343,-2.308 h -6.015 c -1.821,0.832 -3.532,1.457 -5.176,1.848 z"
- style="fill:#006225"
- id="path13" />
- <path
- id="path17"
- style="fill:#ffffff"
- d="m 91.15,132.4 c 2.351,-6.051 3.511,-17.91 3.511,-35.62 0,-15.89 -1.148,-26.82 -3.484,-32.81 -2.336,-6.027 -5.832,-9.281 -10.52,-9.691 -0.359,-0.031 -0.714,-0.051 -1.058,-0.051 -4.34,0 -7.68,2.535 -10.01,7.625 -2.52,5.543 -3.793,17.04 -3.793,34.44 0,16.82 1.238,28.75 3.734,35.75 2.356,6.672 5.879,9.976 10.5,9.976 0.207,0 0.41,-0.008 0.621,-0.019 4.633,-0.293 8.121,-3.496 10.49,-9.602 m 17.98,3.75 c -4.117,9.707 -10.39,16.06 -18.99,19 0.867,4.449 2.176,7.441 3.922,9.019 1.351,1.211 3.433,1.821 6.222,1.821 0.805,0 1.668,-0.055 2.59,-0.157 v 13.12 l -5.961,0.782 c -1.758,0.23 -3.426,0.343 -5.004,0.343 -5.218,0 -9.445,-1.265 -12.62,-3.824 -4.207,-3.379 -7.308,-9.894 -9.297,-19.54 -9.136,-1.945 -16.26,-7.754 -21.19,-17.5 -5.004,-9.902 -7.551,-24.39 -7.551,-43.34 0,-20.43 3.484,-35.51 10.34,-45.07 5.789,-8.07 13.86,-12.04 24.02,-12.04 1.629,0 3.309,0.102 5.043,0.305 11.95,1.375 20.62,7.016 26.26,16.79 5.535,9.562 8.254,23.27 8.254,41.26 0,16.48 -2,29.45 -6.043,39.02 z M 130.4,45.91 l 11.52,1.238 0,20.21 12.96,0.914 0,12.68 -12.96,-0.598 0,46.33 c 0,4.032 0.445,6.625 1.34,7.789 0.8,1.067 2.046,1.594 3.71,1.594 0.161,0 0.329,-0.004 0.497,-0.016 2.55,-0.148 5.32,-0.933 8.343,-2.308 v 11.65 c -5.136,2.258 -10.18,3.598 -15.12,4.02 -0.718,0.055 -1.41,0.086 -2.078,0.086 -4.48,0 -7.906,-1.301 -10.25,-3.934 -2.73,-3.051 -4.09,-7.949 -4.09,-14.67 V 79.535 L 118.046,79.25 V 65.66 l 7.586,0.547 4.773,-20.3 z" />
- <path
- d="m 100.3,166 c 0.809,0 1.672,-0.055 2.59,-0.157 H 98.054 C 98.73,165.949 99.507,166 100.3,166 z"
- style="fill:#006225"
- id="path19" />
- <path
- id="path21"
- style="fill:#006225"
- d="m 84.85,63.98 c 2.336,5.997 3.484,16.92 3.484,32.81 0,17.7 -1.16,29.57 -3.512,35.62 -1.894,4.879 -4.527,7.902 -7.863,9.07 0.965,0.368 1.992,0.551 3.078,0.551 0.207,0 0.41,-0.008 0.621,-0.019 4.633,-0.293 8.121,-3.496 10.49,-9.602 2.351,-6.051 3.511,-17.91 3.511,-35.62 0,-15.89 -1.148,-26.82 -3.484,-32.81 -2.336,-6.027 -5.832,-9.281 -10.52,-9.691 -0.359,-0.031 -0.714,-0.051 -1.058,-0.051 -1.09,0 -2.117,0.16 -3.082,0.481 h -0.004 c 3.601,1.121 6.379,4.215 8.336,9.261 z m -2.344,114.3 c -0.113,-0.05 -0.227,-0.105 -0.336,-0.16 -0.012,-0.004 -0.023,-0.012 -0.035,-0.015 -0.102,-0.051 -0.207,-0.106 -0.309,-0.157 -0.019,-0.011 -0.039,-0.019 -0.058,-0.031 -0.09,-0.051 -0.184,-0.098 -0.278,-0.148 -0.027,-0.016 -0.054,-0.036 -0.086,-0.051 -0.082,-0.043 -0.164,-0.09 -0.242,-0.137 -0.039,-0.023 -0.078,-0.047 -0.113,-0.07 -0.07,-0.039 -0.145,-0.082 -0.215,-0.125 -0.047,-0.031 -0.094,-0.059 -0.14,-0.09 -0.059,-0.039 -0.118,-0.074 -0.176,-0.113 -0.059,-0.039 -0.114,-0.075 -0.168,-0.114 -0.051,-0.031 -0.102,-0.066 -0.149,-0.097 -0.066,-0.047 -0.132,-0.094 -0.195,-0.137 -0.039,-0.027 -0.078,-0.055 -0.113,-0.082 -0.078,-0.055 -0.153,-0.113 -0.231,-0.172 -0.023,-0.016 -0.05,-0.035 -0.078,-0.055 -0.098,-0.078 -0.199,-0.156 -0.297,-0.234 -4.207,-3.379 -7.308,-9.894 -9.297,-19.54 -9.136,-1.945 -16.26,-7.754 -21.19,-17.5 -5.004,-9.902 -7.551,-24.39 -7.551,-43.34 0,-20.43 3.484,-35.51 10.34,-45.07 5.789,-8.07 13.86,-12.04 24.02,-12.04 h -6.351 c -10.15,0.008 -18.22,3.977 -24,12.04 -6.855,9.563 -10.34,24.64 -10.34,45.07 0,18.95 2.547,33.44 7.551,43.34 4.934,9.75 12.05,15.56 21.19,17.5 1.989,9.641 5.09,16.16 9.297,19.54 3.176,2.559 7.403,3.824 12.62,3.824 0.098,0 0.199,0 0.297,-0.004 h 5.539 c -3.406,-0.05 -6.383,-0.66 -8.906,-1.828 L 82.498,178.28 z M 128.4,145.6 c -2.73,-3.051 -4.09,-7.949 -4.09,-14.67 V 79.57 l -6.226,-0.285 v -13.59 h -6.016 v 3.035 c 0.871,3.273 1.555,6.82 2.063,10.64 l 4.164,0.192 v 51.36 c 0,6.723 1.367,11.62 4.09,14.67 2.343,2.633 5.765,3.934 10.25,3.934 h 6.015 c -4.48,0 -7.906,-1.301 -10.25,-3.934 z m 2.043,-99.66 -6.016,0 -4.668,19.88 5.911,0.422 4.773,-20.3 z" />
- </g>
-</svg>
diff --git a/examples/multimedia/video/qmlvideofx/shaders/billboard.fsh b/examples/multimedia/video/qmlvideofx/shaders/billboard.fsh
deleted file mode 100644
index b733d94ae..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/billboard.fsh
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float grid;
-uniform float dividerValue;
-uniform float step_x;
-uniform float step_y;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- float offx = floor(uv.x / (grid * step_x));
- float offy = floor(uv.y / (grid * step_y));
- vec3 res = texture2D(source, vec2(offx * grid * step_x , offy * grid * step_y)).rgb;
- vec2 prc = fract(uv / vec2(grid * step_x, grid * step_y));
- vec2 pw = pow(abs(prc - 0.5), vec2(2.0));
- float rs = pow(0.45, 2.0);
- float gr = smoothstep(rs - 0.1, rs + 0.1, pw.x + pw.y);
- float y = (res.r + res.g + res.b) / 3.0;
- vec3 ra = res / y;
- float ls = 0.3;
- float lb = ceil(y / ls);
- float lf = ls * lb + 0.3;
- res = lf * res;
- vec3 col = mix(res, vec3(0.1, 0.1, 0.1), gr);
- if (uv.x < dividerValue)
- gl_FragColor = qt_Opacity * vec4(col, 1.0);
- else
- gl_FragColor = qt_Opacity * texture2D(source, uv);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/blackandwhite.fsh b/examples/multimedia/video/qmlvideofx/shaders/blackandwhite.fsh
deleted file mode 100644
index 3eeff5925..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/blackandwhite.fsh
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float threshold;
-uniform float dividerValue;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec4 orig = texture2D(source, uv);
- vec3 col = orig.rgb;
- float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b;
- y = y < threshold ? 0.0 : 1.0;
- if (uv.x < dividerValue)
- gl_FragColor = qt_Opacity * vec4(y, y, y, 1.0);
- else
- gl_FragColor = qt_Opacity * orig;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/emboss.fsh b/examples/multimedia/video/qmlvideofx/shaders/emboss.fsh
deleted file mode 100644
index 41f5f1b37..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/emboss.fsh
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float dividerValue;
-const float step_w = 0.0015625;
-const float step_h = 0.0027778;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb;
- vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb;
- vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb;
- vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb;
- vec3 t5 = texture2D(source, uv).rgb;
- vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb;
- vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb;
- vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb;
- vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb;
- vec3 rr = -4.0 * t1 - 4.0 * t2 - 4.0 * t4 + 12.0 * t5;
- float y = (rr.r + rr.g + rr.b) / 3.0;
- vec3 col = vec3(y, y, y) + 0.3;
- if (uv.x < dividerValue)
- gl_FragColor = qt_Opacity * vec4(col, 1.0);
- else
- gl_FragColor = qt_Opacity * texture2D(source, uv);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_h.fsh b/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_h.fsh
deleted file mode 100644
index 794e371ad..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_h.fsh
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-uniform float dividerValue;
-uniform float blurSize;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec4 c = vec4(0.0);
- if (uv.x < dividerValue) {
- c += texture2D(source, uv - vec2(4.0*blurSize, 0.0)) * 0.05;
- c += texture2D(source, uv - vec2(3.0*blurSize, 0.0)) * 0.09;
- c += texture2D(source, uv - vec2(2.0*blurSize, 0.0)) * 0.12;
- c += texture2D(source, uv - vec2(1.0*blurSize, 0.0)) * 0.15;
- c += texture2D(source, uv) * 0.18;
- c += texture2D(source, uv + vec2(1.0*blurSize, 0.0)) * 0.15;
- c += texture2D(source, uv + vec2(2.0*blurSize, 0.0)) * 0.12;
- c += texture2D(source, uv + vec2(3.0*blurSize, 0.0)) * 0.09;
- c += texture2D(source, uv + vec2(4.0*blurSize, 0.0)) * 0.05;
- } else {
- c = texture2D(source, qt_TexCoord0);
- }
- gl_FragColor = qt_Opacity * c;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_v.fsh b/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_v.fsh
deleted file mode 100644
index 975dfcf5d..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_v.fsh
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-uniform float dividerValue;
-uniform float blurSize;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec4 c = vec4(0.0);
- if (uv.x < dividerValue) {
- c += texture2D(source, uv - vec2(0.0, 4.0*blurSize)) * 0.05;
- c += texture2D(source, uv - vec2(0.0, 3.0*blurSize)) * 0.09;
- c += texture2D(source, uv - vec2(0.0, 2.0*blurSize)) * 0.12;
- c += texture2D(source, uv - vec2(0.0, 1.0*blurSize)) * 0.15;
- c += texture2D(source, uv) * 0.18;
- c += texture2D(source, uv + vec2(0.0, 1.0*blurSize)) * 0.15;
- c += texture2D(source, uv + vec2(0.0, 2.0*blurSize)) * 0.12;
- c += texture2D(source, uv + vec2(0.0, 3.0*blurSize)) * 0.09;
- c += texture2D(source, uv + vec2(0.0, 4.0*blurSize)) * 0.05;
- } else {
- c = texture2D(source, qt_TexCoord0);
- }
- // First pass we don't apply opacity
- gl_FragColor = c;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/glow.fsh b/examples/multimedia/video/qmlvideofx/shaders/glow.fsh
deleted file mode 100644
index 8edc603d2..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/glow.fsh
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float dividerValue;
-const float step_w = 0.0015625;
-const float step_h = 0.0027778;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb;
- vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb;
- vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb;
- vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb;
- vec3 t5 = texture2D(source, uv).rgb;
- vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb;
- vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb;
- vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb;
- vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb;
- vec3 xx = t1 + 2.0*t2 + t3 - t7 - 2.0*t8 - t9;
- vec3 yy = t1 - t3 + 2.0*t4 - 2.0*t6 + t7 - t9;
- vec3 rr = sqrt(xx * xx + yy * yy);
- vec3 col = rr * 2.0 * t5;
- if (uv.x < dividerValue)
- gl_FragColor = qt_Opacity * vec4(col, 1.0);
- else
- gl_FragColor = qt_Opacity * texture2D(source, uv);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/isolate.fsh b/examples/multimedia/video/qmlvideofx/shaders/isolate.fsh
deleted file mode 100644
index c6da45b4a..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/isolate.fsh
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float targetHue;
-uniform float windowWidth;
-uniform float dividerValue;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void rgb2hsl(vec3 rgb, out float h, out float s, float l)
-{
- float maxval = max(rgb.r, max(rgb.g, rgb.b));
- float minval = min(rgb.r, min(rgb.g, rgb.b));
- float delta = maxval - minval;
- l = (minval + maxval) / 2.0;
- s = 0.0;
- if (l > 0.0 && l < 1.0)
- s = delta / (l < 0.5 ? 2.0 * l : 2.0 - 2.0 * l);
- h = 0.0;
- if (delta > 0.0)
- {
- if (rgb.r == maxval && rgb.g != maxval)
- h += (rgb.g - rgb.b ) / delta;
- if (rgb.g == maxval && rgb.b != maxval)
- h += 2.0 + (rgb.b - rgb.r) / delta;
- if (rgb.b == maxval && rgb.r != maxval)
- h += 4.0 + (rgb.r - rgb.g) / delta;
- h *= 60.0;
- }
-}
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec3 col = texture2D(source, uv).rgb;
- float h, s, l;
- rgb2hsl(col, h, s, l);
- float h2 = (h > targetHue) ? h - 360.0 : h + 360.0;
- float y = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
- vec3 result;
- if (uv.x > dividerValue || (abs(h - targetHue) < windowWidth) || (abs(h2 - targetHue) < windowWidth))
- result = col;
- else
- result = vec3(y, y, y);
- gl_FragColor = qt_Opacity * vec4(result, 1.0);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh b/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh
deleted file mode 100644
index f7621bed3..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://www.reddit.com/r/programming/comments/losip/shader_toy/c2upn1e
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-uniform float radius;
-uniform float diffractionIndex;
-uniform float targetWidth;
-uniform float targetHeight;
-uniform float posX;
-uniform float posY;
-uniform float pixDens;
-
-void main()
-{
- vec2 tc = qt_TexCoord0;
- vec2 center = vec2(posX, posY);
- vec2 xy = gl_FragCoord.xy - center.xy;
- xy.x -= (pixDens * 14.0);
- xy.y -= (pixDens * 29.0);
- float r = sqrt(xy.x * xy.x + xy.y * xy.y);
- if (r < radius) {
- float h = diffractionIndex * 0.5 * radius;
- vec2 new_xy = r < radius ? xy * (radius - h) / sqrt(radius * radius - r * r) : xy;
- vec2 targetSize = vec2(targetWidth, targetHeight);
- tc = (new_xy + center) / targetSize;
- tc.y = 1.0 - tc.y;
- }
- gl_FragColor = qt_Opacity * texture2D(source, tc);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/pagecurl.fsh b/examples/multimedia/video/qmlvideofx/shaders/pagecurl.fsh
deleted file mode 100644
index 12a5455e6..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/pagecurl.fsh
+++ /dev/null
@@ -1,192 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://rectalogic.github.com/webvfx/examples_2transition-shader-pagecurl_8html-example.html
-
-uniform float dividerValue;
-uniform float curlExtent;
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-const float minAmount = -0.16;
-const float maxAmount = 1.3;
-const float PI = 3.14159265358979323846;
-const float scale = 512.0;
-const float sharpness = 3.0;
-const vec4 bgColor = vec4(1.0, 1.0, 0.8, 1.0);
-
-float amount = curlExtent * (maxAmount - minAmount) + minAmount;
-float cylinderCenter = amount;
-// 360 degrees * amount
-float cylinderAngle = 2.0 * PI * amount;
-const float cylinderRadius = 1.0 / PI / 2.0;
-
-vec3 hitPoint(float hitAngle, float yc, vec3 point, mat3 rrotation)
-{
- float hitPoint = hitAngle / (2.0 * PI);
- point.y = hitPoint;
- return rrotation * point;
-}
-
-vec4 antiAlias(vec4 color1, vec4 color2, float distance)
-{
- distance *= scale;
- if (distance < 0.0) return color2;
- if (distance > 2.0) return color1;
- float dd = pow(1.0 - distance / 2.0, sharpness);
- return ((color2 - color1) * dd) + color1;
-}
-
-float distanceToEdge(vec3 point)
-{
- float dx = abs(point.x > 0.5 ? 1.0 - point.x : point.x);
- float dy = abs(point.y > 0.5 ? 1.0 - point.y : point.y);
- if (point.x < 0.0) dx = -point.x;
- if (point.x > 1.0) dx = point.x - 1.0;
- if (point.y < 0.0) dy = -point.y;
- if (point.y > 1.0) dy = point.y - 1.0;
- if ((point.x < 0.0 || point.x > 1.0) && (point.y < 0.0 || point.y > 1.0)) return sqrt(dx * dx + dy * dy);
- return min(dx, dy);
-}
-
-vec4 seeThrough(float yc, vec2 p, mat3 rotation, mat3 rrotation)
-{
- float hitAngle = PI - (acos(yc / cylinderRadius) - cylinderAngle);
- vec3 point = hitPoint(hitAngle, yc, rotation * vec3(p, 1.0), rrotation);
- if (yc <= 0.0 && (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0))
- return bgColor;
- if (yc > 0.0)
- return texture2D(source, p);
- vec4 color = texture2D(source, point.xy);
- vec4 tcolor = vec4(0.0);
- return antiAlias(color, tcolor, distanceToEdge(point));
-}
-
-vec4 seeThroughWithShadow(float yc, vec2 p, vec3 point, mat3 rotation, mat3 rrotation)
-{
- float shadow = distanceToEdge(point) * 30.0;
- shadow = (1.0 - shadow) / 3.0;
- if (shadow < 0.0)
- shadow = 0.0;
- else
- shadow *= amount;
- vec4 shadowColor = seeThrough(yc, p, rotation, rrotation);
- shadowColor.r -= shadow;
- shadowColor.g -= shadow;
- shadowColor.b -= shadow;
- return shadowColor;
-}
-
-vec4 backside(float yc, vec3 point)
-{
- vec4 color = texture2D(source, point.xy);
- float gray = (color.r + color.b + color.g) / 15.0;
- gray += (8.0 / 10.0) * (pow(1.0 - abs(yc / cylinderRadius), 2.0 / 10.0) / 2.0 + (5.0 / 10.0));
- color.rgb = vec3(gray);
- return color;
-}
-
-void main(void)
-{
- const float angle = 30.0 * PI / 180.0;
- float c = cos(-angle);
- float s = sin(-angle);
- mat3 rotation = mat3(
- c, s, 0,
- -s, c, 0,
- 0.12, 0.258, 1
- );
- c = cos(angle);
- s = sin(angle);
- mat3 rrotation = mat3(
- c, s, 0,
- -s, c, 0,
- 0.15, -0.5, 1
- );
- vec3 point = rotation * vec3(qt_TexCoord0, 1.0);
- float yc = point.y - cylinderCenter;
- vec4 color = vec4(1.0, 0.0, 0.0, 1.0);
- if (yc < -cylinderRadius) {
- // See through to background
- color = bgColor;
- } else if (yc > cylinderRadius) {
- // Flat surface
- color = texture2D(source, qt_TexCoord0);
- } else {
- float hitAngle = (acos(yc / cylinderRadius) + cylinderAngle) - PI;
- float hitAngleMod = mod(hitAngle, 2.0 * PI);
- if ((hitAngleMod > PI && amount < 0.5) || (hitAngleMod > PI/2.0 && amount < 0.0)) {
- color = seeThrough(yc, qt_TexCoord0, rotation, rrotation);
- } else {
- point = hitPoint(hitAngle, yc, point, rrotation);
- if (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0) {
- color = seeThroughWithShadow(yc, qt_TexCoord0, point, rotation, rrotation);
- } else {
- color = backside(yc, point);
- vec4 otherColor;
- if (yc < 0.0) {
- float shado = 1.0 - (sqrt(pow(point.x - 0.5, 2.0) + pow(point.y - 0.5, 2.0)) / 0.71);
- shado *= pow(-yc / cylinderRadius, 3.0);
- shado *= 0.5;
- otherColor = vec4(0.0, 0.0, 0.0, shado);
- } else {
- otherColor = texture2D(source, qt_TexCoord0);
- }
- color = antiAlias(color, otherColor, cylinderRadius - abs(yc));
-
- // This second antialiasing step causes the shader to fail to render, on
- // Symbian devices (tested so far using IVE3.5). Running out of scratch
- // memory?
- }
- }
- }
- gl_FragColor = qt_Opacity * color;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/pixelate.fsh b/examples/multimedia/video/qmlvideofx/shaders/pixelate.fsh
deleted file mode 100644
index b30dc60d0..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/pixelate.fsh
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/
-
-uniform float dividerValue;
-uniform float granularity;
-uniform float targetWidth;
-uniform float targetHeight;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec2 tc = qt_TexCoord0;
- if (uv.x < dividerValue && granularity > 0.0) {
- float dx = granularity / targetWidth;
- float dy = granularity / targetHeight;
- tc = vec2(dx*(floor(uv.x/dx) + 0.5),
- dy*(floor(uv.y/dy) + 0.5));
- }
- gl_FragColor = qt_Opacity * texture2D(source, tc);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/posterize.fsh b/examples/multimedia/video/qmlvideofx/shaders/posterize.fsh
deleted file mode 100644
index 350fda744..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/posterize.fsh
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://www.geeks3d.com/20091027/shader-library-posterization-post-processing-effect-glsl/
-
-uniform float dividerValue;
-uniform float gamma;
-uniform float numColors;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec4 c = vec4(0.0);
- if (uv.x < dividerValue) {
- vec3 x = texture2D(source, uv).rgb;
- x = pow(x, vec3(gamma, gamma, gamma));
- x = x * numColors;
- x = floor(x);
- x = x / numColors;
- x = pow(x, vec3(1.0/gamma));
- c = vec4(x, 1.0);
- } else {
- c = texture2D(source, uv);
- }
- gl_FragColor = qt_Opacity * c;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh b/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh
deleted file mode 100644
index aba47461f..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh
+++ /dev/null
@@ -1,88 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://blog.qt.io/blog/2011/03/22/the-convenient-power-of-qml-scene-graph/
-
-uniform float dividerValue;
-uniform float targetWidth;
-uniform float targetHeight;
-uniform float time;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-const float PI = 3.14159265358979323846;
-const int ITER = 7;
-const float RATE = 0.1;
-uniform float amplitude;
-uniform float n;
-uniform float pixDens;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec2 tc = uv;
- vec2 p = vec2(-1.0 + 2.0 * (gl_FragCoord.x - (pixDens * 14.0)) / targetWidth, -(-1.0 + 2.0 * (gl_FragCoord.y - (pixDens * 29.0)) / targetHeight));
- float diffx = 0.0;
- float diffy = 0.0;
- vec4 col;
- if (uv.x < dividerValue) {
- for (int i=0; i<ITER; ++i) {
- float theta = float(i) * PI / float(ITER);
- vec2 r = vec2(cos(theta) * p.x + sin(theta) * p.y, -1.0 * sin(theta) * p.x + cos(theta) * p.y);
- float diff = (sin(2.0 * PI * n * (r.y + time * RATE)) + 1.0) / 2.0;
- diffx += diff * sin(theta);
- diffy += diff * cos(theta);
- }
- tc = 0.5*(vec2(1.0,1.0) + p) + amplitude * vec2(diffx, diffy);
- }
- gl_FragColor = qt_Opacity * texture2D(source, tc);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/selectionpanel.fsh b/examples/multimedia/video/qmlvideofx/shaders/selectionpanel.fsh
deleted file mode 100644
index 09c22fe10..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/selectionpanel.fsh
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
diff --git a/examples/multimedia/video/qmlvideofx/shaders/sepia.fsh b/examples/multimedia/video/qmlvideofx/shaders/sepia.fsh
deleted file mode 100644
index 065b13318..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/sepia.fsh
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float dividerValue;
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec4 orig = texture2D(source, uv);
- vec3 col = orig.rgb;
- float y = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b;
- if (uv.x < dividerValue)
- gl_FragColor = qt_Opacity * vec4(y + 0.15, y + 0.07, y - 0.12, 1.0);
- else
- gl_FragColor = qt_Opacity * orig;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/sharpen.fsh b/examples/multimedia/video/qmlvideofx/shaders/sharpen.fsh
deleted file mode 100644
index bdfe7f0be..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/sharpen.fsh
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float dividerValue;
-uniform float amount;
-const float step_w = 0.0015625;
-const float step_h = 0.0027778;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-vec3 sharpen(vec3 t1, vec3 t2, vec3 t3, vec3 t4, vec3 t5, vec3 t6, vec3 t7, vec3 t8, vec3 t9)
-{
- return -t1 - t2 - t3 - t4 + amount * t5 - t6 - t7 - t8 - t9;
-}
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb;
- vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb;
- vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb;
- vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb;
- vec3 t5 = texture2D(source, uv).rgb;
- vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb;
- vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb;
- vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb;
- vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb;
- vec3 col = sharpen(t1, t2, t3, t4, t5, t6, t7, t8, t9);
- if (uv.x < dividerValue)
- gl_FragColor = qt_Opacity * vec4(col, 1.0);
- else
- gl_FragColor = qt_Opacity * texture2D(source, uv);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/shockwave.fsh b/examples/multimedia/video/qmlvideofx/shaders/shockwave.fsh
deleted file mode 100644
index 4cd32503c..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/shockwave.fsh
+++ /dev/null
@@ -1,82 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://www.geeks3d.com/20091116/shader-library-2d-shockwave-post-processing-filter-glsl/
-
-uniform float centerX;
-uniform float centerY;
-uniform float dividerValue;
-uniform float granularity;
-uniform float time;
-uniform float weight;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec2 tc = qt_TexCoord0;
- vec2 center = vec2(centerX, centerY);
- const vec3 shock = vec3(10.0, 1.5, 0.1);
- if (uv.x < dividerValue) {
- float distance = distance(uv, center);
- if ((distance <= (time + shock.z)) &&
- (distance >= (time - shock.z))) {
- float diff = (distance - time);
- float powDiff = 1.0 - pow(abs(diff*shock.x), shock.y*weight);
- float diffTime = diff * powDiff;
- vec2 diffUV = normalize(uv - center);
- tc += (diffUV * diffTime);
- }
- }
- gl_FragColor = qt_Opacity * texture2D(source, tc);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection1.fsh b/examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection1.fsh
deleted file mode 100644
index 9c0b33885..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection1.fsh
+++ /dev/null
@@ -1,92 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on "Graphics Shaders: Theory and Practice" (http://cgeducation.org/ShadersBook/)
-
-uniform float dividerValue;
-uniform float mixLevel;
-uniform float resS;
-uniform float resT;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec4 c = vec4(0.0);
- if (uv.x < dividerValue) {
- vec2 st = qt_TexCoord0.st;
- vec3 irgb = texture2D(source, st).rgb;
- vec2 stp0 = vec2(1.0 / resS, 0.0);
- vec2 st0p = vec2(0.0 , 1.0 / resT);
- vec2 stpp = vec2(1.0 / resS, 1.0 / resT);
- vec2 stpm = vec2(1.0 / resS, -1.0 / resT);
- const vec3 W = vec3(0.2125, 0.7154, 0.0721);
- float i00 = dot(texture2D(source, st).rgb, W);
- float im1m1 = dot(texture2D(source, st-stpp).rgb, W);
- float ip1p1 = dot(texture2D(source, st+stpp).rgb, W);
- float im1p1 = dot(texture2D(source, st-stpm).rgb, W);
- float ip1m1 = dot(texture2D(source, st+stpm).rgb, W);
- float im10 = dot(texture2D(source, st-stp0).rgb, W);
- float ip10 = dot(texture2D(source, st+stp0).rgb, W);
- float i0m1 = dot(texture2D(source, st-st0p).rgb, W);
- float i0p1 = dot(texture2D(source, st+st0p).rgb, W);
- float h = -1.0*im1p1 - 2.0*i0p1 - 1.0*ip1p1 + 1.0*im1m1 + 2.0*i0m1 + 1.0*ip1m1;
- float v = -1.0*im1m1 - 2.0*im10 - 1.0*im1p1 + 1.0*ip1m1 + 2.0*ip10 + 1.0*ip1p1;
- float mag = 1.0 - length(vec2(h, v));
- vec3 target = vec3(mag, mag, mag);
- c = vec4(target, 1.0);
- } else {
- c = texture2D(source, qt_TexCoord0);
- }
- gl_FragColor = qt_Opacity * c;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/tiltshift.fsh b/examples/multimedia/video/qmlvideofx/shaders/tiltshift.fsh
deleted file mode 100644
index 5119011ce..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/tiltshift.fsh
+++ /dev/null
@@ -1,84 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float dividerValue;
-const float step_w = 0.0015625;
-const float step_h = 0.0027778;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-vec3 blur()
-{
- vec2 uv = qt_TexCoord0.xy;
- float y = uv.y < 0.4 ? uv.y : 1.0 - uv.y;
- float dist = 8.0 - 20.0 * y;
- vec3 acc = vec3(0.0, 0.0, 0.0);
- for (float y=-2.0; y<=2.0; ++y) {
- for (float x=-2.0; x<=2.0; ++x) {
- acc += texture2D(source, vec2(uv.x + dist * x * step_w, uv.y + 0.5 * dist * y * step_h)).rgb;
- }
- }
- return acc / 25.0;
-}
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec3 col;
- if (uv.x > dividerValue || (uv.y >= 0.4 && uv.y <= 0.6))
- col = texture2D(source, uv).rgb;
- else
- col = blur();
- gl_FragColor = qt_Opacity * vec4(col, 1.0);
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/toon.fsh b/examples/multimedia/video/qmlvideofx/shaders/toon.fsh
deleted file mode 100644
index 22f2116c3..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/toon.fsh
+++ /dev/null
@@ -1,101 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/
-
-uniform float dividerValue;
-uniform float threshold;
-uniform float resS;
-uniform float resT;
-uniform float magTol;
-uniform float quantize;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec4 color = vec4(1.0, 0.0, 0.0, 1.1);
- vec2 uv = qt_TexCoord0.xy;
- if (uv.x < dividerValue) {
- vec2 st = qt_TexCoord0.st;
- vec3 rgb = texture2D(source, st).rgb;
- vec2 stp0 = vec2(1.0/resS, 0.0);
- vec2 st0p = vec2(0.0 , 1.0/resT);
- vec2 stpp = vec2(1.0/resS, 1.0/resT);
- vec2 stpm = vec2(1.0/resS, -1.0/resT);
- float i00 = dot( texture2D(source, st).rgb, vec3(0.2125,0.7154,0.0721));
- float im1m1 = dot( texture2D(source, st-stpp).rgb, vec3(0.2125,0.7154,0.0721));
- float ip1p1 = dot( texture2D(source, st+stpp).rgb, vec3(0.2125,0.7154,0.0721));
- float im1p1 = dot( texture2D(source, st-stpm).rgb, vec3(0.2125,0.7154,0.0721));
- float ip1m1 = dot( texture2D(source, st+stpm).rgb, vec3(0.2125,0.7154,0.0721));
- float im10 = dot( texture2D(source, st-stp0).rgb, vec3(0.2125,0.7154,0.0721));
- float ip10 = dot( texture2D(source, st+stp0).rgb, vec3(0.2125,0.7154,0.0721));
- float i0m1 = dot( texture2D(source, st-st0p).rgb, vec3(0.2125,0.7154,0.0721));
- float i0p1 = dot( texture2D(source, st+st0p).rgb, vec3(0.2125,0.7154,0.0721));
- float h = -1.*im1p1 - 2.*i0p1 - 1.*ip1p1 + 1.*im1m1 + 2.*i0m1 + 1.*ip1m1;
- float v = -1.*im1m1 - 2.*im10 - 1.*im1p1 + 1.*ip1m1 + 2.*ip10 + 1.*ip1p1;
- float mag = sqrt(h*h + v*v);
- if (mag > magTol) {
- color = vec4(0.0, 0.0, 0.0, 1.0);
- }
- else {
- rgb.rgb *= quantize;
- rgb.rgb += vec3(0.5, 0.5, 0.5);
- ivec3 irgb = ivec3(rgb.rgb);
- rgb.rgb = vec3(irgb) / quantize;
- color = vec4(rgb, 1.0);
- }
- } else {
- color = texture2D(source, uv);
- }
- gl_FragColor = qt_Opacity * color;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/vignette.fsh b/examples/multimedia/video/qmlvideofx/shaders/vignette.fsh
deleted file mode 100644
index d8a25737e..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/vignette.fsh
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float dividerValue;
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec4 orig = texture2D(source, uv);
- float cr = pow(0.1, 2.0);
- float pt = pow(uv.x - 0.5, 2.0) + pow(uv.y - 0.5, 2.0);
- float d = pt - cr;
- float cf = 1.0;
- if (d > 0.0)
- cf = 1.0 - 2.0 * d;
- vec3 col = cf * orig.rgb;
- if (uv.x < dividerValue)
- gl_FragColor = qt_Opacity * vec4(col, 1.0);
- else
- gl_FragColor = qt_Opacity * orig;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/warhol.fsh b/examples/multimedia/video/qmlvideofx/shaders/warhol.fsh
deleted file mode 100644
index 0ea02c6a0..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/warhol.fsh
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html
-
-uniform float dividerValue;
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec4 orig = texture2D(source, uv);
- vec3 col = orig.rgb;
- float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b;
- y = y < 0.3 ? 0.0 : (y < 0.6 ? 0.5 : 1.0);
- if (y == 0.5)
- col = vec3(0.8, 0.0, 0.0);
- else if (y == 1.0)
- col = vec3(0.9, 0.9, 0.0);
- else
- col = vec3(0.0, 0.0, 0.0);
- if (uv.x < dividerValue)
- gl_FragColor = qt_Opacity * vec4(col, 1.0);
- else
- gl_FragColor = qt_Opacity * orig;
-}
diff --git a/examples/multimedia/video/qmlvideofx/shaders/wobble.fsh b/examples/multimedia/video/qmlvideofx/shaders/wobble.fsh
deleted file mode 100644
index 5e0b1f79c..000000000
--- a/examples/multimedia/video/qmlvideofx/shaders/wobble.fsh
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies).
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-// Based on http://blog.qt.io/blog/2011/03/22/the-convenient-power-of-qml-scene-graph/
-
-uniform float amplitude;
-uniform float dividerValue;
-uniform float frequency;
-uniform float time;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-varying vec2 qt_TexCoord0;
-
-void main()
-{
- vec2 uv = qt_TexCoord0.xy;
- vec2 tc = qt_TexCoord0;
- if (uv.x < dividerValue) {
- vec2 p = sin(time + frequency * qt_TexCoord0);
- tc += amplitude * vec2(p.y, -p.x);
- }
- gl_FragColor = qt_Opacity * texture2D(source, tc);
-}
diff --git a/examples/multimedia/video/qmlvideofx/trace.h b/examples/multimedia/video/qmlvideofx/trace.h
deleted file mode 100644
index d2cb054df..000000000
--- a/examples/multimedia/video/qmlvideofx/trace.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-#ifndef TRACE_H
-#define TRACE_H
-
-#include <QDebug>
-
-#define ENABLE_TRACE
-//#define VERBOSE_TRACE
-
-namespace Trace {
-
-class NullDebug
-{
-public:
- template <typename T>
- NullDebug &operator<<(const T &) { return *this; }
-};
-
-inline NullDebug nullDebug() { return NullDebug(); }
-
-template <typename T>
-struct PtrWrapper
-{
- PtrWrapper(const T *ptr) : m_ptr(ptr) { }
- const T *const m_ptr;
-};
-
-} // namespace Trace
-
-template <typename T>
-inline QDebug &operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper)
-{
- QDebugStateSaver saver(debug);
- debug.nospace() << '[' << static_cast<const void *>(wrapper.m_ptr) << ']';
- return debug;
-}
-
-#ifdef ENABLE_TRACE
- inline QDebug qtTrace() { return qDebug() << "[qmlvideofx]"; }
-# ifdef VERBOSE_TRACE
- inline QDebug qtVerboseTrace() { return qtTrace(); }
-# else
- inline Trace::NullDebug qtVerboseTrace() { return Trace::nullDebug(); }
-# endif
-#else
- inline Trace::NullDebug qtTrace() { return Trace::nullDebug(); }
- inline Trace::NullDebug qtVerboseTrace() { return Trace::nullDebug(); }
-#endif
-
-#endif // TRACE_H
-
diff --git a/examples/multimedia/video/recorder/AudioInputSelect.qml b/examples/multimedia/video/recorder/AudioInputSelect.qml
new file mode 100644
index 000000000..d1e30f080
--- /dev/null
+++ b/examples/multimedia/video/recorder/AudioInputSelect.qml
@@ -0,0 +1,53 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtMultimedia
+
+Row {
+ id: root
+ height: Style.height
+ property AudioInput selected: available ? audioInput : null
+ property bool available: (typeof comboBox.currentValue !== 'undefined') && audioSwitch.checked
+
+ Component.onCompleted: {
+ audioInputModel.populate()
+ comboBox.currentIndex = 0
+ }
+
+ MediaDevices { id: mediaDevices }
+
+ AudioInput { id: audioInput; muted: !audioSwitch.checked }
+
+ Switch {
+ id: audioSwitch;
+ height: Style.height;
+ checked: true
+ }
+
+ ListModel {
+ id: audioInputModel
+ property var audioInputs: mediaDevices.audioInputs
+
+ function populate() {
+ audioInputModel.clear()
+
+ for (var audioDevice of audioInputs)
+ audioInputModel.append({ text: audioDevice.description, value:
+ { type: 'audioDevice', audioDevice: audioDevice } })
+ }
+ }
+ ComboBox {
+ id: comboBox
+ width: Style.widthLong
+ height: Style.height
+ background: StyleRectangle { anchors.fill: parent }
+ model: audioInputModel
+ textRole: "text"
+ font.pointSize: Style.fontSize
+ displayText: typeof currentValue === 'undefined' ? "unavailable" : currentText
+ valueRole: "value"
+ onCurrentValueChanged: if (typeof comboBox.currentValue !== 'undefined') audioInput.device = currentValue.audioDevice
+ }
+}
diff --git a/examples/multimedia/video/recorder/CMakeLists.txt b/examples/multimedia/video/recorder/CMakeLists.txt
new file mode 100644
index 000000000..116a1b817
--- /dev/null
+++ b/examples/multimedia/video/recorder/CMakeLists.txt
@@ -0,0 +1,62 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+cmake_minimum_required(VERSION 3.16)
+
+project(recorder LANGUAGES CXX)
+
+set(CMAKE_AUTOMOC ON)
+
+if(NOT DEFINED INSTALL_EXAMPLESDIR)
+ set(INSTALL_EXAMPLESDIR "examples")
+endif()
+
+set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/recorder")
+
+find_package(Qt6 REQUIRED COMPONENTS Core Multimedia Quick)
+
+qt_add_executable(recorder
+ main.cpp
+)
+
+set(resource_files
+ "main.qml"
+ "main_no_permissions.qml"
+ "qmldir"
+ "MediaList.qml"
+ "AudioInputSelect.qml"
+ "VideoSourceSelect.qml"
+ "RecordButton.qml"
+ "Controls.qml"
+ "StyleParameter.qml"
+ "StyleRectangle.qml"
+ "SettingsMetaData.qml"
+ "SettingsEncoder.qml"
+ "StyleSlider.qml"
+ "Style.qml"
+ "Playback.qml"
+)
+
+qt_add_resources(recorder "recorder"
+ PREFIX
+ "/"
+ FILES
+ ${resource_files}
+)
+
+target_link_libraries(recorder PRIVATE
+ Qt6::Core
+ Qt6::Multimedia
+ Qt6::Quick
+)
+
+set_target_properties(recorder PROPERTIES
+ MACOSX_BUNDLE TRUE
+ MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
+)
+
+install(TARGETS recorder
+ RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}"
+ BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}"
+ LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}"
+)
diff --git a/examples/multimedia/video/recorder/Controls.qml b/examples/multimedia/video/recorder/Controls.qml
new file mode 100644
index 000000000..627c2fe04
--- /dev/null
+++ b/examples/multimedia/video/recorder/Controls.qml
@@ -0,0 +1,83 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtMultimedia
+
+Row {
+ id: root
+ required property MediaRecorder recorder
+
+ property bool settingsVisible: false
+ property bool capturesVisible: false
+
+ property alias audioInput: audioInputSelect.selected
+ property alias camera: videoSourceSelect.selectedCamera
+ property alias screenCapture: videoSourceSelect.selectedScreenCapture
+ property alias windowCapture: videoSourceSelect.selectedWindowCapture
+
+ spacing: Style.interSpacing * Style.ratio
+
+ Column {
+ id: inputControls
+ spacing: Style.intraSpacing
+
+ VideoSourceSelect { id: videoSourceSelect }
+ AudioInputSelect { id: audioInputSelect }
+ }
+
+ Column {
+ width: recordButton.width
+ RecordButton {
+ id: recordButton
+ recording: recorder.recorderState === MediaRecorder.RecordingState
+ onClicked: recording ? recorder.stop() : recorder.record()
+ }
+ Text {
+ id: recordingTime
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.pointSize: Style.fontSize
+ color: palette.text
+ }
+ }
+
+ Column {
+ id: optionButtons
+ spacing: Style.intraSpacing
+ Button {
+ leftPadding: 0
+ rightPadding: 0
+ topPadding: 0
+ bottomPadding: 0
+ height: Style.height
+ width: Style.widthMedium
+ background: StyleRectangle { anchors.fill: parent }
+ onClicked: root.capturesVisible = !root.capturesVisible
+ text: "Captures"
+ font.pointSize: Style.fontSize
+ }
+ Button {
+ leftPadding: 0
+ rightPadding: 0
+ topPadding: 0
+ bottomPadding: 0
+ height: Style.height
+ width: Style.widthMedium
+ background: StyleRectangle { anchors.fill: parent }
+ onClicked: settingsVisible = !settingsVisible
+ text: "Settings"
+ font.pointSize: Style.fontSize
+ }
+ }
+
+ Timer {
+ running: true; interval: 100; repeat: true
+ onTriggered: {
+ var m = Math.floor(recorder.duration / 60000)
+ var ms = (recorder.duration / 1000 - m * 60).toFixed(1)
+ recordingTime.text = `${m}:${ms.padStart(4, 0)}`
+ }
+ }
+}
diff --git a/examples/multimedia/video/recorder/Info.plist.in b/examples/multimedia/video/recorder/Info.plist.in
new file mode 100644
index 000000000..46a9ecf2d
--- /dev/null
+++ b/examples/multimedia/video/recorder/Info.plist.in
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+
+ <key>CFBundleName</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+ <key>CFBundleExecutable</key>
+ <string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
+
+ <key>CFBundleVersion</key>
+ <string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
+ <key>CFBundleShortVersionString</key>
+ <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
+ <key>CFBundleLongVersionString</key>
+ <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
+
+ <key>LSMinimumSystemVersion</key>
+ <string>${CMAKE_OSX_DEPLOYMENT_TARGET}</string>
+
+ <key>CFBundleGetInfoString</key>
+ <string>${MACOSX_BUNDLE_INFO_STRING}</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>${MACOSX_BUNDLE_COPYRIGHT}</string>
+
+ <key>CFBundleIconFile</key>
+ <string>${MACOSX_BUNDLE_ICON_FILE}</string>
+
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+
+ <key>NSCameraUsageDescription</key>
+ <string>Qt Multimedia Example</string>
+ <key>NSMicrophoneUsageDescription</key>
+ <string>Qt Multimedia Example</string>
+
+ <key>NSSupportsAutomaticGraphicsSwitching</key>
+ <true/>
+</dict>
+</plist>
diff --git a/examples/multimedia/video/recorder/MediaList.qml b/examples/multimedia/video/recorder/MediaList.qml
new file mode 100644
index 000000000..5fa65393a
--- /dev/null
+++ b/examples/multimedia/video/recorder/MediaList.qml
@@ -0,0 +1,67 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtMultimedia
+import QtQuick.Layouts
+
+Item {
+ id: root
+
+ required property Playback playback
+
+ property string mediaThumbnail
+ property string mediaUrl
+
+ function append() {
+ if (mediaUrl !== "")
+ mediaList.append({"thumbnail": root.mediaThumbnail, "url": root.mediaUrl})
+ mediaThumbnail = ""
+ mediaUrl = ""
+ }
+
+ ListModel { id: mediaList }
+
+ ListView {
+ id: listView
+ anchors.fill: parent
+ model: mediaList
+ orientation: ListView.Horizontal
+ spacing: Style.intraSpacing
+
+ delegate: Frame {
+ padding: Style.intraSpacing
+ width: root.height
+ height: root.height
+ background: StyleRectangle { anchors.fill: parent }
+
+ required property string url
+ required property string thumbnail
+
+ ColumnLayout {
+ anchors.fill: parent
+ Image {
+ id: image
+ Layout.fillWidth: true
+ Layout.fillHeight: true
+ source: thumbnail
+ fillMode: Image.PreserveAspectFit
+ }
+
+ Text {
+ Layout.fillWidth: true
+ elide: Text.ElideLeft
+ text: url
+ }
+ }
+ RoundButton {
+ anchors.centerIn: parent
+ width: 30
+ height: 30
+ text: "\u25B6";
+ onClicked: { playback.playUrl(url) }
+ }
+ }
+ }
+}
diff --git a/examples/multimedia/video/recorder/Playback.qml b/examples/multimedia/video/recorder/Playback.qml
new file mode 100644
index 000000000..78575ae26
--- /dev/null
+++ b/examples/multimedia/video/recorder/Playback.qml
@@ -0,0 +1,55 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtMultimedia
+import QtQuick.Controls
+
+Item {
+ id: root
+
+ property bool active: false
+ property bool playing: false
+ visible: active && playing
+
+ function playUrl(url) {
+ playing = true
+ mediaPlayer.source = url
+ mediaPlayer.play()
+ }
+
+ function stop() {
+ playing = false
+ mediaPlayer.stop()
+ }
+
+ onActiveChanged: function() {
+ if (!active)
+ stop();
+ }
+
+ VideoOutput {
+ anchors.fill: parent
+ id: videoOutput
+ }
+
+ MediaPlayer {
+ id: mediaPlayer
+ videoOutput: videoOutput
+ audioOutput: AudioOutput {}
+ }
+
+ HoverHandler { id: hover }
+
+ RoundButton {
+ width: 50
+ height: 50
+ opacity: hover.hovered && active ? 1.0 : 0.0
+ anchors.centerIn: root
+ radius: 25
+ text: "\u25A0";
+ onClicked: root.stop()
+
+ Behavior on opacity { NumberAnimation { duration: 200 } }
+ }
+}
diff --git a/examples/multimedia/video/recorder/RecordButton.qml b/examples/multimedia/video/recorder/RecordButton.qml
new file mode 100644
index 000000000..5296a3028
--- /dev/null
+++ b/examples/multimedia/video/recorder/RecordButton.qml
@@ -0,0 +1,45 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtMultimedia
+
+Item {
+ id: root
+ width: outerRadius * 2
+ height: outerRadius * 2
+
+ required property bool recording
+
+ property int outerRadius: Style.height
+ property int innerRadius: mouse.pressedButtons === Qt.LeftButton ? outerRadius - 6 : outerRadius - 5
+
+ signal clicked
+
+ Rectangle {
+ anchors.fill: parent
+ radius: outerRadius
+ opacity: 0.5
+ border.color: "black"
+ border.width: 1
+ }
+
+ Rectangle {
+ anchors.centerIn: parent
+ width: recording ? innerRadius * 2 - 15 : innerRadius * 2
+ height: recording ? innerRadius * 2 - 15 : innerRadius * 2
+ radius: recording ? 2 : innerRadius
+ color: "red"
+
+ Behavior on width { NumberAnimation { duration: 100 }}
+ Behavior on height { NumberAnimation { duration: 100 }}
+ Behavior on radius { NumberAnimation { duration: 100 }}
+
+ MouseArea {
+ id: mouse
+ anchors.fill: parent
+ onClicked: root.clicked()
+ }
+ }
+}
diff --git a/examples/multimedia/video/recorder/SettingsEncoder.qml b/examples/multimedia/video/recorder/SettingsEncoder.qml
new file mode 100644
index 000000000..16a9590be
--- /dev/null
+++ b/examples/multimedia/video/recorder/SettingsEncoder.qml
@@ -0,0 +1,102 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtMultimedia
+
+Column {
+ id: root
+ spacing: Style.intraSpacing
+ Component.onCompleted: root.populateModels()
+
+ required property MediaRecorder recorder
+
+ function populateModels() {
+ audioCodecModel.populate()
+ videoCodecModel.populate()
+ fileFormatModel.populate()
+ }
+
+ Connections {
+ target: recorder
+ function onMediaFormatChanged() { root.populateModels() }
+ }
+
+ Text {
+ text: "Encoder settings"
+ color: palette.text
+ }
+
+ StyleParameter {
+ label: "Quality"
+ model: ListModel {
+ ListElement { text: "very low"; value: MediaRecorder.VeryLowQuality }
+ ListElement { text: "low"; value: MediaRecorder.LowQuality }
+ ListElement { text: "normal"; value: MediaRecorder.NormalQuality }
+ ListElement { text: "high"; value: MediaRecorder.HighQuality }
+ ListElement { text: "very high"; value: MediaRecorder.VeryHighQuality }
+ }
+ onActivated: (v) => { recorder.quality = v }
+ }
+
+ StyleParameter {
+ id: audioCodecSelect
+ label: "Audio codec"
+ model: audioCodecModel
+ onActivated: (v) => { recorder.mediaFormat.audioCodec = v }
+
+ ListModel {
+ id: audioCodecModel
+ function populate() {
+ audioCodecModel.clear()
+ audioCodecModel.append({"text": "Unspecifed", "value": MediaFormat.AudioCodec.Unspecified})
+ var cs = recorder.mediaFormat.supportedAudioCodecs(MediaFormat.Encode)
+ for (var c of cs)
+ audioCodecModel.append({"text": recorder.mediaFormat.audioCodecName(c), "value": c})
+ audioCodecSelect.currentIndex = cs.indexOf(recorder.mediaFormat.audioCodec) + 1
+ }
+ }
+ }
+
+ function buildModel() {}
+
+ StyleParameter {
+ id: videoCodecSelect
+ label: "Video codec"
+ model: videoCodecModel
+ onActivated: (v) => { recorder.mediaFormat.videoCodec = v }
+
+ ListModel {
+ id: videoCodecModel
+ function populate() {
+ videoCodecModel.clear()
+ videoCodecModel.append({"text": "Unspecifed", "value": MediaFormat.VideoCodec.Unspecified})
+ var cs = recorder.mediaFormat.supportedVideoCodecs(MediaFormat.Encode)
+ for (var c of cs)
+ videoCodecModel.append({"text": recorder.mediaFormat.videoCodecName(c), "value": c})
+ videoCodecSelect.currentIndex = cs.indexOf(recorder.mediaFormat.videoCodec) + 1
+ }
+ }
+ }
+
+ StyleParameter {
+ id: fileFormatSelect
+ label: "File format"
+ model: fileFormatModel
+ onActivated: (v) => { recorder.mediaFormat.fileFormat = v }
+
+ ListModel {
+ id: fileFormatModel
+ function populate() {
+ fileFormatModel.clear()
+ fileFormatModel.append({"text": "Unspecifed", "value": MediaFormat.AudioCodec.Unspecified})
+ var cs = recorder.mediaFormat.supportedFileFormats(MediaFormat.Encode)
+ for (var c of cs)
+ fileFormatModel.append({"text": recorder.mediaFormat.fileFormatName(c), "value": c})
+ fileFormatSelect.currentIndex = cs.indexOf(recorder.mediaFormat.fileFormat) + 1
+ }
+ }
+ }
+}
diff --git a/examples/multimedia/video/recorder/SettingsMetaData.qml b/examples/multimedia/video/recorder/SettingsMetaData.qml
new file mode 100644
index 000000000..7bfc2255d
--- /dev/null
+++ b/examples/multimedia/video/recorder/SettingsMetaData.qml
@@ -0,0 +1,145 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Layouts
+import QtQuick.Controls
+import QtMultimedia
+
+pragma ComponentBehavior: Bound
+
+ColumnLayout {
+ id: root
+ required property MediaRecorder recorder
+
+ Text {
+ text: "Metadata settings"
+ color: palette.text
+ }
+
+ ListModel { id: metaDataModel }
+
+ Connections {
+ target: root.recorder
+ function onMetaDataChanged() {
+ metaDataModel.clear()
+ for (var key of root.recorder.metaData.keys()) {
+ if (recorder.metaData.stringValue(key))
+ metaDataModel.append(
+ { text: recorder.metaData.metaDataKeyToString(key)
+ , value: key })
+ }
+ }
+ }
+
+ Row {
+ id: metaDataAdd
+ spacing: Style.intraSpacing
+ ComboBox {
+ id: metaDataType
+ width: Style.widthMedium
+ height: Style.height
+ font.pointSize: Style.fontSize
+ model: ListModel {
+ ListElement { text: "Title"; value: MediaMetaData.Title }
+ ListElement { text: "Author"; value: MediaMetaData.Author }
+ ListElement { text: "Comment"; value: MediaMetaData.Comment }
+ ListElement { text: "Description"; value: MediaMetaData.Description }
+ ListElement { text: "Genre"; value: MediaMetaData.Genre }
+ ListElement { text: "Publisher"; value: MediaMetaData.Publisher }
+ ListElement { text: "Copyright"; value: MediaMetaData.Copyright }
+ ListElement { text: "Date"; value: MediaMetaData.Date }
+ ListElement { text: "Url"; value: MediaMetaData.Url }
+ ListElement { text: "MediaType"; value: MediaMetaData.MediaType }
+ ListElement { text: "AlbumTitle"; value: MediaMetaData.AlbumTitle }
+ ListElement { text: "AlbumArtist"; value: MediaMetaData.AlbumArtist }
+ ListElement { text: "ContributingArtist"; value: MediaMetaData.ContributingArtist }
+ ListElement { text: "Composer"; value: MediaMetaData.Composer }
+ ListElement { text: "LeadPerformer"; value: MediaMetaData.LeadPerformer }
+ }
+ textRole: "text"
+ valueRole: "value"
+ background: StyleRectangle { anchors.fill: parent; width: metaDataType.width }
+ }
+ Item {
+ width: Style.widthMedium
+ height: Style.height
+ StyleRectangle { anchors.fill: parent }
+ TextInput {
+ id: textInput
+ anchors.fill: parent
+ anchors.bottom: parent.bottom
+ anchors.margins: 4
+ font.pointSize: Style.fontSize
+ clip: true
+ onAccepted: {
+ root.recorder.metaData.insert(metaDataType.currentValue, text)
+ recorder.metaDataChanged()
+ text = ""
+ textInput.deselect()
+ }
+ }
+ }
+ Button {
+ width: Style.widthShort
+ height: Style.height
+ text: "add"
+ font.pointSize: Style.fontSize
+
+ background: StyleRectangle { anchors.fill: parent }
+ onClicked: textInput.accepted()
+ }
+ }
+
+ ListView {
+ id: listView
+ Layout.fillHeight: true
+ Layout.minimumWidth: metaDataAdd.width
+ spacing: Style.intraSpacing
+ clip: true
+ model: metaDataModel
+
+ delegate: Row {
+ id: r
+ height: Style.height
+ spacing: Style.intraSpacing
+
+ required property string text
+ required property string value
+
+ Text {
+ width: Style.widthShort
+ height: Style.height
+ text: r.text
+ font.pointSize: Style.fontSize
+
+ horizontalAlignment: Text.AlignRight
+ verticalAlignment: Text.AlignVCenter
+ }
+ Item {
+ width: Style.widthMedium
+ height: Style.height
+
+ StyleRectangle { anchors.fill: parent }
+ TextInput {
+ anchors.fill: parent
+ anchors.margins: 4
+ anchors.bottom: parent.bottom
+ font.pointSize: Style.fontSize
+ clip: true
+ text: root.recorder.metaData.stringValue(r.value)
+ onAccepted: root.recorder.metaData.insert(r.value, text)
+
+ }
+ }
+ Button {
+ width: Style.widthShort
+ height: Style.height
+ text: "del"
+ font.pointSize: Style.fontSize
+ background: StyleRectangle { anchors.fill: parent }
+ onClicked: { root.recorder.metaData.remove(r.value); recorder.metaDataChanged() }
+ }
+ }
+ }
+}
diff --git a/examples/multimedia/video/recorder/Style.qml b/examples/multimedia/video/recorder/Style.qml
new file mode 100644
index 000000000..d30c3b8ef
--- /dev/null
+++ b/examples/multimedia/video/recorder/Style.qml
@@ -0,0 +1,31 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+pragma Singleton
+import QtQuick
+
+QtObject {
+
+ function isMobile() {
+ return Qt.platform.os === "android" || Qt.platform.os === "ios";
+ }
+
+ function calculateRatio(windowWidth, windowHeight) {
+ var refWidth = 800.;
+ Style.ratio = windowWidth/refWidth;
+ }
+
+ property real ratio : 1
+
+ property real screenWidth: isMobile()? 400 : 800
+ property real screenHeigth: isMobile()? 900 : 600
+
+ property real height: 25
+ property real widthTiny: 40*ratio
+ property real widthShort: 80*ratio
+ property real widthMedium: 160*ratio
+ property real widthLong: 220*ratio
+ property real intraSpacing: 5
+ property real interSpacing: 15
+ property real fontSize: 11
+}
diff --git a/examples/multimedia/video/recorder/StyleParameter.qml b/examples/multimedia/video/recorder/StyleParameter.qml
new file mode 100644
index 000000000..3a7573b92
--- /dev/null
+++ b/examples/multimedia/video/recorder/StyleParameter.qml
@@ -0,0 +1,42 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Row {
+ id: root
+ spacing: Style.intraSpacing
+
+ property alias label: label.text
+ property alias model: comboBox.model
+ property alias currentIndex: comboBox.currentIndex
+ property alias currentValue: comboBox.currentValue
+ property bool enabled: true
+ signal activated(var currentValue)
+
+ Text {
+ id: label
+ height: Style.height
+ width: Style.widthShort
+ horizontalAlignment: Text.AlignRight
+ verticalAlignment: Text.AlignVCenter
+ color: root.enabled ? palette.text : palette.mid
+ font.pointSize: Style.fontSize
+ }
+
+ ComboBox {
+ id: comboBox
+ height: Style.height
+ width: Style.widthLong
+ enabled: root.enabled
+
+ displayText: currentText
+ textRole: "text"
+ valueRole: "value"
+ font.pointSize: Style.fontSize
+
+ background: StyleRectangle { anchors.fill: parent }
+ onActivated: root.activated(currentValue)
+ }
+}
diff --git a/examples/multimedia/video/recorder/StyleRectangle.qml b/examples/multimedia/video/recorder/StyleRectangle.qml
new file mode 100644
index 000000000..e28cf4a19
--- /dev/null
+++ b/examples/multimedia/video/recorder/StyleRectangle.qml
@@ -0,0 +1,11 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+
+Rectangle {
+ opacity: 0.5
+ border.color: "black"
+ border.width: 1
+ radius: 3
+}
diff --git a/examples/multimedia/video/recorder/StyleSlider.qml b/examples/multimedia/video/recorder/StyleSlider.qml
new file mode 100644
index 000000000..a15304aaa
--- /dev/null
+++ b/examples/multimedia/video/recorder/StyleSlider.qml
@@ -0,0 +1,35 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+
+Row {
+ id: root
+ spacing: Style.intraSpacing
+
+ property alias label: label.text
+ property alias from: slider.from
+ property alias to: slider.to
+ property alias value: slider.value
+ property bool enabled: true
+
+ signal moved(real currentValue)
+
+ Text {
+ id: label
+ width: Style.valueWidth
+ height: Style.height
+ horizontalAlignment: Text.AlignRight
+ verticalAlignment: Text.AlignVCenter
+ color: root.enabled ? palette.text : palette.mid
+ }
+
+ Slider {
+ id: slider
+ anchors.verticalCenter: label.verticalCenter
+ width: Style.widthMedium
+ enabled: root.enabled
+ onMoved: root.moved(value)
+ }
+}
diff --git a/examples/multimedia/video/recorder/VideoSourceSelect.qml b/examples/multimedia/video/recorder/VideoSourceSelect.qml
new file mode 100644
index 000000000..7eeed99b9
--- /dev/null
+++ b/examples/multimedia/video/recorder/VideoSourceSelect.qml
@@ -0,0 +1,165 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Controls
+import QtMultimedia
+
+Row {
+ id: root
+ height: Style.height
+ property Camera selectedCamera: cameraAvailable ? camera : null
+ property ScreenCapture selectedScreenCapture: screenAvailable ? screenCapture : null
+ property WindowCapture selectedWindowCapture: windowAvailable ? windowCapture : null
+
+ property bool sourceAvailable: typeof comboBox.currentValue !== 'undefined' &&
+ comboBox.currentValue.type !== 'toggler' &&
+ videoSourceSwitch.checked
+
+ property bool cameraAvailable: sourceAvailable && comboBox.currentValue.type === 'camera'
+ property bool screenAvailable: sourceAvailable && comboBox.currentValue.type === 'screen'
+ property bool windowAvailable: sourceAvailable && comboBox.currentValue.type === 'window'
+
+ Component.onCompleted: {
+ videoSourceModel.populate()
+
+ for (var i = 0; i < videoSourceModel.count; i++) {
+ if (videoSourceModel.get(i).value.type !== 'toggler') {
+ comboBox.currentIndex = i
+ break
+ }
+ }
+ }
+
+ Camera {
+ id: camera
+ active: cameraAvailable
+ }
+
+ ScreenCapture {
+ id: screenCapture
+ active: screenAvailable
+ }
+
+ WindowCapture {
+ id: windowCapture
+ active: windowAvailable
+ }
+
+ MediaDevices { id: mediaDevices
+ onVideoInputsChanged: {
+
+ videoSourceModel.populate()
+
+ for (var i = 0; i < videoSourceModel.count; i++) {
+ if (videoSourceModel.get(i).value.type !== 'toggler') {
+ comboBox.currentIndex = i
+ break
+ }
+ }
+ }
+ }
+
+ Switch {
+ id: videoSourceSwitch
+ anchors.verticalCenter: parent.verticalCenter
+ checked: true
+ }
+
+ ListModel {
+ id: videoSourceModel
+ property var enabledSources: {
+ 'camera': true,
+ 'screen': true,
+ 'window': false
+ }
+
+ function toggleEnabledSource(type) {
+ enabledSources[type] = !enabledSources[type]
+ populate()
+ }
+
+ function appendItem(text, value) {
+ append({ text: text, value: value})
+ }
+
+ function appendToggler(name, sourceType) {
+ appendItem((enabledSources[sourceType] ? "- Hide " : "+ Show ") + name,
+ { type: 'toggler', 'sourceType': sourceType })
+ }
+
+ function populate() {
+ clear()
+
+ appendToggler('Cameras', 'camera')
+ if (enabledSources['camera'])
+ for (var camera of mediaDevices.videoInputs)
+ appendItem(camera.description, { type: 'camera', camera: camera })
+
+ appendToggler('Screens', 'screen')
+ if (enabledSources['screen'])
+ for (var screen of Application.screens)
+ appendItem(screen.name, { type: 'screen', screen: screen })
+
+ appendToggler('Windows', 'window')
+ if (enabledSources['window'])
+ for (var window of windowCapture.capturableWindows())
+ appendItem(window.description, { type: 'window', window: window })
+ }
+ }
+
+ ComboBox {
+ id: comboBox
+ width: Style.widthLong
+ height: Style.height
+ background: StyleRectangle { anchors.fill: parent }
+ model: videoSourceModel
+ displayText: typeof currentValue === 'undefined' ||
+ currentValue.type === 'toggler' ? "Unavailable" : currentText
+ font.pointSize: Style.fontSize
+ textRole: "text"
+ valueRole: "value"
+ onCurrentValueChanged: {
+ if (typeof currentValue === 'undefined')
+ return
+ if (currentValue.type === 'screen')
+ screenCapture.screen = currentValue.screen
+ else if (currentValue.type === 'camera')
+ camera.cameraDevice = currentValue.camera
+ else if (currentValue.type === 'window')
+ windowCapture.window = currentValue.window
+ else if (currentValue.type === 'toggler')
+ model.toggleEnabledSource(currentValue.sourceType)
+ }
+
+ delegate: ItemDelegate {
+ property bool isToggler: value.type === 'toggler'
+ text: model[comboBox.textRole]
+ width: comboBox.width
+ height: comboBox.height
+ highlighted: comboBox.highlightedIndex === index && !isToggler
+ font.italic: isToggler
+ font.underline: isToggler
+ font.bold: comboBox.currentIndex === index && !isToggler ||
+ isToggler && comboBox.highlightedIndex === index
+ palette.text: isToggler ? comboBox.palette.link : comboBox.palette.text
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (isToggler)
+ videoSourceModel.toggleEnabledSource(value.sourceType)
+ else {
+ comboBox.currentIndex = index
+ comboBox.popup.close()
+ }
+ }
+ }
+
+ required property var value
+ required property int index
+ required property var model
+ }
+
+ }
+}
diff --git a/examples/multimedia/video/recorder/doc/images/qml-recorder-control-bar-overview.gif b/examples/multimedia/video/recorder/doc/images/qml-recorder-control-bar-overview.gif
new file mode 100644
index 000000000..b02053ea5
--- /dev/null
+++ b/examples/multimedia/video/recorder/doc/images/qml-recorder-control-bar-overview.gif
Binary files differ
diff --git a/examples/multimedia/video/recorder/doc/images/qml-recorder-overview.gif b/examples/multimedia/video/recorder/doc/images/qml-recorder-overview.gif
new file mode 100644
index 000000000..2e5e39215
--- /dev/null
+++ b/examples/multimedia/video/recorder/doc/images/qml-recorder-overview.gif
Binary files differ
diff --git a/examples/multimedia/video/recorder/doc/images/qmlrecorder.jpg b/examples/multimedia/video/recorder/doc/images/qmlrecorder.jpg
new file mode 100644
index 000000000..1ef0e4447
--- /dev/null
+++ b/examples/multimedia/video/recorder/doc/images/qmlrecorder.jpg
Binary files differ
diff --git a/examples/multimedia/video/recorder/doc/src/recorder.qdoc b/examples/multimedia/video/recorder/doc/src/recorder.qdoc
new file mode 100644
index 000000000..3c0de3730
--- /dev/null
+++ b/examples/multimedia/video/recorder/doc/src/recorder.qdoc
@@ -0,0 +1,102 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example video/recorder
+ \title QML Video Recorder
+ \ingroup multimedia_examples
+ \ingroup video_examples_qml
+ \ingroup camera_examples_qml
+ \examplecategory {Multimedia}
+ \brief Recording audio and video using Qt Quick.
+ \meta {tag} {quick}
+
+ \image qmlrecorder.jpg
+
+ \e{QML Recorder} demonstrates a simple application that can record
+ audio and video separate or together, using a microphone, a camera, or
+ with screen capturing.
+
+ \include examples-run.qdocinc
+
+ \section1 Overview
+ At its core, this is a QML application, see
+ \l{Getting Started Programming with Qt Quick}. This documentation is focused
+ on how this example uses the \l{Qt Multimedia QML Types}.
+
+ \image qml-recorder-overview.gif "Animation cycling through qml objects declared in main.qml"
+
+ The example uses the QML \l Camera and \l AudioInput types connected to a
+ \l CaptureSession. A \l MediaRecorder object is then used to record the
+ captured audio and video.
+
+ In addition to QtMultimedia, features of Qt Quick Windows, Controls, and
+ Layouts are used to implement the graphic user interface and functionality.
+ Playback won't be covered here, for that see the \l{QML Media Player Example}.
+
+ The example demonstrates the following:
+ \list
+ \li Input devices can be selected.
+ \li An input type switched off.
+ \li Settings for capturing such as quality, codec choice, file format,
+ and assigning metadata.
+ \li Captured files are stored and can be played back.
+ \endlist
+
+ \section1 Recording
+
+ The application implements recording.
+
+ \section2 captureSession
+
+ In \c main.qml, \c captureSession is declared like so:
+
+ \quotefromfile video/recorder/main.qml
+ \skipto CaptureSession
+ \printto MediaRecorder
+
+ \section2 recorder
+
+ In \c main.qml, the \l MediaRecorder \c recorder handles recording media
+ as well as capturing a thumbnail for the file and appending it to a ListModel,
+ \c mediaList.
+ \printto Playback
+
+ \c mediaList is declared in the \l Frame \c mediaListFrame
+ \quotefromfile video/recorder/main.qml
+ \skipto Frame
+ \printuntil playback: playback
+
+ \section2 controls
+
+ \image qml-recorder-control-bar-overview.gif
+
+ These are defined in \c Controls.qml and declared in main.qml.
+
+ Its root is a \l Row that contains the \l{Column}{Columns} \c inputControls,
+ \c recordButton, \c optionButtons, each defined in their own .qml files.
+
+ \section3 Selecting a video source
+
+ Defined in \c VideoSourceSelect.qml, \c VideoSourceSlect is comprised of a
+ \l Switch and a \l ComboBox and enables the user to select from available
+ cameras.
+
+ \quotefromfile video/recorder/VideoSourceSelect.qml
+ \skipto Row
+ \printto ComboBox
+
+ \c comboBox, declared in the above snippet, assigns the current video source.
+
+ \printuntil camera.cameraDevice = currentValue.camera
+
+ \section3 Selecting an audio input
+
+ Implemented in the same way as \l{Selecting a video source} and defined in
+ \c AudioInputSelect.qml like so:
+
+ \quotefromfile video/recorder/AudioInputSelect.qml
+ \skipto Row
+ \printto audioInput.device = currentValue
+
+*/
diff --git a/examples/multimedia/video/recorder/main.cpp b/examples/multimedia/video/recorder/main.cpp
new file mode 100644
index 000000000..92e54cb1b
--- /dev/null
+++ b/examples/multimedia/video/recorder/main.cpp
@@ -0,0 +1,51 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+#if QT_CONFIG(permissions)
+ #include <QPermission>
+#endif
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ QQmlApplicationEngine engine;
+ const QUrl url(QStringLiteral("qrc:/main.qml"));
+ QObject::connect(
+ &engine, &QQmlApplicationEngine::objectCreated, &app,
+ [url](QObject *obj, const QUrl &objUrl) {
+ if (!obj && url == objUrl)
+ QCoreApplication::exit(-1);
+ },
+ Qt::QueuedConnection);
+
+#if QT_CONFIG(permissions)
+ // If the permissions are not granted, display another main window, which
+ // simply contains the error message.
+ const QUrl noPermissionsUrl(QStringLiteral("qrc:/main_no_permissions.qml"));
+ QCameraPermission cameraPermission;
+ qApp->requestPermission(cameraPermission, [&](const QPermission &permission) {
+ if (permission.status() != Qt::PermissionStatus::Granted) {
+ qWarning("Camera permission is not granted!");
+ engine.load(noPermissionsUrl);
+ return;
+ }
+ QMicrophonePermission micPermission;
+ qApp->requestPermission(micPermission, [&](const QPermission &permission) {
+ if (permission.status() != Qt::PermissionStatus::Granted) {
+ qWarning("Microphone permission is not granted!");
+ engine.load(noPermissionsUrl);
+ } else {
+ engine.load(url);
+ }
+ });
+ });
+#else
+ engine.load(url);
+#endif
+
+ return app.exec();
+}
diff --git a/examples/multimedia/video/recorder/main.qml b/examples/multimedia/video/recorder/main.qml
new file mode 100644
index 000000000..d8d1cd54f
--- /dev/null
+++ b/examples/multimedia/video/recorder/main.qml
@@ -0,0 +1,144 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Window
+import QtQuick.Controls
+import QtQuick.Layouts
+import QtMultimedia
+
+Window {
+ id: root
+ visible: true
+ title: "Media recorder"
+ width: Style.screenWidth
+ height: Style.screenHeigth
+
+ color: palette.window
+
+ onWidthChanged:{
+ Style.calculateRatio(root.width, root.height)
+ }
+
+ VideoOutput {
+ id: videoOutput
+ anchors.fill: parent
+ visible: !playback.playing
+ }
+
+ Popup {
+ id: recorderError
+ anchors.centerIn: Overlay.overlay
+ Text { id: recorderErrorText }
+ }
+
+ CaptureSession {
+ id: captureSession
+ recorder: recorder
+ audioInput: controls.audioInput
+ camera: controls.camera
+ screenCapture: controls.screenCapture
+ windowCapture: controls.windowCapture
+ videoOutput: videoOutput
+ }
+
+ MediaRecorder {
+ id: recorder
+ onRecorderStateChanged:
+ (state) => {
+ if (state === MediaRecorder.StoppedState) {
+ root.contentOrientation = Qt.PrimaryOrientation
+ mediaList.append()
+ } else if (state === MediaRecorder.RecordingState && captureSession.camera) {
+ // lock orientation while recording and create a preview image
+ root.contentOrientation = root.screen.orientation;
+ videoOutput.grabToImage(function(res) { mediaList.mediaThumbnail = res.url })
+ }
+ }
+ onActualLocationChanged: (url) => { mediaList.mediaUrl = url }
+ onErrorOccurred: { recorderErrorText.text = recorder.errorString; recorderError.open(); }
+ }
+
+ Playback {
+ id: playback
+ anchors {
+ fill: parent
+ margins: 50
+ }
+ active: controls.capturesVisible
+ }
+
+ Frame {
+ id: mediaListFrame
+ height: 150
+ width: parent.width
+ anchors.bottom: controlsFrame.top
+ x: controls.capturesVisible ? 0 : parent.width
+ background: Rectangle {
+ anchors.fill: parent
+ color: palette.base
+ opacity: 0.8
+ }
+
+ Behavior on x { NumberAnimation { duration: 200 } }
+
+ MediaList {
+ id: mediaList
+ anchors.fill: parent
+ playback: playback
+ }
+ }
+
+ Frame {
+ id: controlsFrame
+
+ anchors {
+ left: parent.left
+ right: parent.right
+ bottom: parent.bottom
+ }
+
+ height: controls.height + Style.interSpacing * 2 + (settingsEncoder.visible? settingsEncoder.height : 0) +(settingsMetaData.visible? settingsMetaData.height : 0)
+
+ background: Rectangle {
+ anchors.fill: parent
+ color: palette.base
+ opacity: 0.8
+ }
+
+ Behavior on height { NumberAnimation { duration: 100 } }
+
+ ColumnLayout {
+ anchors.fill: parent
+
+ Controls {
+ Layout.alignment: Qt.AlignHCenter
+ id: controls
+ recorder: recorder
+ }
+
+ StyleRectangle {
+ Layout.alignment: Qt.AlignHCenter
+ visible: controls.settingsVisible
+ width: controls.width
+ height: 1
+ }
+
+ SettingsEncoder {
+
+ id:settingsEncoder
+ Layout.alignment: Qt.AlignHCenter
+ visible: controls.settingsVisible
+ padding: Style.interSpacing
+ recorder: recorder
+ }
+
+ SettingsMetaData {
+ id: settingsMetaData
+ Layout.alignment: Qt.AlignHCenter
+ visible: !Style.isMobile() && controls.settingsVisible
+ recorder: recorder
+ }
+ }
+ }
+}
diff --git a/examples/multimedia/video/recorder/main_no_permissions.qml b/examples/multimedia/video/recorder/main_no_permissions.qml
new file mode 100644
index 000000000..8c76533b0
--- /dev/null
+++ b/examples/multimedia/video/recorder/main_no_permissions.qml
@@ -0,0 +1,26 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick
+import QtQuick.Window
+
+Window {
+ id: root
+ visible: true
+ title: "Media recorder"
+ width: Style.screenWidth
+ height: Style.screenHeigth
+
+ StyleRectangle {
+ anchors.fill: parent
+ Text {
+ anchors.fill: parent
+ anchors.margins: 20
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ horizontalAlignment: Text.AlignHCenter
+ text: qsTr("The example is not usable without the permissions.\n"
+ + "Please grant all requested permissions and restart the application.")
+ }
+ }
+}
diff --git a/examples/multimedia/video/recorder/qmldir b/examples/multimedia/video/recorder/qmldir
new file mode 100644
index 000000000..400b74be5
--- /dev/null
+++ b/examples/multimedia/video/recorder/qmldir
@@ -0,0 +1,2 @@
+module CustomStyles
+singleton Style 1.0 Style.qml
diff --git a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.h b/examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.h
deleted file mode 100644
index efeb78589..000000000
--- a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.h
+++ /dev/null
@@ -1,111 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-#ifndef FREQUENCYMONITOR_H
-#define FREQUENCYMONITOR_H
-
-#include <QObject>
-#include <QTimer>
-
-class FrequencyMonitorPrivate;
-
-/**
- * Class for measuring frequency of events
- *
- * Occurrence of the event is notified by the client via the notify() slot.
- * On a regular interval, both an instantaneous and a rolling average
- * event frequency are calculated.
- */
-class FrequencyMonitor : public QObject
-{
- Q_OBJECT
- Q_DECLARE_PRIVATE(FrequencyMonitor)
- Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged)
- Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged)
- Q_PROPERTY(int samplingInterval READ samplingInterval WRITE setSamplingInterval NOTIFY samplingIntervalChanged)
- Q_PROPERTY(int traceInterval READ traceInterval WRITE setTraceInterval NOTIFY traceIntervalChanged)
- Q_PROPERTY(qreal instantaneousFrequency READ instantaneousFrequency NOTIFY instantaneousFrequencyChanged)
- Q_PROPERTY(qreal averageFrequency READ averageFrequency NOTIFY averageFrequencyChanged)
-
-public:
- FrequencyMonitor(QObject *parent = 0);
- ~FrequencyMonitor();
-
- static void qmlRegisterType();
-
- QString label() const;
- bool active() const;
- int samplingInterval() const;
- int traceInterval() const;
- qreal instantaneousFrequency() const;
- qreal averageFrequency() const;
-
-signals:
- void labelChanged(const QString &value);
- void activeChanged(bool);
- void samplingIntervalChanged(int value);
- void traceIntervalChanged(int value);
- void frequencyChanged();
- void instantaneousFrequencyChanged(qreal value);
- void averageFrequencyChanged(qreal value);
-
-public slots:
- Q_INVOKABLE void notify();
- Q_INVOKABLE void trace();
- void setActive(bool value);
- void setLabel(const QString &value);
- void setSamplingInterval(int value);
- void setTraceInterval(int value);
-
-private:
- FrequencyMonitorPrivate *d_ptr;
-};
-
-#endif // FREQUENCYMONITOR_H
diff --git a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.pri b/examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.pri
deleted file mode 100644
index 3ac8a08c4..000000000
--- a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitor.pri
+++ /dev/null
@@ -1,5 +0,0 @@
-HEADERS += $$PWD/frequencymonitor.h
-SOURCES += $$PWD/frequencymonitor.cpp
-INCLUDEPATH += $$PWD
-DEFINES += FREQUENCYMONITOR_SUPPORT
-
diff --git a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.cpp b/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.cpp
deleted file mode 100644
index 0994ae213..000000000
--- a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 "frequencymonitor.h"
-#include <QtQml/qqml.h>
-
-void FrequencyMonitor::qmlRegisterType()
-{
- ::qmlRegisterType<FrequencyMonitor>("FrequencyMonitor", 1, 0, "FrequencyMonitor");
-}
diff --git a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.pri b/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.pri
deleted file mode 100644
index 071b7286a..000000000
--- a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.pri
+++ /dev/null
@@ -1,5 +0,0 @@
-include($$PWD/frequencymonitor.pri)
-QT += qml
-
-SOURCES += $$PWD/frequencymonitordeclarative.cpp
-RESOURCES += $$PWD/frequencymonitordeclarative.qrc
diff --git a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.qrc b/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.qrc
deleted file mode 100644
index 48e60cf1e..000000000
--- a/examples/multimedia/video/snippets/frequencymonitor/frequencymonitordeclarative.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/frequencymonitor/FrequencyItem.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/multimedia/video/snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml b/examples/multimedia/video/snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml
deleted file mode 100644
index 13867eb3c..000000000
--- a/examples/multimedia/video/snippets/frequencymonitor/qml/frequencymonitor/FrequencyItem.qml
+++ /dev/null
@@ -1,114 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 FrequencyMonitor 1.0
-
-Rectangle {
- id: root
- property bool logging: true
- property bool displayed: true
- property bool enabled: logging || displayed
- property alias active: monitor.active
- property int samplingInterval: 500
- property color textColor: "yellow"
- property int textSize: 20
- property alias label: monitor.label
-
- border.width: 1
- border.color: "yellow"
- width: 5.5 * root.textSize
- height: 3.0 * root.textSize
- color: "black"
- opacity: 0.5
- radius: 10
- visible: displayed && active
-
- // This should ensure that the monitor is on top of all other content
- z: 999
-
- function notify() {
- monitor.notify()
- }
-
- FrequencyMonitor {
- id: monitor
- samplingInterval: root.enabled ? root.samplingInterval : 0
- onAverageFrequencyChanged: {
- if (root.logging) trace()
- averageFrequencyText.text = monitor.averageFrequency.toFixed(2)
- }
- }
-
- Text {
- id: labelText
- anchors {
- left: parent.left
- top: parent.top
- margins: 10
- }
- color: root.textColor
- font.pixelSize: 0.6 * root.textSize
- text: root.label
- width: root.width - 2*anchors.margins
- elide: Text.ElideRight
- }
-
- Text {
- id: averageFrequencyText
- anchors {
- right: parent.right
- bottom: parent.bottom
- margins: 10
- }
- color: root.textColor
- font.pixelSize: root.textSize
- }
-}
diff --git a/examples/multimedia/video/snippets/performancemonitor/performancemonitor.cpp b/examples/multimedia/video/snippets/performancemonitor/performancemonitor.cpp
deleted file mode 100644
index 204eabc5a..000000000
--- a/examples/multimedia/video/snippets/performancemonitor/performancemonitor.cpp
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 "performancemonitor.h"
-
-namespace PerformanceMonitor {
-
-bool State::parseArgument(const QByteArray &arg)
-{
- bool result = false;
- if (arg == "-log-perf") {
- logging = true;
- valid = true;
- result = true;
- } else if (arg == "-no-log-perf") {
- logging = false;
- valid = true;
- result = true;
- } else if (arg == "-show-perf") {
- visible = true;
- valid = true;
- result = true;
- } else if (arg == "-hide-perf") {
- visible = false;
- valid = true;
- result = true;
- }
- return result;
-}
-
-} // namespace PerformanceMonitor
diff --git a/examples/multimedia/video/snippets/performancemonitor/performancemonitor.h b/examples/multimedia/video/snippets/performancemonitor/performancemonitor.h
deleted file mode 100644
index 97b76caf3..000000000
--- a/examples/multimedia/video/snippets/performancemonitor/performancemonitor.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-#ifndef PERFORMANCEMONITOR_H
-#define PERFORMANCEMONITOR_H
-
-#include <QByteArray>
-
-namespace PerformanceMonitor {
-
-struct State
-{
- State() : valid(true), logging(false), visible(true) { }
- State(bool l, bool v) : valid(true), logging(l), visible(v) { }
- bool operator==(const State &other) const
- { return logging == other.logging && visible == other.visible; }
- bool operator!=(const State &other) const
- { return logging != other.logging || visible != other.visible; }
-
- bool parseArgument(const QByteArray &arg);
-
- bool valid;
- bool logging;
- bool visible;
-};
-
-} // namespace PerformanceMonitor
-
-#endif // PERFORMANCEMONITOR_H
-
diff --git a/examples/multimedia/video/snippets/performancemonitor/performancemonitor.pri b/examples/multimedia/video/snippets/performancemonitor/performancemonitor.pri
deleted file mode 100644
index 2df3cfb13..000000000
--- a/examples/multimedia/video/snippets/performancemonitor/performancemonitor.pri
+++ /dev/null
@@ -1,5 +0,0 @@
-INCLUDEPATH += $$PWD
-HEADERS += $$PWD/performancemonitor.h
-SOURCES += $$PWD/performancemonitor.cpp
-DEFINES += PERFORMANCEMONITOR_SUPPORT
-
diff --git a/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.cpp b/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.cpp
deleted file mode 100644
index 0783fdbd9..000000000
--- a/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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 "frequencymonitor.h"
-#include "performancemonitor.h"
-
-namespace PerformanceMonitor {
-
- void qmlRegisterTypes()
- {
- FrequencyMonitor::qmlRegisterType();
- }
-}
diff --git a/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.h b/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.h
deleted file mode 100644
index ca70657ce..000000000
--- a/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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$
-**
-****************************************************************************/
-
-#ifndef PERFORMANCEMONITORDECLARATIVE_H
-#define PERFORMANCEMONITORDECLARATIVE_H
-
-#include "performancemonitor.h"
-
-namespace PerformanceMonitor {
- void qmlRegisterTypes();
-}
-
-#endif // PERFORMANCEMONITORDECLARATIVE_H
diff --git a/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.pri b/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.pri
deleted file mode 100644
index 9a18e35e5..000000000
--- a/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.pri
+++ /dev/null
@@ -1,6 +0,0 @@
-include($$PWD/../frequencymonitor/frequencymonitordeclarative.pri)
-include($$PWD/performancemonitor.pri)
-
-HEADERS += $$PWD/performancemonitordeclarative.h
-SOURCES += $$PWD/performancemonitordeclarative.cpp
-RESOURCES += $$PWD/performancemonitordeclarative.qrc
diff --git a/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.qrc b/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.qrc
deleted file mode 100644
index 9ec54a3e4..000000000
--- a/examples/multimedia/video/snippets/performancemonitor/performancemonitordeclarative.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-<RCC>
- <qresource prefix="/">
- <file>qml/performancemonitor/PerformanceItem.qml</file>
- </qresource>
-</RCC>
diff --git a/examples/multimedia/video/snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml b/examples/multimedia/video/snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml
deleted file mode 100644
index 6f5d3d7d3..000000000
--- a/examples/multimedia/video/snippets/performancemonitor/qml/performancemonitor/PerformanceItem.qml
+++ /dev/null
@@ -1,150 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** BSD License Usage
-** Alternatively, 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 The Qt Company Ltd 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
-
-Rectangle {
- id: root
- property bool logging: true
- property bool displayed: true
- property bool videoActive
- property int margins: 5
- property bool enabled: true
-
- color: "transparent"
-
- // This should ensure that the monitor is on top of all other content
- z: 999
-
- Column {
- id: column
- anchors {
- fill: root
- margins: 10
- }
- spacing: 10
- }
-
- QtObject {
- id: d
- property Item qmlFrameRateItem: null
- property Item videoFrameRateItem: null
- }
-
- Connections {
- id: videoFrameRateActiveConnections
- ignoreUnknownSignals: true
- onActiveChanged: root.videoActive = videoFrameRateActiveConnections.target.active
- }
-
- states: [
- State {
- name: "hidden"
- PropertyChanges {
- target: root
- opacity: 0
- }
- }
- ]
-
- transitions: [
- Transition {
- from: "*"
- to: "*"
- NumberAnimation {
- properties: "opacity"
- easing.type: Easing.OutQuart
- duration: 500
- }
- }
- ]
-
- state: enabled ? "baseState" : "hidden"
-
- function createQmlFrameRateItem() {
- var component = Qt.createComponent("../frequencymonitor/FrequencyItem.qml")
- if (component.status == Component.Ready)
- d.qmlFrameRateItem = component.createObject(column, { label: "QML frame rate",
- displayed: root.displayed,
- logging: root.logging
- })
- }
-
- function createVideoFrameRateItem() {
- var component = Qt.createComponent("../frequencymonitor/FrequencyItem.qml")
- if (component.status == Component.Ready)
- d.videoFrameRateItem = component.createObject(column, { label: "Video frame rate",
- displayed: root.displayed,
- logging: root.logging
- })
- videoFrameRateActiveConnections.target = d.videoFrameRateItem
- }
-
-
- function init() {
- createQmlFrameRateItem()
- createVideoFrameRateItem()
- }
-
- function videoFramePainted() {
- if (d.videoFrameRateItem)
- d.videoFrameRateItem.notify()
- }
-
- function qmlFramePainted() {
- if (d.qmlFrameRateItem)
- d.qmlFrameRateItem.notify()
- }
-
- onVideoActiveChanged: {
- if (d.videoFrameRateItem)
- d.videoFrameRateItem.active = root.videoActive
- }
-}
diff --git a/examples/multimedia/video/video.pro b/examples/multimedia/video/video.pro
index ef5bc849d..2915ce40b 100644
--- a/examples/multimedia/video/video.pro
+++ b/examples/multimedia/video/video.pro
@@ -1,9 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS += qmlvideo qmlvideofx
-
-EXAMPLE_FILES += \
- qmlvideofilter_opencl \ # FIXME: this one should use a configure check instead
- snippets
-
-android: SUBDIRS += android
+SUBDIRS += qmlvideo