diff options
author | Lars Knoll <lars.knoll@qt.io> | 2021-09-17 11:11:56 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-09-20 17:29:09 +0000 |
commit | f01259068ee35f76fd641dadcd358c28b752a88c (patch) | |
tree | 425d02305b4a32e7715a67a8b2378e093e66cd3b | |
parent | 5ba405a88a84c13715f44ff9276afdc3ddc95fe6 (diff) | |
download | qtmultimedia-f01259068ee35f76fd641dadcd358c28b752a88c.tar.gz |
Remove the qmlvideofx example
The example is broken and was never too useful.
Change-Id: I24ccc3f316713ccba73104f2d6f4a2b1dd3727e0
Reviewed-by: Piotr Srebrny <piotr.srebrny@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
(cherry picked from commit 7e2ae885f6292b3b2623797e51de89bed11ce57a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
96 files changed, 1 insertions, 7547 deletions
diff --git a/examples/multimedia/video/CMakeLists.txt b/examples/multimedia/video/CMakeLists.txt index e5bc20ba9..487ae515a 100644 --- a/examples/multimedia/video/CMakeLists.txt +++ b/examples/multimedia/video/CMakeLists.txt @@ -1,7 +1,6 @@ # Generated from video.pro. add_subdirectory(qmlvideo) -add_subdirectory(qmlvideofx) if(TARGET Qt::QuickControls2) if(TARGET Qt::Svg) add_subdirectory(mediaplayer) diff --git a/examples/multimedia/video/doc/images/qmlvideofx-camera-glow.jpg b/examples/multimedia/video/doc/images/qmlvideofx-camera-glow.jpg Binary files differdeleted file mode 100644 index 777ed4ffc..000000000 --- a/examples/multimedia/video/doc/images/qmlvideofx-camera-glow.jpg +++ /dev/null diff --git a/examples/multimedia/video/doc/images/qmlvideofx-camera-wobble.jpg b/examples/multimedia/video/doc/images/qmlvideofx-camera-wobble.jpg Binary files differdeleted file mode 100644 index 980ab0d15..000000000 --- a/examples/multimedia/video/doc/images/qmlvideofx-camera-wobble.jpg +++ /dev/null diff --git a/examples/multimedia/video/doc/images/qmlvideofx-effects-menu.jpg b/examples/multimedia/video/doc/images/qmlvideofx-effects-menu.jpg Binary files differdeleted file mode 100644 index eb5b90321..000000000 --- a/examples/multimedia/video/doc/images/qmlvideofx-effects-menu.jpg +++ /dev/null diff --git a/examples/multimedia/video/doc/images/qmlvideofx-video-edgedetection.jpg b/examples/multimedia/video/doc/images/qmlvideofx-video-edgedetection.jpg Binary files differdeleted file mode 100644 index 35b36c036..000000000 --- a/examples/multimedia/video/doc/images/qmlvideofx-video-edgedetection.jpg +++ /dev/null diff --git a/examples/multimedia/video/doc/images/qmlvideofx-video-pagecurl.jpg b/examples/multimedia/video/doc/images/qmlvideofx-video-pagecurl.jpg Binary files differdeleted file mode 100644 index 5cd8d2bd2..000000000 --- a/examples/multimedia/video/doc/images/qmlvideofx-video-pagecurl.jpg +++ /dev/null diff --git a/examples/multimedia/video/doc/src/qmlvideofx.qdoc b/examples/multimedia/video/doc/src/qmlvideofx.qdoc deleted file mode 100644 index c52f95f44..000000000 --- a/examples/multimedia/video/doc/src/qmlvideofx.qdoc +++ /dev/null @@ -1,207 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** This file is part of the documentation of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:FDL$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** GNU Free Documentation License Usage -** Alternatively, this file may be used under the terms of the GNU Free -** Documentation License version 1.3 as published by the Free Software -** Foundation and appearing in the file included in the packaging of -** this file. Please review the following information to ensure -** the GNU Free Documentation License version 1.3 requirements -** will be met: https://www.gnu.org/licenses/fdl-1.3.html. -** $QT_END_LICENSE$ -** -****************************************************************************/ - -/*! -\example multimedia/video/qmlvideofx -\title QML Video Shader Effects Example -\ingroup multimedia_examples - -\brief Applying shader effects on video and camera viewfinder content. - -\include examples-run.qdocinc - -\section1 Overview - -\e{QML Video Shader Effects} demonstrates how a \l ShaderEffect can be used to -apply postprocessing effects, expressed in GLSL, to QML \l VideoOutput type. - -It also shows how native code can be combined with QML to implement more -advanced functionality - in this case, C++ code is used to calculate the QML -frame rate. This value is rendered in QML in a semi-transparent item -overlaid on the video content. - -The following screenshots show shader effects being applied. In each case, -the effect is implemented using a fragment shader. - -Here we see an edge detection algorithm being applied to a video clip -(\l{http://durian.blender.org/}{Sintel from blender.org}). -\image qmlvideofx-video-edgedetection.jpg - -This image shows a page curl effect, applied to the same video clip. -\image qmlvideofx-video-pagecurl.jpg - -Here we see a 'glow' effect (edge detection plus colour quantization) being -applied to the camera viewfinder. -\image qmlvideofx-camera-glow.jpg - -This image shows a 'wobble' effect applied to the viewfinder. -\image qmlvideofx-camera-wobble.jpg - -The application includes many more effects than the ones shown here - look -for Effect*.qml files in the list of files below to see the full range. - -\section1 Application Structure - -Shader effects can be applied to video or viewfinder content using -\l{ShaderEffect}, as shown in the following example, which applies -a wiggly effect to the content: - -\qml -import QtQuick 2.0 -import QtMultimedia 5.0 - -Rectangle { - width: 300 - height: 300 - color: "black" - - MediaPlayer { - id: mediaPlayer - source: "test.mp4" - playing: true - } - - VideoOutput { - id: video - anchors.fill: parent - source: mediaPlayer - } - - ShaderEffect { - property variant source: ShaderEffectSource { sourceItem: video; hideSource: true } - property real wiggleAmount: 0.005 - anchors.fill: video - - fragmentShader: " - varying highp vec2 qt_TexCoord0; - uniform sampler2D source; - uniform highp float wiggleAmount; - void main(void) - { - highp vec2 wiggledTexCoord = qt_TexCoord0; - wiggledTexCoord.s += sin(4.0 * 3.14159265358979323846 * wiggledTexCoord.t) * wiggleAmount; - gl_FragColor = texture2D(source, wiggledTexCoord.st); - } - " - } -} -\endqml - -In this application, the usage of the \l{ShaderEffect} and \l{VideoOutput} -types is a bit more complicated, for the following reasons: - -\list - \li Each effect can be applied to either a \l{VideoOutput} or an - \l{Image} item, so the type of the source item must be abstracted away - from the effect implementation - \li For some effects (such as the edge detection and glow examples shown in - the screenshots above), the transformation is applied only to pixels to - the left of a dividing line - this allows the effect to be easily - compared with the untransformed image on the right - \li Most effects have one or more parameters which can be modified by the - user - these are controlled by sliders in the UI which are connected - to uniform values passed into the GLSL code -\endlist - -The abstraction of source item type is achieved by the \c Content, which uses a -\l[QML]{Loader} to create either a \l[QML]{MediaPlayer}, \l[QML]{Camera}, or an -\l[QML]{Image}: - -\quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml -\skipto import -\printuntil { -\dots -\skipto Loader { -\printuntil } -\dots -\skipto function openImage -\printuntil "ContentImage.qml" -\skipto contentLoader.item.source -\printuntil path -\skipto } -\printuntil } -\skipto function openVideo -\printuntil "ContentVideo.qml" -\skipto contentLoader.item.mediaSource -\printuntil path -\skipto } -\printuntil } -\skipto function openCamera -\printuntil "ContentCamera.qml" -\skipto } -\printuntil } -\skipto /^\}/ -\printuntil } - -Each effect is implemented as a QML item which is based on the \c Effect, which in -turn is based on the \l[QML]{ShaderEffect}: - -\quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml -\skipto import -\printuntil /^\}/ - -The interface of Effect allows for derived effects to specify the -number of parameters which they support (and therefore the number of sliders -which should be displayed), and whether a vertical dividing line should be drawn -between transformed and untransformed image regions. As an example, here is the -implementation of the pixelation effect. As you can see, the pixelation effect -supports one parameter (which controls the pixelation granularity), and states -that the divider should be displayed. - -\quotefromfile multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml -\skipto import -\printuntil /^\}/ - -The main.qml file shows a \c FileOpen item, which allows -the user to select the input source and an \c EffectSelectionList -item, which lists each of the available shader effects. As described above, a -\c Content item is used to load the appropriate input and effect type. A -\c Divider item draws the vertical dividing line, which can be dragged left or -right by the user. Finally, a \c ParameterPanel item renders the sliders -corresponding to each effect parameter. - -\image qmlvideofx-effects-menu.jpg -\caption The effect selection menu - -\section1 Calculating and Displaying QML Painting Rate - -\input multimedia/doc/src/examples/video-qml-paint-rate.qdocinc - -All that remains is to connect the afterRendering() signal of the QQuickView -object to a JavaScript function, which will eventually call frequencyItem.notify(): - -\quotefromfile multimedia/video/qmlvideofx/main.cpp -\skipto QGuiApplication -\printuntil ; -\dots -\skipto QQuickItem -\printuntil ; -\dots -\skipto QObject::connect -\printuntil SLOT(qmlFramePainted())); - -*/ diff --git a/examples/multimedia/video/qmlvideofx/CMakeLists.txt b/examples/multimedia/video/qmlvideofx/CMakeLists.txt deleted file mode 100644 index d9d6a3d60..000000000 --- a/examples/multimedia/video/qmlvideofx/CMakeLists.txt +++ /dev/null @@ -1,135 +0,0 @@ -# Generated from qmlvideofx.pro. - -cmake_minimum_required(VERSION 3.16) -project(qmlvideofx LANGUAGES CXX) - -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_AUTORCC ON) -set(CMAKE_AUTOUIC ON) - -if(NOT DEFINED INSTALL_EXAMPLESDIR) - set(INSTALL_EXAMPLESDIR "examples") -endif() - -set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/multimedia/video/qmlvideofx") - -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Quick) -find_package(Qt6 COMPONENTS Multimedia) -find_package(Qt6 COMPONENTS Qml) - -qt_add_executable(qmlvideofx - frequencymonitor.cpp - frequencymonitordeclarative.cpp - performancemonitor.cpp - performancemonitordeclarative.cpp - filereader.cpp - main.cpp -) -set_target_properties(qmlvideofx PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) - -target_compile_definitions(qmlvideofx PUBLIC - FREQUENCYMONITOR_SUPPORT - PERFORMANCEMONITOR_SUPPORT -) - -target_link_libraries(qmlvideofx PUBLIC - Qt::Core - Qt::Gui - Qt::Multimedia - Qt::Qml - Qt::Quick -) - - -# Resources: -set(qmlvideofx_resource_files - "images/Dropdown_arrows.png" - "images/Slider_bar.png" - "images/Slider_handle.png" - "images/Triangle_Top.png" - "images/Triangle_bottom.png" - "images/icon_BackArrow.png" - "images/icon_Folder.png" - "images/icon_Menu.png" - "images/qt-logo.png" - "qml/frequencymonitor/FrequencyItem.qml" - "qml/performancemonitor/PerformanceItem.qml" - "qml/qmlvideofx/Button.qml" - "qml/qmlvideofx/Content.qml" - "qml/qmlvideofx/ContentCamera.qml" - "qml/qmlvideofx/ContentImage.qml" - "qml/qmlvideofx/ContentVideo.qml" - "qml/qmlvideofx/Curtain.qml" - "qml/qmlvideofx/Divider.qml" - "qml/qmlvideofx/Effect.qml" - "qml/qmlvideofx/EffectBillboard.qml" - "qml/qmlvideofx/EffectBlackAndWhite.qml" - "qml/qmlvideofx/EffectEmboss.qml" - "qml/qmlvideofx/EffectGaussianBlur.qml" - "qml/qmlvideofx/EffectGlow.qml" - "qml/qmlvideofx/EffectIsolate.qml" - "qml/qmlvideofx/EffectMagnify.qml" - "qml/qmlvideofx/EffectPageCurl.qml" - "qml/qmlvideofx/EffectPassThrough.qml" - "qml/qmlvideofx/EffectPixelate.qml" - "qml/qmlvideofx/EffectPosterize.qml" - "qml/qmlvideofx/EffectRipple.qml" - "qml/qmlvideofx/EffectSelectionList.qml" - "qml/qmlvideofx/EffectSepia.qml" - "qml/qmlvideofx/EffectSharpen.qml" - "qml/qmlvideofx/EffectShockwave.qml" - "qml/qmlvideofx/EffectSobelEdgeDetection1.qml" - "qml/qmlvideofx/EffectTiltShift.qml" - "qml/qmlvideofx/EffectToon.qml" - "qml/qmlvideofx/EffectVignette.qml" - "qml/qmlvideofx/EffectWarhol.qml" - "qml/qmlvideofx/EffectWobble.qml" - "qml/qmlvideofx/FileBrowser.qml" - "qml/qmlvideofx/FileOpen.qml" - "qml/qmlvideofx/HintedMouseArea.qml" - "qml/qmlvideofx/Main.qml" - "qml/qmlvideofx/ParameterPanel.qml" - "qml/qmlvideofx/Slider.qml" - "shaders/billboard.fsh" - "shaders/blackandwhite.fsh" - "shaders/emboss.fsh" - "shaders/gaussianblur_h.fsh" - "shaders/gaussianblur_v.fsh" - "shaders/glow.fsh" - "shaders/isolate.fsh" - "shaders/magnify.fsh" - "shaders/pagecurl.fsh" - "shaders/pixelate.fsh" - "shaders/posterize.fsh" - "shaders/ripple.fsh" - "shaders/selectionpanel.fsh" - "shaders/sepia.fsh" - "shaders/sharpen.fsh" - "shaders/shockwave.fsh" - "shaders/sobeledgedetection1.fsh" - "shaders/tiltshift.fsh" - "shaders/toon.fsh" - "shaders/vignette.fsh" - "shaders/warhol.fsh" - "shaders/wobble.fsh" -) - -qt6_add_resources(qmlvideofx "qmlvideofx" - PREFIX - "/" - FILES - ${qmlvideofx_resource_files} -) - -install(TARGETS qmlvideofx - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/multimedia/video/qmlvideofx/Info.plist b/examples/multimedia/video/qmlvideofx/Info.plist deleted file mode 100644 index 5fbe35f1c..000000000 --- a/examples/multimedia/video/qmlvideofx/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> -<plist version="1.0"> -<dict> - <key>UISupportedInterfaceOrientations</key> - <array> - <string>UIInterfaceOrientationLandscapeRight</string> - </array> - <key>UIInterfaceOrientation</key> - <string>UIInterfaceOrientationLandscapeRight</string> - <key>CFBundleIconFile</key> - <string></string> - <key>CFBundlePackageType</key> - <string>APPL</string> - <key>CFBundleSignature</key> - <string>????</string> - <key>CFBundleExecutable</key> - <string>qmlvideofx</string> - <key>CFBundleIdentifier</key> - <string>com.digia.${PRODUCT_NAME:rfc1034identifier}</string> - <key>CFBundleDisplayName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundleName</key> - <string>${PRODUCT_NAME}</string> - <key>CFBundleShortVersionString</key> - <string>1.0</string> - <key>CFBundleVersion</key> - <string>1.0</string> - <key>NSCameraUsageDescription</key> - <string>Qt Multimedia Example</string> -</dict> -</plist> diff --git a/examples/multimedia/video/qmlvideofx/filereader.cpp b/examples/multimedia/video/qmlvideofx/filereader.cpp deleted file mode 100644 index af74899f9..000000000 --- a/examples/multimedia/video/qmlvideofx/filereader.cpp +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "filereader.h" - -#include <QCoreApplication> -#include <QDir> -#include <QFile> -#include <QFileInfo> -#include <QTextStream> - -QString FileReader::readFile(const QString &fileName) -{ - QString content; - QFile file(fileName); - if (file.open(QIODevice::ReadOnly)) { - QTextStream stream(&file); - content = stream.readAll(); - } - return content; -} - diff --git a/examples/multimedia/video/qmlvideofx/filereader.h b/examples/multimedia/video/qmlvideofx/filereader.h deleted file mode 100644 index 019317a1a..000000000 --- a/examples/multimedia/video/qmlvideofx/filereader.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QObject> - -class FileReader : public QObject -{ - Q_OBJECT -public: - Q_INVOKABLE QString readFile(const QString &fileName); -}; - diff --git a/examples/multimedia/video/qmlvideofx/frequencymonitor.cpp b/examples/multimedia/video/qmlvideofx/frequencymonitor.cpp deleted file mode 100644 index 5f48cd35e..000000000 --- a/examples/multimedia/video/qmlvideofx/frequencymonitor.cpp +++ /dev/null @@ -1,254 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "frequencymonitor.h" -#include <QDebug> -#include <QElapsedTimer> -#include <QString> -#include <QTime> -#include <QTimer> - -//#define VERBOSE_TRACE - -inline QDebug qtTrace() { return qDebug() << "[frequencymonitor]"; } -#ifdef VERBOSE_TRACE -inline QDebug qtVerboseTrace() { return qtTrace(); } -#else -inline QNoDebug qtVerboseTrace() { return QNoDebug(); } -#endif - -static const int DefaultSamplingInterval = 100; -static const int DefaultTraceInterval = 0; - -class FrequencyMonitorPrivate : public QObject -{ - Q_OBJECT - -public: - FrequencyMonitorPrivate(FrequencyMonitor *parent); - void calculateInstantaneousFrequency(); - -private slots: - void calculateAverageFrequency(); - void stalled(); - -public: - FrequencyMonitor *const q_ptr; - QString m_label; - bool m_active; - qreal m_instantaneousFrequency; - QElapsedTimer m_instantaneousElapsed; - QTimer *m_averageTimer; - QElapsedTimer m_averageElapsed; - int m_count; - qreal m_averageFrequency; - QTimer *m_traceTimer; - QTimer *m_stalledTimer; -}; - -FrequencyMonitorPrivate::FrequencyMonitorPrivate(FrequencyMonitor *parent) -: QObject(parent) -, q_ptr(parent) -, m_active(false) -, m_instantaneousFrequency(0) -, m_averageTimer(new QTimer(this)) -, m_count(0) -, m_averageFrequency(0) -, m_traceTimer(new QTimer(this)) -, m_stalledTimer(new QTimer(this)) -{ - m_instantaneousElapsed.start(); - connect(m_averageTimer, &QTimer::timeout, - this, &FrequencyMonitorPrivate::calculateAverageFrequency); - if (DefaultSamplingInterval) - m_averageTimer->start(DefaultSamplingInterval); - m_averageElapsed.start(); - connect(m_traceTimer, &QTimer::timeout, - q_ptr, &FrequencyMonitor::trace); - if (DefaultTraceInterval) - m_traceTimer->start(DefaultTraceInterval); - m_stalledTimer->setSingleShot(true); - connect(m_stalledTimer, &QTimer::timeout, - this, &FrequencyMonitorPrivate::stalled); -} - -void FrequencyMonitorPrivate::calculateInstantaneousFrequency() -{ - const qint64 ms = m_instantaneousElapsed.restart(); - m_instantaneousFrequency = ms ? qreal(1000) / ms : 0; - m_stalledTimer->start(3 * ms); - if (m_instantaneousFrequency) - q_ptr->setActive(true); - emit q_ptr->instantaneousFrequencyChanged(m_instantaneousFrequency); - emit q_ptr->frequencyChanged(); -} - -void FrequencyMonitorPrivate::calculateAverageFrequency() -{ - const qint64 ms = m_averageElapsed.restart(); - m_averageFrequency = qreal(m_count * 1000) / ms; - emit q_ptr->averageFrequencyChanged(m_averageFrequency); - emit q_ptr->frequencyChanged(); - m_count = 0; -} - -void FrequencyMonitorPrivate::stalled() -{ - if (m_instantaneousFrequency) { - m_instantaneousFrequency = 0; - emit q_ptr->instantaneousFrequencyChanged(m_instantaneousFrequency); - emit q_ptr->frequencyChanged(); - } -} - -FrequencyMonitor::FrequencyMonitor(QObject *parent) -: QObject(parent) -{ - d_ptr = new FrequencyMonitorPrivate(this); -} - -FrequencyMonitor::~FrequencyMonitor() = default; - -QString FrequencyMonitor::label() const -{ - return d_func()->m_label; -} - -bool FrequencyMonitor::active() const -{ - return d_func()->m_active; -} - -int FrequencyMonitor::samplingInterval() const -{ - return d_ptr->m_averageTimer->isActive() ? d_ptr->m_averageTimer->interval() : 0; -} - -int FrequencyMonitor::traceInterval() const -{ - return d_ptr->m_traceTimer->isActive() ? d_ptr->m_traceTimer->interval() : 0; -} - -qreal FrequencyMonitor::instantaneousFrequency() const -{ - return d_func()->m_instantaneousFrequency; -} - -qreal FrequencyMonitor::averageFrequency() const -{ - return d_func()->m_averageFrequency; -} - -void FrequencyMonitor::notify() -{ - Q_D(FrequencyMonitor); - ++(d->m_count); - d->calculateInstantaneousFrequency(); -} - -void FrequencyMonitor::trace() -{ - Q_D(FrequencyMonitor); - const QString value = QString::fromLatin1("instant %1 average %2") - .arg(d->m_instantaneousFrequency, 0, 'f', 2) - .arg(d->m_averageFrequency, 0, 'f', 2); - if (d->m_label.isEmpty()) - qtTrace() << "FrequencyMonitor::trace" << value; - else - qtTrace() << "FrequencyMonitor::trace" << "label" << d->m_label << value; -} - -void FrequencyMonitor::setLabel(const QString &value) -{ - Q_D(FrequencyMonitor); - if (d->m_label != value) { - d->m_label = value; - emit labelChanged(d->m_label); - } -} - -void FrequencyMonitor::setActive(bool value) -{ - Q_D(FrequencyMonitor); - if (d->m_active != value) { - d->m_active = value; - emit activeChanged(d->m_active); - } -} - -void FrequencyMonitor::setSamplingInterval(int value) -{ - Q_D(FrequencyMonitor); - if (samplingInterval() != value) { - if (value) { - d->m_averageTimer->setInterval(value); - d->m_averageTimer->start(); - } else { - d->m_averageTimer->stop(); - } - emit samplingIntervalChanged(value); - } -} - -void FrequencyMonitor::setTraceInterval(int value) -{ - Q_D(FrequencyMonitor); - if (traceInterval() != value) { - if (value) { - d->m_traceTimer->setInterval(value); - d->m_traceTimer->start(); - } else { - d->m_traceTimer->stop(); - } - emit traceIntervalChanged(value); - } -} - -#include "frequencymonitor.moc" diff --git a/examples/multimedia/video/qmlvideofx/frequencymonitor.h b/examples/multimedia/video/qmlvideofx/frequencymonitor.h deleted file mode 100644 index efeb78589..000000000 --- a/examples/multimedia/video/qmlvideofx/frequencymonitor.h +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef FREQUENCYMONITOR_H -#define FREQUENCYMONITOR_H - -#include <QObject> -#include <QTimer> - -class FrequencyMonitorPrivate; - -/** - * Class for measuring frequency of events - * - * Occurrence of the event is notified by the client via the notify() slot. - * On a regular interval, both an instantaneous and a rolling average - * event frequency are calculated. - */ -class FrequencyMonitor : public QObject -{ - Q_OBJECT - Q_DECLARE_PRIVATE(FrequencyMonitor) - Q_PROPERTY(QString label READ label WRITE setLabel NOTIFY labelChanged) - Q_PROPERTY(bool active READ active WRITE setActive NOTIFY activeChanged) - Q_PROPERTY(int samplingInterval READ samplingInterval WRITE setSamplingInterval NOTIFY samplingIntervalChanged) - Q_PROPERTY(int traceInterval READ traceInterval WRITE setTraceInterval NOTIFY traceIntervalChanged) - Q_PROPERTY(qreal instantaneousFrequency READ instantaneousFrequency NOTIFY instantaneousFrequencyChanged) - Q_PROPERTY(qreal averageFrequency READ averageFrequency NOTIFY averageFrequencyChanged) - -public: - FrequencyMonitor(QObject *parent = 0); - ~FrequencyMonitor(); - - static void qmlRegisterType(); - - QString label() const; - bool active() const; - int samplingInterval() const; - int traceInterval() const; - qreal instantaneousFrequency() const; - qreal averageFrequency() const; - -signals: - void labelChanged(const QString &value); - void activeChanged(bool); - void samplingIntervalChanged(int value); - void traceIntervalChanged(int value); - void frequencyChanged(); - void instantaneousFrequencyChanged(qreal value); - void averageFrequencyChanged(qreal value); - -public slots: - Q_INVOKABLE void notify(); - Q_INVOKABLE void trace(); - void setActive(bool value); - void setLabel(const QString &value); - void setSamplingInterval(int value); - void setTraceInterval(int value); - -private: - FrequencyMonitorPrivate *d_ptr; -}; - -#endif // FREQUENCYMONITOR_H diff --git a/examples/multimedia/video/qmlvideofx/frequencymonitordeclarative.cpp b/examples/multimedia/video/qmlvideofx/frequencymonitordeclarative.cpp deleted file mode 100644 index 0994ae213..000000000 --- a/examples/multimedia/video/qmlvideofx/frequencymonitordeclarative.cpp +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "frequencymonitor.h" -#include <QtQml/qqml.h> - -void FrequencyMonitor::qmlRegisterType() -{ - ::qmlRegisterType<FrequencyMonitor>("FrequencyMonitor", 1, 0, "FrequencyMonitor"); -} diff --git a/examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png b/examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png Binary files differdeleted file mode 100644 index 0a9e25ce2..000000000 --- a/examples/multimedia/video/qmlvideofx/images/Dropdown_arrows.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/images/Slider_bar.png b/examples/multimedia/video/qmlvideofx/images/Slider_bar.png Binary files differdeleted file mode 100644 index 84be50fae..000000000 --- a/examples/multimedia/video/qmlvideofx/images/Slider_bar.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/images/Slider_handle.png b/examples/multimedia/video/qmlvideofx/images/Slider_handle.png Binary files differdeleted file mode 100644 index aebecdf19..000000000 --- a/examples/multimedia/video/qmlvideofx/images/Slider_handle.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/images/Triangle_Top.png b/examples/multimedia/video/qmlvideofx/images/Triangle_Top.png Binary files differdeleted file mode 100644 index 5768e9536..000000000 --- a/examples/multimedia/video/qmlvideofx/images/Triangle_Top.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png b/examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png Binary files differdeleted file mode 100644 index 509409666..000000000 --- a/examples/multimedia/video/qmlvideofx/images/Triangle_bottom.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png b/examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png Binary files differdeleted file mode 100644 index 6823de004..000000000 --- a/examples/multimedia/video/qmlvideofx/images/icon_BackArrow.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/images/icon_Folder.png b/examples/multimedia/video/qmlvideofx/images/icon_Folder.png Binary files differdeleted file mode 100644 index 62d97004f..000000000 --- a/examples/multimedia/video/qmlvideofx/images/icon_Folder.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/images/icon_Menu.png b/examples/multimedia/video/qmlvideofx/images/icon_Menu.png Binary files differdeleted file mode 100644 index bc078612e..000000000 --- a/examples/multimedia/video/qmlvideofx/images/icon_Menu.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/images/qt-logo.png b/examples/multimedia/video/qmlvideofx/images/qt-logo.png Binary files differdeleted file mode 100644 index ecbff0ca3..000000000 --- a/examples/multimedia/video/qmlvideofx/images/qt-logo.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/main.cpp b/examples/multimedia/video/qmlvideofx/main.cpp deleted file mode 100644 index 814c85368..000000000 --- a/examples/multimedia/video/qmlvideofx/main.cpp +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include <QtCore/QStandardPaths> -#include <QtCore/QStringList> -#include <QtQml/QQmlContext> -#include <QtGui/QGuiApplication> -#include <QtQuick/QQuickItem> -#include <QtQuick/QQuickView> -#include "filereader.h" -#include "trace.h" - -#ifdef PERFORMANCEMONITOR_SUPPORT -#include "performancemonitordeclarative.h" -#endif - -int main(int argc, char *argv[]) -{ - QGuiApplication app(argc, argv); - -#ifdef PERFORMANCEMONITOR_SUPPORT - PerformanceMonitor::qmlRegisterTypes(); -#endif - - QUrl fileName; - qreal volume = 0.5; - QStringList args = app.arguments(); -#ifdef PERFORMANCEMONITOR_SUPPORT - PerformanceMonitor::State performanceMonitorState; -#endif - for (int i = 1; i < args.size(); ++i) { - const QByteArray arg = args.at(i).toUtf8(); - if (arg.startsWith('-')) { - if ("-volume" == arg) { - if (i + 1 < args.size()) - volume = 0.01 * args.at(++i).toInt(); - else - qtTrace() << "Option \"-volume\" takes a value"; - } -#ifdef PERFORMANCEMONITOR_SUPPORT - else if (performanceMonitorState.parseArgument(arg)) { - // Do nothing - } -#endif - else { - qtTrace() << "Option" << arg << "ignored"; - } - } else { - if (fileName.isEmpty()) - fileName = QUrl::fromLocalFile(arg); - else - qtTrace() << "Argument" << arg << "ignored"; - } - } - - QQuickView viewer; - - viewer.setSource(QUrl(QLatin1String("qrc:///qml/qmlvideofx/Main.qml"))); - QQuickItem *rootObject = viewer.rootObject(); - rootObject->setProperty("fileName", fileName); - viewer.rootObject()->setProperty("volume", volume); - -#ifdef PERFORMANCEMONITOR_SUPPORT - if (performanceMonitorState.valid) { - rootObject->setProperty("perfMonitorsLogging", performanceMonitorState.logging); - rootObject->setProperty("perfMonitorsVisible", performanceMonitorState.visible); - } - QObject::connect(&viewer, SIGNAL(afterRendering()), - rootObject, SLOT(qmlFramePainted())); -#endif - - FileReader fileReader; - viewer.rootContext()->setContextProperty("fileReader", &fileReader); - - const QUrl appPath(QUrl::fromLocalFile(app.applicationDirPath())); - const QStringList picturesLocation = QStandardPaths::standardLocations(QStandardPaths::PicturesLocation); - const QUrl imagePath = picturesLocation.isEmpty() ? appPath : QUrl::fromLocalFile(picturesLocation.first()); - viewer.rootContext()->setContextProperty("imagePath", imagePath); - - const QStringList moviesLocation = QStandardPaths::standardLocations(QStandardPaths::MoviesLocation); - const QUrl videoPath = moviesLocation.isEmpty() ? appPath : QUrl::fromLocalFile(moviesLocation.first()); - viewer.rootContext()->setContextProperty("videoPath", videoPath); - - viewer.setTitle("qmlvideofx"); - viewer.setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | - Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint); - viewer.setMinimumSize(QSize(1280, 720)); - viewer.setResizeMode(QQuickView::SizeRootObjectToView); - - viewer.show(); - - // Delay invocation of init until the event loop has started, to work around - // a GL context issue on Harmattan: without this, we get the following error - // when the first ShaderEffectItem is created: - // "QGLShaderProgram::addShader: Program and shader are not associated with same context" - QMetaObject::invokeMethod(viewer.rootObject(), "init", Qt::QueuedConnection); - - return app.exec(); -} - diff --git a/examples/multimedia/video/qmlvideofx/performancemonitor.cpp b/examples/multimedia/video/qmlvideofx/performancemonitor.cpp deleted file mode 100644 index 204eabc5a..000000000 --- a/examples/multimedia/video/qmlvideofx/performancemonitor.cpp +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "performancemonitor.h" - -namespace PerformanceMonitor { - -bool State::parseArgument(const QByteArray &arg) -{ - bool result = false; - if (arg == "-log-perf") { - logging = true; - valid = true; - result = true; - } else if (arg == "-no-log-perf") { - logging = false; - valid = true; - result = true; - } else if (arg == "-show-perf") { - visible = true; - valid = true; - result = true; - } else if (arg == "-hide-perf") { - visible = false; - valid = true; - result = true; - } - return result; -} - -} // namespace PerformanceMonitor diff --git a/examples/multimedia/video/qmlvideofx/performancemonitor.h b/examples/multimedia/video/qmlvideofx/performancemonitor.h deleted file mode 100644 index 97b76caf3..000000000 --- a/examples/multimedia/video/qmlvideofx/performancemonitor.h +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef PERFORMANCEMONITOR_H -#define PERFORMANCEMONITOR_H - -#include <QByteArray> - -namespace PerformanceMonitor { - -struct State -{ - State() : valid(true), logging(false), visible(true) { } - State(bool l, bool v) : valid(true), logging(l), visible(v) { } - bool operator==(const State &other) const - { return logging == other.logging && visible == other.visible; } - bool operator!=(const State &other) const - { return logging != other.logging || visible != other.visible; } - - bool parseArgument(const QByteArray &arg); - - bool valid; - bool logging; - bool visible; -}; - -} // namespace PerformanceMonitor - -#endif // PERFORMANCEMONITOR_H - diff --git a/examples/multimedia/video/qmlvideofx/performancemonitordeclarative.cpp b/examples/multimedia/video/qmlvideofx/performancemonitordeclarative.cpp deleted file mode 100644 index 0783fdbd9..000000000 --- a/examples/multimedia/video/qmlvideofx/performancemonitordeclarative.cpp +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "frequencymonitor.h" -#include "performancemonitor.h" - -namespace PerformanceMonitor { - - void qmlRegisterTypes() - { - FrequencyMonitor::qmlRegisterType(); - } -} diff --git a/examples/multimedia/video/qmlvideofx/performancemonitordeclarative.h b/examples/multimedia/video/qmlvideofx/performancemonitordeclarative.h deleted file mode 100644 index ca70657ce..000000000 --- a/examples/multimedia/video/qmlvideofx/performancemonitordeclarative.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef PERFORMANCEMONITORDECLARATIVE_H -#define PERFORMANCEMONITORDECLARATIVE_H - -#include "performancemonitor.h" - -namespace PerformanceMonitor { - void qmlRegisterTypes(); -} - -#endif // PERFORMANCEMONITORDECLARATIVE_H diff --git a/examples/multimedia/video/qmlvideofx/qml/frequencymonitor/FrequencyItem.qml b/examples/multimedia/video/qmlvideofx/qml/frequencymonitor/FrequencyItem.qml deleted file mode 100644 index ec1bab299..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/frequencymonitor/FrequencyItem.qml +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import FrequencyMonitor 1.0 - -Rectangle { - id: root - property bool logging: true - property bool displayed: true - property bool enabled: logging || displayed - property alias active: monitor.active - property int samplingInterval: 500 - property color textColor: "yellow" - property int textSize: 20 - property alias label: monitor.label - - border.width: 1 - border.color: "yellow" - width: 5.5 * root.textSize - height: 3.0 * root.textSize - color: "black" - opacity: 0.5 - radius: 10 - visible: displayed && active - - // This should ensure that the monitor is on top of all other content - z: 999 - - function notify() { - monitor.notify() - } - - FrequencyMonitor { - id: monitor - samplingInterval: root.enabled ? root.samplingInterval : 0 - onAverageFrequencyChanged: { - if (root.logging) trace() - averageFrequencyText.text = monitor.averageFrequency.toFixed(2) - } - } - - Text { - id: labelText - anchors { - left: parent.left - top: parent.top - margins: 10 - } - color: root.textColor - font.pixelSize: 0.6 * root.textSize - text: root.label - width: root.width - 2*anchors.margins - elide: Text.ElideRight - } - - Text { - id: averageFrequencyText - anchors { - right: parent.right - bottom: parent.bottom - margins: 10 - } - color: root.textColor - font.pixelSize: root.textSize - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/performancemonitor/PerformanceItem.qml b/examples/multimedia/video/qmlvideofx/qml/performancemonitor/PerformanceItem.qml deleted file mode 100644 index 5621450cb..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/performancemonitor/PerformanceItem.qml +++ /dev/null @@ -1,150 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Rectangle { - id: root - property bool logging: true - property bool displayed: true - property bool videoActive - property int margins: 5 - property bool enabled: true - - color: "transparent" - - // This should ensure that the monitor is on top of all other content - z: 999 - - Column { - id: column - anchors { - fill: root - margins: 10 - } - spacing: 10 - } - - QtObject { - id: d - property Item qmlFrameRateItem: null - property Item videoFrameRateItem: null - } - - Connections { - id: videoFrameRateActiveConnections - ignoreUnknownSignals: true - function onActiveChanged() { root.videoActive = videoFrameRateActiveConnections.target.active } - } - - states: [ - State { - name: "hidden" - PropertyChanges { - target: root - opacity: 0 - } - } - ] - - transitions: [ - Transition { - from: "*" - to: "*" - NumberAnimation { - properties: "opacity" - easing.type: Easing.OutQuart - duration: 500 - } - } - ] - - state: enabled ? "baseState" : "hidden" - - function createQmlFrameRateItem() { - var component = Qt.createComponent("../frequencymonitor/FrequencyItem.qml") - if (component.status == Component.Ready) - d.qmlFrameRateItem = component.createObject(column, { label: "QML frame rate", - displayed: root.displayed, - logging: root.logging - }) - } - - function createVideoFrameRateItem() { - var component = Qt.createComponent("../frequencymonitor/FrequencyItem.qml") - if (component.status == Component.Ready) - d.videoFrameRateItem = component.createObject(column, { label: "Video frame rate", - displayed: root.displayed, - logging: root.logging - }) - videoFrameRateActiveConnections.target = d.videoFrameRateItem - } - - - function init() { - createQmlFrameRateItem() - createVideoFrameRateItem() - } - - function videoFramePainted() { - if (d.videoFrameRateItem) - d.videoFrameRateItem.notify() - } - - function qmlFramePainted() { - if (d.qmlFrameRateItem) - d.qmlFrameRateItem.notify() - } - - onVideoActiveChanged: { - if (d.videoFrameRateItem) - d.videoFrameRateItem.active = root.videoActive - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml deleted file mode 100644 index bb5d28843..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Button.qml +++ /dev/null @@ -1,93 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Rectangle { - id: root - color: "transparent" - height: itemHeight - width: itemWidth - - property string text - property color bgColor: "transparent" - property color bgColorSelected: "#14aaff" - property color textColor: "white" - property alias enabled: mouseArea.enabled - property bool active: true - property alias horizontalAlign: text.horizontalAlignment - - signal clicked - - Rectangle { - anchors { fill: parent; margins: 1 } - color: mouseArea.pressed ? bgColorSelected : bgColor - - Text { - id: text - clip: true - text: root.text - anchors { fill: parent; margins: scaledMargin } - font.pixelSize: fontSize - color: textColor - horizontalAlignment: Text.AlignLeft - verticalAlignment: Text.AlignVCenter - } - - MouseArea { - id: mouseArea - anchors.fill: parent - onClicked: { - root.clicked() - } - enabled: active - } - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml deleted file mode 100644 index 6bd841b38..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Content.qml +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Rectangle { - id: root - property alias effect: effectLoader.item - property alias gripSize: divider.gripSize - property string effectSource - property real volume: 0.5 - - signal videoFramePainted - - Divider { - id: divider - visible: false - z: 1.0 - onValueChanged: updateDivider() - } - - ShaderEffectSource { - id: theSource - smooth: true - hideSource: true - } - - Loader { - id: contentLoader - } - - Loader { - id: effectLoader - source: effectSource - } - - Connections { - id: videoFramePaintedConnection - onFramePainted: { - if (performanceLoader.item) - root.videoFramePainted() - } - ignoreUnknownSignals: true - } - - onWidthChanged: { - if (effectLoader.item) - effectLoader.item.targetWidth = root.width - } - - onHeightChanged: { - if (effectLoader.item) - effectLoader.item.targetHeight = root.height - } - - onEffectSourceChanged: { - effectLoader.source = effectSource - effectLoader.item.parent = root - effectLoader.item.targetWidth = root.width - effectLoader.item.targetHeight = root.height - updateSource() - effectLoader.item.source = theSource - divider.visible = effectLoader.item.divider - updateDivider() - } - - function init() { - openImage("qrc:/images/qt-logo.png") - root.effectSource = "EffectPassThrough.qml" - } - - function updateDivider() { - if (effectLoader.item && effectLoader.item.divider) - effectLoader.item.dividerValue = divider.value - } - - function updateSource() { - if (contentLoader.item) { - contentLoader.item.parent = root - contentLoader.item.anchors.fill = root - theSource.sourceItem = contentLoader.item - if (effectLoader.item) - effectLoader.item.anchors.fill = contentLoader.item - } - } - - function openImage(path) { - stop() - contentLoader.source = "ContentImage.qml" - videoFramePaintedConnection.target = null - contentLoader.item.source = path - updateSource() - } - - function openVideo(path) { - stop() - contentLoader.source = "ContentVideo.qml" - videoFramePaintedConnection.target = contentLoader.item - contentLoader.item.mediaSource = path - contentLoader.item.volume = volume - contentLoader.item.play() - updateSource() - } - - function openCamera() { - stop() - contentLoader.source = "ContentCamera.qml" - videoFramePaintedConnection.target = contentLoader.item - updateSource() - } - - function stop() { - if (contentLoader.source == "ContentVideo.qml") - contentLoader.item.stop() - theSource.sourceItem = null - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentCamera.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentCamera.qml deleted file mode 100644 index 00bc038a3..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentCamera.qml +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtMultimedia - -VideoOutput { - source: camera - - Camera { - id: camera - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml deleted file mode 100644 index a0d1083a6..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentImage.qml +++ /dev/null @@ -1,56 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Image { - fillMode: Image.PreserveAspectFit - smooth: true -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml deleted file mode 100644 index 13872c959..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ContentVideo.qml +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtMultimedia - -VideoOutput { - id: video - property alias mediaSource: mediaPlayer.source - property alias volume: mediaPlayer.volume - property bool isRunning: true - - MediaPlayer { - id: mediaPlayer - autoPlay: true - volume: 0.5 - loops: Audio.Infinite - videoOutput: video - audioOutput: AudioOutput { - - } - } - - function play() { mediaPlayer.play() } - function pause() { mediaPlayer.pause() } - function stop() { mediaPlayer.stop() } - - function toggleplay() { - if (isRunning) { - pause() - isRunning = false - } else { - play() - isRunning = true - } - } - - MouseArea { - anchors.fill: parent - onClicked: toggleplay() - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml deleted file mode 100644 index 57b611bff..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Curtain.qml +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Rectangle { - id: root - color: "transparent" - radius: 5 - property alias value: grip.value - property color gripColor: "transparent" - property real gripSize: 20 - property real gripTolerance: 3.0 - property real increment: 0.1 - property bool enabled: true - property string imageSource: "qrc:/images/Triangle_Top.png" - - Rectangle { - id: grip - property real value: 0.5 - x: (value * parent.width) - width/2 - anchors.verticalCenter: parent.verticalCenter - width: root.gripTolerance * root.gripSize - height: width - radius: width/2 - color: "transparent" - - Image { - id: sliderhandleimage - source: imageSource - anchors.centerIn: parent - } - - MouseArea { - id: mouseArea - enabled: root.enabled - anchors.fill: parent - drag { - target: grip - axis: Drag.XAxis - minimumX: -parent.width/2 - maximumX: root.width - parent.width/2 - } - onPositionChanged: { - if (drag.active) - updatePosition() - } - onReleased: { - updatePosition() - } - function updatePosition() { - value = (grip.x + grip.width/2) / grip.parent.width - } - } - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml deleted file mode 100644 index d468b7a85..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Divider.qml +++ /dev/null @@ -1,95 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Rectangle { - id: root - anchors.fill: parent - color: "transparent" - property alias value: slider.value - property alias lineWidth: line.width - property alias gripSize: slider.gripSize - - Rectangle { - id: line - anchors { top: parent.top; bottom: parent.bottom } - x: parent.value * parent.width - (width / 2) - width: 4 - color: "#14aaff" - } - - // topgrip - Curtain { - id: slider - increment: 0.0 - anchors { - top: parent.top - topMargin: (gripSize / 2) + 5 - left: parent.left - right: parent.right - } - onValueChanged: slider2.value = slider.value - } - - // bottomgrip - Curtain { - id: slider2 - increment: 0.0 - anchors { - bottom: parent.bottom - bottomMargin: (gripSize / 2) + 5 - left: parent.left - right: parent.right - } - imageSource: "qrc:/images/Triangle_bottom.png" - onValueChanged: slider.value = slider2.value - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml deleted file mode 100644 index 32cda5c7d..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Effect.qml +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -ShaderEffect { - property variant source - property ListModel parameters: ListModel { } - property bool divider: true - property real dividerValue: 0.5 - property real targetWidth: 0 - property real targetHeight: 0 - property string fragmentShaderFilename - property string vertexShaderFilename - - QtObject { - id: d - property string fragmentShaderCommon: " - #ifdef GL_ES - precision mediump float; - #else - # define lowp - # define mediump - # define highp - #endif // GL_ES - " - } - - // The following is a workaround for the fact that ShaderEffect - // doesn't provide a way for shader programs to be read from a file, - // rather than being inline in the QML file - - onFragmentShaderFilenameChanged: - fragmentShader = d.fragmentShaderCommon + fileReader.readFile(":shaders/" + fragmentShaderFilename) - onVertexShaderFilenameChanged: - vertexShader = fileReader.readFile(vertexShaderFilename) -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml deleted file mode 100644 index 514387548..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBillboard.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Grid Spacing" - value: 0.5 - } - onDataChanged: updateGrid() - } - - function updateGrid() - { - grid = parameters.get(0).value * 10; - } - - // Transform slider values, and bind result to shader uniforms - property real grid: 5.0 - - property real step_x: 0.0015625 - property real step_y: targetHeight ? (step_x * targetWidth / targetHeight) : 0.0 - - fragmentShaderFilename: "billboard.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml deleted file mode 100644 index 140d7eb80..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectBlackAndWhite.qml +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Threshold" - value: 0.5 - } - onDataChanged: updateThreshold() - } - - function updateThreshold() - { - threshold = parameters.get(0).value; - } - // Transform slider values, and bind result to shader uniforms - property real threshold: 0.5 - - fragmentShaderFilename: "blackandwhite.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml deleted file mode 100644 index 57f3c1a99..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectEmboss.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - fragmentShaderFilename: "emboss.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml deleted file mode 100644 index 2a94a7f50..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGaussianBlur.qml +++ /dev/null @@ -1,114 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20100909/shader-library-gaussian-blur-post-processing-filter-in-glsl/ - -import QtQuick - -Item { - id: root - property bool divider: true - property real dividerValue: 0.5 - property ListModel parameters: ListModel { - ListElement { - name: "Radius" - value: 0.5 - } - onDataChanged: updateBlurSize() - } - - function updateBlurSize() - { - if ((targetHeight > 0) && (targetWidth > 0)) - { - verticalBlurSize = 4.0 * parameters.get(0).value / targetHeight; - horizontalBlurSize = 4.0 * parameters.get(0).value / targetWidth; - } - } - - property alias targetWidth: verticalShader.targetWidth - property alias targetHeight: verticalShader.targetHeight - property alias source: verticalShader.source - property alias horizontalBlurSize: horizontalShader.blurSize - property alias verticalBlurSize: verticalShader.blurSize - - - Effect { - id: verticalShader - anchors.fill: parent - dividerValue: parent.dividerValue - property real blurSize: 0.0 - - onTargetHeightChanged: { - updateBlurSize() - } - onTargetWidthChanged: { - updateBlurSize() - } - fragmentShaderFilename: "gaussianblur_v.fsh" - } - - Effect { - id: horizontalShader - anchors.fill: parent - dividerValue: parent.dividerValue - property real blurSize: 0.0 - fragmentShaderFilename: "gaussianblur_h.fsh" - source: horizontalShaderSource - - ShaderEffectSource { - id: horizontalShaderSource - sourceItem: verticalShader - smooth: true - hideSource: true - } - } -} - diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGlow.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGlow.qml deleted file mode 100644 index eeca22c97..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectGlow.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - fragmentShaderFilename: "glow.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml deleted file mode 100644 index 26ffeb42b..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectIsolate.qml +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Hue" - value: 0.5 - } - ListElement { - name: "Width" - value: 0.5 - } - onDataChanged: updateParameters() - } - - function updateParameters() - { - targetHue = parameters.get(0).value * 360 - windowWidth = parameters.get(1).value * 60 - } - - // Transform slider values, and bind result to shader uniforms - property real targetHue: 0.5 * 360 - property real windowWidth: 0.5 * 60 - - fragmentShaderFilename: "isolate.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml deleted file mode 100644 index e5c86f2c5..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectMagnify.qml +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Window - -Effect { - id: root - divider: false - parameters: ListModel { - ListElement { - name: "Radius" - value: 0.5 - } - ListElement { - name: "Diffraction" - value: 0.5 - } - onDataChanged: updateParameters() - } - - function updateParameters() - { - radius = parameters.get(0).value * 100; - diffractionIndex = parameters.get(1).value; - } - - property real posX: -1 - property real posY: -1 - property real pixDens: Screen.pixelDensity - - QtObject { - id: d - property real oldTargetWidth: root.targetWidth - property real oldTargetHeight: root.targetHeight - } - - // Transform slider values, and bind result to shader uniforms - property real radius: 0.5 * 100 - property real diffractionIndex: 0.5 - - onTargetWidthChanged: { - if (posX == -1) - posX = targetWidth / 2 - else if (d.oldTargetWidth != 0) - posX *= (targetWidth / d.oldTargetWidth) - d.oldTargetWidth = targetWidth - } - - onTargetHeightChanged: { - if (posY == -1) - posY = targetHeight / 2 - else if (d.oldTargetHeight != 0) - posY *= (targetHeight / d.oldTargetHeight) - d.oldTargetHeight = targetHeight - } - - fragmentShaderFilename: "magnify.fsh" - - MouseArea { - anchors.fill: parent - onPositionChanged: { root.posX = mouse.x; root.posY = root.targetHeight - mouse.y } - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml deleted file mode 100644 index 6788bafbb..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPageCurl.qml +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - divider: false - parameters: ListModel { - ListElement { - name: "Extent" - value: 0.5 - } - onDataChanged: updateParameters() - } - - function updateParameters() - { - curlExtent = 1.0 - parameters.get(0).value; - } - - // Transform slider values, and bind result to shader uniforms - property real curlExtent: 0.5 - - fragmentShaderFilename: "pagecurl.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml deleted file mode 100644 index 5d2ac2fbc..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPassThrough.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - divider: false -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml deleted file mode 100644 index 760751801..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPixelate.qml +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Granularity" - value: 0.5 - } - onDataChanged: updateParameters() - } - - function updateParameters() - { - granularity = parameters.get(0).value * 20.0; - } - - // Transform slider values, and bind result to shader uniforms - property real granularity: 0.5 * 20 - - fragmentShaderFilename: "pixelate.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml deleted file mode 100644 index a0f2d6577..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectPosterize.qml +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Gamma" - value: 0.5 - } - onDataChanged: updateParameters() - } - - function updateParameters() - { - gamma = parameters.get(0).value; - } - - // Transform slider values, and bind result to shader uniforms - property real gamma: 0.5 - - property real numColors: 8.0 - - fragmentShaderFilename: "posterize.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml deleted file mode 100644 index b1c69fcad..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectRipple.qml +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Window - -Effect { - parameters: ListModel { - ListElement { - name: "Amplitude" - value: 0.5 - } - ListElement { - name: "Frequency" - value: 0.5 - } - onDataChanged: updateParameters() - } - - function updateParameters() - { - amplitude = parameters.get(0).value * 0.03; - n = parameters.get(1).value * 7; - } - - // Transform slider values, and bind result to shader uniforms - property real amplitude: 0.5 * 0.03 - property real n: 0.5 * 7 - property real pixDens: Screen.pixelDensity - - property real time: 0 - NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } - - fragmentShaderFilename: "ripple.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml deleted file mode 100644 index f14244dab..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSelectionList.qml +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -ListModel { - id: sources - ListElement { name: "No effect"; source: "EffectPassThrough.qml" } - ListElement { name: "Billboard"; source: "EffectBillboard.qml" } - ListElement { name: "Black & white"; source: "EffectBlackAndWhite.qml" } - ListElement { name: "Blur"; source: "EffectGaussianBlur.qml" } - ListElement { name: "Edge detection"; source: "EffectSobelEdgeDetection1.qml" } - ListElement { name: "Emboss"; source: "EffectEmboss.qml" } - ListElement { name: "Glow"; source: "EffectGlow.qml" } - ListElement { name: "Isolate"; source: "EffectIsolate.qml" } - ListElement { name: "Magnify"; source: "EffectMagnify.qml" } - ListElement { name: "Page curl"; source: "EffectPageCurl.qml" } - ListElement { name: "Pixelate"; source: "EffectPixelate.qml" } - ListElement { name: "Posterize"; source: "EffectPosterize.qml" } - ListElement { name: "Ripple"; source: "EffectRipple.qml" } - ListElement { name: "Sepia"; source: "EffectSepia.qml" } - ListElement { name: "Sharpen"; source: "EffectSharpen.qml" } - ListElement { name: "Shockwave"; source: "EffectShockwave.qml" } - ListElement { name: "Tilt shift"; source: "EffectTiltShift.qml" } - ListElement { name: "Toon"; source: "EffectToon.qml" } - ListElement { name: "Warhol"; source: "EffectWarhol.qml" } - ListElement { name: "Wobble"; source: "EffectWobble.qml" } - ListElement { name: "Vignette"; source: "EffectVignette.qml" } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSepia.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSepia.qml deleted file mode 100644 index 4f301476c..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSepia.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - fragmentShaderFilename: "sepia.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml deleted file mode 100644 index ce56c519a..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSharpen.qml +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Sharpness" - value: 0.5 - } - onDataChanged: updateParameters() - } - - function updateParameters() - { - amount = parameters.get(0).value * 18; - } - - // Transform slider values, and bind result to shader uniforms - property real amount: 0.5 * 18 - - fragmentShaderFilename: "sharpen.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml deleted file mode 100644 index a02c2770a..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectShockwave.qml +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - id: root - parameters: ListModel { - ListElement { - name: "Amplitude" - value: 0.5 - } - onDataChanged: updateParameters() - } - - function updateParameters() - { - granularity = parameters.get(0).value * 20; - weight = parameters.get(0).value; - } - - // Transform slider values, and bind result to shader uniforms - property real granularity: 0.5 * 20 - property real weight: 0.5 - - property real centerX - property real centerY - property real time - - SequentialAnimation { - running: true - loops: Animation.Infinite - ScriptAction { - script: { - centerX = Math.random() - centerY = Math.random() - } - } - NumberAnimation { - target: root - property: "time" - from: 0 - to: 1 - duration: 1000 - } - } - - fragmentShaderFilename: "shockwave.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml deleted file mode 100644 index de49be1a1..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectSobelEdgeDetection1.qml +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Threshold" - value: 0.5 - } - onDataChanged: updateMixLevel() - } - - function updateMixLevel() - { - mixLevel = parameters.get(0).value; - } - - // Transform slider values, and bind result to shader uniforms - property real mixLevel: 0.5 - property real targetSize: 250 - (200 * mixLevel) // TODO: fix ... - property real resS: targetSize - property real resT: targetSize - - fragmentShaderFilename: "sobeledgedetection1.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml deleted file mode 100644 index f574dffab..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectTiltShift.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - fragmentShaderFilename: "tiltshift.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml deleted file mode 100644 index 1395a150a..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectToon.qml +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Threshold" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real threshold: parameters.get(0).value - property real targetSize: 250 - (200 * threshold) // TODO: fix ... - property real resS: targetSize - property real resT: targetSize - - // TODO - property real magTol: 0.3 - property real quantize: 8.0 - - fragmentShaderFilename: "toon.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectVignette.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectVignette.qml deleted file mode 100644 index b011fc643..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectVignette.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - fragmentShaderFilename: "vignette.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml deleted file mode 100644 index 0dcde6b1b..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWarhol.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - fragmentShaderFilename: "warhol.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml deleted file mode 100644 index 8a7381225..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/EffectWobble.qml +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Effect { - parameters: ListModel { - ListElement { - name: "Amplitude" - value: 0.5 - } - } - - // Transform slider values, and bind result to shader uniforms - property real amplitude: parameters.get(0).value * 0.05 - - property real frequency: 20 - property real time: 0 - - NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } - - fragmentShaderFilename: "wobble.fsh" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml deleted file mode 100644 index 19e14997f..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileBrowser.qml +++ /dev/null @@ -1,392 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import Qt.labs.folderlistmodel 2.1 - -Rectangle { - id: fileBrowser - color: "transparent" - z: 4 - - property string folder - property bool shown: loader.sourceComponent - - signal fileSelected(string file) - - function selectFile(file) { - if (file !== "") { - folder = loader.item.folders.folder - fileBrowser.fileSelected(file) - } - loader.sourceComponent = undefined - } - - Loader { - id: loader - } - - function show() { - loader.sourceComponent = fileBrowserComponent - loader.item.parent = fileBrowser - loader.item.anchors.fill = fileBrowser - loader.item.folder = fileBrowser.folder - } - - Component { - id: fileBrowserComponent - - Rectangle { - id: root - color: "black" - property bool showFocusHighlight: false - property variant folders: folders1 - property variant view: view1 - property alias folder: folders1.folder - property color textColor: "white" - - FolderListModel { - id: folders1 - folder: folder - } - - FolderListModel { - id: folders2 - folder: folder - } - - SystemPalette { - id: palette - } - - Component { - id: folderDelegate - - Rectangle { - id: wrapper - function launch() { - var path = "file://"; - if (filePath.length > 2 && filePath[1] === ':') // Windows drive logic, see QUrl::fromLocalFile() - path += '/'; - path += filePath; - if (folders.isFolder(index)) - down(path); - else - fileBrowser.selectFile(path) - } - width: root.width - height: itemHeight - color: "transparent" - - Rectangle { - id: highlight; visible: false - anchors.fill: parent - color: palette.highlight - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - } - - Item { - width: itemHeight; height: itemHeight - Image { - source: "qrc:/images/icon_Folder.png" - fillMode: Image.PreserveAspectFit - anchors.fill: parent - anchors.margins: scaledMargin - visible: folders.isFolder(index) - } - } - - Text { - id: nameText - anchors.fill: parent; verticalAlignment: Text.AlignVCenter - text: fileName - anchors.leftMargin: itemHeight + scaledMargin - font.pixelSize: fontSize - color: (wrapper.ListView.isCurrentItem && root.showFocusHighlight) ? palette.highlightedText : textColor - elide: Text.ElideRight - } - - MouseArea { - id: mouseRegion - anchors.fill: parent - onPressed: { - root.showFocusHighlight = false; - wrapper.ListView.view.currentIndex = index; - } - onClicked: { if (folders == wrapper.ListView.view.model) launch() } - } - - states: [ - State { - name: "pressed" - when: mouseRegion.pressed - PropertyChanges { target: highlight; visible: true } - PropertyChanges { target: nameText; color: palette.highlightedText } - } - ] - } - } - - ListView { - id: view1 - anchors.top: titleBar.bottom - anchors.bottom: cancelButton.top - x: 0 - width: parent.width - model: folders1 - delegate: folderDelegate - highlight: Rectangle { - color: palette.highlight - visible: root.showFocusHighlight && view1.count != 0 - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - width: view1.currentItem == null ? 0 : view1.currentItem.width - } - highlightMoveVelocity: 1000 - pressDelay: 100 - focus: true - state: "current" - states: [ - State { - name: "current" - PropertyChanges { target: view1; x: 0 } - }, - State { - name: "exitLeft" - PropertyChanges { target: view1; x: -root.width } - }, - State { - name: "exitRight" - PropertyChanges { target: view1; x: root.width } - } - ] - transitions: [ - Transition { - to: "current" - SequentialAnimation { - NumberAnimation { properties: "x"; duration: 250 } - } - }, - Transition { - NumberAnimation { properties: "x"; duration: 250 } - NumberAnimation { properties: "x"; duration: 250 } - } - ] - Keys.onPressed: root.keyPressed(event.key) - } - - ListView { - id: view2 - anchors.top: titleBar.bottom - anchors.bottom: parent.bottom - x: parent.width - width: parent.width - model: folders2 - delegate: folderDelegate - highlight: Rectangle { - color: palette.highlight - visible: root.showFocusHighlight && view2.count != 0 - gradient: Gradient { - GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } - } - width: view1.currentItem == null ? 0 : view1.currentItem.width - } - highlightMoveVelocity: 1000 - pressDelay: 100 - states: [ - State { - name: "current" - PropertyChanges { target: view2; x: 0 } - }, - State { - name: "exitLeft" - PropertyChanges { target: view2; x: -root.width } - }, - State { - name: "exitRight" - PropertyChanges { target: view2; x: root.width } - } - ] - transitions: [ - Transition { - to: "current" - SequentialAnimation { - NumberAnimation { properties: "x"; duration: 250 } - } - }, - Transition { - NumberAnimation { properties: "x"; duration: 250 } - } - ] - Keys.onPressed: root.keyPressed(event.key) - } - - Button { - id: cancelButton - width: itemWidth - height: itemHeight - color: "#353535" - anchors { bottom: parent.bottom; right: parent.right; margins: 5 * scaledMargin } - text: "Cancel" - horizontalAlign: Text.AlignHCenter - onClicked: fileBrowser.selectFile("") - } - - Keys.onPressed: { - root.keyPressed(event.key); - if (event.key === Qt.Key_Return || event.key === Qt.Key_Select || event.key === Qt.Key_Right) { - view.currentItem.launch(); - event.accepted = true; - } else if (event.key === Qt.Key_Left) { - up(); - } - } - - // titlebar - Rectangle { - color: "black" - width: parent.width; - height: itemHeight - id: titleBar - - Rectangle { - id: upButton - width: titleBar.height - height: titleBar.height - color: "transparent" - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - anchors.margins: scaledMargin - - Image { anchors.fill: parent; anchors.margins: scaledMargin; source: "qrc:/images/icon_BackArrow.png" } - MouseArea { id: upRegion; anchors.fill: parent; onClicked: up() } - states: [ - State { - name: "pressed" - when: upRegion.pressed - PropertyChanges { target: upButton; color: palette.highlight } - } - ] - } - - Text { - anchors.left: upButton.right; anchors.right: parent.right; height: parent.height - anchors.leftMargin: 10; anchors.rightMargin: 4 - text: folders.folder - color: "white" - elide: Text.ElideLeft; horizontalAlignment: Text.AlignLeft; verticalAlignment: Text.AlignVCenter - font.pixelSize: fontSize - } - } - - Rectangle { - color: "#353535" - width: parent.width - height: 1 - anchors.top: titleBar.bottom - } - - function down(path) { - if (folders == folders1) { - view = view2 - folders = folders2; - view1.state = "exitLeft"; - } else { - view = view1 - folders = folders1; - view2.state = "exitLeft"; - } - view.x = root.width; - view.state = "current"; - view.focus = true; - folders.folder = path; - } - - function up() { - var path = folders.parentFolder; - if (path.toString().length === 0 || path.toString() === 'file:') - return; - if (folders == folders1) { - view = view2 - folders = folders2; - view1.state = "exitRight"; - } else { - view = view1 - folders = folders1; - view2.state = "exitRight"; - } - view.x = -root.width; - view.state = "current"; - view.focus = true; - folders.folder = path; - } - - function keyPressed(key) { - switch (key) { - case Qt.Key_Up: - case Qt.Key_Down: - case Qt.Key_Left: - case Qt.Key_Right: - root.showFocusHighlight = true; - break; - default: - // do nothing - break; - } - } - } - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml deleted file mode 100644 index f4b660f06..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/FileOpen.qml +++ /dev/null @@ -1,162 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Rectangle { - id: root - color: "#151515" - signal openCamera - signal openImage - signal openVideo - signal close - - - Rectangle { - id: menuField - height: itemHeight - width: itemHeight - color: "transparent" - anchors.right: parent.right - Image { - id: menu - source: "qrc:///images/icon_Menu.png" - anchors { - right: parent.right - top: parent.top - margins: scaledMargin - } - } - MouseArea { - anchors.fill: parent - onClicked: fileOpen.state == "expanded" ? fileOpen.state = "collapsed" : fileOpen.state = "expanded" - } - } - - Column { - anchors { - top: menuField.bottom - right: parent.right - left: parent.left - bottom: parent.bottom - topMargin: 10 - } - - spacing: 10 - visible: fileOpen.state == "expanded" - - Rectangle { - width: 0.9 * parent.width - height: 1 - color: "#353535" - anchors.left: parent.left - } - Button { - text: "Start camera" - height: itemHeight - width: parent.width - onClicked: { - fileOpen.state = "collapsed" - root.openCamera() - } - } - Rectangle { - width: 0.9 * parent.width - height: 1 - color: "#353535" - anchors.left: parent.left - } - Button { - text: "Open image" - height: itemHeight - width: parent.width - onClicked: { - fileOpen.state = "collapsed" - root.openImage() - } - } - Rectangle { - width: 0.9 * parent.width - height: 1 - color: "#353535" - anchors.left: parent.left - } - Button { - text: "Open video" - height: itemHeight - width: parent.width - onClicked: { - fileOpen.state = "collapsed" - root.openVideo() - } - } - Rectangle { - width: 0.9 * parent.width - height: 1 - color: "#353535" - anchors.left: parent.left - } - Button { - text: "Reset" - height: itemHeight - width: parent.width - onClicked: { - fileOpen.state = "collapsed" - root.close() - } - } - Rectangle { - width: 0.9 * parent.width - height: 1 - color: "#353535" - anchors.left: parent.left - } - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml deleted file mode 100644 index 8b837dabe..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/HintedMouseArea.qml +++ /dev/null @@ -1,122 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Mouse area which flashes to indicate its location on the screen - -import QtQuick - -MouseArea { - property alias hintColor: hintRect.color - property bool hintEnabled: true - - Rectangle { - id: hintRect - anchors.fill: parent - color: "yellow" - opacity: 0 - - states: [ - State { - name: "high" - PropertyChanges { - target: hintRect - opacity: 0.8 - } - }, - State { - name: "low" - PropertyChanges { - target: hintRect - opacity: 0.4 - } - } - ] - - transitions: [ - Transition { - from: "low" - to: "high" - SequentialAnimation { - NumberAnimation { - properties: "opacity" - easing.type: Easing.InOutSine - duration: 500 - } - ScriptAction { script: hintRect.state = "low" } - } - }, - Transition { - from: "*" - to: "low" - SequentialAnimation { - NumberAnimation { - properties: "opacity" - easing.type: Easing.InOutSine - duration: 500 - } - ScriptAction { script: hintRect.state = "high" } - } - }, - Transition { - from: "*" - to: "baseState" - NumberAnimation { - properties: "opacity" - easing.type: Easing.InOutSine - duration: 500 - } - } - ] - } - - onHintEnabledChanged: hintRect.state = hintEnabled ? "low" : "baseState" - - Component.onCompleted: hintRect.state = "low" -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml deleted file mode 100644 index c94e7a38f..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Main.qml +++ /dev/null @@ -1,296 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Window - -Rectangle { - id: root - color: "black" - property string fileName - property alias volume: content.volume - property bool perfMonitorsLogging: false - property bool perfMonitorsVisible: false - property int pixDens: Math.ceil(Screen.pixelDensity) - property int itemWidth: 25 * pixDens - property int itemHeight: 10 * pixDens - property int windowWidth: Screen.desktopAvailableWidth - property int windowHeight: Screen.desktopAvailableHeight - property int scaledMargin: 2 * pixDens - property int fontSize: 5 * pixDens - - QtObject { - id: d - property real gripSize: 20 - } - - Content { - id: content - color: "transparent" - anchors { - top: parent.top - left: parent.left - right: parent.right - bottom: parameterPanel.top - margins: scaledMargin - leftMargin: scaledMargin + itemHeight - } - gripSize: d.gripSize - } - - ParameterPanel { - id: parameterPanel - anchors { - left: parent.left - right: effectName.left - bottom: parent.bottom - margins: scaledMargin - leftMargin: scaledMargin + itemHeight - } - gripSize: d.gripSize - height: root.itemHeight * 2.5 - width: root.itemWidth * 3 - } - - Button { - id: effectName - anchors { - right: parent.right - bottom: perfHolder.top - margins: scaledMargin - } - - text: "No effect" - width: itemWidth * 2 - height: itemHeight - onClicked: { - effectName.visible = false - listview.visible = true - lvbg.visible = true - } - color: "#303030" - } - - Rectangle { - id: lvbg - width: itemWidth * 2 - color: "black" - opacity: 0.8 - visible: false - - anchors { - right: parent.right - bottom: perfHolder.top - top: parent.top - margins: scaledMargin - } - - ListView { - id: listview - width: itemWidth * 2 - anchors.fill: parent - visible: false - - model: EffectSelectionList {} - delegate: effectDelegate - - clip: true - focus: true - - Component { - id: effectDelegate - Button { - text: name - width: itemWidth * 2 - onClicked: { - content.effectSource = source - listview.visible = false - lvbg.visible = false - effectName.text = name - effectName.visible = true - parameterPanel.model = content.effect.parameters - - } - } - } - } - } - - Rectangle { - id: perfHolder - color: "transparent" - anchors { - right: parent.right - bottom: parent.bottom - margins: scaledMargin - } - height: root.itemHeight * 1.5 - width: root.itemWidth - - Loader { - id: performanceLoader - function init() { - var enabled = root.perfMonitorsLogging || root.perfMonitorsVisible - source = enabled ? "../performancemonitor/PerformanceItem.qml" : "" - } - onLoaded: { - item.parent = perfHolder - item.anchors.top = perfHolder.top - item.anchors.bottom = perfHolder.bottom - item.anchors.left = perfHolder.left - item.anchors.right = perfHolder.right - item.logging = root.perfMonitorsLogging - item.displayed = root.perfMonitorsVisible - item.init() - } - } - } - - FileOpen { - id: fileOpen - state: "collapsed" - anchors { - left: parent.left - top: parent.top - bottom: parent.bottom - margins: scaledMargin - } - width: itemHeight + scaledMargin - z: 2 - opacity: 0.9 - - states: [ - State { - name: "expanded" - PropertyChanges { - target: fileOpen - width: itemWidth * 1.5 - opacity: 0.8 - } - }, - State { - name: "collapsed" - PropertyChanges { - target: fileOpen - width: itemHeight + scaledMargin - opacity: 0.9 - } - } - ] - - transitions: [ - Transition { - NumberAnimation { target: fileOpen; property: "width"; duration: 100 } - NumberAnimation { target: fileOpen; property: "opacity"; duration: 100 } - } - ] - } - - FileBrowser { - id: imageFileBrowser - anchors.fill: root - Component.onCompleted: fileSelected.connect(content.openImage) - } - - FileBrowser { - id: videoFileBrowser - anchors.fill: root - Component.onCompleted: fileSelected.connect(content.openVideo) - } - - Component.onCompleted: { - fileOpen.openImage.connect(openImage) - fileOpen.openVideo.connect(openVideo) - fileOpen.openCamera.connect(openCamera) - fileOpen.close.connect(close) - } - - function init() { - if (Qt.platform.os === "linux" || Qt.platform.os === "windows" || Qt.platform.os === "osx" || Qt.platform.os === "unix") { - if (Screen.desktopAvailableWidth > 1280) { - windowWidth = 1280 - } - if (Screen.desktopAvailableHeight > 720) { - windowHeight = 720 - } - } - - height = windowHeight - width = windowWidth - - imageFileBrowser.folder = imagePath - videoFileBrowser.folder = videoPath - content.init() - performanceLoader.init() - if (fileName != "") - content.openVideo(fileName) - } - - function qmlFramePainted() { - if (performanceLoader.item) - performanceLoader.item.qmlFramePainted() - } - - function openImage() { - imageFileBrowser.show() - } - - function openVideo() { - videoFileBrowser.show() - } - - function openCamera() { - content.openCamera() - } - - function close() { - content.init() - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml deleted file mode 100644 index 1e16d8d3e..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/ParameterPanel.qml +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Rectangle { - id: root - color: "transparent" - height: view.model.count * sliderHeight - property color lineColor: "black" - property real gripSize: 25 - property real spacing: 20 - property real sliderHeight: 60 - - property ListModel model: ListModel { } - - anchors.topMargin: 10 - - Component { - id: editDelegate - - Rectangle { - id: delegate - width: parent.width - height: root.sliderHeight - color: "transparent" - - Text { - id: text - text: name - color: "white" - anchors { - top: parent.top - bottom: parent.bottom - left: parent.left - } - font.pixelSize: fontSize - horizontalAlignment: Text.AlignRight - verticalAlignment: Text.AlignVCenter - width: 8 * fontSize - } - - Slider { - anchors { - top: parent.top - bottom: parent.bottom - left: text.right - leftMargin: 20 - right: parent.right - rightMargin: 20 - } - gripSize: root.gripSize - value: model.value - onValueChanged: view.model.setProperty(index, "value", value) - } - } - } - - ListView { - id: view - anchors.fill: parent - model: root.model - delegate: editDelegate - interactive: false - } -} diff --git a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml b/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml deleted file mode 100644 index d89e3459d..000000000 --- a/examples/multimedia/video/qmlvideofx/qml/qmlvideofx/Slider.qml +++ /dev/null @@ -1,131 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick - -Rectangle { - id: root - color: "transparent" - radius: 5 - property alias value: grip.value - property color fillColor: "#14aaff" - property real gripSize: 40 - property real gripTolerance: 3.0 - property real increment: 0.1 - property bool enabled: true - - Rectangle { - id: slider - anchors { - left: parent.left - right: parent.right - verticalCenter: parent.verticalCenter - } - height: 10 - color: "transparent" - - BorderImage { - id: sliderbarimage - source: "qrc:/images/Slider_bar.png" - anchors { fill: parent; margins: 1 } - border.right: 5 - border.left: 5 - } - Rectangle { - height: parent.height -2 - anchors.left: parent.left - anchors.right: grip.horizontalCenter - color: root.fillColor - radius: 3 - border.width: 1 - border.color: Qt.darker(color, 1.3) - opacity: 0.8 - } - Rectangle { - id: grip - property real value: 0.5 - x: (value * parent.width) - width/2 - anchors.verticalCenter: parent.verticalCenter - width: root.gripTolerance * root.gripSize - height: width - radius: width/2 - color: "transparent" - - Image { - id: sliderhandleimage - source: "qrc:/images/Slider_handle.png" - anchors.centerIn: parent - } - - MouseArea { - id: mouseArea - enabled: root.enabled - anchors.fill: parent - drag { - target: grip - axis: Drag.XAxis - minimumX: -parent.width/2 - maximumX: root.width - parent.width/2 - } - onPositionChanged: { - if (drag.active) - updatePosition() - } - onReleased: { - updatePosition() - } - function updatePosition() { - value = (grip.x + grip.width/2) / slider.width - } - } - } - - } -} diff --git a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp b/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp deleted file mode 100644 index 27102b0c5..000000000 --- a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.cpp +++ /dev/null @@ -1,138 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include "qmlapplicationviewer.h" - -#include <QtCore/QDir> -#include <QtCore/QFileInfo> -#include <QtQml/QQmlComponent> -#include <QtQml/QQmlEngine> -#include <QtQml/QQmlContext> -#include <QtGui/QGuiApplication> - -class QmlApplicationViewerPrivate -{ - QmlApplicationViewerPrivate(QQuickView *view_) : view(view_) {} - - QString mainQmlFile; - QQuickView *view; - friend class QmlApplicationViewer; - QString adjustPath(const QString &path); -}; - -QString QmlApplicationViewerPrivate::adjustPath(const QString &path) -{ -#ifdef Q_OS_UNIX -#ifdef Q_OS_MAC - if (!QDir::isAbsolutePath(path)) - return QCoreApplication::applicationDirPath() - + QLatin1String("/../Resources/") + path; -#else - QString pathInInstallDir; - const QString applicationDirPath = QCoreApplication::applicationDirPath(); - pathInInstallDir = QString::fromLatin1("%1/../%2").arg(applicationDirPath, path); - - if (QFileInfo(pathInInstallDir).exists()) - return pathInInstallDir; -#endif -#endif - return path; -} - -QmlApplicationViewer::QmlApplicationViewer(QWindow *parent) - : QQuickView(parent) - , d(new QmlApplicationViewerPrivate(this)) -{ - connect(engine(), &QQmlEngine::quit, QCoreApplication::instance(), &QCoreApplication::quit); - setResizeMode(QQuickView::SizeRootObjectToView); -} - -QmlApplicationViewer::QmlApplicationViewer(QQuickView *view, QWindow *parent) - : QQuickView(parent) - , d(new QmlApplicationViewerPrivate(view)) -{ - connect(view->engine(), &QQmlEngine::quit, QCoreApplication::instance(), &QCoreApplication::quit); - view->setResizeMode(QQuickView::SizeRootObjectToView); -} - -QmlApplicationViewer::~QmlApplicationViewer() -{ - delete d; -} - -QmlApplicationViewer *QmlApplicationViewer::create() -{ - return new QmlApplicationViewer(); -} - -void QmlApplicationViewer::setMainQmlFile(const QString &file) -{ - d->mainQmlFile = d->adjustPath(file); - d->view->setSource(QUrl::fromLocalFile(d->mainQmlFile)); -} - -void QmlApplicationViewer::addImportPath(const QString &path) -{ - d->view->engine()->addImportPath(d->adjustPath(path)); -} - -void QmlApplicationViewer::showExpanded() -{ -#if defined(Q_WS_SIMULATOR) - d->view->showFullScreen(); -#else - d->view->show(); -#endif -} - -QGuiApplication *createApplication(int &argc, char **argv) -{ - return new QGuiApplication(argc, argv); -} diff --git a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h b/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h deleted file mode 100644 index 8af12477f..000000000 --- a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.h +++ /dev/null @@ -1,79 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef QMLAPPLICATIONVIEWER_H -#define QMLAPPLICATIONVIEWER_H - -#include <QtQuick/QQuickView> -#include <QtGui/QGuiApplication> - -class QmlApplicationViewer : public QQuickView -{ - Q_OBJECT - -public: - explicit QmlApplicationViewer(QWindow *parent = 0); - virtual ~QmlApplicationViewer(); - - static QmlApplicationViewer *create(); - - void setMainQmlFile(const QString &file); - void addImportPath(const QString &path); - - void showExpanded(); - -private: - explicit QmlApplicationViewer(QQuickView *view, QWindow *parent); - class QmlApplicationViewerPrivate *d; -}; - -QGuiApplication *createApplication(int &argc, char **argv); - -#endif // QMLAPPLICATIONVIEWER_H diff --git a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri b/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri deleted file mode 100644 index d9807943e..000000000 --- a/examples/multimedia/video/qmlvideofx/qmlapplicationviewer/qmlapplicationviewer.pri +++ /dev/null @@ -1,7 +0,0 @@ -QT += quick - -SOURCES += $$PWD/qmlapplicationviewer.cpp -HEADERS += $$PWD/qmlapplicationviewer.h -INCLUDEPATH += $$PWD - - diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.png b/examples/multimedia/video/qmlvideofx/qmlvideofx.png Binary files differdeleted file mode 100644 index 707d5c4e8..000000000 --- a/examples/multimedia/video/qmlvideofx/qmlvideofx.png +++ /dev/null diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.pro b/examples/multimedia/video/qmlvideofx/qmlvideofx.pro deleted file mode 100644 index fd43fb5b5..000000000 --- a/examples/multimedia/video/qmlvideofx/qmlvideofx.pro +++ /dev/null @@ -1,111 +0,0 @@ -TEMPLATE = app -TARGET = qmlvideofx - -QT += quick multimedia -android: qtHaveModule(androidextras) { - QT += androidextras - DEFINES += REQUEST_PERMISSIONS_ON_ANDROID -} - -DEFINES += \ - FREQUENCYMONITOR_SUPPORT \ - PERFORMANCEMONITOR_SUPPORT - -SOURCES += \ - main.cpp \ - filereader.cpp \ - frequencymonitor.cpp \ - frequencymonitordeclarative.cpp \ - performancemonitor.cpp \ - performancemonitordeclarative.cpp - -HEADERS += \ - filereader.h \ - frequencymonitor.h \ - performancemonitor.h \ - performancemonitordeclarative.h \ - trace.h - -resources.files = \ - images/Dropdown_arrows.png \ - images/Slider_bar.png \ - images/Slider_handle.png \ - images/Triangle_Top.png \ - images/Triangle_bottom.png \ - images/icon_BackArrow.png \ - images/icon_Folder.png \ - images/icon_Menu.png \ - images/qt-logo.png \ - qml/frequencymonitor/FrequencyItem.qml \ - qml/performancemonitor/PerformanceItem.qml \ - qml/qmlvideofx/Button.qml \ - qml/qmlvideofx/Content.qml \ - qml/qmlvideofx/ContentCamera.qml \ - qml/qmlvideofx/ContentImage.qml \ - qml/qmlvideofx/ContentVideo.qml \ - qml/qmlvideofx/Curtain.qml \ - qml/qmlvideofx/Divider.qml \ - qml/qmlvideofx/Effect.qml \ - qml/qmlvideofx/EffectBillboard.qml \ - qml/qmlvideofx/EffectBlackAndWhite.qml \ - qml/qmlvideofx/EffectEmboss.qml \ - qml/qmlvideofx/EffectGaussianBlur.qml \ - qml/qmlvideofx/EffectGlow.qml \ - qml/qmlvideofx/EffectIsolate.qml \ - qml/qmlvideofx/EffectMagnify.qml \ - qml/qmlvideofx/EffectPageCurl.qml \ - qml/qmlvideofx/EffectPassThrough.qml \ - qml/qmlvideofx/EffectPixelate.qml \ - qml/qmlvideofx/EffectPosterize.qml \ - qml/qmlvideofx/EffectRipple.qml \ - qml/qmlvideofx/EffectSelectionList.qml \ - qml/qmlvideofx/EffectSepia.qml \ - qml/qmlvideofx/EffectSharpen.qml \ - qml/qmlvideofx/EffectShockwave.qml \ - qml/qmlvideofx/EffectSobelEdgeDetection1.qml \ - qml/qmlvideofx/EffectTiltShift.qml \ - qml/qmlvideofx/EffectToon.qml \ - qml/qmlvideofx/EffectVignette.qml \ - qml/qmlvideofx/EffectWarhol.qml \ - qml/qmlvideofx/EffectWobble.qml \ - qml/qmlvideofx/FileBrowser.qml \ - qml/qmlvideofx/FileOpen.qml \ - qml/qmlvideofx/HintedMouseArea.qml \ - qml/qmlvideofx/Main.qml \ - qml/qmlvideofx/ParameterPanel.qml \ - qml/qmlvideofx/Slider.qml \ - shaders/billboard.fsh \ - shaders/blackandwhite.fsh \ - shaders/emboss.fsh \ - shaders/gaussianblur_h.fsh \ - shaders/gaussianblur_v.fsh \ - shaders/glow.fsh \ - shaders/isolate.fsh \ - shaders/magnify.fsh \ - shaders/pagecurl.fsh \ - shaders/pixelate.fsh \ - shaders/posterize.fsh \ - shaders/ripple.fsh \ - shaders/selectionpanel.fsh \ - shaders/sepia.fsh \ - shaders/sharpen.fsh \ - shaders/shockwave.fsh \ - shaders/sobeledgedetection1.fsh \ - shaders/tiltshift.fsh \ - shaders/toon.fsh \ - shaders/vignette.fsh \ - shaders/warhol.fsh \ - shaders/wobble.fsh - -resources.prefix = / - -RESOURCES += resources - -target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/video/qmlvideofx -INSTALLS += target - -QMAKE_INFO_PLIST = Info.plist - -EXAMPLE_FILES += \ - qmlvideofx.png \ - qmlvideofx.svg diff --git a/examples/multimedia/video/qmlvideofx/qmlvideofx.svg b/examples/multimedia/video/qmlvideofx/qmlvideofx.svg deleted file mode 100644 index 566acfada..000000000 --- a/examples/multimedia/video/qmlvideofx/qmlvideofx.svg +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - height="44px" - version="1.1" - viewBox="0 0 44 44" - width="44px" - x="0px" - y="0px" - id="svg2" - inkscape:version="0.47 r22583" - sodipodi:docname="qt.svg"> - <metadata - id="metadata18"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <defs - id="defs16"> - <inkscape:perspective - sodipodi:type="inkscape:persp3d" - inkscape:vp_x="0 : 22 : 1" - inkscape:vp_y="0 : 1000 : 0" - inkscape:vp_z="44 : 22 : 1" - inkscape:persp3d-origin="22 : 14.666667 : 1" - id="perspective2836" /> - </defs> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="1920" - inkscape:window-height="1020" - id="namedview14" - showgrid="false" - inkscape:zoom="21.454545" - inkscape:cx="49.412871" - inkscape:cy="21.894358" - inkscape:window-x="-4" - inkscape:window-y="-4" - inkscape:window-maximized="1" - inkscape:current-layer="g3" /> - <g - transform="matrix(0.18308778,0,0,0.18308778,6.6100946,3.2385199)" - id="g3"> - <path - d="M 43.09,0.3586 C 40.94,0.0036 38.84,-0.0824 36.81,0.0776 31.968136,0.39505671 27.122677,0.73638425 22.28,1.0696 9.62,2.0816 0,12.4996 0,26.8896 l 0,169.7 14.19,13.2 28.87,-209.42 0.03,-0.011 z" - style="fill:#006225" - id="path5" - sodipodi:nodetypes="cccccccc" /> - <path - d="m 174.4,160 c 0,12.5 -7.75,24.07 -17.57,25.77 L 14.23,209.73 V 25.93 C 14.23,9.21 27.57,-2.27 43.12,0.3 l 131.3,21.52 v 138.2 z" - style="fill:#80c342" - id="path7" /> - <path - d="m 154.9,80.96 -12.96,-0.598 0,0.278 6.945,0.32 6.016,0 z" - style="fill:#006225" - id="path11" /> - <path - d="m 144.6,135.6 c 0.66,0.328 1.43,0.476 2.351,0.476 0.161,0 0.329,-0.004 0.497,-0.016 2.55,-0.148 5.32,-0.933 8.343,-2.308 h -6.015 c -1.821,0.832 -3.532,1.457 -5.176,1.848 z" - style="fill:#006225" - id="path13" /> - <path - id="path17" - style="fill:#ffffff" - d="m 91.15,132.4 c 2.351,-6.051 3.511,-17.91 3.511,-35.62 0,-15.89 -1.148,-26.82 -3.484,-32.81 -2.336,-6.027 -5.832,-9.281 -10.52,-9.691 -0.359,-0.031 -0.714,-0.051 -1.058,-0.051 -4.34,0 -7.68,2.535 -10.01,7.625 -2.52,5.543 -3.793,17.04 -3.793,34.44 0,16.82 1.238,28.75 3.734,35.75 2.356,6.672 5.879,9.976 10.5,9.976 0.207,0 0.41,-0.008 0.621,-0.019 4.633,-0.293 8.121,-3.496 10.49,-9.602 m 17.98,3.75 c -4.117,9.707 -10.39,16.06 -18.99,19 0.867,4.449 2.176,7.441 3.922,9.019 1.351,1.211 3.433,1.821 6.222,1.821 0.805,0 1.668,-0.055 2.59,-0.157 v 13.12 l -5.961,0.782 c -1.758,0.23 -3.426,0.343 -5.004,0.343 -5.218,0 -9.445,-1.265 -12.62,-3.824 -4.207,-3.379 -7.308,-9.894 -9.297,-19.54 -9.136,-1.945 -16.26,-7.754 -21.19,-17.5 -5.004,-9.902 -7.551,-24.39 -7.551,-43.34 0,-20.43 3.484,-35.51 10.34,-45.07 5.789,-8.07 13.86,-12.04 24.02,-12.04 1.629,0 3.309,0.102 5.043,0.305 11.95,1.375 20.62,7.016 26.26,16.79 5.535,9.562 8.254,23.27 8.254,41.26 0,16.48 -2,29.45 -6.043,39.02 z M 130.4,45.91 l 11.52,1.238 0,20.21 12.96,0.914 0,12.68 -12.96,-0.598 0,46.33 c 0,4.032 0.445,6.625 1.34,7.789 0.8,1.067 2.046,1.594 3.71,1.594 0.161,0 0.329,-0.004 0.497,-0.016 2.55,-0.148 5.32,-0.933 8.343,-2.308 v 11.65 c -5.136,2.258 -10.18,3.598 -15.12,4.02 -0.718,0.055 -1.41,0.086 -2.078,0.086 -4.48,0 -7.906,-1.301 -10.25,-3.934 -2.73,-3.051 -4.09,-7.949 -4.09,-14.67 V 79.535 L 118.046,79.25 V 65.66 l 7.586,0.547 4.773,-20.3 z" /> - <path - d="m 100.3,166 c 0.809,0 1.672,-0.055 2.59,-0.157 H 98.054 C 98.73,165.949 99.507,166 100.3,166 z" - style="fill:#006225" - id="path19" /> - <path - id="path21" - style="fill:#006225" - d="m 84.85,63.98 c 2.336,5.997 3.484,16.92 3.484,32.81 0,17.7 -1.16,29.57 -3.512,35.62 -1.894,4.879 -4.527,7.902 -7.863,9.07 0.965,0.368 1.992,0.551 3.078,0.551 0.207,0 0.41,-0.008 0.621,-0.019 4.633,-0.293 8.121,-3.496 10.49,-9.602 2.351,-6.051 3.511,-17.91 3.511,-35.62 0,-15.89 -1.148,-26.82 -3.484,-32.81 -2.336,-6.027 -5.832,-9.281 -10.52,-9.691 -0.359,-0.031 -0.714,-0.051 -1.058,-0.051 -1.09,0 -2.117,0.16 -3.082,0.481 h -0.004 c 3.601,1.121 6.379,4.215 8.336,9.261 z m -2.344,114.3 c -0.113,-0.05 -0.227,-0.105 -0.336,-0.16 -0.012,-0.004 -0.023,-0.012 -0.035,-0.015 -0.102,-0.051 -0.207,-0.106 -0.309,-0.157 -0.019,-0.011 -0.039,-0.019 -0.058,-0.031 -0.09,-0.051 -0.184,-0.098 -0.278,-0.148 -0.027,-0.016 -0.054,-0.036 -0.086,-0.051 -0.082,-0.043 -0.164,-0.09 -0.242,-0.137 -0.039,-0.023 -0.078,-0.047 -0.113,-0.07 -0.07,-0.039 -0.145,-0.082 -0.215,-0.125 -0.047,-0.031 -0.094,-0.059 -0.14,-0.09 -0.059,-0.039 -0.118,-0.074 -0.176,-0.113 -0.059,-0.039 -0.114,-0.075 -0.168,-0.114 -0.051,-0.031 -0.102,-0.066 -0.149,-0.097 -0.066,-0.047 -0.132,-0.094 -0.195,-0.137 -0.039,-0.027 -0.078,-0.055 -0.113,-0.082 -0.078,-0.055 -0.153,-0.113 -0.231,-0.172 -0.023,-0.016 -0.05,-0.035 -0.078,-0.055 -0.098,-0.078 -0.199,-0.156 -0.297,-0.234 -4.207,-3.379 -7.308,-9.894 -9.297,-19.54 -9.136,-1.945 -16.26,-7.754 -21.19,-17.5 -5.004,-9.902 -7.551,-24.39 -7.551,-43.34 0,-20.43 3.484,-35.51 10.34,-45.07 5.789,-8.07 13.86,-12.04 24.02,-12.04 h -6.351 c -10.15,0.008 -18.22,3.977 -24,12.04 -6.855,9.563 -10.34,24.64 -10.34,45.07 0,18.95 2.547,33.44 7.551,43.34 4.934,9.75 12.05,15.56 21.19,17.5 1.989,9.641 5.09,16.16 9.297,19.54 3.176,2.559 7.403,3.824 12.62,3.824 0.098,0 0.199,0 0.297,-0.004 h 5.539 c -3.406,-0.05 -6.383,-0.66 -8.906,-1.828 L 82.498,178.28 z M 128.4,145.6 c -2.73,-3.051 -4.09,-7.949 -4.09,-14.67 V 79.57 l -6.226,-0.285 v -13.59 h -6.016 v 3.035 c 0.871,3.273 1.555,6.82 2.063,10.64 l 4.164,0.192 v 51.36 c 0,6.723 1.367,11.62 4.09,14.67 2.343,2.633 5.765,3.934 10.25,3.934 h 6.015 c -4.48,0 -7.906,-1.301 -10.25,-3.934 z m 2.043,-99.66 -6.016,0 -4.668,19.88 5.911,0.422 4.773,-20.3 z" /> - </g> -</svg> diff --git a/examples/multimedia/video/qmlvideofx/shaders/billboard.fsh b/examples/multimedia/video/qmlvideofx/shaders/billboard.fsh deleted file mode 100644 index b733d94ae..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/billboard.fsh +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float grid; -uniform float dividerValue; -uniform float step_x; -uniform float step_y; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - float offx = floor(uv.x / (grid * step_x)); - float offy = floor(uv.y / (grid * step_y)); - vec3 res = texture2D(source, vec2(offx * grid * step_x , offy * grid * step_y)).rgb; - vec2 prc = fract(uv / vec2(grid * step_x, grid * step_y)); - vec2 pw = pow(abs(prc - 0.5), vec2(2.0)); - float rs = pow(0.45, 2.0); - float gr = smoothstep(rs - 0.1, rs + 0.1, pw.x + pw.y); - float y = (res.r + res.g + res.b) / 3.0; - vec3 ra = res / y; - float ls = 0.3; - float lb = ceil(y / ls); - float lf = ls * lb + 0.3; - res = lf * res; - vec3 col = mix(res, vec3(0.1, 0.1, 0.1), gr); - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/blackandwhite.fsh b/examples/multimedia/video/qmlvideofx/shaders/blackandwhite.fsh deleted file mode 100644 index 3eeff5925..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/blackandwhite.fsh +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float threshold; -uniform float dividerValue; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - vec3 col = orig.rgb; - float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; - y = y < threshold ? 0.0 : 1.0; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(y, y, y, 1.0); - else - gl_FragColor = qt_Opacity * orig; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/emboss.fsh b/examples/multimedia/video/qmlvideofx/shaders/emboss.fsh deleted file mode 100644 index 41f5f1b37..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/emboss.fsh +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -const float step_w = 0.0015625; -const float step_h = 0.0027778; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; - vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; - vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; - vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; - vec3 t5 = texture2D(source, uv).rgb; - vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; - vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; - vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; - vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; - vec3 rr = -4.0 * t1 - 4.0 * t2 - 4.0 * t4 + 12.0 * t5; - float y = (rr.r + rr.g + rr.b) / 3.0; - vec3 col = vec3(y, y, y) + 0.3; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_h.fsh b/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_h.fsh deleted file mode 100644 index 794e371ad..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_h.fsh +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -uniform float dividerValue; -uniform float blurSize; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - c += texture2D(source, uv - vec2(4.0*blurSize, 0.0)) * 0.05; - c += texture2D(source, uv - vec2(3.0*blurSize, 0.0)) * 0.09; - c += texture2D(source, uv - vec2(2.0*blurSize, 0.0)) * 0.12; - c += texture2D(source, uv - vec2(1.0*blurSize, 0.0)) * 0.15; - c += texture2D(source, uv) * 0.18; - c += texture2D(source, uv + vec2(1.0*blurSize, 0.0)) * 0.15; - c += texture2D(source, uv + vec2(2.0*blurSize, 0.0)) * 0.12; - c += texture2D(source, uv + vec2(3.0*blurSize, 0.0)) * 0.09; - c += texture2D(source, uv + vec2(4.0*blurSize, 0.0)) * 0.05; - } else { - c = texture2D(source, qt_TexCoord0); - } - gl_FragColor = qt_Opacity * c; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_v.fsh b/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_v.fsh deleted file mode 100644 index 975dfcf5d..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/gaussianblur_v.fsh +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -uniform float dividerValue; -uniform float blurSize; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - c += texture2D(source, uv - vec2(0.0, 4.0*blurSize)) * 0.05; - c += texture2D(source, uv - vec2(0.0, 3.0*blurSize)) * 0.09; - c += texture2D(source, uv - vec2(0.0, 2.0*blurSize)) * 0.12; - c += texture2D(source, uv - vec2(0.0, 1.0*blurSize)) * 0.15; - c += texture2D(source, uv) * 0.18; - c += texture2D(source, uv + vec2(0.0, 1.0*blurSize)) * 0.15; - c += texture2D(source, uv + vec2(0.0, 2.0*blurSize)) * 0.12; - c += texture2D(source, uv + vec2(0.0, 3.0*blurSize)) * 0.09; - c += texture2D(source, uv + vec2(0.0, 4.0*blurSize)) * 0.05; - } else { - c = texture2D(source, qt_TexCoord0); - } - // First pass we don't apply opacity - gl_FragColor = c; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/glow.fsh b/examples/multimedia/video/qmlvideofx/shaders/glow.fsh deleted file mode 100644 index 8edc603d2..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/glow.fsh +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -const float step_w = 0.0015625; -const float step_h = 0.0027778; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; - vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; - vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; - vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; - vec3 t5 = texture2D(source, uv).rgb; - vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; - vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; - vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; - vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; - vec3 xx = t1 + 2.0*t2 + t3 - t7 - 2.0*t8 - t9; - vec3 yy = t1 - t3 + 2.0*t4 - 2.0*t6 + t7 - t9; - vec3 rr = sqrt(xx * xx + yy * yy); - vec3 col = rr * 2.0 * t5; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/isolate.fsh b/examples/multimedia/video/qmlvideofx/shaders/isolate.fsh deleted file mode 100644 index c6da45b4a..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/isolate.fsh +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float targetHue; -uniform float windowWidth; -uniform float dividerValue; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void rgb2hsl(vec3 rgb, out float h, out float s, float l) -{ - float maxval = max(rgb.r, max(rgb.g, rgb.b)); - float minval = min(rgb.r, min(rgb.g, rgb.b)); - float delta = maxval - minval; - l = (minval + maxval) / 2.0; - s = 0.0; - if (l > 0.0 && l < 1.0) - s = delta / (l < 0.5 ? 2.0 * l : 2.0 - 2.0 * l); - h = 0.0; - if (delta > 0.0) - { - if (rgb.r == maxval && rgb.g != maxval) - h += (rgb.g - rgb.b ) / delta; - if (rgb.g == maxval && rgb.b != maxval) - h += 2.0 + (rgb.b - rgb.r) / delta; - if (rgb.b == maxval && rgb.r != maxval) - h += 4.0 + (rgb.r - rgb.g) / delta; - h *= 60.0; - } -} - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec3 col = texture2D(source, uv).rgb; - float h, s, l; - rgb2hsl(col, h, s, l); - float h2 = (h > targetHue) ? h - 360.0 : h + 360.0; - float y = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b; - vec3 result; - if (uv.x > dividerValue || (abs(h - targetHue) < windowWidth) || (abs(h2 - targetHue) < windowWidth)) - result = col; - else - result = vec3(y, y, y); - gl_FragColor = qt_Opacity * vec4(result, 1.0); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh b/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh deleted file mode 100644 index f7621bed3..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/magnify.fsh +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.reddit.com/r/programming/comments/losip/shader_toy/c2upn1e - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; -uniform float radius; -uniform float diffractionIndex; -uniform float targetWidth; -uniform float targetHeight; -uniform float posX; -uniform float posY; -uniform float pixDens; - -void main() -{ - vec2 tc = qt_TexCoord0; - vec2 center = vec2(posX, posY); - vec2 xy = gl_FragCoord.xy - center.xy; - xy.x -= (pixDens * 14.0); - xy.y -= (pixDens * 29.0); - float r = sqrt(xy.x * xy.x + xy.y * xy.y); - if (r < radius) { - float h = diffractionIndex * 0.5 * radius; - vec2 new_xy = r < radius ? xy * (radius - h) / sqrt(radius * radius - r * r) : xy; - vec2 targetSize = vec2(targetWidth, targetHeight); - tc = (new_xy + center) / targetSize; - tc.y = 1.0 - tc.y; - } - gl_FragColor = qt_Opacity * texture2D(source, tc); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/pagecurl.fsh b/examples/multimedia/video/qmlvideofx/shaders/pagecurl.fsh deleted file mode 100644 index 12a5455e6..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/pagecurl.fsh +++ /dev/null @@ -1,192 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://rectalogic.github.com/webvfx/examples_2transition-shader-pagecurl_8html-example.html - -uniform float dividerValue; -uniform float curlExtent; -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -const float minAmount = -0.16; -const float maxAmount = 1.3; -const float PI = 3.14159265358979323846; -const float scale = 512.0; -const float sharpness = 3.0; -const vec4 bgColor = vec4(1.0, 1.0, 0.8, 1.0); - -float amount = curlExtent * (maxAmount - minAmount) + minAmount; -float cylinderCenter = amount; -// 360 degrees * amount -float cylinderAngle = 2.0 * PI * amount; -const float cylinderRadius = 1.0 / PI / 2.0; - -vec3 hitPoint(float hitAngle, float yc, vec3 point, mat3 rrotation) -{ - float hitPoint = hitAngle / (2.0 * PI); - point.y = hitPoint; - return rrotation * point; -} - -vec4 antiAlias(vec4 color1, vec4 color2, float distance) -{ - distance *= scale; - if (distance < 0.0) return color2; - if (distance > 2.0) return color1; - float dd = pow(1.0 - distance / 2.0, sharpness); - return ((color2 - color1) * dd) + color1; -} - -float distanceToEdge(vec3 point) -{ - float dx = abs(point.x > 0.5 ? 1.0 - point.x : point.x); - float dy = abs(point.y > 0.5 ? 1.0 - point.y : point.y); - if (point.x < 0.0) dx = -point.x; - if (point.x > 1.0) dx = point.x - 1.0; - if (point.y < 0.0) dy = -point.y; - if (point.y > 1.0) dy = point.y - 1.0; - if ((point.x < 0.0 || point.x > 1.0) && (point.y < 0.0 || point.y > 1.0)) return sqrt(dx * dx + dy * dy); - return min(dx, dy); -} - -vec4 seeThrough(float yc, vec2 p, mat3 rotation, mat3 rrotation) -{ - float hitAngle = PI - (acos(yc / cylinderRadius) - cylinderAngle); - vec3 point = hitPoint(hitAngle, yc, rotation * vec3(p, 1.0), rrotation); - if (yc <= 0.0 && (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0)) - return bgColor; - if (yc > 0.0) - return texture2D(source, p); - vec4 color = texture2D(source, point.xy); - vec4 tcolor = vec4(0.0); - return antiAlias(color, tcolor, distanceToEdge(point)); -} - -vec4 seeThroughWithShadow(float yc, vec2 p, vec3 point, mat3 rotation, mat3 rrotation) -{ - float shadow = distanceToEdge(point) * 30.0; - shadow = (1.0 - shadow) / 3.0; - if (shadow < 0.0) - shadow = 0.0; - else - shadow *= amount; - vec4 shadowColor = seeThrough(yc, p, rotation, rrotation); - shadowColor.r -= shadow; - shadowColor.g -= shadow; - shadowColor.b -= shadow; - return shadowColor; -} - -vec4 backside(float yc, vec3 point) -{ - vec4 color = texture2D(source, point.xy); - float gray = (color.r + color.b + color.g) / 15.0; - gray += (8.0 / 10.0) * (pow(1.0 - abs(yc / cylinderRadius), 2.0 / 10.0) / 2.0 + (5.0 / 10.0)); - color.rgb = vec3(gray); - return color; -} - -void main(void) -{ - const float angle = 30.0 * PI / 180.0; - float c = cos(-angle); - float s = sin(-angle); - mat3 rotation = mat3( - c, s, 0, - -s, c, 0, - 0.12, 0.258, 1 - ); - c = cos(angle); - s = sin(angle); - mat3 rrotation = mat3( - c, s, 0, - -s, c, 0, - 0.15, -0.5, 1 - ); - vec3 point = rotation * vec3(qt_TexCoord0, 1.0); - float yc = point.y - cylinderCenter; - vec4 color = vec4(1.0, 0.0, 0.0, 1.0); - if (yc < -cylinderRadius) { - // See through to background - color = bgColor; - } else if (yc > cylinderRadius) { - // Flat surface - color = texture2D(source, qt_TexCoord0); - } else { - float hitAngle = (acos(yc / cylinderRadius) + cylinderAngle) - PI; - float hitAngleMod = mod(hitAngle, 2.0 * PI); - if ((hitAngleMod > PI && amount < 0.5) || (hitAngleMod > PI/2.0 && amount < 0.0)) { - color = seeThrough(yc, qt_TexCoord0, rotation, rrotation); - } else { - point = hitPoint(hitAngle, yc, point, rrotation); - if (point.x < 0.0 || point.y < 0.0 || point.x > 1.0 || point.y > 1.0) { - color = seeThroughWithShadow(yc, qt_TexCoord0, point, rotation, rrotation); - } else { - color = backside(yc, point); - vec4 otherColor; - if (yc < 0.0) { - float shado = 1.0 - (sqrt(pow(point.x - 0.5, 2.0) + pow(point.y - 0.5, 2.0)) / 0.71); - shado *= pow(-yc / cylinderRadius, 3.0); - shado *= 0.5; - otherColor = vec4(0.0, 0.0, 0.0, shado); - } else { - otherColor = texture2D(source, qt_TexCoord0); - } - color = antiAlias(color, otherColor, cylinderRadius - abs(yc)); - - // This second antialiasing step causes the shader to fail to render, on - // Symbian devices (tested so far using IVE3.5). Running out of scratch - // memory? - } - } - } - gl_FragColor = qt_Opacity * color; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/pixelate.fsh b/examples/multimedia/video/qmlvideofx/shaders/pixelate.fsh deleted file mode 100644 index b30dc60d0..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/pixelate.fsh +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/ - -uniform float dividerValue; -uniform float granularity; -uniform float targetWidth; -uniform float targetHeight; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec2 tc = qt_TexCoord0; - if (uv.x < dividerValue && granularity > 0.0) { - float dx = granularity / targetWidth; - float dy = granularity / targetHeight; - tc = vec2(dx*(floor(uv.x/dx) + 0.5), - dy*(floor(uv.y/dy) + 0.5)); - } - gl_FragColor = qt_Opacity * texture2D(source, tc); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/posterize.fsh b/examples/multimedia/video/qmlvideofx/shaders/posterize.fsh deleted file mode 100644 index 350fda744..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/posterize.fsh +++ /dev/null @@ -1,77 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20091027/shader-library-posterization-post-processing-effect-glsl/ - -uniform float dividerValue; -uniform float gamma; -uniform float numColors; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - vec3 x = texture2D(source, uv).rgb; - x = pow(x, vec3(gamma, gamma, gamma)); - x = x * numColors; - x = floor(x); - x = x / numColors; - x = pow(x, vec3(1.0/gamma)); - c = vec4(x, 1.0); - } else { - c = texture2D(source, uv); - } - gl_FragColor = qt_Opacity * c; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh b/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh deleted file mode 100644 index aba47461f..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/ripple.fsh +++ /dev/null @@ -1,88 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://blog.qt.io/blog/2011/03/22/the-convenient-power-of-qml-scene-graph/ - -uniform float dividerValue; -uniform float targetWidth; -uniform float targetHeight; -uniform float time; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -const float PI = 3.14159265358979323846; -const int ITER = 7; -const float RATE = 0.1; -uniform float amplitude; -uniform float n; -uniform float pixDens; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec2 tc = uv; - vec2 p = vec2(-1.0 + 2.0 * (gl_FragCoord.x - (pixDens * 14.0)) / targetWidth, -(-1.0 + 2.0 * (gl_FragCoord.y - (pixDens * 29.0)) / targetHeight)); - float diffx = 0.0; - float diffy = 0.0; - vec4 col; - if (uv.x < dividerValue) { - for (int i=0; i<ITER; ++i) { - float theta = float(i) * PI / float(ITER); - vec2 r = vec2(cos(theta) * p.x + sin(theta) * p.y, -1.0 * sin(theta) * p.x + cos(theta) * p.y); - float diff = (sin(2.0 * PI * n * (r.y + time * RATE)) + 1.0) / 2.0; - diffx += diff * sin(theta); - diffy += diff * cos(theta); - } - tc = 0.5*(vec2(1.0,1.0) + p) + amplitude * vec2(diffx, diffy); - } - gl_FragColor = qt_Opacity * texture2D(source, tc); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/selectionpanel.fsh b/examples/multimedia/video/qmlvideofx/shaders/selectionpanel.fsh deleted file mode 100644 index 09c22fe10..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/selectionpanel.fsh +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - diff --git a/examples/multimedia/video/qmlvideofx/shaders/sepia.fsh b/examples/multimedia/video/qmlvideofx/shaders/sepia.fsh deleted file mode 100644 index 065b13318..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/sepia.fsh +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - vec3 col = orig.rgb; - float y = 0.3 * col.r + 0.59 * col.g + 0.11 * col.b; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(y + 0.15, y + 0.07, y - 0.12, 1.0); - else - gl_FragColor = qt_Opacity * orig; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/sharpen.fsh b/examples/multimedia/video/qmlvideofx/shaders/sharpen.fsh deleted file mode 100644 index bdfe7f0be..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/sharpen.fsh +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -uniform float amount; -const float step_w = 0.0015625; -const float step_h = 0.0027778; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -vec3 sharpen(vec3 t1, vec3 t2, vec3 t3, vec3 t4, vec3 t5, vec3 t6, vec3 t7, vec3 t8, vec3 t9) -{ - return -t1 - t2 - t3 - t4 + amount * t5 - t6 - t7 - t8 - t9; -} - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec3 t1 = texture2D(source, vec2(uv.x - step_w, uv.y - step_h)).rgb; - vec3 t2 = texture2D(source, vec2(uv.x, uv.y - step_h)).rgb; - vec3 t3 = texture2D(source, vec2(uv.x + step_w, uv.y - step_h)).rgb; - vec3 t4 = texture2D(source, vec2(uv.x - step_w, uv.y)).rgb; - vec3 t5 = texture2D(source, uv).rgb; - vec3 t6 = texture2D(source, vec2(uv.x + step_w, uv.y)).rgb; - vec3 t7 = texture2D(source, vec2(uv.x - step_w, uv.y + step_h)).rgb; - vec3 t8 = texture2D(source, vec2(uv.x, uv.y + step_h)).rgb; - vec3 t9 = texture2D(source, vec2(uv.x + step_w, uv.y + step_h)).rgb; - vec3 col = sharpen(t1, t2, t3, t4, t5, t6, t7, t8, t9); - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * texture2D(source, uv); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/shockwave.fsh b/examples/multimedia/video/qmlvideofx/shaders/shockwave.fsh deleted file mode 100644 index 4cd32503c..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/shockwave.fsh +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20091116/shader-library-2d-shockwave-post-processing-filter-glsl/ - -uniform float centerX; -uniform float centerY; -uniform float dividerValue; -uniform float granularity; -uniform float time; -uniform float weight; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec2 tc = qt_TexCoord0; - vec2 center = vec2(centerX, centerY); - const vec3 shock = vec3(10.0, 1.5, 0.1); - if (uv.x < dividerValue) { - float distance = distance(uv, center); - if ((distance <= (time + shock.z)) && - (distance >= (time - shock.z))) { - float diff = (distance - time); - float powDiff = 1.0 - pow(abs(diff*shock.x), shock.y*weight); - float diffTime = diff * powDiff; - vec2 diffUV = normalize(uv - center); - tc += (diffUV * diffTime); - } - } - gl_FragColor = qt_Opacity * texture2D(source, tc); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection1.fsh b/examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection1.fsh deleted file mode 100644 index 9c0b33885..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/sobeledgedetection1.fsh +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on "Graphics Shaders: Theory and Practice" (http://cgeducation.org/ShadersBook/) - -uniform float dividerValue; -uniform float mixLevel; -uniform float resS; -uniform float resT; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 c = vec4(0.0); - if (uv.x < dividerValue) { - vec2 st = qt_TexCoord0.st; - vec3 irgb = texture2D(source, st).rgb; - vec2 stp0 = vec2(1.0 / resS, 0.0); - vec2 st0p = vec2(0.0 , 1.0 / resT); - vec2 stpp = vec2(1.0 / resS, 1.0 / resT); - vec2 stpm = vec2(1.0 / resS, -1.0 / resT); - const vec3 W = vec3(0.2125, 0.7154, 0.0721); - float i00 = dot(texture2D(source, st).rgb, W); - float im1m1 = dot(texture2D(source, st-stpp).rgb, W); - float ip1p1 = dot(texture2D(source, st+stpp).rgb, W); - float im1p1 = dot(texture2D(source, st-stpm).rgb, W); - float ip1m1 = dot(texture2D(source, st+stpm).rgb, W); - float im10 = dot(texture2D(source, st-stp0).rgb, W); - float ip10 = dot(texture2D(source, st+stp0).rgb, W); - float i0m1 = dot(texture2D(source, st-st0p).rgb, W); - float i0p1 = dot(texture2D(source, st+st0p).rgb, W); - float h = -1.0*im1p1 - 2.0*i0p1 - 1.0*ip1p1 + 1.0*im1m1 + 2.0*i0m1 + 1.0*ip1m1; - float v = -1.0*im1m1 - 2.0*im10 - 1.0*im1p1 + 1.0*ip1m1 + 2.0*ip10 + 1.0*ip1p1; - float mag = 1.0 - length(vec2(h, v)); - vec3 target = vec3(mag, mag, mag); - c = vec4(target, 1.0); - } else { - c = texture2D(source, qt_TexCoord0); - } - gl_FragColor = qt_Opacity * c; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/tiltshift.fsh b/examples/multimedia/video/qmlvideofx/shaders/tiltshift.fsh deleted file mode 100644 index 5119011ce..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/tiltshift.fsh +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -const float step_w = 0.0015625; -const float step_h = 0.0027778; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -vec3 blur() -{ - vec2 uv = qt_TexCoord0.xy; - float y = uv.y < 0.4 ? uv.y : 1.0 - uv.y; - float dist = 8.0 - 20.0 * y; - vec3 acc = vec3(0.0, 0.0, 0.0); - for (float y=-2.0; y<=2.0; ++y) { - for (float x=-2.0; x<=2.0; ++x) { - acc += texture2D(source, vec2(uv.x + dist * x * step_w, uv.y + 0.5 * dist * y * step_h)).rgb; - } - } - return acc / 25.0; -} - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec3 col; - if (uv.x > dividerValue || (uv.y >= 0.4 && uv.y <= 0.6)) - col = texture2D(source, uv).rgb; - else - col = blur(); - gl_FragColor = qt_Opacity * vec4(col, 1.0); -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/toon.fsh b/examples/multimedia/video/qmlvideofx/shaders/toon.fsh deleted file mode 100644 index 22f2116c3..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/toon.fsh +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://www.geeks3d.com/20101029/shader-library-pixelation-post-processing-effect-glsl/ - -uniform float dividerValue; -uniform float threshold; -uniform float resS; -uniform float resT; -uniform float magTol; -uniform float quantize; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec4 color = vec4(1.0, 0.0, 0.0, 1.1); - vec2 uv = qt_TexCoord0.xy; - if (uv.x < dividerValue) { - vec2 st = qt_TexCoord0.st; - vec3 rgb = texture2D(source, st).rgb; - vec2 stp0 = vec2(1.0/resS, 0.0); - vec2 st0p = vec2(0.0 , 1.0/resT); - vec2 stpp = vec2(1.0/resS, 1.0/resT); - vec2 stpm = vec2(1.0/resS, -1.0/resT); - float i00 = dot( texture2D(source, st).rgb, vec3(0.2125,0.7154,0.0721)); - float im1m1 = dot( texture2D(source, st-stpp).rgb, vec3(0.2125,0.7154,0.0721)); - float ip1p1 = dot( texture2D(source, st+stpp).rgb, vec3(0.2125,0.7154,0.0721)); - float im1p1 = dot( texture2D(source, st-stpm).rgb, vec3(0.2125,0.7154,0.0721)); - float ip1m1 = dot( texture2D(source, st+stpm).rgb, vec3(0.2125,0.7154,0.0721)); - float im10 = dot( texture2D(source, st-stp0).rgb, vec3(0.2125,0.7154,0.0721)); - float ip10 = dot( texture2D(source, st+stp0).rgb, vec3(0.2125,0.7154,0.0721)); - float i0m1 = dot( texture2D(source, st-st0p).rgb, vec3(0.2125,0.7154,0.0721)); - float i0p1 = dot( texture2D(source, st+st0p).rgb, vec3(0.2125,0.7154,0.0721)); - float h = -1.*im1p1 - 2.*i0p1 - 1.*ip1p1 + 1.*im1m1 + 2.*i0m1 + 1.*ip1m1; - float v = -1.*im1m1 - 2.*im10 - 1.*im1p1 + 1.*ip1m1 + 2.*ip10 + 1.*ip1p1; - float mag = sqrt(h*h + v*v); - if (mag > magTol) { - color = vec4(0.0, 0.0, 0.0, 1.0); - } - else { - rgb.rgb *= quantize; - rgb.rgb += vec3(0.5, 0.5, 0.5); - ivec3 irgb = ivec3(rgb.rgb); - rgb.rgb = vec3(irgb) / quantize; - color = vec4(rgb, 1.0); - } - } else { - color = texture2D(source, uv); - } - gl_FragColor = qt_Opacity * color; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/vignette.fsh b/examples/multimedia/video/qmlvideofx/shaders/vignette.fsh deleted file mode 100644 index d8a25737e..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/vignette.fsh +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - float cr = pow(0.1, 2.0); - float pt = pow(uv.x - 0.5, 2.0) + pow(uv.y - 0.5, 2.0); - float d = pt - cr; - float cf = 1.0; - if (d > 0.0) - cf = 1.0 - 2.0 * d; - vec3 col = cf * orig.rgb; - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * orig; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/warhol.fsh b/examples/multimedia/video/qmlvideofx/shaders/warhol.fsh deleted file mode 100644 index 0ea02c6a0..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/warhol.fsh +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://kodemongki.blogspot.com/2011/06/kameraku-custom-shader-effects-example.html - -uniform float dividerValue; -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec4 orig = texture2D(source, uv); - vec3 col = orig.rgb; - float y = 0.3 *col.r + 0.59 * col.g + 0.11 * col.b; - y = y < 0.3 ? 0.0 : (y < 0.6 ? 0.5 : 1.0); - if (y == 0.5) - col = vec3(0.8, 0.0, 0.0); - else if (y == 1.0) - col = vec3(0.9, 0.9, 0.0); - else - col = vec3(0.0, 0.0, 0.0); - if (uv.x < dividerValue) - gl_FragColor = qt_Opacity * vec4(col, 1.0); - else - gl_FragColor = qt_Opacity * orig; -} diff --git a/examples/multimedia/video/qmlvideofx/shaders/wobble.fsh b/examples/multimedia/video/qmlvideofx/shaders/wobble.fsh deleted file mode 100644 index 5e0b1f79c..000000000 --- a/examples/multimedia/video/qmlvideofx/shaders/wobble.fsh +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd and/or its subsidiary(-ies). -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -// Based on http://blog.qt.io/blog/2011/03/22/the-convenient-power-of-qml-scene-graph/ - -uniform float amplitude; -uniform float dividerValue; -uniform float frequency; -uniform float time; - -uniform sampler2D source; -uniform lowp float qt_Opacity; -varying vec2 qt_TexCoord0; - -void main() -{ - vec2 uv = qt_TexCoord0.xy; - vec2 tc = qt_TexCoord0; - if (uv.x < dividerValue) { - vec2 p = sin(time + frequency * qt_TexCoord0); - tc += amplitude * vec2(p.y, -p.x); - } - gl_FragColor = qt_Opacity * texture2D(source, tc); -} diff --git a/examples/multimedia/video/qmlvideofx/trace.h b/examples/multimedia/video/qmlvideofx/trace.h deleted file mode 100644 index d2cb054df..000000000 --- a/examples/multimedia/video/qmlvideofx/trace.h +++ /dev/null @@ -1,100 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2016 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the Qt Mobility Components. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#ifndef TRACE_H -#define TRACE_H - -#include <QDebug> - -#define ENABLE_TRACE -//#define VERBOSE_TRACE - -namespace Trace { - -class NullDebug -{ -public: - template <typename T> - NullDebug &operator<<(const T &) { return *this; } -}; - -inline NullDebug nullDebug() { return NullDebug(); } - -template <typename T> -struct PtrWrapper -{ - PtrWrapper(const T *ptr) : m_ptr(ptr) { } - const T *const m_ptr; -}; - -} // namespace Trace - -template <typename T> -inline QDebug &operator<<(QDebug &debug, const Trace::PtrWrapper<T> &wrapper) -{ - QDebugStateSaver saver(debug); - debug.nospace() << '[' << static_cast<const void *>(wrapper.m_ptr) << ']'; - return debug; -} - -#ifdef ENABLE_TRACE - inline QDebug qtTrace() { return qDebug() << "[qmlvideofx]"; } -# ifdef VERBOSE_TRACE - inline QDebug qtVerboseTrace() { return qtTrace(); } -# else - inline Trace::NullDebug qtVerboseTrace() { return Trace::nullDebug(); } -# endif -#else - inline Trace::NullDebug qtTrace() { return Trace::nullDebug(); } - inline Trace::NullDebug qtVerboseTrace() { return Trace::nullDebug(); } -#endif - -#endif // TRACE_H - diff --git a/examples/multimedia/video/video.pro b/examples/multimedia/video/video.pro index ef5bc849d..75f1d9b21 100644 --- a/examples/multimedia/video/video.pro +++ b/examples/multimedia/video/video.pro @@ -1,9 +1,5 @@ TEMPLATE = subdirs -SUBDIRS += qmlvideo qmlvideofx - -EXAMPLE_FILES += \ - qmlvideofilter_opencl \ # FIXME: this one should use a configure check instead - snippets +SUBDIRS += qmlvideo android: SUBDIRS += android |