Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/plugins/generic/psimedia/CMakeLists.txt b/plugins/generic/psimedia/CMakeLists.txt
- index bc184283..6a789224 100644
- --- a/plugins/generic/psimedia/CMakeLists.txt
- +++ b/plugins/generic/psimedia/CMakeLists.txt
- @@ -17,23 +17,29 @@ if( (CMAKE_CROSSCOMPILING) AND (DEFINED MSYS) )
- message(STATUS "MXE root path: ${CMAKE_PREFIX_PATH}")
- endif()
- +if(POLICY CMP0053)
- + cmake_policy(SET CMP0053 NEW)
- +endif()
- +
- # On Windows debug library should have 'd' postfix.
- if(WIN32)
- + unset(GST_SDK)
- set(CMAKE_DEBUG_POSTFIX "d")
- if(NOT USE_MXE)
- if(CMAKE_SIZEOF_VOID_P MATCHES "8")
- if(MSVC)
- - set(GST_SDK $ENV{GSTREAMER_1_0_ROOT_MSVC_X86_64} CACHE STRING "Path to gstreamer SDK")
- + set(GST_SDK_PATH $ENV{GSTREAMER_1_0_ROOT_MSVC_X86_64} CACHE STRING "Path to gstreamer SDK")
- else()
- - set(GST_SDK $ENV{GSTREAMER_1_0_ROOT_X86_64} CACHE STRING "Path to gstreamer SDK")
- + set(GST_SDK_PATH $ENV{GSTREAMER_1_0_ROOT_X86_64} CACHE STRING "Path to gstreamer SDK")
- endif()
- else()
- if(MSVC)
- - set(GST_SDK $ENV{GSTREAMER_1_0_ROOT_MSVC_X86} CACHE STRING "Path to gstreamer SDK")
- + set(GST_SDK_PATH $ENV{GSTREAMER_1_0_ROOT_MSVC_X86} CACHE STRING "Path to gstreamer SDK")
- else()
- - set(GST_SDK $ENV{GSTREAMER_1_0_ROOT_x86} CACHE STRING "Path to gstreamer SDK")
- + set(GST_SDK_PATH $ENV{GSTREAMER_1_0_ROOT_x86} CACHE STRING "Path to gstreamer SDK")
- endif()
- endif()
- + string(REPLACE "\\" "/" GST_SDK ${GST_SDK_PATH})
- message(STATUS "GST_SDK: ${GST_SDK}")
- if(GST_SDK)
- set(ENV{PKG_CONFIG_PATH} "${GST_SDK}/lib/pkgconfig")
- @@ -125,8 +131,8 @@ endif()
- if(BUILD_DEMO)
- add_subdirectory(demo)
- add_subdirectory(gstplugin)
- - add_subdirectory(gstprovider)
- endif()
- if(BUILD_PSIPLUGIN)
- add_subdirectory(psiplugin)
- endif()
- +add_subdirectory(gstprovider)
- diff --git a/plugins/generic/psimedia/gstplugin/CMakeLists.txt b/plugins/generic/psimedia/gstplugin/CMakeLists.txt
- index e4414634..79e8fa33 100644
- --- a/plugins/generic/psimedia/gstplugin/CMakeLists.txt
- +++ b/plugins/generic/psimedia/gstplugin/CMakeLists.txt
- @@ -21,6 +21,8 @@ include_directories(
- ${CMAKE_CURRENT_BINARY_DIR}
- ${CMAKE_CURRENT_LIST_DIR}
- ${ABS_GPLUG_PARENT_DIR}/psimedia
- + ${ABS_GPLUG_PARENT_DIR}/gstprovider
- + ${ABS_GPLUG_PARENT_DIR}/gstprovider/devices
- )
- set(SOURCES
- @@ -42,5 +44,7 @@ target_link_libraries(
- ${PLUGIN}
- ${QT_DEPLIBS}
- )
- +add_dependencies(${PLUGIN} gstprovidersrc)
- target_link_libraries(${PLUGIN} gstprovidersrc)
- install(TARGETS ${PLUGIN} LIBRARY DESTINATION ${LIB_INSTALL_DIR})
- +
- diff --git a/plugins/generic/psimedia/gstprovider/CMakeLists.txt b/plugins/generic/psimedia/gstprovider/CMakeLists.txt
- index 585730fd..0590f48f 100644
- --- a/plugins/generic/psimedia/gstprovider/CMakeLists.txt
- +++ b/plugins/generic/psimedia/gstprovider/CMakeLists.txt
- @@ -128,6 +128,10 @@ endif()
- set(PROVIDERLIB gstprovidersrc)
- add_library(${PROVIDERLIB} STATIC ${SOURCES})
- +if(UNIX AND ${QT_DEFAULT_MAJOR_VERSION} GREATER_EQUAL 6)
- + add_definitions(-fPIC)
- +endif()
- +
- target_include_directories(${PROVIDERLIB}
- PUBLIC
- ${CMAKE_CURRENT_SOURCE_DIR}
- diff --git a/plugins/generic/psimedia/gstprovider/devices.cpp b/plugins/generic/psimedia/gstprovider/devices.cpp
- index c404fca8..ce110b19 100644
- --- a/plugins/generic/psimedia/gstprovider/devices.cpp
- +++ b/plugins/generic/psimedia/gstprovider/devices.cpp
- @@ -188,7 +188,11 @@ public:
- }
- gchar *name = gst_device_get_display_name(gdev);
- +#ifdef Q_OS_WINDOWS
- + d.name = QString::fromLocal8Bit(name);
- +#else
- d.name = QString::fromUtf8(name);
- +#endif
- g_free(name);
- if (gst_device_has_classes(gdev, "Audio/Source")) {
- diff --git a/plugins/generic/psimedia/gstprovider/gstthread.cpp b/plugins/generic/psimedia/gstprovider/gstthread.cpp
- index 61664738..bc15cc1c 100644
- --- a/plugins/generic/psimedia/gstprovider/gstthread.cpp
- +++ b/plugins/generic/psimedia/gstprovider/gstthread.cpp
- @@ -242,10 +242,10 @@ public:
- class GstMainLoop::Private {
- public:
- - typedef struct {
- + struct BridgeQueueSource{
- GSource parent;
- GstMainLoop::Private *d = nullptr;
- - } BridgeQueueSource;
- + };
- GstMainLoop *q = nullptr;
- QString pluginPath;
- diff --git a/plugins/generic/psimedia/psiplugin/CMakeLists.txt b/plugins/generic/psimedia/psiplugin/CMakeLists.txt
- index 5ea0f8bd..549a3868 100644
- --- a/plugins/generic/psimedia/psiplugin/CMakeLists.txt
- +++ b/plugins/generic/psimedia/psiplugin/CMakeLists.txt
- @@ -19,7 +19,6 @@ get_filename_component(ABS_PLUGINS_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}/.." ABSOL
- set(PLUGINS_ROOT_DIR "${ABS_PLUGINS_ROOT_DIR}" CACHE STRING "Plugins root path. Path where include directory placed")
- if(NOT BUILD_DEMO)
- - include(${ABS_PLUGINS_ROOT_DIR}/gstprovider/CMakeLists.txt)
- include_directories(
- ${ABS_PLUGINS_ROOT_DIR}/gstprovider
- ${ABS_PLUGINS_ROOT_DIR}/gstprovider/devices
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement