diff --git a/src/VideoStreaming/VideoReceiver.cc b/src/VideoStreaming/VideoReceiver.cc index 07a836e83876af1bf3275f90dad12e41f25c6564..cd62f8d11aa28864b44d8f4ecd5f75c57f08a430 100644 --- a/src/VideoStreaming/VideoReceiver.cc +++ b/src/VideoStreaming/VideoReceiver.cc @@ -200,6 +200,11 @@ VideoReceiver::start() qCDebug(VideoReceiverLog) << "Already running!"; return; } + if (isUdp264) { + setVideoDecoder(H264_HW); + } else if (isUdp265) { + setVideoDecoder(H265_HW); + } _starting = true; @@ -240,11 +245,11 @@ VideoReceiver::start() } g_object_set(static_cast(dataSource), "uri", qPrintable(_uri), "caps", caps, nullptr); } else if(isUdp265) { - - - //-- TODO - - + if ((caps = gst_caps_from_string("application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265")) == nullptr) { + qCritical() << "VideoReceiver::start() failed. Error with gst_caps_from_string()"; + break; + } + g_object_set(static_cast(dataSource), "uri", qPrintable(_uri.replace("udp265", "udp")), "caps", caps, nullptr); #if defined(QGC_GST_TAISYNC_ENABLED) && (defined(__android__) || defined(__ios__)) } else if(isTaisyncUSB) { QString uri = QString("0.0.0.0:%1").arg(TAISYNC_VIDEO_UDP_PORT); diff --git a/src/ui/preferences/GeneralSettings.qml b/src/ui/preferences/GeneralSettings.qml index b1e697c0915e2832a5435eaad267f48e501223f6..add796374c6b5a8caacc1f4f02546228df99f805 100644 --- a/src/ui/preferences/GeneralSettings.qml +++ b/src/ui/preferences/GeneralSettings.qml @@ -47,6 +47,7 @@ Rectangle { property string _videoSource: QGroundControl.settingsManager.videoSettings.videoSource.value property bool _isGst: QGroundControl.videoManager.isGStreamer property bool _isUDP264: _isGst && _videoSource === QGroundControl.settingsManager.videoSettings.udp264VideoSource + property bool _isUDP265: _isGst && _videoSource === QGroundControl.settingsManager.videoSettings.udp265VideoSource property bool _isRTSP: _isGst && _videoSource === QGroundControl.settingsManager.videoSettings.rtspVideoSource property bool _isTCP: _isGst && _videoSource === QGroundControl.settingsManager.videoSettings.tcpVideoSource property bool _isMPEGTS: _isGst && _videoSource === QGroundControl.settingsManager.videoSettings.mpegtsVideoSource