From f763920411015ecd259499c5925d1c9043154f05 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Wed, 13 Oct 2021 13:12:02 +0200 Subject: Remove the android/gstreamer example MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're not using gstreamer on Android and the example is in any case relying on code that is not supported anymore in Qt 6. Pick-to: 6.2 Fixes: QTBUG-95369 Change-Id: I24c814bbb820ff42c2830d4d9661c1485f8dc0f3 Reviewed-by: André de la Rocha Reviewed-by: Piotr Srebrny Reviewed-by: Lars Knoll --- examples/multimedia/video/CMakeLists.txt | 3 - examples/multimedia/video/android/CMakeLists.txt | 5 - examples/multimedia/video/android/android.pro | 5 - .../video/android/gstreamer/CMakeLists.txt | 108 ------------------- .../video/android/gstreamer/gstreamer.pro | 22 ---- .../multimedia/video/android/gstreamer/main.cpp | 115 --------------------- .../multimedia/video/android/gstreamer/main.qml | 73 ------------- .../multimedia/video/android/gstreamer/qml.qrc | 5 - examples/multimedia/video/video.pro | 2 - 9 files changed, 338 deletions(-) delete mode 100644 examples/multimedia/video/android/CMakeLists.txt delete mode 100644 examples/multimedia/video/android/android.pro delete mode 100644 examples/multimedia/video/android/gstreamer/CMakeLists.txt delete mode 100644 examples/multimedia/video/android/gstreamer/gstreamer.pro delete mode 100644 examples/multimedia/video/android/gstreamer/main.cpp delete mode 100644 examples/multimedia/video/android/gstreamer/main.qml delete mode 100644 examples/multimedia/video/android/gstreamer/qml.qrc diff --git a/examples/multimedia/video/CMakeLists.txt b/examples/multimedia/video/CMakeLists.txt index 487ae515a..f8fc28144 100644 --- a/examples/multimedia/video/CMakeLists.txt +++ b/examples/multimedia/video/CMakeLists.txt @@ -7,6 +7,3 @@ if(TARGET Qt::QuickControls2) endif() add_subdirectory(recorder) endif() -if(ANDROID) - add_subdirectory(android) -endif() diff --git a/examples/multimedia/video/android/CMakeLists.txt b/examples/multimedia/video/android/CMakeLists.txt deleted file mode 100644 index dba46ec68..000000000 --- a/examples/multimedia/video/android/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Generated from android.pro. - -if(QT_FEATURE_gstreamer) - add_subdirectory(gstreamer) -endif() diff --git a/examples/multimedia/video/android/android.pro b/examples/multimedia/video/android/android.pro deleted file mode 100644 index 95ed21e17..000000000 --- a/examples/multimedia/video/android/android.pro +++ /dev/null @@ -1,5 +0,0 @@ -TEMPLATE = subdirs - -QT_FOR_CONFIG += multimedia-private - -qtConfig(gstreamer): SUBDIRS += gstreamer diff --git a/examples/multimedia/video/android/gstreamer/CMakeLists.txt b/examples/multimedia/video/android/gstreamer/CMakeLists.txt deleted file mode 100644 index f2b749c2a..000000000 --- a/examples/multimedia/video/android/gstreamer/CMakeLists.txt +++ /dev/null @@ -1,108 +0,0 @@ -# Generated from gstreamer.pro. - -cmake_minimum_required(VERSION 3.16) -project(gstreamer 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/android/gstreamer") - -find_package(Qt6 COMPONENTS Core) -find_package(Qt6 COMPONENTS Gui) -find_package(Qt6 COMPONENTS Quick) -find_package(Qt6 COMPONENTS Multimedia) -find_package(Qt6 COMPONENTS MultimediaWidgets) - -qt_add_executable(gstreamer - main.cpp -) -set_target_properties(gstreamer PROPERTIES - WIN32_EXECUTABLE TRUE - MACOSX_BUNDLE TRUE -) -target_include_directories(gstreamer PUBLIC - $(GSTREAMER_ROOT_ANDROID)/armv7/include - $(GSTREAMER_ROOT_ANDROID)/armv7/include/glib-2.0 - $(GSTREAMER_ROOT_ANDROID)/armv7/include/gstreamer-1.0 - $(GSTREAMER_ROOT_ANDROID)/armv7/lib/glib-2.0/include -) - -target_link_libraries(gstreamer PUBLIC - # Remove: L$(GSTREAMER_ROOT_ANDROID)/armv7/lib/ - # Remove: L$(GSTREAMER_ROOT_ANDROID)/armv7/lib/gstreamer-1.0 - Qt::Core - Qt::Gui - Qt::Multimedia - Qt::MultimediaWidgetsPrivate - Qt::Quick - avcodec - avfilter - avformat - avutil - bz2 - gio-2.0 - gstapp - gstaudioconvert - gstaudioparsers - gstautodetect - gstavi - gstcoreelements - gstgio - gstisomp4 - gstivorbisdec - gstlibav - gstmpg123 - gstnet-1.0 - gstogg - gstplayback - gstriff-1.0 - gstrtp-1.0 - gstsoup - gstsubparse - gsttcp - gsttheora - gsttypefindfunctions - gstvideoconvert - gstvideotestsrc - gstvorbis - gstwavenc - gstwavpack - gstwavparse - gstx264 - mpg123 - ogg - soup-2.4 - swresample - theora - vorbis - vorbisenc - vorbisfile - x264 -) - - -# Resources: -set(qml_resource_files - "main.qml" -) - -qt6_add_resources(gstreamer "qml" - PREFIX - "/" - FILES - ${qml_resource_files} -) - -install(TARGETS gstreamer - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/multimedia/video/android/gstreamer/gstreamer.pro b/examples/multimedia/video/android/gstreamer/gstreamer.pro deleted file mode 100644 index 0ae344678..000000000 --- a/examples/multimedia/video/android/gstreamer/gstreamer.pro +++ /dev/null @@ -1,22 +0,0 @@ -QT += quick multimedia multimediawidgets-private -CONFIG += c++11 - -SOURCES += main.cpp - -RESOURCES += qml.qrc - -target.path = $$[QT_INSTALL_EXAMPLES]/multimedia/video/android/gstreamer -INSTALLS += target - -GSTREAMER_ROOT_ANDROID = $$(GSTREAMER_ROOT_ANDROID) -isEmpty(GSTREAMER_ROOT_ANDROID): error("GSTREAMER_ROOT_ANDROID is empty") - -INCLUDEPATH += $(GSTREAMER_ROOT_ANDROID)/armv7/include/ $(GSTREAMER_ROOT_ANDROID)/armv7/include/gstreamer-1.0 $(GSTREAMER_ROOT_ANDROID)/armv7/include/glib-2.0 $(GSTREAMER_ROOT_ANDROID)/armv7/lib/glib-2.0/include - -LIBS += -L$(GSTREAMER_ROOT_ANDROID)/armv7/lib/ -L$(GSTREAMER_ROOT_ANDROID)/armv7/lib/gstreamer-1.0 \ --lgstcoreelements -lgstplayback -lgstvideotestsrc -lgstaudioconvert -lgstvideoconvert -lgstautodetect -lgsttypefindfunctions \ -#PLUGINS codecs --lgstvorbis -lvorbis -lgstivorbisdec -lvorbisenc -lvorbisfile -lgstsubparse -lgstaudioparsers \ --lgstgio -lgstapp -lgstisomp4 -lgstavi -lgstogg -lgstwavenc -lgstwavpack -lgstwavparse -lgsttheora -lgstmpg123 -lgstx264 -lgstlibav \ --lgsttcp -lgstsoup -logg -ltheora -lmpg123 -lx264 -lavfilter -lavformat -lavcodec -lavutil -lbz2 -lswresample \ --lsoup-2.4 -lgio-2.0 -lgstrtp-1.0 -lgstriff-1.0 -lgstnet-1.0 diff --git a/examples/multimedia/video/android/gstreamer/main.cpp b/examples/multimedia/video/android/gstreamer/main.cpp deleted file mode 100644 index 56037aece..000000000 --- a/examples/multimedia/video/android/gstreamer/main.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -#include -#include - -#include - -#include -extern "C" { -GST_PLUGIN_STATIC_DECLARE(coreelements); -GST_PLUGIN_STATIC_DECLARE(playback); -GST_PLUGIN_STATIC_DECLARE(videotestsrc); -GST_PLUGIN_STATIC_DECLARE(audioconvert); -GST_PLUGIN_STATIC_DECLARE(videoconvert); -GST_PLUGIN_STATIC_DECLARE(autodetect); -GST_PLUGIN_STATIC_DECLARE(gio); -GST_PLUGIN_STATIC_DECLARE(soup); -GST_PLUGIN_STATIC_DECLARE(app); -GST_PLUGIN_STATIC_DECLARE(isomp4); -GST_PLUGIN_STATIC_DECLARE(avi); -GST_PLUGIN_STATIC_DECLARE(ogg); -GST_PLUGIN_STATIC_DECLARE(vorbis); -GST_PLUGIN_STATIC_DECLARE(tcp); -GST_PLUGIN_STATIC_DECLARE(audioparsers); -GST_PLUGIN_STATIC_DECLARE(theora); -GST_PLUGIN_STATIC_DECLARE(mpg123); -GST_PLUGIN_STATIC_DECLARE(typefindfunctions); -GST_PLUGIN_STATIC_DECLARE(x264); -GST_PLUGIN_STATIC_DECLARE(libav); -}; - -int main(int argc, char *argv[]) -{ - QGstUtils::initializeGst(); - - GST_PLUGIN_STATIC_REGISTER(coreelements); - GST_PLUGIN_STATIC_REGISTER(playback); - GST_PLUGIN_STATIC_REGISTER(videotestsrc); - GST_PLUGIN_STATIC_REGISTER(audioconvert); - GST_PLUGIN_STATIC_REGISTER(videoconvert); - GST_PLUGIN_STATIC_REGISTER(autodetect); - GST_PLUGIN_STATIC_REGISTER(soup); - GST_PLUGIN_STATIC_REGISTER(gio); - GST_PLUGIN_STATIC_REGISTER(app); - GST_PLUGIN_STATIC_REGISTER(isomp4); - GST_PLUGIN_STATIC_REGISTER(avi); - GST_PLUGIN_STATIC_REGISTER(ogg); - GST_PLUGIN_STATIC_REGISTER(vorbis); - GST_PLUGIN_STATIC_REGISTER(tcp); - GST_PLUGIN_STATIC_REGISTER(audioparsers); - GST_PLUGIN_STATIC_REGISTER(theora); - GST_PLUGIN_STATIC_REGISTER(mpg123); - GST_PLUGIN_STATIC_REGISTER(typefindfunctions); - GST_PLUGIN_STATIC_REGISTER(x264); - GST_PLUGIN_STATIC_REGISTER(libav); - - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); - - QGuiApplication app(argc, argv); - - QQmlApplicationEngine engine; - engine.load(QUrl(QLatin1String("qrc:/main.qml"))); - if (engine.rootObjects().isEmpty()) - return -1; - - return app.exec(); -} diff --git a/examples/multimedia/video/android/gstreamer/main.qml b/examples/multimedia/video/android/gstreamer/main.qml deleted file mode 100644 index c4663cb9a..000000000 --- a/examples/multimedia/video/android/gstreamer/main.qml +++ /dev/null @@ -1,73 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2019 The Qt Company Ltd. -** Contact: https://www.qt.io/licensing/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** Commercial License Usage -** Licensees holding valid commercial Qt licenses may use this file in -** accordance with the commercial license agreement provided with the -** Software or, alternatively, in accordance with the terms contained in -** a written agreement between you and The Qt Company. For licensing terms -** and conditions see https://www.qt.io/terms-conditions. For further -** information use the contact form at https://www.qt.io/contact-us. -** -** BSD License Usage -** Alternatively, you may use this file under the terms of the BSD license -** as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of The Qt Company Ltd nor the names of its -** contributors may be used to endorse or promote products derived -** from this software without specific prior written permission. -** -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick -import QtQuick.Controls -import QtQuick.Layouts -import QtMultimedia - -ApplicationWindow { - visible: true - width: 640 - height: 480 - - Video { - id: video - anchors.fill: parent - source: "gst-pipeline: videotestsrc ! qtvideosink" - } - - MouseArea { - anchors.fill: video - onClicked: { - video.play() - } - } -} diff --git a/examples/multimedia/video/android/gstreamer/qml.qrc b/examples/multimedia/video/android/gstreamer/qml.qrc deleted file mode 100644 index 5f6483ac3..000000000 --- a/examples/multimedia/video/android/gstreamer/qml.qrc +++ /dev/null @@ -1,5 +0,0 @@ - - - main.qml - - diff --git a/examples/multimedia/video/video.pro b/examples/multimedia/video/video.pro index 75f1d9b21..2915ce40b 100644 --- a/examples/multimedia/video/video.pro +++ b/examples/multimedia/video/video.pro @@ -1,5 +1,3 @@ TEMPLATE = subdirs SUBDIRS += qmlvideo - -android: SUBDIRS += android -- cgit v1.2.3