Skip to content

Commit

Permalink
VideoManager: Fix QtMultimedia Define
Browse files Browse the repository at this point in the history
  • Loading branch information
HTRamsey committed Dec 21, 2024
1 parent fd9e451 commit c45f87c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/Settings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ target_link_libraries(Settings
GStreamerReceiver
QGC
QmlControls
QtMultimediaReceiver
Vehicle
VideoManager
VideoReceiver
Expand Down
6 changes: 2 additions & 4 deletions src/Settings/VideoSettings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,7 @@ DECLARE_SETTINGGROUP(Video, "Video")

_nameToMetaDataMap[videoSourceName]->setEnumInfo(videoSourceCookedList, videoSourceList);

#ifdef QGC_GST_STREAMING
_setForceVideoDecodeList();
#endif

// Set default value for videoSource
_setDefaults();
Expand Down Expand Up @@ -250,9 +248,9 @@ void VideoSettings::_configChanged(QVariant)
emit streamConfiguredChanged(streamConfigured());
}

#ifdef QGC_GST_STREAMING
void VideoSettings::_setForceVideoDecodeList()
{
#ifdef QGC_GST_STREAMING
const QVariantList removeForceVideoDecodeList{
#if defined(Q_OS_LINUX) && !defined(Q_OS_ANDROID)
GStreamer::VideoDecoderOptions::ForceVideoDecoderDirectX3D,
Expand All @@ -274,5 +272,5 @@ void VideoSettings::_setForceVideoDecodeList()
for (const auto &value : removeForceVideoDecodeList) {
_nameToMetaDataMap[forceVideoDecoderName]->removeEnumInfo(value);
}
}
#endif
}
2 changes: 0 additions & 2 deletions src/Settings/VideoSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ private slots:

private:
void _setDefaults ();
#ifdef QGC_GST_STREAMING
void _setForceVideoDecodeList();
#endif

private:
bool _noVideo = false;
Expand Down
8 changes: 0 additions & 8 deletions src/VideoManager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@ qt_add_library(VideoManager STATIC
VideoManager.h
)

# option(QGC_ENABLE_VIDEOSTREAMING "Enable video streaming" ON)
# cmake_print_variables(QGC_ENABLE_VIDEOSTREAMING)
# if(NOT QGC_ENABLE_VIDEOSTREAMING)
# message(STATUS "Video streaming support disabled")
# return()
# endif()
# message(STATUS "Video streaming support enabled")

add_subdirectory(VideoReceiver)

target_link_libraries(VideoManager
Expand Down
2 changes: 1 addition & 1 deletion src/VideoManager/VideoManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ void VideoManager::init()
}
});

(void) connect(videoReceiver.receiver, &VideoReceiver::onTakeScreenshotComplete, this, [this, &videoReceiver](VideoReceiver::STATUS status) {
(void) connect(videoReceiver.receiver, &VideoReceiver::onTakeScreenshotComplete, this, [&videoReceiver](VideoReceiver::STATUS status) {
if (status == VideoReceiver::STATUS_OK) {
qCDebug(VideoManagerLog) << "Video" << videoReceiver.index << "screenshot taken";
} else {
Expand Down

0 comments on commit c45f87c

Please sign in to comment.