Commit 343eecde authored by Tomaz Canabrava's avatar Tomaz Canabrava Committed by Daniel Agar

Correctly link against GStreamer

Video is still not being displayed, for some reason
parent d4492ef5
cmake_minimum_required(VERSION 3.2) cmake_minimum_required(VERSION 3.2)
project(QGroundControl LANGUAGES CXX) project(QGroundControl LANGUAGES C CXX)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage") set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug;Release;RelWithDebInfo;MinSizeRel;Coverage")
...@@ -58,6 +58,16 @@ if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE}) ...@@ -58,6 +58,16 @@ if (CCACHE AND CCACHE_PROGRAM AND NOT DEFINED ENV{CCACHE_DISABLE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
endif() endif()
#=============================================================================
# GStreamer
#
find_package(PkgConfig)
pkg_check_modules(GST
gstreamer-1.0>=1.14
gstreamer-video-1.0>=1.14
)
#============================================================================= #=============================================================================
# Qt5 # Qt5
# #
...@@ -73,6 +83,7 @@ find_package(Qt5 ${QT_VERSION} ...@@ -73,6 +83,7 @@ find_package(Qt5 ${QT_VERSION}
Positioning Positioning
Quick Quick
QuickWidgets QuickWidgets
OpenGL
Sql Sql
Svg Svg
Test Test
......
if (GST_FOUND)
include_directories(
${GST_INCLUDE_DIRS}
gstqtvideosink/utils/
)
set(EXTRA_SRC) set(EXTRA_SRC
if(VIDEO) gstqtvideosink/delegates/basedelegate.cpp
list(APPEND EXTRA_SRC gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp
gstqtvideosink/delegates/basedelegate.cpp gstqtvideosink/delegates/qtvideosinkdelegate.cpp
gstqtvideosink/delegates/qtquick2videosinkdelegate.cpp gstqtvideosink/delegates/qwidgetvideosinkdelegate.cpp
gstqtvideosink/delegates/qtvideosinkdelegate.cpp gstqtvideosink/gstqtglvideosink.cpp
gstqtvideosink/delegates/qwidgetvideosinkdelegate.cpp gstqtvideosink/gstqtglvideosinkbase.cpp
gstqtvideosink/gstqtglvideosink.cpp gstqtvideosink/gstqtquick2videosink.cpp
gstqtvideosink/gstqtglvideosinkbase.cpp gstqtvideosink/gstqtvideosink.cpp
gstqtvideosink/gstqtquick2videosink.cpp gstqtvideosink/gstqtvideosinkbase.cpp
gstqtvideosink/gstqtvideosink.cpp gstqtvideosink/gstqtvideosinkplugin.cpp
gstqtvideosink/gstqtvideosinkbase.cpp gstqtvideosink/gstqwidgetvideosink.cpp
gstqtvideosink/gstqtvideosinkplugin.cpp gstqtvideosink/gstqtvideosinkmarshal.c
gstqtvideosink/gstqwidgetvideosink.cpp gstqtvideosink/painters/genericsurfacepainter.cpp
gstqtvideosink/painters/genericsurfacepainter.cpp gstqtvideosink/painters/openglsurfacepainter.cpp
gstqtvideosink/painters/openglsurfacepainter.cpp gstqtvideosink/painters/videomaterial.cpp
gstqtvideosink/painters/videomaterial.cpp gstqtvideosink/painters/videonode.cpp
gstqtvideosink/painters/videonode.cpp gstqtvideosink/utils/bufferformat.cpp
gstqtvideosink/utils/bufferformat.cpp gstqtvideosink/utils/utils.cpp
gstqtvideosink/utils/utils.cpp )
)
endif()
add_library(VideoStreaming
VideoItem.cc
VideoReceiver.cc
VideoStreaming.cc
VideoSurface.cc
SubtitleWriter.cc
${EXTRA_SRC}
)
target_link_libraries(VideoStreaming add_library(VideoStreaming
PUBLIC VideoItem.cc
qgc VideoReceiver.cc
VideoStreaming.cc
VideoSurface.cc
SubtitleWriter.cc
${EXTRA_SRC}
)
Qt5::Multimedia target_link_libraries(VideoStreaming
) PUBLIC
qgc
Qt5::Multimedia
Qt5::OpenGL
${GST_LIBRARIES}
)
target_include_directories(VideoStreaming INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_include_directories(VideoStreaming INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment