From 70609d3e67b8db0f42c0782073336eeee254d9a3 Mon Sep 17 00:00:00 2001 From: VaL Doroshchuk Date: Sun, 13 Aug 2023 19:54:24 +0200 Subject: [PATCH] Deprecate QtAVPlayer module Instead of building a module or a lib, suggesting to build QtAVPlayer directly to an app using pri file. Removed CMake support for now, since not used. --- .cmake.conf | 2 - .github/workflows/main.yaml | 111 ++-------- .gitignore | 2 - .qmake.conf | 5 - CMakeLists.txt | 118 ----------- QtAVPlayer.pro | 2 - configure.json | 5 - examples/CMakeLists.txt | 1 - examples/examples.pro | 5 - examples/extract_frames/CMakeLists.txt | 15 -- examples/extract_frames/extract_frames.pro | 3 + examples/qml_video/CMakeLists.txt | 47 ----- examples/qml_video/qml_video.pro | 5 +- src/CMakeLists.txt | 1 - src/QtAVPlayer/CMakeLists.txt | 157 -------------- src/QtAVPlayer/QtAVPlayer.pri | 130 ++++++++++++ src/QtAVPlayer/QtAVPlayer.pro | 135 ------------ src/QtAVPlayer/configure.json | 197 ------------------ src/QtAVPlayer/qavaudiocodec_p.h | 2 +- src/QtAVPlayer/qavaudiofilter_p.h | 2 +- src/QtAVPlayer/qavaudioformat.h | 2 +- src/QtAVPlayer/qavaudioframe.h | 2 +- src/QtAVPlayer/qavaudioinputfilter_p.h | 2 +- src/QtAVPlayer/qavaudiooutput.h | 2 +- src/QtAVPlayer/qavaudiooutputfilter_p.h | 2 +- src/QtAVPlayer/qavcodec_p.h | 2 +- src/QtAVPlayer/qavdemuxer_p.h | 2 +- src/QtAVPlayer/qavfilter_p.h | 2 +- src/QtAVPlayer/qavfiltergraph_p.h | 2 +- src/QtAVPlayer/qavfilters_p.h | 2 +- src/QtAVPlayer/qavframe.h | 2 +- src/QtAVPlayer/qavframecodec_p.h | 2 +- src/QtAVPlayer/qavhwdevice_d3d11_p.h | 2 +- src/QtAVPlayer/qavhwdevice_mediacodec_p.h | 2 +- src/QtAVPlayer/qavhwdevice_p.h | 2 +- src/QtAVPlayer/qavhwdevice_vaapi_drm_egl_p.h | 2 +- src/QtAVPlayer/qavhwdevice_vaapi_x11_glx_p.h | 2 +- src/QtAVPlayer/qavhwdevice_vdpau_p.h | 2 +- src/QtAVPlayer/qavhwdevice_videotoolbox_p.h | 2 +- src/QtAVPlayer/qavinoutfilter_p.h | 2 +- src/QtAVPlayer/qaviodevice_p.h | 2 +- src/QtAVPlayer/qavpacket_p.h | 2 +- src/QtAVPlayer/qavplayer.h | 8 +- src/QtAVPlayer/qavstream.h | 8 +- src/QtAVPlayer/qavstreamframe.h | 2 +- src/QtAVPlayer/qavsubtitlecodec_p.h | 2 +- src/QtAVPlayer/qavsubtitleframe.h | 2 +- src/QtAVPlayer/qavvideobuffer_cpu_p.h | 2 +- src/QtAVPlayer/qavvideobuffer_gpu_p.h | 2 +- src/QtAVPlayer/qavvideobuffer_p.h | 2 +- src/QtAVPlayer/qavvideocodec_p.h | 2 +- src/QtAVPlayer/qavvideofilter_p.h | 2 +- src/QtAVPlayer/qavvideoframe.h | 2 +- src/QtAVPlayer/qavvideoinputfilter_p.h | 2 +- src/QtAVPlayer/qavvideooutputfilter_p.h | 2 +- ...ayer-config.h.in => qtQtAVPlayer-config.h} | 1 - ...-config_p.h.in => qtQtAVPlayer-config_p.h} | 4 - src/QtAVPlayer/qtavplayerglobal.h | 13 -- src/src.pro | 3 - sync.profile | 3 - tests/CMakeLists.txt | 1 - tests/auto/CMakeLists.txt | 1 - tests/auto/auto.pro | 3 - tests/auto/cmake/CMakeLists.txt | 10 - tests/auto/cmake/cmake.pro | 6 - tests/auto/integration/CMakeLists.txt | 2 - tests/auto/integration/integration.pro | 3 - .../integration/qavdemuxer/CMakeLists.txt | 22 -- .../integration/qavdemuxer/qavdemuxer.pro | 10 +- .../auto/integration/qavplayer/CMakeLists.txt | 10 - .../auto/integration/qavplayer/qavplayer.pro | 9 +- tests/tests.pro | 2 - 72 files changed, 210 insertions(+), 920 deletions(-) delete mode 100644 .cmake.conf delete mode 100644 .qmake.conf delete mode 100644 CMakeLists.txt delete mode 100644 QtAVPlayer.pro delete mode 100644 configure.json delete mode 100644 examples/CMakeLists.txt delete mode 100644 examples/examples.pro delete mode 100644 examples/extract_frames/CMakeLists.txt delete mode 100644 examples/qml_video/CMakeLists.txt delete mode 100644 src/CMakeLists.txt delete mode 100644 src/QtAVPlayer/CMakeLists.txt create mode 100644 src/QtAVPlayer/QtAVPlayer.pri delete mode 100644 src/QtAVPlayer/QtAVPlayer.pro delete mode 100644 src/QtAVPlayer/configure.json rename src/QtAVPlayer/{qavplayer-config.h.in => qtQtAVPlayer-config.h} (71%) rename src/QtAVPlayer/{qavplayer-config_p.h.in => qtQtAVPlayer-config_p.h} (82%) delete mode 100644 src/src.pro delete mode 100644 sync.profile delete mode 100644 tests/CMakeLists.txt delete mode 100644 tests/auto/CMakeLists.txt delete mode 100644 tests/auto/auto.pro delete mode 100644 tests/auto/cmake/CMakeLists.txt delete mode 100644 tests/auto/cmake/cmake.pro delete mode 100644 tests/auto/integration/CMakeLists.txt delete mode 100644 tests/auto/integration/integration.pro delete mode 100644 tests/auto/integration/qavdemuxer/CMakeLists.txt delete mode 100644 tests/auto/integration/qavplayer/CMakeLists.txt delete mode 100644 tests/tests.pro diff --git a/.cmake.conf b/.cmake.conf deleted file mode 100644 index fbed2e46..00000000 --- a/.cmake.conf +++ /dev/null @@ -1,2 +0,0 @@ -set(QT_REPO_MODULE_VERSION "0.1.0") -set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7b51e340..b1ac01de 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -48,41 +48,18 @@ jobs: version: ${{ matrix.qt_version }} modules: ${{ matrix.qt_modules }} - - name: QMake Build - if: ${{ matrix.qt_version == '5.15.2' }} - run: | - qmake - make CC=$CC CXX=$CXX - make install - - - name: CMake Build - run: | - mkdir build - cd build - cmake ../ -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON - make CC=$CC CXX=$CXX CXXFLAGS='-std=c++17' VERBOSE=1 - - name: QMake Test - if: ${{ matrix.qt_version == '5.15.2' }} run: | - cd tests/ - qmake - make CC=$CC CXX=$CXX CXXFLAGS='-std=c++17 -fPIC' export QT_LOGGING_RULES="qt.QtAVPlayer.debug=true" - cd auto/integration/qavdemuxer + cd tests/auto/integration/qavdemuxer + qmake DEFINES+="multimedia" + make CC=$CC CXX=$CXX ./tst_qavdemuxer - cd ../ - cd qavplayer + cd ../qavplayer + qmake DEFINES+="multimedia" + make CC=$CC CXX=$CXX ./tst_qavplayer -maxwarnings 100000 - - name: CMake Test - if: ${{ matrix.qt_version == '6.5.0' }} - run: | - cd build - export QT_LOGGING_RULES="qt.QtAVPlayer.debug=true" - ./tests/auto/integration/qavdemuxer/tst_qavdemuxer - ./tests/auto/integration/qavplayer/tst_qavplayer -maxwarnings 100000 - macos: strategy: matrix: @@ -109,30 +86,15 @@ jobs: echo "/usr/local/Cellar/ffmpeg/6.0/include" >> $GITHUB_PATH echo "/usr/local/opt/llvm@9/bin" >> $GITHUB_PATH - - name: CMake Build - run: | - mkdir build - cd build - cmake ../ -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=/usr/local/Cellar/ffmpeg/6.0/include -DCMAKE_LIBRARY_PATH=/usr/local/Cellar/ffmpeg/6.0/lib - make CC=$CC CXX=$CXX CXXFLAGS='-std=c++17' VERBOSE=1 - - - name: QMake Build - run: | - ffmpeg -version - qmake - make CC=$CC CXX=$CXX CXXFLAGS="$CXXFLAGS" - make install - - name: QMake Test run: | - cd tests/ - qmake - make CC=$CC CXX=$CXX export QT_LOGGING_RULES="qt.QtAVPlayer.debug=true" - cd auto/integration/qavdemuxer + cd tests/auto/integration/qavdemuxer + qmake DEFINES+="multimedia" INCLUDE+="/usr/local/Cellar/ffmpeg/6.0/include" LIBS="-Wl,-rpath-link,/usr/local/Cellar/ffmpeg/6.0/lib" + make CC=$CC CXX=$CXX ./tst_qavdemuxer --platform minimal - cd ../ - cd qavplayer + cd ../qavplayer + qmake DEFINES+="multimedia" INCLUDE+="/usr/local/Cellar/ffmpeg/6.0/include" LIBS="-Wl,-rpath-link,/usr/local/Cellar/ffmpeg/6.0/lib" ./tst_qavplayer --platform minimal -maxwarnings 100000 windows: @@ -191,30 +153,6 @@ jobs: echo CPLUS_INCLUDE_PATH=%FFMPEG%\include;%CPLUS_INCLUDE_PATH%>>%GITHUB_ENV% echo LIB=%FFMPEG%\lib;%FFMPEG%\bin;%LIB%>>%GITHUB_ENV% - - name: CMake Build - if: ${{ matrix.type == 'MSVC' }} - run: | - mkdir build - cd build - cmake ../ -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=D:\a\QtAVPlayer\ffmpeg\include -DCMAKE_LIBRARY_PATH=D:\a\QtAVPlayer\ffmpeg\lib -DBUILD_SHARED_LIBS=ON - cmake --build . -v - - - name: CMake Build - if: ${{ matrix.type == 'MINGW' }} - run: | - mkdir build - cd build - cmake ../ -DBUILD_TESTS=ON -DBUILD_EXAMPLES=OFF -DCMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES=D:\a\QtAVPlayer\ffmpeg\include -DCMAKE_LIBRARY_PATH=D:\a\QtAVPlayer\ffmpeg\lib -DBUILD_SHARED_LIBS=OFF - cmake --build . -v - - - name: QMake Build - if: ${{ matrix.type == 'MSVC' }} - shell: cmd - run: | - qmake - nmake - nmake install - - name: QMake Test if: ${{ matrix.type == 'MSVC' }} shell: cmd @@ -222,23 +160,16 @@ jobs: set QT_LOGGING_RULES=qt.QtAVPlayer.debug=true set QT_FORCE_STDERR_LOGGING=1 set QT_ASSUME_STDERR_HAS_CONSOLE=1 - cd tests/ - qmake + cd tests/auto/integration/qavdemuxer + qmake DEFINES+="multimedia" nmake - cd auto/integration/qavdemuxer release\tst_qavdemuxer.exe - cd ../ + cd ../qavplayer cd qavplayer + qmake DEFINES+="multimedia" + nmake release\tst_qavplayer.exe -maxwarnings 100000 - - name: QMake Build - if: ${{ matrix.type == 'MINGW' }} - shell: cmd - run: | - qmake - mingw32-make - mingw32-make install - - name: QMake Test if: ${{ matrix.type == 'MINGW' }} shell: cmd @@ -246,12 +177,12 @@ jobs: set QT_LOGGING_RULES=qt.QtAVPlayer.debug=true set QT_FORCE_STDERR_LOGGING=1 set QT_ASSUME_STDERR_HAS_CONSOLE=1 - cd tests/ - qmake + cd tests/auto/integration/qavdemuxer + qmake DEFINES+="multimedia" mingw32-make - cd auto/integration/qavdemuxer release\tst_qavdemuxer.exe - cd ../ - cd qavplayer + cd ../qavplayer + qmake DEFINES+="multimedia" + mingw32-make release\tst_qavplayer.exe -maxwarnings 100000 diff --git a/.gitignore b/.gitignore index 0751196a..c42cc3b9 100644 --- a/.gitignore +++ b/.gitignore @@ -23,8 +23,6 @@ tmp *.dylib *.framework *_wrapper.* -*-config_p.h -*-config.h *-config.pri *.version* diff --git a/.qmake.conf b/.qmake.conf deleted file mode 100644 index c4fe007d..00000000 --- a/.qmake.conf +++ /dev/null @@ -1,5 +0,0 @@ -load(qt_build_config) - -DEFINES += QT_NO_FOREACH QT_NO_JAVA_STYLE_ITERATORS - -MODULE_VERSION = 0.1.0 diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index ba1fd06b..00000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,118 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -include(.cmake.conf) -project(QtAVPlayer - VERSION "${QT_REPO_MODULE_VERSION}" - DESCRIPTION "Qt AVPlayer Libraries" - HOMEPAGE_URL "http://valbok.com/" - LANGUAGES CXX C -) - -if(NOT WIN32) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) - set(CXX_FLAGS "-Wall" "-pedantic") - set(CMAKE_CXX_FLAGS, "${CXX_FLAGS}") - add_definitions(-std=c++17) -endif() - -if(MSVC) - # error D8016: '/O2' and '/RTC1' command-line options are incompatible - string(REPLACE "/RTC1" "" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") -endif() - -set(QT_DEFAULT_MAJOR_VERSION 6) -set(MULTIMEDIA_FOUND FALSE) -find_package(Qt6 COMPONENTS CoreTools) -if(Qt6CoreTools_FOUND) - # TODO: tools? - find_package(Qt6 REQUIRED COMPONENTS Core BuildInternals OPTIONAL_COMPONENTS Multimedia Test) - if(Qt6Multimedia_FOUND) - set(MULTIMEDIA_FOUND TRUE) - endif() - add_definitions(${Qt6Core_DEFINITIONS}) -else() - find_package(Qt5 REQUIRED COMPONENTS Core OPTIONAL_COMPONENTS Gui Multimedia) - if(Qt5Multimedia_FOUND) - set(MULTIMEDIA_FOUND TRUE) - endif() - if(Qt5Gui_EGL_LIBRARIES) - set(EGL_FOUND TRUE) - endif() - add_definitions(${Qt5Core_DEFINITIONS}) -endif() - -find_library(LIBVA_X11_LIBRARY NAMES va-x11) -find_library(LIBVA_DRM_LIBRARY NAMES va-drm) -find_library(VDPAU_LIBRARY NAMES vdpau) -find_library(AVDEVICE_LIBRARY REQUIRED NAMES avdevice) -find_library(AVCODEC_LIBRARY REQUIRED NAMES avcodec) -find_library(AVFILTER_LIBRARY REQUIRED NAMES avfilter) -find_library(AVFORMAT_LIBRARY REQUIRED NAMES avformat) -find_library(AVUTIL_LIBRARY REQUIRED NAMES avutil) -find_library(SWRESAMPLE_LIBRARY REQUIRED NAMES swresample) -find_library(SWSCALE_LIBRARY REQUIRED NAMES swscale) - -set(LIBAV ${AVDEVICE_LIBRARY} ${AVFILTER_LIBRARY} ${AVCODEC_LIBRARY} ${AVFORMAT_LIBRARY} ${AVUTIL_LIBRARY} ${SWRESAMPLE_LIBRARY} ${SWSCALE_LIBRARY}) - -set(CMAKE_AUTOMOC ON) -set(CMAKE_INCLUDE_CURRENT_DIR ON) - -if(LIBVA_X11_LIBRARY) - set(LIBVA_X11_FOUND TRUE) -endif() -if(LIBVA_DRM_LIBRARY) - set(LIBVA_DRM_FOUND TRUE) -endif() -if(VDPAU_LIBRARY) - set(VDPAU_FOUND TRUE) -endif() - -option(va_x11 "Enable libva-x11" ${LIBVA_X11_FOUND}) -option(va_drm "Enable libva-drm" ${LIBVA_DRM_FOUND}) -option(vdpau "Enable vdpau" ${VDPAU_FOUND}) -option(egl "Enable egl" ${EGL_FOUND}) -option(multimedia "Enable Qt Multimedia" ${MULTIMEDIA_FOUND}) -option(BUILD_TESTS "Build tests" OFF) -option(BUILD_EXAMPLES "Build examples" OFF) - -if(Qt6_FOUND) - message(STATUS "Using Qt6") -else() - if(Qt5_FOUND) - message(STATUS "Using Qt5") - else() - message(FATAL_ERROR "Qt has not been found!") - endif() -endif() -message(STATUS "Enable Qt Multimedia: " ${multimedia}) -message(STATUS "Enable libva-x11: " ${va_x11}) -message(STATUS "Enable libva-drm: " ${va_drm}) -message(STATUS "Enable vdpau: " ${vdpau}) -message(STATUS "Enable egl: " ${egl}) -if(BUILD_TESTS AND NOT Qt6CoreTools_FOUND) - message(WARNING "Tests are supported only in Qt6") - set(BUILD_TESTS OFF) -endif() -message(STATUS "Build tests: " ${BUILD_TESTS}) -if(BUILD_EXAMPLES AND NOT multimedia) - message(WARNING "Examples are supported only with Qt Multimedia Qt6") - set(BUILD_EXAMPLES OFF) -endif() -message(STATUS "Build examples: " ${BUILD_EXAMPLES}) - -configure_file(src/QtAVPlayer/qavplayer-config_p.h.in ${PROJECT_SOURCE_DIR}/src/QtAVPlayer/qtQtAVPlayer-config_p.h) -configure_file(src/QtAVPlayer/qavplayer-config.h.in ${PROJECT_SOURCE_DIR}/src/QtAVPlayer/qtQtAVPlayer-config.h) - -include_directories(./src) -include_directories(./src/QtAVPlayer) -if(Qt6CoreTools_FOUND) - qt_build_repo() - if(BUILD_TESTS) - add_subdirectory(tests) - endif() -else() - add_subdirectory(src) -endif() - -if(BUILD_EXAMPLES) - add_subdirectory(examples) -endif() diff --git a/QtAVPlayer.pro b/QtAVPlayer.pro deleted file mode 100644 index 2d70b157..00000000 --- a/QtAVPlayer.pro +++ /dev/null @@ -1,2 +0,0 @@ -load(qt_parts) - diff --git a/configure.json b/configure.json deleted file mode 100644 index 157ae5dc..00000000 --- a/configure.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "subconfigs": [ - "src/QtAVPlayer" - ] -} diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt deleted file mode 100644 index b4fea1aa..00000000 --- a/examples/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(qml_video) diff --git a/examples/examples.pro b/examples/examples.pro deleted file mode 100644 index 8d7b60fe..00000000 --- a/examples/examples.pro +++ /dev/null @@ -1,5 +0,0 @@ -TEMPLATE = subdirs -qtConfig(multimedia) { - SUBDIRS += qml_video - lessThan(QT_MAJOR_VERSION, 6): SUBDIRS += widget_video -} diff --git a/examples/extract_frames/CMakeLists.txt b/examples/extract_frames/CMakeLists.txt deleted file mode 100644 index ba693080..00000000 --- a/examples/extract_frames/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(extract_frames) - -set(SOURCES main.cpp) - -add_executable(${PROJECT_NAME} ${SOURCES}) -target_compile_options(${PROJECT_NAME} PRIVATE -fPIC) - -if(Qt6_FOUND) - target_link_libraries(${PROJECT_NAME} QtAVPlayer Qt6::Core ${LIBAV}) -else() - target_link_libraries(${PROJECT_NAME} QtAVPlayer Qt5::Core ${LIBAV}) -endif() - - diff --git a/examples/extract_frames/extract_frames.pro b/examples/extract_frames/extract_frames.pro index f363ec4b..f4816bfe 100644 --- a/examples/extract_frames/extract_frames.pro +++ b/examples/extract_frames/extract_frames.pro @@ -2,6 +2,9 @@ TEMPLATE = app TARGET = extract_frames INCLUDEPATH += . +INCLUDEPATH += . ../../src/QtAVPlayer +include(../../src/QtAVPlayer/QtAVPlayer.pri) + QT -= gui QT += QtAVPlayer diff --git a/examples/qml_video/CMakeLists.txt b/examples/qml_video/CMakeLists.txt deleted file mode 100644 index 7499daeb..00000000 --- a/examples/qml_video/CMakeLists.txt +++ /dev/null @@ -1,47 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(qml_video LANGUAGES CXX) - -if(Qt6_FOUND) - find_package(Qt6 COMPONENTS QmlTools Quick REQUIRED) - qt6_add_resources(QT_RESOURCES qml_qt6.qrc) - find_package(Qt6 COMPONENTS MultimediaQuickPrivate REQUIRED) - include_directories(${Qt6MultimediaQuick_PRIVATE_INCLUDE_DIRS}) - include_directories(${Qt6Multimedia_PRIVATE_INCLUDE_DIRS}) -else() - find_package(Qt5 COMPONENTS Quick) - qt5_add_resources(QT_RESOURCES qml.qrc) - include_directories(${Qt5Multimedia_PRIVATE_INCLUDE_DIRS}) -endif() - -set(SOURCES main.cpp) - -add_executable(${PROJECT_NAME} WIN32 ${SOURCES} ${QT_RESOURCES}) -if(NOT WIN32) - add_definitions(-std=c++1z) - target_compile_options(${PROJECT_NAME} PRIVATE -fPIC) -endif() -add_dependencies(${PROJECT_NAME} QtAVPlayer) - -set(LIBS QtAVPlayer ${LIBAV}) - -if(Qt6_FOUND) - set(LIBS ${LIBS} Qt6::Core Qt6::Gui Qt6::Multimedia Qt6::Quick Qt6::MultimediaQuickPrivate) -else() - set(LIBS ${LIBS} Qt5::Core Qt5::Gui Qt5::Quick Qt5::Multimedia ${MultimediaQuick_LIBRARY}) - if (Qt5Core_VERSION VERSION_LESS 5.15.0) - find_library(MultimediaQuick_LIBRARY REQUIRED NAMES Qt5MultimediaQuick) - set(LIBS ${LIBS} ${MultimediaQuick_LIBRARY}) - else() - find_package(Qt5 COMPONENTS MultimediaQuick REQUIRED) - include_directories(${Qt5MultimediaQuick_PRIVATE_INCLUDE_DIRS}) - set(LIBS ${LIBS} Qt5::MultimediaQuick) - endif() -endif() - -target_link_libraries(${PROJECT_NAME} ${LIBS}) - -install(TARGETS ${PROJECT_NAME} - RUNTIME DESTINATION "${INSTALL_EXAMPLEDIR}" - BUNDLE DESTINATION "${INSTALL_EXAMPLEDIR}" - LIBRARY DESTINATION "${INSTALL_EXAMPLEDIR}" -) diff --git a/examples/qml_video/qml_video.pro b/examples/qml_video/qml_video.pro index 3354774c..42a751b6 100644 --- a/examples/qml_video/qml_video.pro +++ b/examples/qml_video/qml_video.pro @@ -1,6 +1,7 @@ TEMPLATE = app TARGET = qml_video -INCLUDEPATH += . +INCLUDEPATH += . ../../src/QtAVPlayer +include(../../src/QtAVPlayer/QtAVPlayer.pri) # Example ANDROID_EXTRA_LIBS += /opt/mobile-ffmpeg/prebuilt/android-arm/ffmpeg/lib/libavdevice.so \ /opt/mobile-ffmpeg/prebuilt/android-arm/ffmpeg/lib/libavformat.so \ @@ -10,7 +11,7 @@ ANDROID_EXTRA_LIBS += /opt/mobile-ffmpeg/prebuilt/android-arm/ffmpeg/lib/libavde /opt/mobile-ffmpeg/prebuilt/android-arm/ffmpeg/lib/libswscale.so \ /opt/mobile-ffmpeg/prebuilt/android-arm/ffmpeg/lib/libswresample.so CONFIG += c++1z -QT += gui multimedia QtAVPlayer +QT += gui multimedia lessThan(QT_MAJOR_VERSION, 6): QT += qtmultimediaquicktools-private equals(QT_MAJOR_VERSION, 6): QT += multimediaquick-private diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 6fb3196d..00000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(QtAVPlayer) diff --git a/src/QtAVPlayer/CMakeLists.txt b/src/QtAVPlayer/CMakeLists.txt deleted file mode 100644 index c7559e05..00000000 --- a/src/QtAVPlayer/CMakeLists.txt +++ /dev/null @@ -1,157 +0,0 @@ -set(SOURCES - qavdemuxer.cpp - qavplayer.cpp - qavcodec.cpp - qavframecodec.cpp - qavaudiocodec.cpp - qavvideocodec.cpp - qavsubtitlecodec.cpp - qavpacket.cpp - qavvideobuffer_gpu.cpp - qavvideobuffer_cpu.cpp - qavstreamframe.cpp - qavframe.cpp - qavvideoframe.cpp - qavaudioframe.cpp - qavsubtitleframe.cpp - qavfilter.cpp - qavvideofilter.cpp - qavaudiofilter.cpp - qavfiltergraph.cpp - qavinoutfilter.cpp - qavvideoinputfilter.cpp - qavaudioinputfilter.cpp - qavvideooutputfilter.cpp - qavaudiooutputfilter.cpp - qaviodevice.cpp - qavstream.cpp - qavfilters.cpp -) -set(PUBLIC_HEADERS - qavframe.h - qavstreamframe.h - qavvideoframe.h - qavaudioframe.h - qavsubtitleframe.h - qavaudioformat.h - qavplayer.h - qtavplayerglobal.h - qavstream.h - qtQtAVPlayer-config.h -) - -set(PRIVATE_HEADERS - qavcodec_p.h - qavcodec_p_p.h - qavframecodec_p.h - qavaudiocodec_p.h - qavvideocodec_p.h - qavsubtitlecodec_p.h - qavhwdevice_p.h - qavdemuxer_p.h - qavpacket_p.h - qavstreamframe_p.h - qavframe_p.h - qavpacketqueue_p.h - qavvideobuffer_p.h - qavvideobuffer_cpu_p.h - qavvideobuffer_gpu_p.h - qavfilter_p.h - qavfilter_p_p.h - qavvideofilter_p.h - qavaudiofilter_p.h - qavfiltergraph_p.h - qavinoutfilter_p.h - qavinoutfilter_p_p.h - qavvideoinputfilter_p.h - qavaudioinputfilter_p.h - qavvideooutputfilter_p.h - qavaudiooutputfilter_p.h - qaviodevice_p.h - qavfilters_p.h - qtQtAVPlayer-config_p.h -) - -if(MULTIMEDIA_FOUND) - set(SOURCES ${SOURCES} qavaudiooutput.cpp) - set(PUBLIC_HEADERS ${PUBLIC_HEADERS} qavaudiooutput.h) -endif() - -if(Qt6_FOUND) - if(QT_FEATURE_egl AND va_drm) - set(SOURCES ${SOURCES} qavhwdevice_vaapi_drm_egl.cpp) - set(LIBS EGL) - endif() - if(QT_FEATURE_opengl AND va_x11) - set(SOURCES ${SOURCES} qavhwdevice_vaapi_x11_glx.cpp) - endif() -else() - if(Qt5Gui_EGL_LIBRARIES AND va_drm) - set(SOURCES ${SOURCES} qavhwdevice_vaapi_drm_egl.cpp) - set(LIBS EGL) - endif() - - if(Qt5Gui_OPENGL_LIBRARIES AND va_x11) - set(SOURCES ${SOURCES} qavhwdevice_vaapi_x11_glx.cpp) - endif() -endif() - -if(WIN32) - set(SOURCES ${SOURCES} qavhwdevice_d3d11.cpp) -endif() - -if(vdpau) - set(SOURCES ${SOURCES} qavhwdevice_vdpau.cpp) -endif() - -if(ANDROID) - set(SOURCES - ${SOURCES} - qavhwdevice_mediacodec.cpp - qavandroidsurfacetexture.cpp) -endif() - -if(APPLE) - set(SOURCES ${SOURCES} qavhwdevice_videotoolbox.mm) - find_library(IOSURFACE_LIBRARY IOSurface) - find_library(COREVIDEO_LIBRARY CoreVideo) - find_library(COREMEDIA_LIBRARY CoreMedia) - find_library(METAL_LIBRARY Metal) - find_library(METAL_FOUNDATION Foundation) -endif() - -add_library(${PROJECT_NAME} ${SOURCES}) - -set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}") -set_target_properties(${PROJECT_NAME} PROPERTIES PRIVATE_HEADER "${PRIVATE_HEADERS}") -set(LIBS ${LIBS} ${LIBAV}) - -if(APPLE) - set(LIBS ${LIBS} ${IOSURFACE_LIBRARY} ${COREVIDEO_LIBRARY} ${COREMEDIA_LIBRARY} ${METAL_LIBRARY} ${METAL_FOUNDATION}) -endif() - -if(Qt6_FOUND) - set(LIBS ${LIBS} Qt6::Core) - if(MULTIMEDIA_FOUND) - set(LIBS ${LIBS} Qt6::Multimedia) - include_directories(${Qt6Multimedia_PRIVATE_INCLUDE_DIRS}) - else() - include_directories(${Qt6Gui_PRIVATE_INCLUDE_DIRS}) - endif() -else() - set(LIBS ${LIBS} Qt5::Core) - if(MULTIMEDIA_FOUND) - include_directories(${Qt5Multimedia_PRIVATE_INCLUDE_DIRS}) - set(LIBS ${LIBS} Qt5::Multimedia) - else() - include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) - endif() -endif() -target_link_libraries(${PROJECT_NAME} ${LIBS}) -target_compile_definitions(${PROJECT_NAME} PRIVATE QT_BUILD_QTAVPLAYER_LIB) - -install(TARGETS ${PROJECT_NAME} - LIBRARY DESTINATION lib - PUBLIC_HEADER DESTINATION include/${PROJECT_NAME} - PRIVATE_HEADER DESTINATION include/${PROJECT_NAME}/private -) diff --git a/src/QtAVPlayer/QtAVPlayer.pri b/src/QtAVPlayer/QtAVPlayer.pri new file mode 100644 index 00000000..594ea2ea --- /dev/null +++ b/src/QtAVPlayer/QtAVPlayer.pri @@ -0,0 +1,130 @@ +QT += concurrent +CONFIG += C++1z +LIBS += -lavcodec -lavformat -lswscale -lavutil -lswresample -lswscale -lavfilter -lavdevice + +PRIVATE_HEADERS += \ + $$PWD/qavcodec_p.h \ + $$PWD/qavcodec_p_p.h \ + $$PWD/qavframecodec_p.h \ + $$PWD/qavaudiocodec_p.h \ + $$PWD/qavvideocodec_p.h \ + $$PWD/qavsubtitlecodec_p.h \ + $$PWD/qavhwdevice_p.h \ + $$PWD/qavdemuxer_p.h \ + $$PWD/qavpacket_p.h \ + $$PWD/qavstreamframe_p.h \ + $$PWD/qavframe_p.h \ + $$PWD/qavpacketqueue_p.h \ + $$PWD/qavvideobuffer_p.h \ + $$PWD/qavvideobuffer_cpu_p.h \ + $$PWD/qavvideobuffer_gpu_p.h \ + $$PWD/qavfilter_p.h \ + $$PWD/qavfilter_p_p.h \ + $$PWD/qavvideofilter_p.h \ + $$PWD/qavaudiofilter_p.h \ + $$PWD/qavfiltergraph_p.h \ + $$PWD/qavinoutfilter_p.h \ + $$PWD/qavinoutfilter_p_p.h \ + $$PWD/qavvideoinputfilter_p.h \ + $$PWD/qavaudioinputfilter_p.h \ + $$PWD/qavvideooutputfilter_p.h \ + $$PWD/qavaudiooutputfilter_p.h \ + $$PWD/qaviodevice_p.h \ + $$PWD/qavfilters_p.h + +PUBLIC_HEADERS += \ + $$PWD/qavaudioformat.h \ + $$PWD/qavstreamframe.h \ + $$PWD/qavframe.h \ + $$PWD/qavvideoframe.h \ + $$PWD/qavaudioframe.h \ + $$PWD/qavsubtitleframe.h \ + $$PWD/qtavplayerglobal.h \ + $$PWD/qavstream.h \ + $$PWD/qavplayer.h \ + +SOURCES += \ + $$PWD/qavplayer.cpp \ + $$PWD/qavcodec.cpp \ + $$PWD/qavframecodec.cpp \ + $$PWD/qavaudiocodec.cpp \ + $$PWD/qavvideocodec.cpp \ + $$PWD/qavsubtitlecodec.cpp \ + $$PWD/qavdemuxer.cpp \ + $$PWD/qavpacket.cpp \ + $$PWD/qavframe.cpp \ + $$PWD/qavstreamframe.cpp \ + $$PWD/qavvideoframe.cpp \ + $$PWD/qavaudioframe.cpp \ + $$PWD/qavsubtitleframe.cpp \ + $$PWD/qavvideobuffer_cpu.cpp \ + $$PWD/qavvideobuffer_gpu.cpp \ + $$PWD/qavfilter.cpp \ + $$PWD/qavvideofilter.cpp \ + $$PWD/qavaudiofilter.cpp \ + $$PWD/qavfiltergraph.cpp \ + $$PWD/qavinoutfilter.cpp \ + $$PWD/qavvideoinputfilter.cpp \ + $$PWD/qavaudioinputfilter.cpp \ + $$PWD/qavvideooutputfilter.cpp \ + $$PWD/qavaudiooutputfilter.cpp \ + $$PWD/qaviodevice.cpp \ + $$PWD/qavstream.cpp \ + $$PWD/qavfilters.cpp + +contains(DEFINES, multimedia) { + QT += multimedia + # Needed for QAbstractVideoBuffer + equals(QT_MAJOR_VERSION, 6): QT += multimedia-private + HEADERS += $$PWD/qavaudiooutput.h + SOURCES += $$PWD/qavaudiooutput.cpp +} + +contains(DEFINES, va_x11):qtConfig(opengl) { + QMAKE_USE += va_x11 x11 opengl + PRIVATE_HEADERS += $$PWD/qavhwdevice_vaapi_x11_glx_p.h + SOURCES += $$PWD/qavhwdevice_vaapi_x11_glx.cpp +} + +contains(DEFINES, va_drm):contains(DEFINES, egl) { + QMAKE_USE += va_drm egl opengl + PRIVATE_HEADERS += $$PWD/qavhwdevice_vaapi_drm_egl_p.h + SOURCES += $$PWD/qavhwdevice_vaapi_drm_egl.cpp +} + +contains(DEFINES, vdpau) { + PRIVATE_HEADERS += $$PWD/qavhwdevice_vdpau_p.h + SOURCES += $$PWD/qavhwdevice_vdpau.cpp +} + +macos|darwin { + PRIVATE_HEADERS += $$PWD/qavhwdevice_videotoolbox_p.h + SOURCES += $$PWD/qavhwdevice_videotoolbox.mm + LIBS += -framework CoreVideo -framework Metal -framework CoreMedia -framework QuartzCore -framework IOSurface +} + +win32 { + PRIVATE_HEADERS += $$PWD/qavhwdevice_d3d11_p.h + SOURCES += $$PWD/qavhwdevice_d3d11.cpp +} + +android { + QT += core-private + PRIVATE_HEADERS += $$PWD/qavhwdevice_mediacodec_p.h + SOURCES += $$PWD/qavhwdevice_mediacodec.cpp $$PWD/qavandroidsurfacetexture.cpp + + LIBS += -lavdevice -lavformat -lavutil -lavcodec -lavfilter -lswscale -lswresample + equals(ANDROID_TARGET_ARCH, armeabi-v7a): \ + LIBS += -L$$(AVPLAYER_ANDROID_LIB_ARMEABI_V7A) + + equals(ANDROID_TARGET_ARCH, arm64-v8a): \ + LIBS += -L$$(AVPLAYER_ANDROID_LIB_ARMEABI_V8A) + + equals(ANDROID_TARGET_ARCH, x86): \ + LIBS += -L$$(AVPLAYER_ANDROID_LIB_X86) + + equals(ANDROID_TARGET_ARCH, x86_64): \ + LIBS += -L$$(AVPLAYER_ANDROID_LIB_X86_64) +} + +HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS diff --git a/src/QtAVPlayer/QtAVPlayer.pro b/src/QtAVPlayer/QtAVPlayer.pro deleted file mode 100644 index 96afc2d3..00000000 --- a/src/QtAVPlayer/QtAVPlayer.pro +++ /dev/null @@ -1,135 +0,0 @@ -TARGET = QtAVPlayer -MODULE = QtAVPlayer - -QT = concurrent - -CONFIG += C++1z -QMAKE_USE += ffmpeg - -PRIVATE_HEADERS += \ - qavcodec_p.h \ - qavcodec_p_p.h \ - qavframecodec_p.h \ - qavaudiocodec_p.h \ - qavvideocodec_p.h \ - qavsubtitlecodec_p.h \ - qavhwdevice_p.h \ - qavdemuxer_p.h \ - qavpacket_p.h \ - qavstreamframe_p.h \ - qavframe_p.h \ - qavpacketqueue_p.h \ - qavvideobuffer_p.h \ - qavvideobuffer_cpu_p.h \ - qavvideobuffer_gpu_p.h \ - qavfilter_p.h \ - qavfilter_p_p.h \ - qavvideofilter_p.h \ - qavaudiofilter_p.h \ - qavfiltergraph_p.h \ - qavinoutfilter_p.h \ - qavinoutfilter_p_p.h \ - qavvideoinputfilter_p.h \ - qavaudioinputfilter_p.h \ - qavvideooutputfilter_p.h \ - qavaudiooutputfilter_p.h \ - qaviodevice_p.h \ - qavfilters_p.h - -PUBLIC_HEADERS += \ - qavaudioformat.h \ - qavstreamframe.h \ - qavframe.h \ - qavvideoframe.h \ - qavaudioframe.h \ - qavsubtitleframe.h \ - qtavplayerglobal.h \ - qavstream.h \ - qavplayer.h - -SOURCES += \ - qavplayer.cpp \ - qavcodec.cpp \ - qavframecodec.cpp \ - qavaudiocodec.cpp \ - qavvideocodec.cpp \ - qavsubtitlecodec.cpp \ - qavdemuxer.cpp \ - qavpacket.cpp \ - qavframe.cpp \ - qavstreamframe.cpp \ - qavvideoframe.cpp \ - qavaudioframe.cpp \ - qavsubtitleframe.cpp \ - qavvideobuffer_cpu.cpp \ - qavvideobuffer_gpu.cpp \ - qavfilter.cpp \ - qavvideofilter.cpp \ - qavaudiofilter.cpp \ - qavfiltergraph.cpp \ - qavinoutfilter.cpp \ - qavvideoinputfilter.cpp \ - qavaudioinputfilter.cpp \ - qavvideooutputfilter.cpp \ - qavaudiooutputfilter.cpp \ - qaviodevice.cpp \ - qavstream.cpp \ - qavfilters.cpp - -qtConfig(multimedia) { - QT += multimedia - # Needed for QAbstractVideoBuffer - equals(QT_MAJOR_VERSION, 6): QT += multimedia-private - HEADERS += qavaudiooutput.h - SOURCES += qavaudiooutput.cpp -} - -qtConfig(va_x11):qtConfig(opengl) { - QMAKE_USE += va_x11 x11 opengl - PRIVATE_HEADERS += qavhwdevice_vaapi_x11_glx_p.h - SOURCES += qavhwdevice_vaapi_x11_glx.cpp -} - -qtConfig(va_drm):qtConfig(egl) { - QMAKE_USE += va_drm egl opengl - PRIVATE_HEADERS += qavhwdevice_vaapi_drm_egl_p.h - SOURCES += qavhwdevice_vaapi_drm_egl.cpp -} - -macos|darwin { - PRIVATE_HEADERS += qavhwdevice_videotoolbox_p.h - SOURCES += qavhwdevice_videotoolbox.mm - LIBS += -framework CoreVideo -framework Metal -framework CoreMedia -framework QuartzCore -framework IOSurface -} - -win32 { - PRIVATE_HEADERS += qavhwdevice_d3d11_p.h - SOURCES += qavhwdevice_d3d11.cpp -} - -qtConfig(vdpau) { - PRIVATE_HEADERS += qavhwdevice_vdpau_p.h - SOURCES += qavhwdevice_vdpau.cpp -} - -android { - QT += core-private - PRIVATE_HEADERS += qavhwdevice_mediacodec_p.h - SOURCES += qavhwdevice_mediacodec.cpp qavandroidsurfacetexture.cpp - - LIBS += -lavdevice -lavformat -lavutil -lavcodec -lavfilter -lswscale -lswresample - equals(ANDROID_TARGET_ARCH, armeabi-v7a): \ - LIBS += -L$$(AVPLAYER_ANDROID_LIB_ARMEABI_V7A) - - equals(ANDROID_TARGET_ARCH, arm64-v8a): \ - LIBS += -L$$(AVPLAYER_ANDROID_LIB_ARMEABI_V8A) - - equals(ANDROID_TARGET_ARCH, x86): \ - LIBS += -L$$(AVPLAYER_ANDROID_LIB_X86) - - equals(ANDROID_TARGET_ARCH, x86_64): \ - LIBS += -L$$(AVPLAYER_ANDROID_LIB_X86_64) -} - -HEADERS += $$PUBLIC_HEADERS $$PRIVATE_HEADERS -load(qt_module) diff --git a/src/QtAVPlayer/configure.json b/src/QtAVPlayer/configure.json deleted file mode 100644 index 03615875..00000000 --- a/src/QtAVPlayer/configure.json +++ /dev/null @@ -1,197 +0,0 @@ -{ - "module": "QtAVPlayer", - "libraries": { - "ffmpeg": { - "label": "FFmpeg", - "export": "ffmpeg", - "test": { - "include": "libavcodec/avcodec.h" - }, - "sources": [ - { "type": "pkgConfig", - "args": "libavcodec libavformat libavutil libswresample libswscale libavfilter libavdevice" }, - { "libs": "-lavcodec -lavformat -lswscale -lavutil -lswresample -lswscale -lavfilter -lavdevice" }, - { "libs": "", "condition": "config.android" } - ] - }, - "va_x11": { - "label": "va_x11", - "export": "va_x11", - "test": { - "include": "va/va_x11.h" - }, - "sources": [ - { "type": "pkgConfig", - "args": "libva-x11" } - ] - }, - "va_drm": { - "label": "va_drm", - "export": "va_drm", - "test": { - "include": "va/va_drm.h" - }, - "sources": [ - { "type": "pkgConfig", - "args": "libva-drm" } - ] - }, - "opengl_es2": { - "label": "OpenGL ES 2.0", - "test": { - "head": [ - "#ifdef __APPLE__", - "# include ", - "#else", - "# define GL_GLEXT_PROTOTYPES", - "#endif" - ], - "main": [ - "glUniform1f(1, GLfloat(1.0));", - "glClear(GL_COLOR_BUFFER_BIT);" - ] - }, - "headers": [ - { - "condition": "!config.darwin", - "headers": "GLES2/gl2.h" - } - ], - "sources": [ - { "type": "pkgConfig", "args": "glesv2", "condition": "!config.darwin" }, - { "type": "makeSpec", "spec": "OPENGL_ES2" } - ] - }, - "egl": { - "label": "EGL", - "test": { - "main": [ - "EGLint x = 0; EGLDisplay dpy = 0; EGLContext ctx = 0;", - "eglDestroyContext(dpy, ctx);" - ] - }, - "headers": "EGL/egl.h", - "sources": [ - { "type": "pkgConfig", "args": "egl" }, - { "type": "makeSpec", "spec": "EGL" } - ] - }, - "opengl": { - "label": "Desktop OpenGL", - "test": { - "head": [ - "#ifdef __APPLE__", - "# include ", - "#else", - "# define GL_GLEXT_PROTOTYPES", - "#endif" - ], - "main": [ - "glBegin(GL_TRIANGLES);", - " glVertex2f(20.0f, 10.0f);", - " glVertex2f(10.0f, 30.0f);", - " glVertex2f(20.0f, 50.0f);", - "glEnd();" - ] - }, - "headers": [ - { - "condition": "!config.darwin", - "headers": "GL/gl.h" - } - ], - "sources": [ - { "type": "pkgConfig", "args": "gl", "condition": "!config.darwin" }, - { "type": "makeSpec", "spec": "OPENGL" } - ] - }, - "vdpau": { - "label": "vdpau", - "export": "vdpau", - "test": { - "include": "vdpau/vdpau.h" - }, - "sources": [ - { "type": "pkgConfig", - "args": "vdpau" } - ] - } - }, - - "features": { - "gui": { - "label": "Qt GUI", - "condition": "module.gui", - "output": [ "feature", "privateFeature" ] - }, - "multimedia": { - "label": "Qt Multimedia", - "condition": "module.multimedia", - "output": [ "feature", "privateFeature" ] - }, - "ffmpeg": { - "label": "FFmpeg", - "condition": "libs.ffmpeg", - "output": [ "privateFeature" ] - }, - "va_x11": { - "label": "va_x11", - "condition": "libs.va_x11", - "output": [ "privateFeature" ] - }, - "va_drm": { - "label": "va_drm", - "condition": "libs.va_drm", - "output": [ "privateFeature" ] - }, - "egl": { - "label": "egl", - "condition": "libs.egl && libs.opengl_es2", - "output": [ "privateFeature" ] - }, - "opengles2": { - "label": "OpenGL ES 2.0", - "enable": "input.opengl == 'es2'", - "disable": "input.opengl == 'desktop' || input.opengl == 'dynamic' || input.opengl == 'no'", - "condition": "config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)" - }, - "opengl-desktop": { - "label": "Desktop OpenGL", - "enable": "input.opengl == 'desktop'", - "disable": "input.opengl == 'es2' || input.opengl == 'dynamic' || input.opengl == 'no'", - "condition": "(config.win32 && !config.winrt && !features.opengles2 && (config.msvc || libs.opengl)) - || (!config.watchos && !config.win32 && !config.wasm && libs.opengl)" - }, - "opengl-dynamic": { - "label": "Dynamic OpenGL", - "enable": "input.opengl == 'dynamic'", - "autoDetect": false, - "condition": "config.win32 && !config.winrt" - }, - "opengl": { - "label": "OpenGL", - "condition": "features.opengl-desktop || features.opengl-dynamic || features.opengles2", - "output": [ "publicFeature", "feature" ] - }, - "vdpau": { - "label": "vdpau", - "condition": "libs.vdpau", - "output": [ "privateFeature" ] - } - }, - - "summary": [ - { - "section": "Qt AVPlayer", - "entries": [ - "multimedia", - "ffmpeg", - "va_x11", - "va_drm", - "egl", - "opengl", - "vdpau" - ] - } - ] -} diff --git a/src/QtAVPlayer/qavaudiocodec_p.h b/src/QtAVPlayer/qavaudiocodec_p.h index 208918ce..2fdabc93 100644 --- a/src/QtAVPlayer/qavaudiocodec_p.h +++ b/src/QtAVPlayer/qavaudiocodec_p.h @@ -24,7 +24,7 @@ QT_BEGIN_NAMESPACE -class Q_AVPLAYER_EXPORT QAVAudioCodec : public QAVFrameCodec +class QAVAudioCodec : public QAVFrameCodec { public: QAVAudioCodec(); diff --git a/src/QtAVPlayer/qavaudiofilter_p.h b/src/QtAVPlayer/qavaudiofilter_p.h index b7854333..0d95bab2 100644 --- a/src/QtAVPlayer/qavaudiofilter_p.h +++ b/src/QtAVPlayer/qavaudiofilter_p.h @@ -28,7 +28,7 @@ QT_BEGIN_NAMESPACE class QAVAudioFilterPrivate; -class Q_AVPLAYER_EXPORT QAVAudioFilter : public QAVFilter +class QAVAudioFilter : public QAVFilter { public: QAVAudioFilter( diff --git a/src/QtAVPlayer/qavaudioformat.h b/src/QtAVPlayer/qavaudioformat.h index 0684d41d..7fc931dc 100644 --- a/src/QtAVPlayer/qavaudioformat.h +++ b/src/QtAVPlayer/qavaudioformat.h @@ -12,7 +12,7 @@ QT_BEGIN_NAMESPACE -class Q_AVPLAYER_EXPORT QAVAudioFormat +class QAVAudioFormat { public: enum SampleFormat diff --git a/src/QtAVPlayer/qavaudioframe.h b/src/QtAVPlayer/qavaudioframe.h index 57bed3d6..8d89608a 100644 --- a/src/QtAVPlayer/qavaudioframe.h +++ b/src/QtAVPlayer/qavaudioframe.h @@ -15,7 +15,7 @@ QT_BEGIN_NAMESPACE class QAVAudioCodec; class QAVAudioFramePrivate; -class Q_AVPLAYER_EXPORT QAVAudioFrame : public QAVFrame +class QAVAudioFrame : public QAVFrame { public: QAVAudioFrame(); diff --git a/src/QtAVPlayer/qavaudioinputfilter_p.h b/src/QtAVPlayer/qavaudioinputfilter_p.h index d0caf076..a42a9863 100644 --- a/src/QtAVPlayer/qavaudioinputfilter_p.h +++ b/src/QtAVPlayer/qavaudioinputfilter_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE class QAVFrame; class QAVAudioInputFilterPrivate; -class Q_AVPLAYER_EXPORT QAVAudioInputFilter : public QAVInOutFilter +class QAVAudioInputFilter : public QAVInOutFilter { public: QAVAudioInputFilter(const QAVFrame &frame); diff --git a/src/QtAVPlayer/qavaudiooutput.h b/src/QtAVPlayer/qavaudiooutput.h index f07a06bf..f9b60b11 100644 --- a/src/QtAVPlayer/qavaudiooutput.h +++ b/src/QtAVPlayer/qavaudiooutput.h @@ -16,7 +16,7 @@ QT_BEGIN_NAMESPACE class QAVAudioOutputPrivate; -class Q_AVPLAYER_EXPORT QAVAudioOutput : public QObject +class QAVAudioOutput : public QObject { public: QAVAudioOutput(QObject *parent = nullptr); diff --git a/src/QtAVPlayer/qavaudiooutputfilter_p.h b/src/QtAVPlayer/qavaudiooutputfilter_p.h index 735453d9..8e7ed29e 100644 --- a/src/QtAVPlayer/qavaudiooutputfilter_p.h +++ b/src/QtAVPlayer/qavaudiooutputfilter_p.h @@ -24,7 +24,7 @@ QT_BEGIN_NAMESPACE class QAVAudioOutputFilterPrivate; -class Q_AVPLAYER_EXPORT QAVAudioOutputFilter : public QAVInOutFilter +class QAVAudioOutputFilter : public QAVInOutFilter { public: QAVAudioOutputFilter(); diff --git a/src/QtAVPlayer/qavcodec_p.h b/src/QtAVPlayer/qavcodec_p.h index 2e565ed5..34ea2c25 100644 --- a/src/QtAVPlayer/qavcodec_p.h +++ b/src/QtAVPlayer/qavcodec_p.h @@ -30,7 +30,7 @@ struct AVCodec; struct AVCodecContext; struct AVStream; class QAVCodecPrivate; -class Q_AVPLAYER_EXPORT QAVCodec +class QAVCodec { public: virtual ~QAVCodec(); diff --git a/src/QtAVPlayer/qavdemuxer_p.h b/src/QtAVPlayer/qavdemuxer_p.h index 0b17a03c..c2a9cf08 100644 --- a/src/QtAVPlayer/qavdemuxer_p.h +++ b/src/QtAVPlayer/qavdemuxer_p.h @@ -39,7 +39,7 @@ class QAVIODevice; struct AVStream; struct AVCodecContext; struct AVFormatContext; -class Q_AVPLAYER_EXPORT QAVDemuxer +class QAVDemuxer { public: QAVDemuxer(); diff --git a/src/QtAVPlayer/qavfilter_p.h b/src/QtAVPlayer/qavfilter_p.h index 4eb1bb1a..27f1156f 100644 --- a/src/QtAVPlayer/qavfilter_p.h +++ b/src/QtAVPlayer/qavfilter_p.h @@ -27,7 +27,7 @@ QT_BEGIN_NAMESPACE class QAVFilterPrivate; -class Q_AVPLAYER_EXPORT QAVFilter +class QAVFilter { public: virtual ~QAVFilter(); diff --git a/src/QtAVPlayer/qavfiltergraph_p.h b/src/QtAVPlayer/qavfiltergraph_p.h index 59a28dd4..897d335f 100644 --- a/src/QtAVPlayer/qavfiltergraph_p.h +++ b/src/QtAVPlayer/qavfiltergraph_p.h @@ -34,7 +34,7 @@ QT_BEGIN_NAMESPACE class QAVFilterGraphPrivate; class QAVDemuxer; -class Q_AVPLAYER_EXPORT QAVFilterGraph +class QAVFilterGraph { public: QAVFilterGraph(); diff --git a/src/QtAVPlayer/qavfilters_p.h b/src/QtAVPlayer/qavfilters_p.h index 936316d6..f423e408 100644 --- a/src/QtAVPlayer/qavfilters_p.h +++ b/src/QtAVPlayer/qavfilters_p.h @@ -30,7 +30,7 @@ QT_BEGIN_NAMESPACE -class Q_AVPLAYER_EXPORT QAVFilters +class QAVFilters { public: QAVFilters() = default; diff --git a/src/QtAVPlayer/qavframe.h b/src/QtAVPlayer/qavframe.h index 3d648f59..53a50dbe 100644 --- a/src/QtAVPlayer/qavframe.h +++ b/src/QtAVPlayer/qavframe.h @@ -16,7 +16,7 @@ QT_BEGIN_NAMESPACE struct AVFrame; struct AVRational; class QAVFramePrivate; -class Q_AVPLAYER_EXPORT QAVFrame : public QAVStreamFrame +class QAVFrame : public QAVStreamFrame { public: QAVFrame(); diff --git a/src/QtAVPlayer/qavframecodec_p.h b/src/QtAVPlayer/qavframecodec_p.h index 36f0ba2c..a4fdf6e4 100644 --- a/src/QtAVPlayer/qavframecodec_p.h +++ b/src/QtAVPlayer/qavframecodec_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE -class Q_AVPLAYER_EXPORT QAVFrameCodec : public QAVCodec +class QAVFrameCodec : public QAVCodec { public: int write(const QAVPacket &pkt) override; diff --git a/src/QtAVPlayer/qavhwdevice_d3d11_p.h b/src/QtAVPlayer/qavhwdevice_d3d11_p.h index 223663ac..92143414 100644 --- a/src/QtAVPlayer/qavhwdevice_d3d11_p.h +++ b/src/QtAVPlayer/qavhwdevice_d3d11_p.h @@ -24,7 +24,7 @@ QT_BEGIN_NAMESPACE struct AVCodecContext; -class Q_AVPLAYER_EXPORT QAVHWDevice_D3D11 : public QAVHWDevice +class QAVHWDevice_D3D11 : public QAVHWDevice { public: QAVHWDevice_D3D11() = default; diff --git a/src/QtAVPlayer/qavhwdevice_mediacodec_p.h b/src/QtAVPlayer/qavhwdevice_mediacodec_p.h index b475a58c..5a8b0f4d 100644 --- a/src/QtAVPlayer/qavhwdevice_mediacodec_p.h +++ b/src/QtAVPlayer/qavhwdevice_mediacodec_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE class QAVHWDevice_MediaCodecPrivate; -class Q_AVPLAYER_EXPORT QAVHWDevice_MediaCodec : public QAVHWDevice +class QAVHWDevice_MediaCodec : public QAVHWDevice { public: QAVHWDevice_MediaCodec(); diff --git a/src/QtAVPlayer/qavhwdevice_p.h b/src/QtAVPlayer/qavhwdevice_p.h index 33e01473..b91d4d2d 100644 --- a/src/QtAVPlayer/qavhwdevice_p.h +++ b/src/QtAVPlayer/qavhwdevice_p.h @@ -31,7 +31,7 @@ QT_BEGIN_NAMESPACE struct AVCodecContext; class QAVVideoBuffer; -class Q_AVPLAYER_EXPORT QAVHWDevice +class QAVHWDevice { public: QAVHWDevice() = default; diff --git a/src/QtAVPlayer/qavhwdevice_vaapi_drm_egl_p.h b/src/QtAVPlayer/qavhwdevice_vaapi_drm_egl_p.h index 4908b92b..5c008d3d 100644 --- a/src/QtAVPlayer/qavhwdevice_vaapi_drm_egl_p.h +++ b/src/QtAVPlayer/qavhwdevice_vaapi_drm_egl_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE class QAVHWDevice_VAAPI_DRM_EGLPrivate; -class Q_AVPLAYER_EXPORT QAVHWDevice_VAAPI_DRM_EGL : public QAVHWDevice +class QAVHWDevice_VAAPI_DRM_EGL : public QAVHWDevice { public: QAVHWDevice_VAAPI_DRM_EGL(); diff --git a/src/QtAVPlayer/qavhwdevice_vaapi_x11_glx_p.h b/src/QtAVPlayer/qavhwdevice_vaapi_x11_glx_p.h index 89451057..56b05c05 100644 --- a/src/QtAVPlayer/qavhwdevice_vaapi_x11_glx_p.h +++ b/src/QtAVPlayer/qavhwdevice_vaapi_x11_glx_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE class QAVHWDevice_VAAPI_X11_GLXPrivate; -class Q_AVPLAYER_EXPORT QAVHWDevice_VAAPI_X11_GLX : public QAVHWDevice +class QAVHWDevice_VAAPI_X11_GLX : public QAVHWDevice { public: QAVHWDevice_VAAPI_X11_GLX(); diff --git a/src/QtAVPlayer/qavhwdevice_vdpau_p.h b/src/QtAVPlayer/qavhwdevice_vdpau_p.h index b4c37f32..e6cccb1e 100644 --- a/src/QtAVPlayer/qavhwdevice_vdpau_p.h +++ b/src/QtAVPlayer/qavhwdevice_vdpau_p.h @@ -23,7 +23,7 @@ QT_BEGIN_NAMESPACE -class Q_AVPLAYER_EXPORT QAVHWDevice_VDPAU : public QAVHWDevice +class QAVHWDevice_VDPAU : public QAVHWDevice { public: QAVHWDevice_VDPAU(); diff --git a/src/QtAVPlayer/qavhwdevice_videotoolbox_p.h b/src/QtAVPlayer/qavhwdevice_videotoolbox_p.h index 422f8c28..30b09d55 100644 --- a/src/QtAVPlayer/qavhwdevice_videotoolbox_p.h +++ b/src/QtAVPlayer/qavhwdevice_videotoolbox_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE class QAVHWDevice_VideoToolboxPrivate; -class Q_AVPLAYER_EXPORT QAVHWDevice_VideoToolbox : public QAVHWDevice +class QAVHWDevice_VideoToolbox : public QAVHWDevice { public: QAVHWDevice_VideoToolbox(); diff --git a/src/QtAVPlayer/qavinoutfilter_p.h b/src/QtAVPlayer/qavinoutfilter_p.h index 6b905685..028efe63 100644 --- a/src/QtAVPlayer/qavinoutfilter_p.h +++ b/src/QtAVPlayer/qavinoutfilter_p.h @@ -28,7 +28,7 @@ struct AVFilterGraph; struct AVFilterInOut; struct AVFilterContext; class QAVInOutFilterPrivate; -class Q_AVPLAYER_EXPORT QAVInOutFilter +class QAVInOutFilter { public: QAVInOutFilter(); diff --git a/src/QtAVPlayer/qaviodevice_p.h b/src/QtAVPlayer/qaviodevice_p.h index 2c04275f..f57aa7f3 100644 --- a/src/QtAVPlayer/qaviodevice_p.h +++ b/src/QtAVPlayer/qaviodevice_p.h @@ -27,7 +27,7 @@ QT_BEGIN_NAMESPACE struct AVIOContext; class QAVIODevicePrivate; -class Q_AVPLAYER_EXPORT QAVIODevice : public QObject +class QAVIODevice : public QObject { public: QAVIODevice(QIODevice &device, QObject *parent = nullptr); diff --git a/src/QtAVPlayer/qavpacket_p.h b/src/QtAVPlayer/qavpacket_p.h index 62489c52..fd09913f 100644 --- a/src/QtAVPlayer/qavpacket_p.h +++ b/src/QtAVPlayer/qavpacket_p.h @@ -27,7 +27,7 @@ QT_BEGIN_NAMESPACE struct AVPacket; class QAVPacketPrivate; -class Q_AVPLAYER_EXPORT QAVPacket +class QAVPacket { public: QAVPacket(); diff --git a/src/QtAVPlayer/qavplayer.h b/src/QtAVPlayer/qavplayer.h index e1572b9a..845537dd 100644 --- a/src/QtAVPlayer/qavplayer.h +++ b/src/QtAVPlayer/qavplayer.h @@ -20,7 +20,7 @@ QT_BEGIN_NAMESPACE class QIODevice; class QAVPlayerPrivate; -class Q_AVPLAYER_EXPORT QAVPlayer : public QObject +class QAVPlayer : public QObject { Q_OBJECT Q_ENUMS(State) @@ -148,9 +148,9 @@ public Q_SLOTS: }; #ifndef QT_NO_DEBUG_STREAM -Q_AVPLAYER_EXPORT QDebug operator<<(QDebug, QAVPlayer::State); -Q_AVPLAYER_EXPORT QDebug operator<<(QDebug, QAVPlayer::MediaStatus); -Q_AVPLAYER_EXPORT QDebug operator<<(QDebug, QAVPlayer::Error); +QDebug operator<<(QDebug, QAVPlayer::State); +QDebug operator<<(QDebug, QAVPlayer::MediaStatus); +QDebug operator<<(QDebug, QAVPlayer::Error); #endif Q_DECLARE_METATYPE(QAVPlayer::State) diff --git a/src/QtAVPlayer/qavstream.h b/src/QtAVPlayer/qavstream.h index f6248ce6..eba72454 100644 --- a/src/QtAVPlayer/qavstream.h +++ b/src/QtAVPlayer/qavstream.h @@ -19,7 +19,7 @@ struct AVStream; struct AVFormatContext; class QAVCodec; class QAVStreamPrivate; -class Q_AVPLAYER_EXPORT QAVStream +class QAVStream { public: QAVStream(); @@ -38,7 +38,7 @@ class Q_AVPLAYER_EXPORT QAVStream QSharedPointer codec() const; - class Q_AVPLAYER_EXPORT Progress + class Progress { public: Progress(double duration = 0.0, qint64 frames = 0, double fr = 0.0); @@ -74,8 +74,8 @@ bool operator==(const QAVStream &lhs, const QAVStream &rhs); Q_DECLARE_METATYPE(QAVStream) #ifndef QT_NO_DEBUG_STREAM -Q_AVPLAYER_EXPORT QDebug operator<<(QDebug, const QAVStream &); -Q_AVPLAYER_EXPORT QDebug operator<<(QDebug, const QAVStream::Progress &); +QDebug operator<<(QDebug, const QAVStream &); +QDebug operator<<(QDebug, const QAVStream::Progress &); #endif QT_END_NAMESPACE diff --git a/src/QtAVPlayer/qavstreamframe.h b/src/QtAVPlayer/qavstreamframe.h index 8c1ca7cb..c19c9059 100644 --- a/src/QtAVPlayer/qavstreamframe.h +++ b/src/QtAVPlayer/qavstreamframe.h @@ -15,7 +15,7 @@ QT_BEGIN_NAMESPACE class QAVStreamFramePrivate; -class Q_AVPLAYER_EXPORT QAVStreamFrame +class QAVStreamFrame { public: QAVStreamFrame(); diff --git a/src/QtAVPlayer/qavsubtitlecodec_p.h b/src/QtAVPlayer/qavsubtitlecodec_p.h index 1c07f92e..914d725c 100644 --- a/src/QtAVPlayer/qavsubtitlecodec_p.h +++ b/src/QtAVPlayer/qavsubtitlecodec_p.h @@ -26,7 +26,7 @@ QT_BEGIN_NAMESPACE class QAVSubtitleCodecPrivate; -class Q_AVPLAYER_EXPORT QAVSubtitleCodec : public QAVCodec +class QAVSubtitleCodec : public QAVCodec { public: QAVSubtitleCodec(); diff --git a/src/QtAVPlayer/qavsubtitleframe.h b/src/QtAVPlayer/qavsubtitleframe.h index 7a8d7313..35849df4 100644 --- a/src/QtAVPlayer/qavsubtitleframe.h +++ b/src/QtAVPlayer/qavsubtitleframe.h @@ -14,7 +14,7 @@ QT_BEGIN_NAMESPACE struct AVSubtitle; class QAVSubtitleFramePrivate; -class Q_AVPLAYER_EXPORT QAVSubtitleFrame : public QAVStreamFrame +class QAVSubtitleFrame : public QAVStreamFrame { public: QAVSubtitleFrame(); diff --git a/src/QtAVPlayer/qavvideobuffer_cpu_p.h b/src/QtAVPlayer/qavvideobuffer_cpu_p.h index 060a4087..ad19fc55 100644 --- a/src/QtAVPlayer/qavvideobuffer_cpu_p.h +++ b/src/QtAVPlayer/qavvideobuffer_cpu_p.h @@ -23,7 +23,7 @@ QT_BEGIN_NAMESPACE -class Q_AVPLAYER_EXPORT QAVVideoBuffer_CPU : public QAVVideoBuffer +class QAVVideoBuffer_CPU : public QAVVideoBuffer { public: QAVVideoBuffer_CPU() = default; diff --git a/src/QtAVPlayer/qavvideobuffer_gpu_p.h b/src/QtAVPlayer/qavvideobuffer_gpu_p.h index 725a6589..f41f9958 100644 --- a/src/QtAVPlayer/qavvideobuffer_gpu_p.h +++ b/src/QtAVPlayer/qavvideobuffer_gpu_p.h @@ -24,7 +24,7 @@ QT_BEGIN_NAMESPACE -class Q_AVPLAYER_EXPORT QAVVideoBuffer_GPU : public QAVVideoBuffer +class QAVVideoBuffer_GPU : public QAVVideoBuffer { public: QAVVideoBuffer_GPU() = default; diff --git a/src/QtAVPlayer/qavvideobuffer_p.h b/src/QtAVPlayer/qavvideobuffer_p.h index a8091a2a..a98d9079 100644 --- a/src/QtAVPlayer/qavvideobuffer_p.h +++ b/src/QtAVPlayer/qavvideobuffer_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE class QRhi; -class Q_AVPLAYER_EXPORT QAVVideoBuffer +class QAVVideoBuffer { public: QAVVideoBuffer() = default; diff --git a/src/QtAVPlayer/qavvideocodec_p.h b/src/QtAVPlayer/qavvideocodec_p.h index a491b175..d7e811ff 100644 --- a/src/QtAVPlayer/qavvideocodec_p.h +++ b/src/QtAVPlayer/qavvideocodec_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE class QAVVideoCodecPrivate; class QAVHWDevice; -class Q_AVPLAYER_EXPORT QAVVideoCodec : public QAVFrameCodec +class QAVVideoCodec : public QAVFrameCodec { public: QAVVideoCodec(); diff --git a/src/QtAVPlayer/qavvideofilter_p.h b/src/QtAVPlayer/qavvideofilter_p.h index 6a4b2ef3..ed38df41 100644 --- a/src/QtAVPlayer/qavvideofilter_p.h +++ b/src/QtAVPlayer/qavvideofilter_p.h @@ -27,7 +27,7 @@ QT_BEGIN_NAMESPACE class QAVVideoFilterPrivate; -class Q_AVPLAYER_EXPORT QAVVideoFilter : public QAVFilter +class QAVVideoFilter : public QAVFilter { public: QAVVideoFilter( diff --git a/src/QtAVPlayer/qavvideoframe.h b/src/QtAVPlayer/qavvideoframe.h index a5735d67..aeaa7fb3 100644 --- a/src/QtAVPlayer/qavvideoframe.h +++ b/src/QtAVPlayer/qavvideoframe.h @@ -25,7 +25,7 @@ class QAVCodec; #if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) class QRhi; #endif -class Q_AVPLAYER_EXPORT QAVVideoFrame : public QAVFrame +class QAVVideoFrame : public QAVFrame { public: enum HandleType diff --git a/src/QtAVPlayer/qavvideoinputfilter_p.h b/src/QtAVPlayer/qavvideoinputfilter_p.h index dfb3d7c1..e8825423 100644 --- a/src/QtAVPlayer/qavvideoinputfilter_p.h +++ b/src/QtAVPlayer/qavvideoinputfilter_p.h @@ -25,7 +25,7 @@ QT_BEGIN_NAMESPACE class QAVFrame; class QAVVideoInputFilterPrivate; -class Q_AVPLAYER_EXPORT QAVVideoInputFilter : public QAVInOutFilter +class QAVVideoInputFilter : public QAVInOutFilter { public: QAVVideoInputFilter(const QAVFrame &frame); diff --git a/src/QtAVPlayer/qavvideooutputfilter_p.h b/src/QtAVPlayer/qavvideooutputfilter_p.h index 696dcd62..50b14e25 100644 --- a/src/QtAVPlayer/qavvideooutputfilter_p.h +++ b/src/QtAVPlayer/qavvideooutputfilter_p.h @@ -24,7 +24,7 @@ QT_BEGIN_NAMESPACE class QAVVideoOutputFilterPrivate; -class Q_AVPLAYER_EXPORT QAVVideoOutputFilter : public QAVInOutFilter +class QAVVideoOutputFilter : public QAVInOutFilter { public: QAVVideoOutputFilter(); diff --git a/src/QtAVPlayer/qavplayer-config.h.in b/src/QtAVPlayer/qtQtAVPlayer-config.h similarity index 71% rename from src/QtAVPlayer/qavplayer-config.h.in rename to src/QtAVPlayer/qtQtAVPlayer-config.h index dbe39f0e..379a5b05 100644 --- a/src/QtAVPlayer/qavplayer-config.h.in +++ b/src/QtAVPlayer/qtQtAVPlayer-config.h @@ -1,5 +1,4 @@ #pragma once -#cmakedefine multimedia 1 #ifndef multimedia #define QT_NO_MULTIMEDIA diff --git a/src/QtAVPlayer/qavplayer-config_p.h.in b/src/QtAVPlayer/qtQtAVPlayer-config_p.h similarity index 82% rename from src/QtAVPlayer/qavplayer-config_p.h.in rename to src/QtAVPlayer/qtQtAVPlayer-config_p.h index 299ce584..5cb4b76e 100644 --- a/src/QtAVPlayer/qavplayer-config_p.h.in +++ b/src/QtAVPlayer/qtQtAVPlayer-config_p.h @@ -1,9 +1,5 @@ #pragma once #define QT_FEATURE_ffmpeg 1 -#cmakedefine va_drm 1 -#cmakedefine va_x11 1 -#cmakedefine vdpau 1 -#cmakedefine egl 1 #ifdef va_x11 #define QT_FEATURE_va_x11 1 diff --git a/src/QtAVPlayer/qtavplayerglobal.h b/src/QtAVPlayer/qtavplayerglobal.h index f84559a8..9439f7d6 100644 --- a/src/QtAVPlayer/qtavplayerglobal.h +++ b/src/QtAVPlayer/qtavplayerglobal.h @@ -11,17 +11,4 @@ #include #include -QT_BEGIN_NAMESPACE - -#ifndef QT_STATIC -# ifdef QT_BUILD_QTAVPLAYER_LIB -# define Q_AVPLAYER_EXPORT Q_DECL_EXPORT -# else -# define Q_AVPLAYER_EXPORT Q_DECL_IMPORT -# endif -#else -# define Q_AVPLAYER_EXPORT -#endif - -QT_END_NAMESPACE #endif diff --git a/src/src.pro b/src/src.pro deleted file mode 100644 index 77f0337e..00000000 --- a/src/src.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += QtAVPlayer diff --git a/sync.profile b/sync.profile deleted file mode 100644 index 8905681c..00000000 --- a/sync.profile +++ /dev/null @@ -1,3 +0,0 @@ -%modules = ( - "QtAVPlayer" => "$basedir/src/QtAVPlayer" -); diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt deleted file mode 100644 index a8f031a5..00000000 --- a/tests/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -qt_build_tests() diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt deleted file mode 100644 index 26e40e61..00000000 --- a/tests/auto/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -add_subdirectory(integration) diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro deleted file mode 100644 index 30e1247b..00000000 --- a/tests/auto/auto.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE=subdirs -SUBDIRS += \ - integration diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt deleted file mode 100644 index 06490ee2..00000000 --- a/tests/auto/cmake/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ - -cmake_minimum_required(VERSION 2.8) - -project(qmake_cmake_files) - -enable_testing() - -find_package(Qt5Core REQUIRED) - -include("${_Qt5CTestMacros}") diff --git a/tests/auto/cmake/cmake.pro b/tests/auto/cmake/cmake.pro deleted file mode 100644 index 6afc1f61..00000000 --- a/tests/auto/cmake/cmake.pro +++ /dev/null @@ -1,6 +0,0 @@ -# Cause make to do nothing. -TEMPLATE = subdirs - -CMAKE_QT_MODULES_UNDER_TEST = avplayer - -CONFIG += ctest_testcase diff --git a/tests/auto/integration/CMakeLists.txt b/tests/auto/integration/CMakeLists.txt deleted file mode 100644 index 3802cf9f..00000000 --- a/tests/auto/integration/CMakeLists.txt +++ /dev/null @@ -1,2 +0,0 @@ -add_subdirectory(qavdemuxer) -add_subdirectory(qavplayer) diff --git a/tests/auto/integration/integration.pro b/tests/auto/integration/integration.pro deleted file mode 100644 index fb2fa82c..00000000 --- a/tests/auto/integration/integration.pro +++ /dev/null @@ -1,3 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += qavdemuxer qavplayer diff --git a/tests/auto/integration/qavdemuxer/CMakeLists.txt b/tests/auto/integration/qavdemuxer/CMakeLists.txt deleted file mode 100644 index 7872235d..00000000 --- a/tests/auto/integration/qavdemuxer/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -qt_internal_add_test(tst_qavdemuxer - SOURCES - tst_qavdemuxer.cpp - LIBRARIES - ${PROJECT_NAME} - TESTDATA testdata -) -set(resource_files test.wav) - -qt_internal_add_resource(tst_qavdemuxer "testdata" - PREFIX - "/" - BASE - "${CMAKE_CURRENT_SOURCE_DIR}/../testdata/" - FILES - "../testdata/test.wav" -) - -set_target_properties(Qt6::Gui PROPERTIES INTERFACE_COMPILE_DEFINITIONS "") -target_compile_definitions(tst_qavdemuxer PUBLIC TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/../testdata") - - diff --git a/tests/auto/integration/qavdemuxer/qavdemuxer.pro b/tests/auto/integration/qavdemuxer/qavdemuxer.pro index 31766f82..1709e29a 100644 --- a/tests/auto/integration/qavdemuxer/qavdemuxer.pro +++ b/tests/auto/integration/qavdemuxer/qavdemuxer.pro @@ -1,10 +1,10 @@ TARGET = tst_qavdemuxer -QT += testlib QtAVPlayer-private -qtConfig(multimedia): QT += multimedia-private -INCLUDEPATH += ../../../../src/QtAVPlayer -CONFIG += testcase console -CONFIG += C++1z +INCLUDEPATH += ../../../../src/ ../../../../src/QtAVPlayer +include(../../../../src/QtAVPlayer/QtAVPlayer.pri) + +QT += testlib +CONFIG += c++17 testcase console RESOURCES += files.qrc SOURCES += \ diff --git a/tests/auto/integration/qavplayer/CMakeLists.txt b/tests/auto/integration/qavplayer/CMakeLists.txt deleted file mode 100644 index e69895e5..00000000 --- a/tests/auto/integration/qavplayer/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -qt_internal_add_test(tst_qavplayer - SOURCES - tst_qavplayer.cpp - LIBRARIES - ${PROJECT_NAME} - TESTDATA testdata -) - -set_target_properties(Qt6::Gui PROPERTIES INTERFACE_COMPILE_DEFINITIONS "") -target_compile_definitions(tst_qavplayer PUBLIC TEST_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/../testdata") diff --git a/tests/auto/integration/qavplayer/qavplayer.pro b/tests/auto/integration/qavplayer/qavplayer.pro index ccf33d43..def98607 100644 --- a/tests/auto/integration/qavplayer/qavplayer.pro +++ b/tests/auto/integration/qavplayer/qavplayer.pro @@ -1,10 +1,11 @@ TARGET = tst_qavplayer +INCLUDEPATH += ../../../../src/ ../../../../src/QtAVPlayer +include(../../../../src/QtAVPlayer/QtAVPlayer.pri) + QT -= gui -QT += testlib QtAVPlayer QtAVPlayer-private -qtConfig(multimedia): QT += multimedia-private -INCLUDEPATH += ../../../../src/QtAVPlayer -CONFIG += testcase console C++1z +QT += testlib +CONFIG += testcase console c++17 SOURCES += \ tst_qavplayer.cpp diff --git a/tests/tests.pro b/tests/tests.pro deleted file mode 100644 index 157ef345..00000000 --- a/tests/tests.pro +++ /dev/null @@ -1,2 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += auto