Skip to content

Commit

Permalink
CMake: Make qmlglsink Private
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Apr 19, 2024
1 parent 1579b15 commit 64e1d5d
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 22 deletions.
3 changes: 0 additions & 3 deletions libs/qmlglsink/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,9 +208,6 @@ if(QGC_ENABLE_VIDEOSTREAMING)
PRIVATE
HAVE_QT_QPA_HEADER
QT_QPA_HEADER=<QtGui/qpa/qplatformnativeinterface.h>
PUBLIC
QGC_GST_STREAMING
QGC_CMAKE_GST
)
if(LINUX)
target_compile_definitions(qmlglsink PRIVATE HAVE_QT_X11)
Expand Down
16 changes: 10 additions & 6 deletions src/VideoReceiver/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
find_package(Qt6 REQUIRED COMPONENTS Core Multimedia)
find_package(Qt6 REQUIRED COMPONENTS Core)

qt_add_library(VideoReceiver STATIC
VideoReceiver.h
)

target_link_libraries(VideoReceiver
PUBLIC
Qt6::Multimedia
Qt6::OpenGL
Qt6::Quick
Utilities
Qt6::Core
)

target_include_directories(VideoReceiver PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})

if(GST_FOUND)
find_package(Qt6 REQUIRED COMPONENTS Quick)

target_sources(VideoReceiver
PRIVATE
gstqgc.c
Expand All @@ -26,11 +25,16 @@ if(GST_FOUND)
)

target_link_libraries(VideoReceiver
PUBLIC
PRIVATE
qmlglsink
Utilities
PUBLIC
Qt6::Quick
Settings
)

target_compile_definitions(VideoReceiver PUBLIC QGC_GST_STREAMING)

if(CMAKE_BUILD_TYPE STREQUAL "Release")
target_compile_definitions(VideoReceiver PRIVATE QGC_INSTALL_RELEASE)
endif()
Expand Down
2 changes: 1 addition & 1 deletion src/VideoReceiver/GStreamer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* @author Gus Grubba <[email protected]>
*/

#include <QDebug>
#include <QtCore/QDebug>

#include "GStreamer.h"
#include "GstVideoReceiver.h"
Expand Down
5 changes: 3 additions & 2 deletions src/VideoReceiver/GStreamer.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
#pragma once

#include <QtCore/QLoggingCategory>
#include <QQuickItem>
#include <QtQuick/QQuickItem>

#include "Settings/VideoDecoderOptions.h"
#include "VideoReceiver.h"

Q_DECLARE_LOGGING_CATEGORY(GStreamerLog)
Q_DECLARE_LOGGING_CATEGORY(GStreamerAPILog)

class VideoReceiver;

class GStreamer {
public:
static void blacklist(VideoDecoderOptions option);
Expand Down
6 changes: 3 additions & 3 deletions src/VideoReceiver/GstVideoReceiver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
#include "GstVideoReceiver.h"
#include "QGCLoggingCategory.h"

#include <QDebug>
#include <QUrl>
#include <QDateTime>
#include <QtCore/QDebug>
#include <QtCore/QUrl>
#include <QtCore/QDateTime>

QGC_LOGGING_CATEGORY(VideoReceiverLog, "VideoReceiverLog")

Expand Down
10 changes: 5 additions & 5 deletions src/VideoReceiver/GstVideoReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#pragma once

#include <QtCore/QLoggingCategory>
#include <QTimer>
#include <QThread>
#include <QWaitCondition>
#include <QMutex>
#include <QQueue>
#include <QtCore/QTimer>
#include <QtCore/QThread>
#include <QtCore/QWaitCondition>
#include <QtCore/QMutex>
#include <QtCore/QQueue>

#include "VideoReceiver.h"

Expand Down
4 changes: 2 additions & 2 deletions src/VideoReceiver/VideoReceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

#pragma once

#include <QObject>
#include <QSize>
#include <QtCore/QObject>
#include <QtCore/QSize>

class VideoReceiver : public QObject
{
Expand Down

0 comments on commit 64e1d5d

Please sign in to comment.