QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GStreamerLibavWorkaround.cc
Go to the documentation of this file.
2
3#include <gst/gst.h>
4
5#include "GStreamerHelpers.h"
6
7namespace GStreamer {
8
9QLatin1StringView libavcodecVersion()
10{
11#ifdef QGC_GST_LIBAVCODEC_VERSION
12 return QLatin1StringView(QGC_GST_LIBAVCODEC_VERSION);
13#else
14 return {};
15#endif
16}
17
18bool avoidHevcWavefrontDeadlock(GstElement* decoder, QLatin1StringView version)
19{
20 if (version != QLatin1StringView("61.19.100")) {
21 return false;
22 }
23
24 if (g_strcmp0(factoryNameOf(GST_OBJECT_CAST(decoder)), "avdec_h265") != 0) {
25 return false;
26 }
27
28 g_object_set(decoder, "max-threads", 1, nullptr);
29 return true;
30}
31
32} // namespace GStreamer
struct _GstElement GstElement
const char * factoryNameOf(GstObject *object)
The name of the factory that made object ("rtph264depay"); null when it is no element or has no facto...
QLatin1StringView libavcodecVersion()
bool avoidHevcWavefrontDeadlock(GstElement *decoder, QLatin1StringView version)