From b33e6d46726ee275eaa00be8800339f1fce4585e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Str=C3=B8mme?= Date: Mon, 7 Apr 2014 14:04:49 +0200 Subject: [PATCH 1/3] Android: Release the surface texture when not in use With some Android versions the preview texture is released when the application is suspended. If we don't release the texture in our code, the preview will be empty when the application resumes. Task-number: QTBUG-38165 Change-Id: I72244727081d8f94ee5f6cb0ab660ca59f4bb2de Reviewed-by: Yoann Lopes --- .../android/src/mediacapture/qandroidcamerasession.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp b/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp index b1b3f848..6051cf96 100644 --- a/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp +++ b/src/plugins/android/src/mediacapture/qandroidcamerasession.cpp @@ -286,8 +286,10 @@ void QAndroidCameraSession::close() void QAndroidCameraSession::setVideoPreview(QObject *videoOutput) { - if (m_videoOutput) + if (m_videoOutput) { m_videoOutput->stop(); + m_videoOutput->reset(); + } if (videoOutput) { connect(videoOutput, SIGNAL(readyChanged(bool)), this, SLOT(onVideoOutputReady(bool))); @@ -368,8 +370,12 @@ void QAndroidCameraSession::stopPreview() m_camera->stopPreview(); m_camera->setPreviewSize(QSize()); - if (m_videoOutput) + m_camera->setPreviewTexture(0); + + if (m_videoOutput) { m_videoOutput->stop(); + m_videoOutput->reset(); + } m_previewStarted = false; } From af73d55efffa1dca928038cd4f392eb7def7c7e1 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 9 Apr 2014 17:02:25 +0200 Subject: [PATCH 2/3] Doc: Improved example documentation -added instructions on how to run the example (using \include to insert a section from qtbase/doc/global/) -updated copyright year -removed links to Qt 4 API -rearranged some of the sections -created links from the example pages to Qt Multimedia -fixed QDoc warnings related to the example pages Task-number: QTBUG-33597 Change-Id: Id45ce5cbd40dbfa384abd7260a316f6f6837c186 Reviewed-by: Yoann Lopes Reviewed-by: Sze Howe Koh --- .../audiodevices/doc/src/audiodevices.qdoc | 9 ++--- .../audioengine/doc/src/audioengine.qdoc | 10 ++--- .../audioinput/doc/src/audioinput.qdoc | 9 +++-- .../audiooutput/doc/src/audiooutput.qdoc | 9 +++-- .../audiorecorder/doc/src/audiorecorder.qdoc | 12 ++++-- .../doc/src/declarative-camera.qdoc | 37 ++++++------------- .../doc/src/declarative-radio.qdoc | 10 ++--- .../multimedia/spectrum/doc/src/spectrum.qdoc | 6 +-- .../multimedia/video/doc/src/qmlvideo.qdoc | 11 +++--- .../multimedia/video/doc/src/qmlvideofx.qdoc | 11 +++--- .../camera/doc/src/camera.qdoc | 8 ++-- .../player/doc/src/player.qdoc | 5 ++- .../doc/src/videographicsitem.qdoc | 6 ++- .../videowidget/doc/src/videowidget.qdoc | 6 ++- 14 files changed, 73 insertions(+), 76 deletions(-) diff --git a/examples/multimedia/audiodevices/doc/src/audiodevices.qdoc b/examples/multimedia/audiodevices/doc/src/audiodevices.qdoc index d7558448..bdf1590f 100644 --- a/examples/multimedia/audiodevices/doc/src/audiodevices.qdoc +++ b/examples/multimedia/audiodevices/doc/src/audiodevices.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -29,8 +29,8 @@ \example audiodevices \title Audio Devices Example \ingroup multimedia_examples - \brief The Audio Devices example shows the application of the audio devices APIs - + \brief The Audio Devices example shows the application of the audio devices + APIs. This example shows how to create a simple application to list and test the configuration for the various audio devices available on the device @@ -38,6 +38,5 @@ \image audiodevices.png + \include examples-run.qdocinc */ - - diff --git a/examples/multimedia/audioengine/doc/src/audioengine.qdoc b/examples/multimedia/audioengine/doc/src/audioengine.qdoc index c83247df..52a37713 100644 --- a/examples/multimedia/audioengine/doc/src/audioengine.qdoc +++ b/examples/multimedia/audioengine/doc/src/audioengine.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -30,10 +30,10 @@ \title AudioEngine Example \ingroup multimedia_examples \brief The Audio Engine example demonstrates 3D sound control using - the QtAudioEngine API. + the Qt Audio Engine API. - \image audioengine.png + The Audio Engine example demonstrates 3D sound control using the + \l{Qt Audio Engine QML Types}{Qt Audio Engine} API. + \include examples-run.qdocinc */ - - diff --git a/examples/multimedia/audioinput/doc/src/audioinput.qdoc b/examples/multimedia/audioinput/doc/src/audioinput.qdoc index 39ef2615..11a513a9 100644 --- a/examples/multimedia/audioinput/doc/src/audioinput.qdoc +++ b/examples/multimedia/audioinput/doc/src/audioinput.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -37,7 +37,8 @@ Qt provides the QAudioInput class to enable audio functionality within a standard application user interface. - This example calculates the maximum linear value of the input audio from the microphone and displays the output. + This example calculates the maximum linear value of the input audio from the + microphone and displays the output. + + \include examples-run.qdocinc */ - - diff --git a/examples/multimedia/audiooutput/doc/src/audiooutput.qdoc b/examples/multimedia/audiooutput/doc/src/audiooutput.qdoc index bc79e6a5..60c9d00d 100644 --- a/examples/multimedia/audiooutput/doc/src/audiooutput.qdoc +++ b/examples/multimedia/audiooutput/doc/src/audiooutput.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -31,13 +31,14 @@ \ingroup multimedia_examples \brief The Audio Output Example show the use of the QAudioOutput API. - The example demonstrates the basic use cases of the QAudioOutput class. + The example demonstrates the basic use cases of the QAudioOutput class from + \l{Qt Multimedia}. \image audiooutput-example.png This example provides a tone generator to supply continuous audio playback. The first button allows pause and resume of the playback, and the second button allows toggling between push and pull modes of operation. + + \include examples-run.qdocinc */ - - diff --git a/examples/multimedia/audiorecorder/doc/src/audiorecorder.qdoc b/examples/multimedia/audiorecorder/doc/src/audiorecorder.qdoc index 8453ea34..35f6c051 100644 --- a/examples/multimedia/audiorecorder/doc/src/audiorecorder.qdoc +++ b/examples/multimedia/audiorecorder/doc/src/audiorecorder.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -34,6 +34,12 @@ It demonstrates the discovery of the supported devices and codecs and the use of recording functions in the QAudioRecorder class. + \image audiorecorder.png + + \include examples-run.qdocinc + + \section1 Displaying the Window and Audio Settings + We display a window for the user to select the appropriate audio input, codec, container, and sample rate. Allow a setting of either quality or bitrate. Finally, the output file can be selected and recording can be @@ -49,7 +55,7 @@ \l{QMultimedia::NormalQuality}, while the bitrates are hardcoded into the list. - \image audiorecorder.png + \section1 Recording Audio To record audio we simply create a QAudioRecorder object. @@ -96,5 +102,3 @@ ui->statusbar->showMessage(tr("Recorded %1 sec").arg(duration / 1000)); \endcode */ - - diff --git a/examples/multimedia/declarative-camera/doc/src/declarative-camera.qdoc b/examples/multimedia/declarative-camera/doc/src/declarative-camera.qdoc index 02e77854..8c87b1d4 100644 --- a/examples/multimedia/declarative-camera/doc/src/declarative-camera.qdoc +++ b/examples/multimedia/declarative-camera/doc/src/declarative-camera.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -34,35 +34,22 @@ or video. \image qml-camera.png -This example demonstrates how to use the Qt Multimedia QML API to access -camera functions. It shows how to change settings and to capture images. +This example demonstrates how to use the +\l{Qt Multimedia QML Types}{Qt Multimedia QML API} to access camera functions. +It shows how to change settings and to capture images. + +\include examples-run.qdocinc + +\section1 Application Structure Most of the QML code supports the user interface for this application with the camera types being mostly found in \e {declarative-camera.qml} and \e {CaptureControls.qml}. -In \e {declarative-camera.qml} the \l Camera is initialized with an id -of \e {camera}, a photo preview is setup, states are implemented for image -preview or capture and \l CaptureControls is initialized. The initial -\e state is \e PhotoCapture. \l CameraCapture includes a handler, \e onImageCaptured, -for the \l {imageCaptured} signal. The handler sets up the application to process -the preview including a change in the user interface state. The \l PhotoPreview -becomes visible with any key press being picked up by the handler -in PhotoPreview and returning the state to \e PhotoCapture. - -\e CaptureControls, which is implemented in \e {CaptureControls.qml}, +CaptureControls, which is implemented in \e {CaptureControls.qml}, generates a column on the right hand side of the screen which includes control -buttons for \e focus (not initially visible), \e {capture}, \e {flash modes}, -\e {white balance}, \e {exposure compensation}, and if a preview is -available a \e {preview} button. The last button exits from the application. - -When the Capture button is pressed the \e onClicked handler calls -\l {Camera::captureImage()}{captureImage()} - - - - - - +buttons for focus (not initially visible), capture, flash modes, +white balance, exposure compensation, and if a preview is +available, a preview button. The last button exits from the application. */ diff --git a/examples/multimedia/declarative-radio/doc/src/declarative-radio.qdoc b/examples/multimedia/declarative-radio/doc/src/declarative-radio.qdoc index 99c41114..bb1a5d89 100644 --- a/examples/multimedia/declarative-radio/doc/src/declarative-radio.qdoc +++ b/examples/multimedia/declarative-radio/doc/src/declarative-radio.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -31,8 +31,8 @@ \brief Demonstrates the radio functionality \ingroup multimedia_examples - This examples uses the Qt Multimedia Radio QML type to list the available - channels on the FM frequency. + This examples uses the \l{Qt Multimedia} \l Radio QML type to list the + available channels on the FM frequency. + + \include examples-run.qdocinc */ - - diff --git a/examples/multimedia/spectrum/doc/src/spectrum.qdoc b/examples/multimedia/spectrum/doc/src/spectrum.qdoc index 28083895..3c846afd 100644 --- a/examples/multimedia/spectrum/doc/src/spectrum.qdoc +++ b/examples/multimedia/spectrum/doc/src/spectrum.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -59,6 +59,6 @@ (FFT) of a segment of audio data. An open-source library, \l{http://ldesoras.free.fr/prod.html}{FFTReal}, against which the application is dynamically linked, is used to compute the transform. + + \include examples-run.qdocinc */ - - diff --git a/examples/multimedia/video/doc/src/qmlvideo.qdoc b/examples/multimedia/video/doc/src/qmlvideo.qdoc index 6d683349..1e80cd17 100644 --- a/examples/multimedia/video/doc/src/qmlvideo.qdoc +++ b/examples/multimedia/video/doc/src/qmlvideo.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -34,8 +34,6 @@ resize; rotate; change aspect ratio) which can be applied to QML \l{VideoOutput} items. -\section1 Overview - This example demonstrates the various manipulations (move; resize; rotate; change aspect ratio) which can be applied to QML \l{VideoOutput} items. @@ -50,7 +48,9 @@ which moves across the \l{VideoOutput} item. \image qmlvideo-overlay.png -\section1 Application structure +\include examples-run.qdocinc + +\section1 Application Structure The \l{video/qmlvideo/qml/qmlvideo/main.qml} file creates a UI which includes the following items: @@ -127,7 +127,7 @@ instance, the embedded \l{video/qmlvideo/qml/qmlvideo/Content.qml}{Content} item creates either a \l{MediaPlayer} or a \l{Camera} item. -\section1 Calculating and displaying QML painting rate +\section1 Calculating and Displaying QML Painting Rate \input multimedia/doc/src/examples/video-qml-paint-rate.qdocinc @@ -145,4 +145,3 @@ object to a JavaScript function, which will eventually call frequencyItem.notify \printuntil SLOT(qmlFramePainted())); */ - diff --git a/examples/multimedia/video/doc/src/qmlvideofx.qdoc b/examples/multimedia/video/doc/src/qmlvideofx.qdoc index b7bd78ac..80f087e7 100644 --- a/examples/multimedia/video/doc/src/qmlvideofx.qdoc +++ b/examples/multimedia/video/doc/src/qmlvideofx.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -34,9 +34,11 @@ can be used to apply postprocessing effects, expressed in \c GLSL, to video and camera viewfinder content. +\include examples-run.qdocinc + \section1 Overview -This example shows how a \l {ShaderEffectItem} can be used to apply +This example shows how a \l {ShaderEffect} can be used to apply postprocessing effects, expressed in GLSL, to QML \l {VideoOutput} items. It also shows how native code can be combined with QML to implement more @@ -73,7 +75,7 @@ for Effect*.qml files in the list above to see the full range. \section1 Application structure Shader effects can be applied to video or viewfinder content using -\l{ShaderEffectItem}, as shown in the following example, which applies +\l{ShaderEffect}, as shown in the following example, which applies a wiggly effect to the content: \code @@ -171,7 +173,7 @@ is based on the \l{ShaderEffect}: \skipto import \printuntil /^\}/ -The interface of the \l Effect allows for derived effects to specify the +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 @@ -219,4 +221,3 @@ object to a JavaScript function, which will eventually call frequencyItem.notify \printuntil SLOT(qmlFramePainted())); */ - diff --git a/examples/multimediawidgets/camera/doc/src/camera.qdoc b/examples/multimediawidgets/camera/doc/src/camera.qdoc index d1a855d4..5f668348 100644 --- a/examples/multimediawidgets/camera/doc/src/camera.qdoc +++ b/examples/multimediawidgets/camera/doc/src/camera.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -35,10 +35,12 @@ \brief The Camera Example shows how to use the API to capture a still image or video. -The Camera Example demonstrates how you can use Qt Multimedia to implement +The Camera Example demonstrates how you can use \l{Qt Multimedia} to implement some basic Camera functionality to take still images and record video clips with audio. +\include examples-run.qdocinc + A Camera class is created that will act as our Camera. It has a user interface, control functions, setting values and a means of defining the location where the image or video clip is to be saved. It will also store the image and video @@ -74,5 +76,3 @@ is started with a call to \l {QMediaRecorder::record()}. \image camera-example.png */ - - diff --git a/examples/multimediawidgets/player/doc/src/player.qdoc b/examples/multimediawidgets/player/doc/src/player.qdoc index 2dfb7c3d..29121dce 100644 --- a/examples/multimediawidgets/player/doc/src/player.qdoc +++ b/examples/multimediawidgets/player/doc/src/player.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -34,6 +34,8 @@ This example creates a simple multimedia player. We can play audio and or video files using various codecs. + \include examples-run.qdocinc + The example uses a QMediaPlayer object passed into a QVideoWidget to control the video output. To give the application playlist capability we also use a QPlayList object. @@ -93,4 +95,3 @@ \endcode */ - diff --git a/examples/multimediawidgets/videographicsitem/doc/src/videographicsitem.qdoc b/examples/multimediawidgets/videographicsitem/doc/src/videographicsitem.qdoc index 3ccdba5f..1e392ce8 100644 --- a/examples/multimediawidgets/videographicsitem/doc/src/videographicsitem.qdoc +++ b/examples/multimediawidgets/videographicsitem/doc/src/videographicsitem.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -32,9 +32,11 @@ \brief This example demonstrates how to stream video on a graphics scene. The Video Graphics Item example shows how to implement a QGraphicsItem that displays video on a - graphics scene using Qt Multimedia's QAbstractVideoSurface. + graphics scene using \l{Qt Multimedia}'s QAbstractVideoSurface. \image video-videographicsitem.png \sa {Video Widget Example} + + \include examples-run.qdocinc */ diff --git a/examples/multimediawidgets/videowidget/doc/src/videowidget.qdoc b/examples/multimediawidgets/videowidget/doc/src/videowidget.qdoc index 805a830b..6b93a3c1 100644 --- a/examples/multimediawidgets/videowidget/doc/src/videowidget.qdoc +++ b/examples/multimediawidgets/videowidget/doc/src/videowidget.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the documentation of the Qt Toolkit. @@ -32,7 +32,9 @@ \brief This example is a simple video player The Video Widget example denonstrates how to implement a video widget using - Qt Multimedia's QAbstractVideoSurface. + \l{Qt Multimedia}'s QAbstractVideoSurface. \image video-videowidget.png + + \include examples-run.qdocinc */ From 4c8284de46052970de001c5c9b96c4fa365f89b4 Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Mon, 14 Apr 2014 18:36:40 +0200 Subject: [PATCH 3/3] Rework qmlvideofx example Task-number: QTBUG-38121 Change-Id: If06ba6ce2c66b4d735baaeb56e004861c62ea533 Reviewed-by: Alessandro Portale --- .../multimedia/video/qmlvideofx/Info.plist | 30 ++ .../qmlvideofx/android/AndroidManifest.xml | 48 +++ .../qmlvideofx/images/Dropdown_arrows.png | Bin 0 -> 1156 bytes .../video/qmlvideofx/images/Slider_bar.png | Bin 0 -> 1129 bytes .../video/qmlvideofx/images/Slider_handle.png | Bin 0 -> 2784 bytes .../video/qmlvideofx/images/Triangle_Top.png | Bin 0 -> 2212 bytes .../qmlvideofx/images/Triangle_bottom.png | Bin 0 -> 2125 bytes .../video/qmlvideofx/images/close.png | Bin 1799 -> 0 bytes .../video/qmlvideofx/images/folder.png | Bin 1841 -> 0 bytes .../qmlvideofx/images/icon_BackArrow.png | Bin 0 -> 1268 bytes .../video/qmlvideofx/images/icon_Folder.png | Bin 0 -> 1829 bytes .../video/qmlvideofx/images/icon_Menu.png | Bin 0 -> 990 bytes .../video/qmlvideofx/images/titlebar.png | Bin 1436 -> 0 bytes .../video/qmlvideofx/images/titlebar.sci | 5 - .../multimedia/video/qmlvideofx/images/up.png | Bin 662 -> 0 bytes examples/multimedia/video/qmlvideofx/main.cpp | 16 +- .../qmlvideofx/qml/qmlvideofx/Button.qml | 23 +- .../qmlvideofx/qml/qmlvideofx/Content.qml | 3 +- .../qml/qmlvideofx/ContentImage.qml | 2 +- .../qml/qmlvideofx/ContentVideo.qml | 21 +- .../qmlvideofx/Curtain.qml} | 81 ++-- .../qmlvideofx/qml/qmlvideofx/Divider.qml | 31 +- .../qml/qmlvideofx/EffectBillboard.qml | 2 +- .../qml/qmlvideofx/EffectBlackAndWhite.qml | 2 +- .../qml/qmlvideofx/EffectGaussianBlur.qml | 2 +- .../qml/qmlvideofx/EffectIsolate.qml | 4 +- .../qml/qmlvideofx/EffectMagnify.qml | 4 +- .../qml/qmlvideofx/EffectPageCurl.qml | 2 +- .../qml/qmlvideofx/EffectPixelate.qml | 2 +- .../qml/qmlvideofx/EffectPosterize.qml | 2 +- .../qml/qmlvideofx/EffectRipple.qml | 4 +- ...Detection2.qml => EffectSelectionList.qml} | 37 +- .../qml/qmlvideofx/EffectSelectionPanel.qml | 154 ------- .../qml/qmlvideofx/EffectSharpen.qml | 2 +- .../qml/qmlvideofx/EffectShockwave.qml | 2 +- .../qmlvideofx/EffectSobelEdgeDetection1.qml | 2 +- .../qmlvideofx/qml/qmlvideofx/EffectToon.qml | 2 +- .../qml/qmlvideofx/EffectWobble.qml | 2 +- .../qmlvideofx/qml/qmlvideofx/FileBrowser.qml | 100 ++--- .../qmlvideofx/qml/qmlvideofx/FileOpen.qml | 125 ++++-- .../video/qmlvideofx/qml/qmlvideofx/Main.qml | 287 ++++++++++++ .../qml/qmlvideofx/ParameterPanel.qml | 15 +- .../qmlvideofx/qml/qmlvideofx/Slider.qml | 133 +++--- .../qml/qmlvideofx/main-largescreen.qml | 186 -------- .../qml/qmlvideofx/main-smallscreen.qml | 408 ------------------ .../video/qmlvideofx/qmlvideofx.pro | 12 +- .../video/qmlvideofx/qmlvideofx.qrc | 21 +- 47 files changed, 729 insertions(+), 1043 deletions(-) create mode 100644 examples/multimedia/video/qmlvideofx/Info.plist create mode 100644 examples/multimedia/video/qmlvideofx/android/AndroidManifest.xml create mode 100644 examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png create mode 100644 examples/multimedia/video/qmlvideofx/images/Slider_bar.png create mode 100644 examples/multimedia/video/qmlvideofx/images/Slider_handle.png create mode 100644 examples/multimedia/video/qmlvideofx/images/Triangle_Top.png create mode 100644 examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png delete mode 100644 examples/multimedia/video/qmlvideofx/images/close.png delete mode 100644 examples/multimedia/video/qmlvideofx/images/folder.png create mode 100644 examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png create mode 100644 examples/multimedia/video/qmlvideofx/images/icon_Folder.png create mode 100644 examples/multimedia/video/qmlvideofx/images/icon_Menu.png delete mode 100644 examples/multimedia/video/qmlvideofx/images/titlebar.png delete mode 100644 examples/multimedia/video/qmlvideofx/images/titlebar.sci delete mode 100644 examples/multimedia/video/qmlvideofx/images/up.png rename examples/multimedia/video/qmlvideofx/{shaders/sobeledgedetection2.fsh => qml/qmlvideofx/Curtain.qml} (57%) rename examples/multimedia/video/qmlvideofx/qml/qmlvideofx/{EffectSobelEdgeDetection2.qml => EffectSelectionList.qml} (56%) delete mode 100644 examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionPanel.qml create mode 100644 examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml delete mode 100644 examples/multimedia/video/qmlvideofx/qml/qmlvideofx/main-largescreen.qml delete mode 100644 examples/multimedia/video/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml diff --git a/examples/multimedia/video/qmlvideofx/Info.plist b/examples/multimedia/video/qmlvideofx/Info.plist new file mode 100644 index 00000000..8fc24251 --- /dev/null +++ b/examples/multimedia/video/qmlvideofx/Info.plist @@ -0,0 +1,30 @@ + + + + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeRight + + UIInterfaceOrientation + UIInterfaceOrientationLandscapeRight + CFBundleIconFile + + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleExecutable + qmlvideofx + CFBundleIdentifier + com.digia.${PRODUCT_NAME:rfc1034identifier} + CFBundleDisplayName + ${PRODUCT_NAME} + CFBundleName + ${PRODUCT_NAME} + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1.0 + + diff --git a/examples/multimedia/video/qmlvideofx/android/AndroidManifest.xml b/examples/multimedia/video/qmlvideofx/android/AndroidManifest.xml new file mode 100644 index 00000000..0612d484 --- /dev/null +++ b/examples/multimedia/video/qmlvideofx/android/AndroidManifest.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png b/examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png new file mode 100644 index 0000000000000000000000000000000000000000..0a9e25ce27d5270f9c36690b97e06e2f019a4e68 GIT binary patch literal 1156 zcmaJ>TWHi+7*1!j+R}^n%PcI1IM@oEWHOi337vH=nd*Qk<8;IdKA1^P+fb8}CTEW)M5XFJEvO*U2SHD2r~2R+lALpXzVG|5 z$%$Oo?#6mwJw;KC**#*OtWD(ct*#~SXAO=O)rx|hj&6OK8(9}46ASwkV zGY$K-J;N649_}hA!vji8rFZ=TIvjxr=n%`m(T^Cm;Kb=gU4iUfGfRU-2p)*jUxMn9 zav+T?2%=0lpaeM%@I1psqCC&Ffl!bOu|ab40WKm$c_GvemM)rjv(#Q8FLo~ZBBwar zkFhDRY`I)!%3%gseJmG?#axY0C_oSad&t1D6EN&;6$KI6ilv!YLk4gabiG3A!m&fRglMsID)gZJdW+5(! zDWokZV`LQ&I#Q`(t{-7!_ahUeyLr$m$%FxNfNS#jb%fDSusu%4Mx*cL5xK* znQ$taitWsBTqc~1Cfj3tC(kE$rjzZFOob~VrKCdxSGej|E?<@F4uftI&my$6qfqU% zkPa4;7PRWIgsbW;anQulp&+MUw@tVzr(_Cxe z_2|XPu?V>9xiGEXT=?{9#Ck7J-Q73ko%!SS|8wVGX)ES80lsD5^X%_;>JnF*CrT$C z;jI%b$38C9PFx#Zs9Sq#I`Q~=Z))A!6?HEjzW2>}UgfTNX0IncHvTq)a+mI3{O6^A z&2G;-)_?AK?%bc_^MmWxwA8#CY3&;Sb?yE$%*x_HKVM6&4pODd+^U)b)S&xc$Y#34 JGpWPJJ_D)3d(!{_ literal 0 HcmV?d00001 diff --git a/examples/multimedia/video/qmlvideofx/images/Slider_bar.png b/examples/multimedia/video/qmlvideofx/images/Slider_bar.png new file mode 100644 index 0000000000000000000000000000000000000000..84be50fae9eb1a8c9e25b7dd2866977ce956b9d1 GIT binary patch literal 1129 zcmaJ=TWHfz7>@Hc2lE0VIzX^pdV&RlBCuPP5IfVBJ8LC1+dQaxpoz*%Yty zG7<6iq6l7KB8nFfpR6~;hcTI=59&mi`rv~%)S)OSp3HUnU=1Pp&(HsT|Lr^7wbjcC z3yKN|f+&nF=i&r0W*oNj^C#f%yzATU;@>P3NuoNf8KngS5+O-zf*_^{EieuRsbhUF ztRRT7^W{VmCHa-Cs3}gtj&WLwj?n~BvBc5^u?-^71Y2Y^NPf6>lLWF9Bv<=*7q5q5 ztGv9^fOVbK39++H3`pdX#h}7sF@XY+04$|lHCZc24)e0uw%rs7hC@(Wko;X#lCK3} z&49q?^f*KpO#_B;(q13K(2IcEMY|~%ei;YtWql0m_Jfg!#Mum~nT>PNkzDu`BwG>E zS&B-h)6TTVsTnO49S8($4!7HZBOGRjiUiA{n#EZL4w|AN>qypAU^5C$S_%b8Tt7D5KFPio-wk{*%~Dbm)+ZLsLr`B3@i`v7Jh1 z!v++PW+XJNJv+tPRt;%ptEPi+9Ro^vL6lY7Q8tX=c{Zk+NKi!>LFw z0*0Gr<=nM+bMlQ~rQEgna$+f53}vtOuT^JVSU9zu*x{Nwez1EBi1(IMU3$A%xbWsNmuU2N=7-OOE`#}=%daLbeVT4J0{o_{y6N-ZktKYHcP k9wPJcRi->G-g`~mB1$dz>% literal 0 HcmV?d00001 diff --git a/examples/multimedia/video/qmlvideofx/images/Slider_handle.png b/examples/multimedia/video/qmlvideofx/images/Slider_handle.png new file mode 100644 index 0000000000000000000000000000000000000000..aebecdf19812d0701549d2831b2cb0f9e3ca0233 GIT binary patch literal 2784 zcmaJ@dpwi-AD>XiWzmf?r)J1~v$2^OH5)^Qv$^Hgh6iIe+b~P0L#~~EB`Vdy5#?5? zTyhWPl**5zqmWx}$K|+2aeDbpr#inse*K=;^E}`0_w#zc-=FLAdOayFPGqpWnmh;u z0^8e>sFD@F`Fyuk^7eROU?y4i32i)uG;WYEiopj!gg~x80JUc`f&nVP2#gMY0^mU) zX)UI!r_ht)hzsDd;fzfTT*T%{*dP%8kch_!2m^#re;}C2v4qXlHo~CHKueehnqo}h z5rGh`?{J9ZAOPD0mzf)lIzRGe0pUWgE7(&G0A&_w6&6K_XDU|;YWwXDc z1wtzDPrUzASl}AX0}xa|z>VMsNE#QUx#^0BBk}=;kjr=Fa#>%h=n}#eas?q=9+XJK zKy@jM048VCp!b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x2)->{sW`9vPb{` literal 0 HcmV?d00001 diff --git a/examples/multimedia/video/qmlvideofx/images/Triangle_Top.png b/examples/multimedia/video/qmlvideofx/images/Triangle_Top.png new file mode 100644 index 0000000000000000000000000000000000000000..5768e953618f2b7ee3ca72de44bcf9eaf4536ae0 GIT binary patch literal 2212 zcmaJ@eK=HUA0GK8ktnh07$u4sgBfO+G-JkR<8wrzcFY`RWaf;SBSWgCh_`&NY(7#d z=_(X&s7Xz1g(b3*3Cm*Jq!QPrwiWN0HtqYz>pj;w=Xsvr^}Fxi*Zs$n>F?{Iqh+jx zLZNiLJZXW*ia|b04K?JSGTOEkS=Ph!P&f#Rf)iLG5JllYks#p3XGMd7Ad8b2*ABX% zP|BNl%uqO#v6IAx_!ySL2P5GN5i|2k(0wnxcftVyAqd)VKkiEi;MFXE*;QeIu z-${is`~f#e1Oj-By$#zIhXV)%49)>hAmFS4J6oI`))sjQHaG_ooh$Y?GM3rSdPLP7#2!5#yNqOmw4k*MIXv$H`wY{ZEIm?g0hh|QN6XrP!a z;t63MBmfkQtVk#xCZmx||1N(jay`9~8h#Sk6CK!m?O}82CaYG7S{*4uBkY5yS^R7fs?VpNsvnd|$Af<#TaZ z7K=ra!74`kU!z_!A^K5lzX}&Qe3d>ZK=dv`g#F8^25%Hfb*&eT!jwGg43!Ja=?2wr z=18UweItpd@ZKmT>IzL5U!`KG&|<;Fm>SYDda&52>zWfuBS_Q7 zQfBG$nCsx=>bjWnbn1}b(|1KL&KSMsmQ>!9$K1FRzGu(Jrcmqt7p5siXPYxdTUuH? ziYuE(VhQw1Kd&CQUD>L)z1%PK)Vubvv9aS#^wF?<{lhe)(}x>(UCBHkWvqFK*3f35 zV~^!sH_q>dSDVH3OvIU-Y;QHvyi&7`srhSH|4bBHz0`I!p`|Sp9}%~v`_ZFEXom5+ z;x=ICv8?(UpV3~?vq_i~j49e!VDtdgTiZe#7zog~vbp(L>yRd^cXDWG$XPE97jvgI zKW$_hs=j(Pxu5IM+w@K)fZC^X@k8m+hbm;FmF`e&!9i8f$oSgifQZf)9$uLVkMZ^K}`s3E^+-KiE~6)mKM_uPWHW{J^L$DJjwIDJ%1@7jMup ztfnJ8C(lKy58I5-T`ku(JPmEq&vbm-6OC!h%F2=!dT)Nh$Zh`4=j}S1X}Ns&HvP;_ zYSm0Mn8P_D%|)OsTROgm1BiIr^kvV7naB}keaYk;JK>o(USL$Cf-%m^$n46pH=4#dn zv}j2`kZMpe&GHUA5P` zN9%ZNBhdHbweU-^Y~^__1Wg}2uzI)IR0uezDGaXKu5m--V6us<`Dm(#vPVEzM8qe9 zV)^sf0;oK~!t;`BaSPLWB1KyT=qplJ^_9D)&Ev|u7u!=i=kzDe%E~)PE{&-cukcRP z0V_$}-K6F-l1_kU3lc9{va!>&7{?nYh7t=?;} zUae_!*gosnbm}=8pyxSP65l~kxhaxJJ}5{3rKw%_SeO2BW=3$<`Sy<84R@qc>HB+s zZq2OTNa+p#xbY%bShnxdNUUytoHOWIrG`rUHm~-N4w8~b+We~ZN7@Y9MYY3l{%cms zPmAv>N}S6|OOp-nZxR`D{ijfdvo*c6h*xGCr1>V*=>{+R`uc*YcuHQa?ez6PGruy8 zUYk+BU?%G2jtg<=|T%u2$L3i)~GHKQDxQr-W)) Wn>By4>VAdd-rz;|rPWZsP5lqF0Fg5Q literal 0 HcmV?d00001 diff --git a/examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png b/examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..50940966662cf4ddb032f0d6ab79870c29434321 GIT binary patch literal 2125 zcmaJ?Yg7|w8V(@^WI?=u8i5!iwSbU72nmEl4N15sLI@DiR6;U9gj`655Re)WQ4}e- zQdBN&%B4jV5DG%&k`?O#i-=v=rE3&LpcJWs3TUl`PORAdvFx0g`M&Qx@AJI3XU?1m zW&2y2Z#IX)V3vUa3=Xtnp~un81bSyZ>~)3~B*^4};j%a|RiFT1G?6S8KnF?$@c;)9 zh|-d80u&g`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RaR~Y#Ft0-D(7o zT2`Kp%lU0DOJqNE&eB1m&0@5KfHA_jHHIpN45Yz zlY2g50+0|L@I)~@VS;D}1ee?t;v3NNIcWJ*gJcc4Luic+!1Dn3iQFNSZWK;Jj2=yc zjvuF>0m4*b5PxIF49cmlPJ3?^ARz!Q*Z}-U?hx{uMsU3tJTVxa@PlCS*U|Dpw0ywl zz7jw-=2}~Ta&m`|%{++fMbRgoLZ3(l!Q%fw%!d&3e&Um2G!Lw^0eB7oKae|wY)b;! zrvKr?ls{#P@p|*AQ*>wcY|646u_b`ivYwJJ`ThX=$op#NR{{`Uh*a6jkSf)3A1U@0 zQf%A;f|cG=w0vv>FaZE%J5MqE!HUN9c{X&xtfW;3&p6_i) zmF2F8hW5E4LY`NS4rk0w6VM43m}Cm}v!5Z?yzRme76#vnW886a8! z@n@R369dQ)VjZ8_0E`E~ZcV%ifW;3+*hCCr!{UEOo{v;lJ3=u|jKw%%gg`i5H_V;5 zT+}@9870?<`~h}p;&p(mygV9$md{Ti{x`IIKJvVr#q!H}GscMtDLl~(h->VLwl)ud z+KD&W0E`m=(gU3afWmd_sA%n4kC0Y~KZ`tHfIP2H!ILX(7$+uToCq5rZmwTXw{YK7 z00{wb#RlM8%>$iUrJ)B7P{G`}9`R?;@_o?q##c~sUeKH1iBfn%hiE)_km~2nGXh90 zpW6cLBzO4e3-oOVShQ6O+*=RESF}S5niaO|H6^$sIyp z+5n6Nzz%YUkPgrk4AQ_28)yhRUvqsuonOA3`qtI?idP}-ju=5Dn>SPb(4lk<$>6Wm ztEo>cmJ%Q#0Iu2qY$taJ#S9{N(TP`&dDWV?ZfwP?5WEM#%jgBL#|(8OfYkDpExe5EHT6k*n pbcP|Mc;2Aw_P-iD66KKx_!kJI7Ht%E#-RWJ002ovPDHLkV1kHfP1XPa diff --git a/examples/multimedia/video/qmlvideofx/images/folder.png b/examples/multimedia/video/qmlvideofx/images/folder.png deleted file mode 100644 index e53e2ad464eb993256a6c3567fc940498e26fc8b..0000000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v_cl5Kvhd<Kj7jHJ9 zuov4NZN#y6-oU9-T>vJx;-m<>{XD=q_XDURqKq?VF8;2tFlV!UL#>dPYk^G8pf`%p z>O>HwCJ~TsVEf}O*tKH^y1G7rD9WY;h|N6@OpCYxY#}1*>ACuh&6f4cRSl)u2Oe0C zQI80nUWDEtLJ${j5)2KXq%<4d-QBk`K*T`Fj^)W9qLmq$hJ)2r1^2IOsUfXK4UJBO z-Y7z$U|$^ofb+T^AALBCt=k^K$*#9?sN)@1(hMYnbAA@Uaw0OFJlV6qxH$K_>+Q9| z((J`hC>ab!8PrExm=j+6TJw= zl9%VqX$OV|WiXm!c;mJA-1j6fOQb3z)6h{@TUfewT{UUcD(LhgbVeCuvfD)>;W+-# zei}ukIr!u2C%ztmSt5F+Qub0=`F)St*Vl?xYbMm1$*d?Pll()iNj)lMSoUiEv&Y$M4(!4!6tiUT_np3g`R)fCEHSws^6rqpq&7 za?P4*QmYlvXq7OTwD5Yy>3^1ixe$?7rIzojD9_(+x7Uiku^|3@_+vjf=l}PMh`wjD fEpp4{;>3Rd&!+YNzwAbe00000NkvXXu0mjfMH*<- diff --git a/examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png b/examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png new file mode 100644 index 0000000000000000000000000000000000000000..6823de0040faa2b40088178f9de0aaa2a33f4ee9 GIT binary patch literal 1268 zcmeAS@N?(olHy`uVBq!ia0vp^LO?9T!3HFAj=Wa~Qj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS=07?@QuLn2Bde0{8v^Kf6`()~Xj@TAnpKdC8`Lf!&sHg;q@=(~U%$M( zT(8_%FTW^V-_X+15@d#vkuFe$ZgFK^Nn(X=Ua>OF1ees}+T7#d8#0MoBXEYLU9GXQxBrqI_HztY@Xxa#7Ppj3o=u^L<)Qdy9y zACy|0Us{w5jJPyqkW~d%&PAz-CHX}m`T04pPz=b(FUc>?$S+WE4mMNJ@J&q4%mWE% zf_3=%T6yLbmn7yTr+T{BDgn*V%gju%aP^Az77Ltu^?{Dj2SqJXRKtXT=?BDwCtM&0p7c}mfa$#mn6UdBzjZM%Fs6CBIEGZ* zS~GROm$RWr`(DGQ1?R4rZ+N65vSvm8gZW?fGn%#QS}+KIuEBnAvb~;U`Nsi%k*|0eOlwSa_!rIo8bZ;=T@q0$a;AATeJNhA+d{% zOSE3}v5GZmo%#~&yYAQulP7Xn8)tAcajww`UlQ}9>qOXm4&xU-LEbN>u`X-YIu-JK z{={qbdzaNIF8#fC_2Ww2OWT*5asFNR_36j+m78n2dwz&%{)tVt&Mn;f_^!F3xaf_= e2hP>ANHDZN+w`o>Y1uwdIppc;=d#Wzp$P!%^~9C{ literal 0 HcmV?d00001 diff --git a/examples/multimedia/video/qmlvideofx/images/icon_Folder.png b/examples/multimedia/video/qmlvideofx/images/icon_Folder.png new file mode 100644 index 0000000000000000000000000000000000000000..62d97004fb01e085c3060619ac68dbec2fa7e8aa GIT binary patch literal 1829 zcmeAS@N?(olHy`uVBq!ia0vp^YCtTv4 zq}24xJX@vryZ0+8WTx0Eg`4^s_!c;)W@LI)6{QAO`Gq7`WhYyvDB0U7*i={n4aiL` zNmQuF&B-gas<2f8n`;GRgM{^!6u?SKvTcwn`GuBNuFf>#!Gt)CP zF*P$Y)KM@pFf`IP03tJ8LlY}gGbUo-h6WQb!1OB;3-k^33_xCjDfIQluQWFouDZA+C>7yetOgf{R2HP_ z2c;J0mlh=hBQ8xDWL1Hcb5UwyNq$jCetr%t6azByOY(~|@(UE4gUu8)d=ry1^FRWc zU>&}`R-SpqC5d^-sh%#jN#+F1Fo{r=~4uH@E9JI=0Qtrd5!+PCQzUtL^g zrG&rEzjI51B%a@V^Ydow_K&}^^&g)2WmQ#O{o?!Yh~?kkzRg{;cJ0FYTK3_CQ{DemONp)#m=zXl|Lu8iaW@EDf0b47=f=iwkJHbU0CQP?US8fh70*rgUY5w!y}!Hp zdEG8EoBAZ>gHPY*D|}Ho;(q^20C&jiJL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&7?W<36YU1?e8V@u-wjkurtG_?%7wYgO7?ZTI&zzW?CftG*>O<*2)0;~i6V8sT22XsZi zk^oBus4yj^Ktg5VUKdyc`am#T`ax75I*cAclmex}R)P>jK~3~(JNA$eAihC-5CH`U z8*?qet_?YCeyi2~`Qmwd%yl;oiwc1P{XQ5&ElO!C_;z!E8^H0fuk;S-F9DB%c61do w;_HY3aljr{4D`a++EgVYx?e`D2SX#j0sXq9GS=auNdN!<07*qoM6N<$g8bnhMgRZ+ diff --git a/examples/multimedia/video/qmlvideofx/main.cpp b/examples/multimedia/video/qmlvideofx/main.cpp index 7465deab..f221c954 100644 --- a/examples/multimedia/video/qmlvideofx/main.cpp +++ b/examples/multimedia/video/qmlvideofx/main.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -48,12 +48,6 @@ #include "filereader.h" #include "trace.h" -#ifdef SMALL_SCREEN_LAYOUT - static const QLatin1String MainQmlFile("main-smallscreen.qml"); -#else - static const QLatin1String MainQmlFile("main-largescreen.qml"); -#endif - #ifdef PERFORMANCEMONITOR_SUPPORT #include "performancemonitordeclarative.h" #endif @@ -99,7 +93,7 @@ int main(int argc, char *argv[]) QQuickView viewer; - viewer.setSource(QLatin1String("qrc:///qml/qmlvideofx/") + MainQmlFile); + viewer.setSource(QUrl(QLatin1String("qrc:///qml/qmlvideofx/Main.qml"))); QQuickItem *rootObject = viewer.rootObject(); rootObject->setProperty("fileName", fileName); viewer.rootObject()->setProperty("volume", volume); @@ -128,13 +122,9 @@ int main(int argc, char *argv[]) viewer.setTitle("qmlvideofx"); viewer.setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); - viewer.setMinimumSize(QSize(600, 400)); + viewer.setMinimumSize(QSize(640, 360)); -#ifdef SMALL_SCREEN_PHYSICAL - viewer.showFullScreen(); -#else viewer.show(); -#endif // 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 diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml index eb82acee..dd7cca60 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml @@ -43,29 +43,33 @@ import QtQuick 2.0 Rectangle { id: root - color: textColor - radius: 0.25 * height + color: "transparent" + height: itemHeight + width: itemWidth property string text - property color bgColor: "white" - property color bgColorSelected: "red" - property color textColor: "black" + 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 - radius: 0.25 * height + radius: 0.1 * height Text { id: text - anchors.centerIn: parent + clip: true text: root.text - font.pixelSize: 0.5 * parent.height + anchors { fill: parent; margins: scaledMargin } + font.pixelSize: fontSize color: mouseArea.pressed ? bgColor : textColor - horizontalAlignment: Text.AlignHCenter + horizontalAlignment: Text.AlignLeft verticalAlignment: Text.AlignVCenter } @@ -75,6 +79,7 @@ Rectangle { 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 index d3a2e9f4..72b7cca7 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml @@ -39,11 +39,10 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 Rectangle { id: root - color: "black" property alias effect: effectLoader.item property alias gripSize: divider.gripSize property string effectSource diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml index 0fa047bb..2bce20bf 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 Image { fillMode: Image.PreserveAspectFit diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml index be09f7ea..6491ceff 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -39,13 +39,14 @@ ** ****************************************************************************/ -import QtQuick 2.0 +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 @@ -55,5 +56,21 @@ VideoOutput { } 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/shaders/sobeledgedetection2.fsh b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml similarity index 57% rename from examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection2.fsh rename to examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml index 039a567d..253e3c39 100644 --- a/examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection2.fsh +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -39,39 +39,56 @@ ** ****************************************************************************/ -// Based on http://rastergrid.com/blog/downloads/frei-chen-edge-detector/ +import QtQuick 2.0 -#version 130 -uniform sampler2D source; -uniform float dividerValue; -uniform float weight; -mat3 G[2] = mat3[]( - mat3( 1.0, 2.0, 1.0, 0.0, 0.0, 0.0, -1.0, -2.0, -1.0 ), - mat3( 1.0, 0.0, -1.0, 2.0, 0.0, -2.0, 1.0, 0.0, -1.0 ) -); -uniform lowp float qt_Opacity; -in vec2 qt_TexCoord0; -out vec4 FragmentColor; -void main() { - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - mat3 intensity; - float conv[2]; - vec3 sample; - for (int i=0; i<3; ++i) { - for (int j=0; j<3; ++j) { - sample = texelFetch(source, ivec2(gl_FragCoord) + ivec2(i-1, j-1), 0).rgb; - intensity[i][j] = length(sample) * weight; +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 } } - for (int i=0; i<2; ++i) { - float dp3 = dot(G[i][0], intensity[0]) + dot(G[i][1], intensity[1]) + dot(G[i][2], intensity[2]); - conv[i] = dp3 * dp3; - } - c = vec4(0.5 * sqrt(conv[0]*conv[0] + conv[1]*conv[1])); - } else { - c = texture2D(source, qt_TexCoord0); } - FragmentColor = qt_Opacity * c; } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml index 390818bb..45c2606f 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -39,7 +39,7 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 Rectangle { id: root @@ -53,21 +53,34 @@ Rectangle { id: line anchors { top: parent.top; bottom: parent.bottom } x: parent.value * parent.width - (width / 2) - width: 2 - color: "red" + width: 4 + color: "#14aaff" } - Slider { + // topgrip + Curtain { id: slider increment: 0.0 - lineColor: "transparent" - fillColor: "transparent" - gripColor: "red" anchors { top: parent.top - topMargin: gripSize / 2 + 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/EffectBillboard.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml index 4e3adc3e..1e207724 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml @@ -44,7 +44,7 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "grid spacing" + name: "Grid Spacing" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml index 5e37c70c..85f2abc7 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml @@ -44,7 +44,7 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "threshold" + name: "Threshold" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml index 00fab044..f0cad528 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml @@ -49,7 +49,7 @@ Item { property real dividerValue: 0.5 property ListModel parameters: ListModel { ListElement { - name: "radius" + name: "Radius" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml index f3650419..80c7ccae 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml @@ -44,11 +44,11 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "hue" + name: "Hue" value: 0.5 } ListElement { - name: "width" + name: "Width" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml index d93e72c9..3fd35eaa 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml @@ -46,11 +46,11 @@ Effect { divider: false parameters: ListModel { ListElement { - name: "radius" + name: "Radius" value: 0.5 } ListElement { - name: "diffraction" + name: "Diffraction" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml index e4fc1f78..c035b9b6 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml @@ -45,7 +45,7 @@ Effect { divider: false parameters: ListModel { ListElement { - name: "extent" + name: "Extent" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml index 002a74a4..7a0f2198 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml @@ -44,7 +44,7 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "granularity" + name: "Granularity" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml index bda47376..084b28c1 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml @@ -44,7 +44,7 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "gamma" + name: "Gamma" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml index 7932b4c1..e0a2b022 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml @@ -44,11 +44,11 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "amplitude" + name: "Amplitude" value: 0.5 } ListElement { - name: "frequency" + name: "Frequency" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection2.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml similarity index 56% rename from examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection2.qml rename to examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml index 33336537..fa92bb7c 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection2.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -41,16 +41,27 @@ import QtQuick 2.0 -Effect { - parameters: ListModel { - ListElement { - name: "threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real weight: parameters.get(0).value - - fragmentShaderFilename: "sobeledgedetection2.fsh" +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/EffectSelectionPanel.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionPanel.qml deleted file mode 100644 index 948a4e88..00000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionPanel.qml +++ /dev/null @@ -1,154 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ -import QtQuick 2.0 - -Rectangle { - id: root - property int itemHeight: 25 - property string effectSource: "" - - signal clicked - - QtObject { - id: d - property Item selectedItem - } - - 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: "Edge detection (Sobel, #2)"; source: "EffectSobelEdgeDetection2.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" } - } - - Component { - id: sourceDelegate - Item { - id: sourceDelegateItem - width: root.width - height: itemHeight - - Button { - id: sourceSelectorItem - anchors.centerIn: parent - width: 0.9 * parent.width - height: 0.8 * itemHeight - text: name - onClicked: { - if (d.selectedItem) - d.selectedItem.state = "baseState" - d.selectedItem = sourceDelegateItem - d.selectedItem.state = "selected" - effectSource = source - root.clicked() - } - } - - states: [ - State { - name: "selected" - PropertyChanges { - target: sourceSelectorItem - bgColor: "#ff8888" - } - } - ] - - Component.onCompleted: { - if (name == "No effect") { - state = "selected" - d.selectedItem = sourceDelegateItem - } - } - - transitions: [ - Transition { - from: "*" - to: "*" - ColorAnimation { - properties: "color" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - } - } - - Flickable { - anchors.fill: parent - contentHeight: (itemHeight * sources.count) + layout.anchors.topMargin + layout.spacing - clip: true - - Column { - id: layout - - anchors { - fill: parent - topMargin: 10 - } - - Repeater { - model: sources - delegate: sourceDelegate - } - } - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml index 25215980..f59544dc 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml @@ -44,7 +44,7 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "sharpness" + name: "Sharpness" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml index 0e1b1785..746445b4 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml @@ -45,7 +45,7 @@ Effect { id: root parameters: ListModel { ListElement { - name: "amplitude" + name: "Amplitude" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml index 6724a844..7b03dbfd 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml @@ -44,7 +44,7 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "threshold" + name: "Threshold" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml index ff985e56..ecba4062 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml @@ -44,7 +44,7 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "threshold" + name: "Threshold" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml index 97e7c061..aa07c1a6 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml @@ -44,7 +44,7 @@ import QtQuick 2.0 Effect { parameters: ListModel { ListElement { - name: "amplitude" + name: "Amplitude" value: 0.5 } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml index 7c861036..c75b6f25 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -39,12 +39,13 @@ ** ****************************************************************************/ -import QtQuick 2.0 -import Qt.labs.folderlistmodel 2.0 +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 @@ -75,12 +76,12 @@ Rectangle { Rectangle { id: root - color: "white" + color: "black" property bool showFocusHighlight: false property variant folders: folders1 property variant view: view1 property alias folder: folders1.folder - property color textColor: "black" + property color textColor: "white" FolderListModel { id: folders1 @@ -112,7 +113,7 @@ Rectangle { fileBrowser.selectFile(path) } width: root.width - height: 52 + height: itemHeight color: "transparent" Rectangle { @@ -126,10 +127,12 @@ Rectangle { } Item { - width: 48; height: 48 + width: itemHeight; height: itemHeight Image { - source: "qrc:/images/folder.png" - anchors.centerIn: parent + source: "qrc:/images/icon_Folder.png" + fillMode: Image.PreserveAspectFit + anchors.fill: parent + anchors.margins: scaledMargin visible: folders.isFolder(index) } } @@ -138,8 +141,8 @@ Rectangle { id: nameText anchors.fill: parent; verticalAlignment: Text.AlignVCenter text: fileName - anchors.leftMargin: 54 - font.pixelSize: 32 + anchors.leftMargin: itemHeight + scaledMargin + font.pixelSize: fontSize color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : textColor elide: Text.ElideRight } @@ -262,56 +265,45 @@ Rectangle { Keys.onPressed: root.keyPressed(event.key) } - Rectangle { + Button { id: cancelButton - width: 100 - height: titleBar.height - 7 - color: "black" - anchors { bottom: parent.bottom; horizontalCenter: parent.horizontalCenter } - - Text { - anchors { fill: parent; margins: 4 } - text: "Cancel" - color: "white" - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 20 - } - - MouseArea { - anchors.fill: parent - onClicked: fileBrowser.selectFile("") - } + 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) { + 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) { + } else if (event.key === Qt.Key_Left) { up(); } } - BorderImage { - source: "qrc:/images/titlebar.sci"; + // titlebar + Rectangle { + color: "black" width: parent.width; - height: 52 - y: -7 + height: itemHeight id: titleBar Rectangle { id: upButton - width: 48 - height: titleBar.height - 7 + width: titleBar.height + height: titleBar.height color: "transparent" - Image { anchors.centerIn: parent; source: "qrc:/images/up.png" } - MouseArea { id: upRegion; anchors.centerIn: parent - width: 56 - height: 56 - onClicked: up() - } + 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" @@ -321,23 +313,23 @@ Rectangle { ] } - Rectangle { - color: "gray" - x: 48 - width: 1 - height: 44 - } - Text { anchors.left: upButton.right; anchors.right: parent.right; height: parent.height - anchors.leftMargin: 4; anchors.rightMargin: 4 + anchors.leftMargin: 10; anchors.rightMargin: 4 text: folders.folder color: "white" - elide: Text.ElideLeft; horizontalAlignment: Text.AlignRight; verticalAlignment: Text.AlignVCenter - font.pixelSize: 32 + 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 diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml index 716f4165..b0542cb8 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -39,56 +39,95 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 Rectangle { id: root - color: "white" - property int buttonHeight: 35 - property int topMargin: 0 - + color: "#151515" + signal openCamera signal openImage signal openVideo - signal openCamera signal close - Rectangle { - anchors { - top: parent.top; - topMargin: root.topMargin - bottom: parent.bottom; - horizontalCenter: parent.horizontalCenter + Column { + anchors.fill: parent + spacing: 10 + Rectangle { + 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" + } } - width: 0.9 * parent.width - color: "transparent" - - Column { - anchors.fill: parent - spacing: 5 - Button { - text: "Open image" - height: buttonHeight - width: parent.width - onClicked: root.openImage() - } - Button { - text: "Open video" - height: buttonHeight - width: parent.width - onClicked: root.openVideo() - } - Button { - text: "Start camera" - height: buttonHeight - width: parent.width - onClicked: root.openCamera() - } - Button { - text: "Reset" - height: buttonHeight - width: parent.width - onClicked: root.close() - } + Rectangle { + width: 0.9 * parent.width + height: 1 + color: "#353535" + anchors.left: parent.left + } + Button { + text: "Start camera" + height: itemHeight + width: parent.width + onClicked: root.openCamera() + active: fileOpen.state == "expanded" + } + Rectangle { + width: 0.9 * parent.width + height: 1 + color: "#353535" + anchors.left: parent.left + } + Button { + text: "Open image" + height: itemHeight + width: parent.width + onClicked: root.openImage() + active: fileOpen.state == "expanded" + } + Rectangle { + width: 0.9 * parent.width + height: 1 + color: "#353535" + anchors.left: parent.left + } + Button { + text: "Open video" + height: itemHeight + width: parent.width + onClicked: root.openVideo() + active: fileOpen.state == "expanded" + } + Rectangle { + width: 0.9 * parent.width + height: 1 + color: "#353535" + anchors.left: parent.left + } + Button { + text: "Reset" + height: itemHeight + width: parent.width + onClicked: root.close() + active: fileOpen.state == "expanded" + } + Rectangle { + width: 0.9 * parent.width + height: 1 + color: "#353535" + anchors.left: parent.left } } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml new file mode 100644 index 00000000..5ec13750 --- /dev/null +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml @@ -0,0 +1,287 @@ +/**************************************************************************** +** +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the Qt Mobility Components. +** +** $QT_BEGIN_LICENSE:LGPL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU +** General Public License version 3.0 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU General Public License version 3.0 requirements will be +** met: http://www.gnu.org/copyleft/gpl.html. +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +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: listview.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 + top: content.bottom + margins: scaledMargin + } + + text: "No effect" + width: itemWidth * 2 + onClicked: { + effectName.visible = false + listview.visible = true + } + color: "#303030" + } + + + ListView { + id: listview + width: itemWidth * 2 + anchors { + right: parent.right + bottom: perfHolder.top + top: parent.top + margins: scaledMargin + } + visible: false + + model: EffectSelectionList {} + delegate: effectDelegate + + highlight: Rectangle { color: "#14aaff"; radius: 5 } + highlightFollowsCurrentItem: true + highlightRangeMode: ListView.StrictlyEnforceRange + clip: true + focus: true + + Component { + id: effectDelegate + Button { + text: name + width: itemWidth * 2 + onClicked: { + content.effectSource = source + listview.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() { + console.log("[qmlvideofx] performanceLoader.init logging " + root.perfMonitorsLogging + " visible " + root.perfMonitorsVisible) + 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: 400 } + NumberAnimation { target: fileOpen; property: "opacity"; duration: 400 } + } + ] + } + + 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 + + console.log("[qmlvideofx] root.init") + console.log("Height: ", Screen.desktopAvailableHeight) + console.log("Width: ", Screen.desktopAvailableWidth) + console.log("Pixels per mm: ", Math.ceil(Screen.pixelDensity)) + console.log("Orientation: ", Screen.orientation) + 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 index 83c0d4c8..aa4315c9 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml @@ -47,17 +47,12 @@ Rectangle { height: view.model.count * sliderHeight property color lineColor: "black" property real gripSize: 25 - property real spacing: 10 - property real sliderHeight: 40 + property real spacing: 20 + property real sliderHeight: 60 property ListModel model: ListModel { } - Rectangle { - anchors.fill: parent - color: "black" - opacity: 0.5 - radius: 10 - } + anchors.topMargin: 10 Component { id: editDelegate @@ -77,10 +72,10 @@ Rectangle { bottom: parent.bottom left: parent.left } - font.pixelSize: 0.5 * parent.height + font.pixelSize: fontSize horizontalAlignment: Text.AlignRight verticalAlignment: Text.AlignVCenter - width: 150 + width: 8 * fontSize } Slider { diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml index c1253702..97b52c87 100644 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml +++ b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies). ** Contact: http://www.qt-project.org/legal ** ** This file is part of the Qt Mobility Components. @@ -39,91 +39,84 @@ ** ****************************************************************************/ -import QtQuick 2.0 +import QtQuick 2.1 Rectangle { id: root color: "transparent" radius: 5 property alias value: grip.value - property color fillColor: "white" - property color lineColor: "black" - property color gripColor: "white" - property real gripSize: 20 + property color fillColor: "#14aaff" + property real gripSize: 40 property real gripTolerance: 3.0 property real increment: 0.1 property bool enabled: true Rectangle { - anchors { left: parent.left; right: parent.right; verticalCenter: parent.verticalCenter } - height: 3 - color: displayedColor(root.lineColor) - - Rectangle { - anchors { fill: parent; margins: 1 } - color: root.fillColor + id: slider + anchors { + left: parent.left + right: parent.right + verticalCenter: parent.verticalCenter } - } + height: 10 + color: "transparent" - MouseArea { - anchors.fill: parent - enabled: root.enabled - onClicked: { - if (parent.width) { - var newValue = mouse.x / parent.width - if (Math.abs(newValue - parent.value) > parent.increment) { - if (newValue > parent.value) - parent.value = Math.min(1.0, parent.value + parent.increment) - else - parent.value = Math.max(0.0, parent.value - parent.increment) + 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 } } } - } - 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" - - 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 - } - } - - Rectangle { - anchors.centerIn: parent - width: root.gripSize - height: width - radius: width/2 - color: root.gripColor - } - } - - function displayedColor(c) { - var tint = Qt.rgba(c.r, c.g, c.b, 0.25) - return enabled ? c : Qt.tint(c, tint) } } diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/main-largescreen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/main-largescreen.qml deleted file mode 100644 index 63a0a01a..00000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/main-largescreen.qml +++ /dev/null @@ -1,186 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: root - width: 900 - height: 600 - color: "grey" - property string fileName - property alias volume: content.volume - property bool perfMonitorsLogging: false - property bool perfMonitorsVisible: false - - QtObject { - id: d - property real gripSize: 20 - } - - Rectangle { - id: inner - anchors.fill: parent - color: "grey" - - Content { - id: content - anchors { - top: parent.top - bottom: parent.bottom - left: parent.left - right: effectSelectionPanel.left - margins: 5 - } - gripSize: d.gripSize - width: 600 - height: 600 - } - - Loader { - id: performanceLoader - function init() { - console.log("[qmlvideofx] performanceLoader.init logging " + root.perfMonitorsLogging + " visible " + root.perfMonitorsVisible) - var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible - source = enabled ? "../performancemonitor/PerformanceItem.qml" : "" - } - onLoaded: { - item.parent = content - item.anchors.top = content.top - item.anchors.left = content.left - item.anchors.right = content.right - item.logging = root.perfMonitorsLogging - item.displayed = root.perfMonitorsVisible - item.init() - } - } - - ParameterPanel { - id: parameterPanel - anchors { - left: parent.left - bottom: parent.bottom - right: effectSelectionPanel.left - margins: 20 - } - gripSize: d.gripSize - } - - EffectSelectionPanel { - id: effectSelectionPanel - anchors { - top: parent.top - bottom: fileOpen.top - right: parent.right - margins: 5 - } - width: 300 - itemHeight: 40 - onEffectSourceChanged: { - content.effectSource = effectSource - parameterPanel.model = content.effect.parameters - } - } - - FileOpen { - id: fileOpen - anchors { - right: parent.right - bottom: parent.bottom - margins: 5 - } - width: effectSelectionPanel.width - height: 165 - buttonHeight: 32 - topMargin: 10 - } - } - - 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() { - console.log("[qmlvideofx] main.init") - 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.openImage("qrc:/images/qt-logo.png") - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml deleted file mode 100644 index f715dc8c..00000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/main-smallscreen.qml +++ /dev/null @@ -1,408 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/legal -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:LGPL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and Digia. For licensing terms and -** conditions see http://qt.digia.com/licensing. For further information -** use the contact form at http://qt.digia.com/contact-us. -** -** GNU Lesser General Public License Usage -** Alternatively, this file may be used under the terms of the GNU Lesser -** General Public License version 2.1 as published by the Free Software -** Foundation and appearing in the file LICENSE.LGPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU Lesser General Public License version 2.1 requirements -** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. -** -** In addition, as a special exception, Digia gives you certain additional -** rights. These rights are described in the Digia Qt LGPL Exception -** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. -** -** GNU General Public License Usage -** Alternatively, this file may be used under the terms of the GNU -** General Public License version 3.0 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. Please review the following information to -** ensure the GNU General Public License version 3.0 requirements will be -** met: http://www.gnu.org/copyleft/gpl.html. -** -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 - -Rectangle { - id: root - width: 640 - height: 360 - color: "grey" - property string fileName - property alias volume: content.volume - property bool perfMonitorsLogging: false - property bool perfMonitorsVisible: false - - QtObject { - id: d - property bool dialogShown: (fileOpenContainer.state == "shown" || - effectSelectionPanel.state == "shown" || - videoFileBrowser.shown || - imageFileBrowser.shown) - property real gripSize: 40 - } - - // Create ScreenSaver element via Loader, so this app will still run if the - // SystemInfo module is not available - Loader { - source: "DisableScreenSaver.qml" - } - - Loader { - id: performanceLoader - - Connections { - target: d - onDialogShownChanged: - if (performanceLoader.item) - performanceLoader.item.enabled = !d.dialogShown - ignoreUnknownSignals: true - } - - function init() { - console.log("[qmlvideofx] performanceLoader.init logging " + root.perfMonitorsLogging + " visible " + root.perfMonitorsVisible) - var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible - source = enabled ? "../performancemonitor/PerformanceItem.qml" : "" - } - - onLoaded: { - item.parent = root - item.anchors.top = root.top - item.anchors.left = root.left - item.logging = root.perfMonitorsLogging - item.displayed = root.perfMonitorsVisible - item.init() - } - } - - Rectangle { - id: inner - anchors.fill: parent - color: "grey" - - Content { - id: content - anchors.fill: parent - gripSize: d.gripSize - onVideoFramePainted: performanceLoader.item.videoFramePainted() - } - - ParameterPanel { - id: parameterPanel - anchors { - left: parent.left; - right: parent.right; - margins: 10 - } - y: parent.height - gripSize: d.gripSize - - states: [ - State { - name: "shown" - PropertyChanges { - target: parameterPanel - y: parent.height - (parameterPanel.height + 10) - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "y" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - - state: (enabled && !d.dialogShown) ? "shown" : "baseState" - } - - EffectSelectionPanel { - id: effectSelectionPanel - anchors { - top: parent.top; - bottom: parameterPanel.top; - margins: 10 - } - x: parent.width - width: parent.width - 40 - opacity: 0.75 - radius: 20 - itemHeight: 50 - - states: [ - State { - name: "shown" - PropertyChanges { - target: effectSelectionPanel - x: 20 - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "x" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - - onEffectSourceChanged: { - content.effectSource = effectSource - if (content.effect.parameters.count) { - parameterPanel.model = content.effect.parameters - parameterPanel.enabled = true - } else { - parameterPanel.enabled = false - } - } - - onClicked: state = "baseState" - } - - Rectangle { - id: fileOpenContainer - anchors { - top: parent.top - bottom: parameterPanel.top - margins: 10 - } - x: -width - width: parent.width - 40 - color: "transparent" - - Column { - anchors.fill: parent - - FileOpen { - id: fileOpen - color: "transparent" - width: parent.width - height: 200 - opacity: 0.75 - radius: 20 - buttonHeight: 40 - } - - MouseArea { - width: parent.width - height: 250 - onClicked: fileOpenContainer.state = "baseState" - } - } - - states: [ - State { - name: "shown" - PropertyChanges { - target: fileOpenContainer - x: 20 - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "x" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - } - - Rectangle { - id: splashScreen - anchors { - horizontalCenter: parent.horizontalCenter - verticalCenter: parent.verticalCenter - } - width: 300 - height: 200 - radius: 0.1 * height - color: "white" - opacity: 0.9 - border { color: "black"; width: 2 } - - Text { - anchors { - fill: parent - margins: 5 - } - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 24 - text: "Tap on left side to switch between sources.\n\nTap on right side to switch between effects." - wrapMode: Text.WordWrap - } - - MouseArea { - anchors.fill: parent - onClicked: parent.state = "hidden" - } - - states: [ - State { - name: "hidden" - PropertyChanges { - target: splashScreen - opacity: 0.0 - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "opacity" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - } - - HintedMouseArea { - id: fileOpenMouseArea - anchors { - left: parent.left; - top: parent.top; - bottom: parameterPanel.top; - topMargin: 75 - } - width: 100 - onClicked: { - fileOpenMouseArea.hintEnabled = false - effectSelectionPanelMouseArea.hintEnabled = false - splashScreen.state = "hidden" - fileOpenContainer.state = "shown" - } - enabled: !d.dialogShown - } - - HintedMouseArea { - id: effectSelectionPanelMouseArea - anchors { - right: parent.right; - top: parent.top; - bottom: parameterPanel.top; - topMargin: 75 - } - width: 100 - onClicked: { - fileOpenMouseArea.hintEnabled = false - effectSelectionPanelMouseArea.hintEnabled = false - splashScreen.state = "hidden" - effectSelectionPanel.state = "shown" - } - enabled: !d.dialogShown - } - - Image { - source: "qrc:/images/close.png" - - anchors { - top: parent.top - right: parent.right - margins: 5 - } - - MouseArea { - anchors.fill: parent - onClicked: Qt.quit() - } - } - } - - Component.onCompleted: { - fileOpen.openImage.connect(openImage) - fileOpen.openVideo.connect(openVideo) - fileOpen.openCamera.connect(openCamera) - fileOpen.close.connect(close) - } - - FileBrowser { - id: imageFileBrowser - anchors.fill: root - Component.onCompleted: fileSelected.connect(content.openImage) - } - - FileBrowser { - id: videoFileBrowser - anchors.fill: root - Component.onCompleted: fileSelected.connect(content.openVideo) - } - - // Called from main() once root properties have been set - function init() { - console.log("[qmlvideofx] main.init") - imageFileBrowser.folder = imagePath - videoFileBrowser.folder = videoPath - content.init() - performanceLoader.init() - if (fileName != "") { - fileOpenMouseArea.hintEnabled = false - effectSelectionPanelMouseArea.hintEnabled = false - splashScreen.state = "hidden" - content.openVideo(fileName) - } - } - - function qmlFramePainted() { - if (performanceLoader.item) - performanceLoader.item.qmlFramePainted() - } - - function openImage() { - fileOpenContainer.state = "baseState" - imageFileBrowser.show() - } - - function openVideo() { - fileOpenContainer.state = "baseState" - videoFileBrowser.show() - } - - function openCamera() { - fileOpenContainer.state = "baseState" - content.openCamera() - } - - function close() { - fileOpenContainer.state = "baseState" - content.openImage("qrc:/images/qt-logo.png") - } -} diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.pro b/examples/multimedia/video/qmlvideofx/qmlvideofx.pro index 56344490..e9633954 100644 --- a/examples/multimedia/video/qmlvideofx/qmlvideofx.pro +++ b/examples/multimedia/video/qmlvideofx/qmlvideofx.pro @@ -10,10 +10,12 @@ RESOURCES += qmlvideofx.qrc include($$PWD/../snippets/performancemonitor/performancemonitordeclarative.pri) -maemo6: { - DEFINES += SMALL_SCREEN_LAYOUT - DEFINES += SMALL_SCREEN_PHYSICAL -} - target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/video/qmlvideofx INSTALLS += target + +ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android + +OTHER_FILES += \ + android/AndroidManifest.xml + +QMAKE_INFO_PLIST = Info.plist diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.qrc b/examples/multimedia/video/qmlvideofx/qmlvideofx.qrc index 93cb4f1f..e7a36124 100644 --- a/examples/multimedia/video/qmlvideofx/qmlvideofx.qrc +++ b/examples/multimedia/video/qmlvideofx/qmlvideofx.qrc @@ -1,10 +1,5 @@ - images/close.png - images/folder.png - images/titlebar.png - images/titlebar.sci - images/up.png images/qt-logo.png qml/qmlvideofx/Button.qml qml/qmlvideofx/Content.qml @@ -26,12 +21,10 @@ qml/qmlvideofx/EffectPixelate.qml qml/qmlvideofx/EffectPosterize.qml qml/qmlvideofx/EffectRipple.qml - qml/qmlvideofx/EffectSelectionPanel.qml qml/qmlvideofx/EffectSepia.qml qml/qmlvideofx/EffectSharpen.qml qml/qmlvideofx/EffectShockwave.qml qml/qmlvideofx/EffectSobelEdgeDetection1.qml - qml/qmlvideofx/EffectSobelEdgeDetection2.qml qml/qmlvideofx/EffectTiltShift.qml qml/qmlvideofx/EffectToon.qml qml/qmlvideofx/EffectVignette.qml @@ -40,8 +33,6 @@ qml/qmlvideofx/FileBrowser.qml qml/qmlvideofx/FileOpen.qml qml/qmlvideofx/HintedMouseArea.qml - qml/qmlvideofx/main-largescreen.qml - qml/qmlvideofx/main-smallscreen.qml qml/qmlvideofx/ParameterPanel.qml qml/qmlvideofx/Slider.qml shaders/billboard.fsh @@ -61,11 +52,21 @@ shaders/sharpen.fsh shaders/shockwave.fsh shaders/sobeledgedetection1.fsh - shaders/sobeledgedetection2.fsh shaders/tiltshift.fsh shaders/toon.fsh shaders/vignette.fsh shaders/warhol.fsh shaders/wobble.fsh + images/Slider_handle.png + images/Slider_bar.png + qml/qmlvideofx/Curtain.qml + images/Triangle_bottom.png + images/Triangle_Top.png + images/Dropdown_arrows.png + images/icon_Folder.png + images/icon_BackArrow.png + qml/qmlvideofx/Main.qml + images/icon_Menu.png + qml/qmlvideofx/EffectSelectionList.qml