diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2018-02-12 18:48:32 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2018-02-12 18:48:32 +0000 |
commit | e9bfb4edc2ab28b7f64b8b57469d0f8d3638be8a (patch) | |
tree | d7296dc09c4b587c9a3695fbf1230e996a4dc51b /tests | |
parent | 743a325df09e89c6ece5070f80c1470e556382e9 (diff) | |
download | gstreamer-plugins-bad-e9bfb4edc2ab28b7f64b8b57469d0f8d3638be8a.tar.gz |
qt: remove plugin, moved to -good
https://bugzilla.gnome.org/show_bug.cgi?id=754094
Diffstat (limited to 'tests')
-rw-r--r-- | tests/examples/meson.build | 1 | ||||
-rw-r--r-- | tests/examples/qt/qmlsink/.gitignore | 3 | ||||
-rw-r--r-- | tests/examples/qt/qmlsink/CMakeLists.txt | 23 | ||||
-rw-r--r-- | tests/examples/qt/qmlsink/main.cpp | 83 | ||||
-rw-r--r-- | tests/examples/qt/qmlsink/main.qml | 60 | ||||
-rw-r--r-- | tests/examples/qt/qmlsink/play.pro | 20 | ||||
-rw-r--r-- | tests/examples/qt/qmlsink/qml.qrc | 5 | ||||
-rw-r--r-- | tests/examples/qt/qmlsrc/.gitignore | 2 | ||||
-rw-r--r-- | tests/examples/qt/qmlsrc/grabqml.pro | 20 | ||||
-rw-r--r-- | tests/examples/qt/qmlsrc/main.cpp | 80 | ||||
-rw-r--r-- | tests/examples/qt/qmlsrc/main.qml | 65 | ||||
-rw-r--r-- | tests/examples/qt/qmlsrc/qml.qrc | 5 |
12 files changed, 0 insertions, 367 deletions
diff --git a/tests/examples/meson.build b/tests/examples/meson.build index 5ccd9ebb1..356587f69 100644 --- a/tests/examples/meson.build +++ b/tests/examples/meson.build @@ -9,7 +9,6 @@ subdir('compositor') subdir('mpegts') #subdir('mxf') #subdir('opencv') -#subdir('qt') #subdir('uvch264') #subdir('waylandsink') subdir('webrtc') diff --git a/tests/examples/qt/qmlsink/.gitignore b/tests/examples/qt/qmlsink/.gitignore deleted file mode 100644 index 1f8151858..000000000 --- a/tests/examples/qt/qmlsink/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -deployment.pri -play -qrc_qml.cpp diff --git a/tests/examples/qt/qmlsink/CMakeLists.txt b/tests/examples/qt/qmlsink/CMakeLists.txt deleted file mode 100644 index 02b0e11ea..000000000 --- a/tests/examples/qt/qmlsink/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -cmake_minimum_required(VERSION 3.3) - -include(FindPkgConfig) -if(!${PKG_CONFIG_FOUND}) - MESSAGE(FATAL_ERROR "pkg-config required. Please install it") - return ("Error - pkg-config not found") -endif() - -pkg_check_modules(GSTREAMER gstreamer-1.0>=1.6 gstreamer-video-1.0>=1.6 REQUIRED) - -find_package(Qt5Core REQUIRED) -find_package(Qt5Widgets REQUIRED) -find_package(Qt5Qml REQUIRED) -find_package(Qt5Quick REQUIRED) - -set (SRC_LIST main.cpp) -qt5_add_resources(RESOURCES qml.qrc) -link_directories(${GSTREAMER_LIBRARY_DIRS}) -include_directories (${GSTREAMER_INCLUDE_DIRS}) -add_executable(qml-example ${SRC_LIST} ${RESOURCES}) -target_link_libraries (qml-example ${GSTREAMER_LIBRARIES}) -qt5_use_modules(qml-example Core Widgets Qml Quick) - diff --git a/tests/examples/qt/qmlsink/main.cpp b/tests/examples/qt/qmlsink/main.cpp deleted file mode 100644 index a5cd5606b..000000000 --- a/tests/examples/qt/qmlsink/main.cpp +++ /dev/null @@ -1,83 +0,0 @@ -#include <QApplication> -#include <QQmlApplicationEngine> -#include <QQuickWindow> -#include <QQuickItem> -#include <QRunnable> -#include <gst/gst.h> - -class SetPlaying : public QRunnable -{ -public: - SetPlaying(GstElement *); - ~SetPlaying(); - - void run (); - -private: - GstElement * pipeline_; -}; - -SetPlaying::SetPlaying (GstElement * pipeline) -{ - this->pipeline_ = pipeline ? static_cast<GstElement *> (gst_object_ref (pipeline)) : NULL; -} - -SetPlaying::~SetPlaying () -{ - if (this->pipeline_) - gst_object_unref (this->pipeline_); -} - -void -SetPlaying::run () -{ - if (this->pipeline_) - gst_element_set_state (this->pipeline_, GST_STATE_PLAYING); -} - -int main(int argc, char *argv[]) -{ - int ret; - - gst_init (&argc, &argv); - - { - QGuiApplication app(argc, argv); - - GstElement *pipeline = gst_pipeline_new (NULL); - GstElement *src = gst_element_factory_make ("videotestsrc", NULL); - GstElement *glupload = gst_element_factory_make ("glupload", NULL); - /* the plugin must be loaded before loading the qml file to register the - * GstGLVideoItem qml item */ - GstElement *sink = gst_element_factory_make ("qmlglsink", NULL); - - g_assert (src && glupload && sink); - - gst_bin_add_many (GST_BIN (pipeline), src, glupload, sink, NULL); - gst_element_link_many (src, glupload, sink, NULL); - - QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - - QQuickItem *videoItem; - QQuickWindow *rootObject; - - /* find and set the videoItem on the sink */ - rootObject = static_cast<QQuickWindow *> (engine.rootObjects().first()); - videoItem = rootObject->findChild<QQuickItem *> ("videoItem"); - g_assert (videoItem); - g_object_set(sink, "widget", videoItem, NULL); - - rootObject->scheduleRenderJob (new SetPlaying (pipeline), - QQuickWindow::BeforeSynchronizingStage); - - ret = app.exec(); - - gst_element_set_state (pipeline, GST_STATE_NULL); - gst_object_unref (pipeline); - } - - gst_deinit (); - - return ret; -} diff --git a/tests/examples/qt/qmlsink/main.qml b/tests/examples/qt/qmlsink/main.qml deleted file mode 100644 index ffd3cd165..000000000 --- a/tests/examples/qt/qmlsink/main.qml +++ /dev/null @@ -1,60 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.3 -import QtQuick.Dialogs 1.2 -import QtQuick.Window 2.1 - -import org.freedesktop.gstreamer.GLVideoItem 1.0 - -ApplicationWindow { - id: window - visible: true - width: 640 - height: 480 - x: 30 - y: 30 - color: "black" - - Item { - anchors.fill: parent - - GstGLVideoItem { - id: video - objectName: "videoItem" - anchors.centerIn: parent - width: parent.width - height: parent.height - } - - Rectangle { - color: Qt.rgba(1, 1, 1, 0.7) - border.width: 1 - border.color: "white" - anchors.bottom: video.bottom - anchors.bottomMargin: 15 - anchors.horizontalCenter: parent.horizontalCenter - width : parent.width - 30 - height: parent.height - 30 - radius: 8 - - MouseArea { - id: mousearea - anchors.fill: parent - hoverEnabled: true - onEntered: { - parent.opacity = 1.0 - hidetimer.start() - } - } - - Timer { - id: hidetimer - interval: 5000 - onTriggered: { - parent.opacity = 0.0 - stop() - } - } - } - } -} diff --git a/tests/examples/qt/qmlsink/play.pro b/tests/examples/qt/qmlsink/play.pro deleted file mode 100644 index 374e40297..000000000 --- a/tests/examples/qt/qmlsink/play.pro +++ /dev/null @@ -1,20 +0,0 @@ -TEMPLATE = app - -QT += qml quick widgets - -QT_CONFIG -= no-pkg-config -CONFIG += link_pkgconfig debug -PKGCONFIG = \ - gstreamer-1.0 \ - gstreamer-video-1.0 - -DEFINES += GST_USE_UNSTABLE_API - -INCLUDEPATH += ../lib - -SOURCES += main.cpp - -RESOURCES += qml.qrc - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = diff --git a/tests/examples/qt/qmlsink/qml.qrc b/tests/examples/qt/qmlsink/qml.qrc deleted file mode 100644 index 5f6483ac3..000000000 --- a/tests/examples/qt/qmlsink/qml.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>main.qml</file> - </qresource> -</RCC> diff --git a/tests/examples/qt/qmlsrc/.gitignore b/tests/examples/qt/qmlsrc/.gitignore deleted file mode 100644 index d2246aeb2..000000000 --- a/tests/examples/qt/qmlsrc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -grabqml -qrc_qml.cpp diff --git a/tests/examples/qt/qmlsrc/grabqml.pro b/tests/examples/qt/qmlsrc/grabqml.pro deleted file mode 100644 index 374e40297..000000000 --- a/tests/examples/qt/qmlsrc/grabqml.pro +++ /dev/null @@ -1,20 +0,0 @@ -TEMPLATE = app - -QT += qml quick widgets - -QT_CONFIG -= no-pkg-config -CONFIG += link_pkgconfig debug -PKGCONFIG = \ - gstreamer-1.0 \ - gstreamer-video-1.0 - -DEFINES += GST_USE_UNSTABLE_API - -INCLUDEPATH += ../lib - -SOURCES += main.cpp - -RESOURCES += qml.qrc - -# Additional import path used to resolve QML modules in Qt Creator's code model -QML_IMPORT_PATH = diff --git a/tests/examples/qt/qmlsrc/main.cpp b/tests/examples/qt/qmlsrc/main.cpp deleted file mode 100644 index 35cedcb09..000000000 --- a/tests/examples/qt/qmlsrc/main.cpp +++ /dev/null @@ -1,80 +0,0 @@ -#include <QApplication> -#include <QQmlApplicationEngine> -#include <QQuickWindow> -#include <QQuickItem> -#include <QQuickView> -#include <QRunnable> -#include <QDebug> -#include <gst/gst.h> - -class SetPlaying : public QRunnable -{ -public: - SetPlaying(GstElement *); - ~SetPlaying(); - - void run (); - -private: - GstElement * pipeline_; -}; - -SetPlaying::SetPlaying (GstElement * pipeline) -{ - this->pipeline_ = pipeline ? static_cast<GstElement *> (gst_object_ref (pipeline)) : NULL; -} - -SetPlaying::~SetPlaying () -{ - if (this->pipeline_) - gst_object_unref (this->pipeline_); - -} - -void -SetPlaying::run () -{ - if (this->pipeline_) - gst_element_set_state (this->pipeline_, GST_STATE_PLAYING); -} - -int main(int argc, char *argv[]) -{ - int ret; - - QGuiApplication app(argc, argv); - gst_init (&argc, &argv); - - GstElement *pipeline = gst_pipeline_new (NULL); - GstElement *src = gst_element_factory_make ("qmlglsrc", NULL); - GstElement *sink = gst_element_factory_make ("glimagesink", NULL); - - g_assert (src && sink); - - gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL); - gst_element_link_many (src, sink, NULL); - - QQmlApplicationEngine engine; - engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); - - QQuickWindow *rootObject; - - /* find and set the QQuickWindow on the src */ - rootObject = static_cast<QQuickWindow *> (engine.rootObjects().first()); - g_object_set(src, "window", rootObject, NULL); - g_object_set(src, "use-default-fbo", TRUE, NULL); - /* output buffer of qmlglsrc is vertical flip, get the image orientation tag */ - g_object_set(sink, "rotate-method", 8, NULL); - - rootObject->scheduleRenderJob (new SetPlaying (pipeline), - QQuickWindow::BeforeSynchronizingStage); - - ret = app.exec(); - - gst_element_set_state (pipeline, GST_STATE_NULL); - gst_object_unref (pipeline); - - gst_deinit (); - - return ret; -} diff --git a/tests/examples/qt/qmlsrc/main.qml b/tests/examples/qt/qmlsrc/main.qml deleted file mode 100644 index 18b36e650..000000000 --- a/tests/examples/qt/qmlsrc/main.qml +++ /dev/null @@ -1,65 +0,0 @@ -import QtQuick 2.4 -import QtQuick.Controls 1.1 -import QtQuick.Controls.Styles 1.1 -import QtQuick.Dialogs 1.1 -import QtQuick.Window 2.1 - -ApplicationWindow { - id: window - visible: true - width: 640 - height: 480 - x: 30 - y: 30 - color: "dodgerblue" - - Item { - anchors.fill: parent - - Rectangle { - color: Qt.rgba(1, 1, 1, 0.7) - border.width: 1 - border.color: "white" - anchors.bottomMargin: 15 - anchors.horizontalCenter: parent.horizontalCenter - width : parent.width - 30 - height: parent.height - 30 - radius: 8 - - Text { - id: text1 - anchors.centerIn: parent - text: "Hello World!" - font.pointSize: 24 - visible: timer.tex1_visible - } - - Text { - id: text2 - anchors.centerIn: parent - text: "This is qmlglsrc demo!" - font.pointSize: 24 - visible: timer.tex2_visible - } - - Timer { - id: timer - property int count: 0 - property int tex1_visible: 1 - property int tex2_visible: 0 - interval: 30; running: true; repeat: true - onTriggered: { - count++; - if (count%2 == 0) { - tex1_visible = 1; - tex2_visible = 0; - } - else { - tex1_visible = 0; - tex2_visible = 1; - } - } - } - } - } -} diff --git a/tests/examples/qt/qmlsrc/qml.qrc b/tests/examples/qt/qmlsrc/qml.qrc deleted file mode 100644 index 5f6483ac3..000000000 --- a/tests/examples/qt/qmlsrc/qml.qrc +++ /dev/null @@ -1,5 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>main.qml</file> - </qresource> -</RCC> |