Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VideoManager: Fix QtMultimedia Define #12244

Merged
merged 1 commit into from
Dec 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading