Commit 07e26df1 authored by Andrew Voznytsa's avatar Andrew Voznytsa

Use parsebin for automatic stream demuxing and parsing; Automatically insert...

Use parsebin for automatic stream demuxing and parsing; Automatically insert rtpjitterbuffer for RTP streams to avoid video stuttering
parent 21c47c16
...@@ -24,16 +24,6 @@ CustomVideoManager::_updateSettings() ...@@ -24,16 +24,6 @@ CustomVideoManager::_updateSettings()
{ {
if(!_videoSettings || !_videoReceiver) if(!_videoSettings || !_videoReceiver)
return; return;
//-- Check encoding
if(_activeVehicle && _activeVehicle->dynamicCameras()) {
auto* pCamera = qobject_cast<CustomCameraControl*>(_activeVehicle->dynamicCameras()->currentCameraInstance());
if(pCamera) {
Fact *fact = pCamera->videoEncoding();
if (fact) {
_videoReceiver->setVideoDecoder(static_cast<VideoReceiver::VideoEncoding>(fact->rawValue().toInt()));
}
}
}
VideoManager::_updateSettings(); VideoManager::_updateSettings();
} }
...@@ -19,7 +19,6 @@ QGC_LOGGING_CATEGORY(CustomCameraVerboseLog, "CustomCameraVerboseLog") ...@@ -19,7 +19,6 @@ QGC_LOGGING_CATEGORY(CustomCameraVerboseLog, "CustomCameraVerboseLog")
static const char* kCAM_IRPALETTE = "CAM_IRPALETTE"; static const char* kCAM_IRPALETTE = "CAM_IRPALETTE";
static const char* kCAM_NEXTVISION_IRPALETTE = "IR_SENS_POL"; static const char* kCAM_NEXTVISION_IRPALETTE = "IR_SENS_POL";
static const char* kCAM_ENC = "CAM_ENC";
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
CustomCameraControl::CustomCameraControl(const mavlink_camera_information_t *info, Vehicle* vehicle, int compID, QObject* parent) CustomCameraControl::CustomCameraControl(const mavlink_camera_information_t *info, Vehicle* vehicle, int compID, QObject* parent)
...@@ -117,13 +116,6 @@ CustomCameraControl::irPalette() ...@@ -117,13 +116,6 @@ CustomCameraControl::irPalette()
return nullptr; return nullptr;
} }
//-----------------------------------------------------------------------------
Fact*
CustomCameraControl::videoEncoding()
{
return _paramComplete ? getFact(kCAM_ENC) : nullptr;
}
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
void void
CustomCameraControl::setThermalMode(ThermalViewMode mode) CustomCameraControl::setThermalMode(ThermalViewMode mode)
......
...@@ -29,10 +29,8 @@ public: ...@@ -29,10 +29,8 @@ public:
CustomCameraControl(const mavlink_camera_information_t* info, Vehicle* vehicle, int compID, QObject* parent = nullptr); CustomCameraControl(const mavlink_camera_information_t* info, Vehicle* vehicle, int compID, QObject* parent = nullptr);
Q_PROPERTY(Fact* irPalette READ irPalette NOTIFY parametersReady) Q_PROPERTY(Fact* irPalette READ irPalette NOTIFY parametersReady)
Q_PROPERTY(Fact* videoEncoding READ videoEncoding NOTIFY parametersReady)
Fact* irPalette (); Fact* irPalette ();
Fact* videoEncoding ();
bool takePhoto () override; bool takePhoto () override;
bool stopTakePhoto () override; bool stopTakePhoto () override;
......
...@@ -345,13 +345,6 @@ VideoManager::_makeVideoSink(gpointer widget) ...@@ -345,13 +345,6 @@ VideoManager::_makeVideoSink(gpointer widget)
g_object_set(qmlglsink, "widget", widget, NULL); g_object_set(qmlglsink, "widget", widget, NULL);
// FIXME: AV: temporally disable any sort of QoS due to unknow (yet) timing issues
#if defined(__android__) || defined(__ios__)
//g_object_set(qmlglsink, "max-lateness", -1, NULL);
g_object_set(qmlglsink, "qos", FALSE, NULL);
g_object_set(qmlglsink, "sync", FALSE, NULL);
#endif
if ((bin = gst_bin_new("videosink")) == nullptr) { if ((bin = gst_bin_new("videosink")) == nullptr) {
qCritical() << "VideoManager::_makeVideoSink() failed. Error with gst_bin_new('videosink')"; qCritical() << "VideoManager::_makeVideoSink() failed. Error with gst_bin_new('videosink')";
break; break;
......
This diff is collapsed.
...@@ -32,12 +32,6 @@ class VideoReceiver : public QObject ...@@ -32,12 +32,6 @@ class VideoReceiver : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
enum VideoEncoding {
H264_SW = 1,
H264_HW = 2,
H265_SW = 3,
H265_HW = 4
};
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
Q_PROPERTY(bool recording READ recording NOTIFY recordingChanged) Q_PROPERTY(bool recording READ recording NOTIFY recordingChanged)
...@@ -63,7 +57,6 @@ public: ...@@ -63,7 +57,6 @@ public:
virtual void setShowFullScreen (bool show) { _showFullScreen = show; emit showFullScreenChanged(); } virtual void setShowFullScreen (bool show) { _showFullScreen = show; emit showFullScreenChanged(); }
void setVideoDecoder (VideoEncoding encoding);
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
void setVideoSink (GstElement* videoSink); void setVideoSink (GstElement* videoSink);
#endif #endif
...@@ -91,6 +84,7 @@ public slots: ...@@ -91,6 +84,7 @@ public slots:
protected slots: protected slots:
virtual void _updateTimer (); virtual void _updateTimer ();
#if defined(QGC_GST_STREAMING) #if defined(QGC_GST_STREAMING)
GstElement* _makeSource (const QString& uri);
virtual void _restart_timeout (); virtual void _restart_timeout ();
virtual void _tcp_timeout (); virtual void _tcp_timeout ();
virtual void _connected (); virtual void _connected ();
......
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