86 void _onNewSourcePad(GstPad *pad);
87 void _onNewDecoderPad(GstPad *pad);
89 void _ensureVideoSinkInPipeline();
90 bool _addVideoSink(GstPad *pad);
92 void _noteVideoSinkFrame();
93 void _noteEndOfStream();
97 void _shutdownDecodingBranch();
98 void _shutdownRecordingBranch();
99 void _logDecodebin3SelectedCodec(
GstElement *decodebin3);
101 bool _needDispatch();
102 void _dispatchSignal(
Task emitter);
104 static gboolean _onBusMessage(GstBus *bus, GstMessage *message, gpointer user_data);
105 static void _onNewPad(
GstElement *element, GstPad *pad, gpointer data);
106 static void _wrapWithGhostPad(
GstElement *element, GstPad *pad, gpointer data);
107 static void _linkPad(
GstElement *element, GstPad *pad, gpointer data);
108 static gboolean _padProbe(
GstElement *element, GstPad *pad, gpointer user_data);
109#if !defined(QGC_GST_BUILD_VERSION_MAJOR) || (QGC_GST_BUILD_VERSION_MAJOR == 1 && QGC_GST_BUILD_VERSION_MINOR < 28)
110 static gboolean _filterParserCaps(
GstElement *bin, GstPad *pad,
GstElement *element, GstQuery *query, gpointer data);
112 static GstPadProbeReturn _teeProbe(GstPad *pad, GstPadProbeInfo *info, gpointer user_data);
113 static GstPadProbeReturn _videoSinkProbe(GstPad *pad, GstPadProbeInfo *info, gpointer user_data);
114 static GstPadProbeReturn _eosProbe(GstPad *pad, GstPadProbeInfo *info, gpointer user_data);
115 static GstPadProbeReturn _keyframeWatch(GstPad *pad, GstPadProbeInfo *info, gpointer user_data);
126 gulong _teeProbeId = 0;
127 gulong _videoSinkProbeId = 0;
128 gulong _eosProbeId = 0;
129 GstPad *_eosProbePad =
nullptr;
130 gulong _keyframeWatchId = 0;
131 bool _recordingStopRequested =
false;
133 QString _decoderName;
134 quint64 _processedFrames = 0;
135 quint64 _droppedFrames = 0;
136 qint64 _currentJitterNs = 0;
137 double _qosProportion = 1.0;
138 int _qosQuality = 1000000;