Namespaces | |
| namespace | Environment |
| namespace | SelfTest |
| The self-test's media pipelines: decoding the embedded samples and recording and reading back a file. | |
| namespace | SourceFactory |
| The RTSP source GStreamer::SourceFactory::create() builds, with QGC's transport, latency and retransmission policy. | |
Classes | |
| struct | MissingPluginFeature |
| A QGC video feature whose GStreamer elements are not all registered. More... | |
| struct | DecoderInfo |
| A video decoder factory as planRanks() sees it. More... | |
| struct | RankTraits |
| The platform rules planRanks() adds to an option. More... | |
| struct | RankChange |
| struct | RankPlan |
| class | DecoderRankApplier |
| class | ScopedDecoderOption |
| struct | GstObjectDeleter |
| struct | GstQueryDeleter |
| struct | GstCapsDeleter |
| struct | GstMessageDeleter |
| struct | GstEventDeleter |
| struct | GstContextDeleter |
| struct | GstStructureDeleter |
| struct | GFreeDeleter |
| struct | GErrorDeleter |
| struct | MessageError |
| What an ERROR or WARNING message carries, owned. The debug detail may be null. More... | |
| class | ScopedSignal |
| class | PadProbe |
| struct | RtpPacketCounts |
| What countRtpPackets() has counted for a bin since it was installed. More... | |
Typedefs | |
| using | GstObjectPtr = std::unique_ptr<GstObject, GstObjectDeleter> |
| using | GstElementPtr = std::unique_ptr<GstElement, GstObjectDeleter> |
| using | GstPadPtr = std::unique_ptr<GstPad, GstObjectDeleter> |
| using | GstBusPtr = std::unique_ptr<GstBus, GstObjectDeleter> |
| using | GstFactoryPtr = std::unique_ptr<GstElementFactory, GstObjectDeleter> |
| using | GstFeaturePtr = std::unique_ptr<GstPluginFeature, GstObjectDeleter> |
| using | GstQueryPtr = std::unique_ptr<GstQuery, GstQueryDeleter> |
| using | GstCapsPtr = std::unique_ptr<GstCaps, GstCapsDeleter> |
| using | GstMessagePtr = std::unique_ptr<GstMessage, GstMessageDeleter> |
| using | GstEventPtr = std::unique_ptr<GstEvent, GstEventDeleter> |
| using | GstContextPtr = std::unique_ptr<GstContext, GstContextDeleter> |
| using | GstStructurePtr = std::unique_ptr<GstStructure, GstStructureDeleter> |
| using | GCharPtr = std::unique_ptr<gchar, GFreeDeleter> |
| using | GErrorPtr = std::unique_ptr<GError, GErrorDeleter> |
Enumerations | |
| enum class | PipelineBranch { None , Decoding , Recording } |
| The tee branch a pipeline element belongs to, so a bus message can be blamed on the part that failed. More... | |
| enum class | D3DApi : uint8_t { D3D11 , D3D12 } |
| The D3D decoder API a Windows QRhi backend samples zero-copy. More... | |
Functions | |
| GQuark | pipelineBranchQuark () |
| void | markBranch (GstElement *element, PipelineBranch branch) |
Marks element and everything inside it as part of branch. | |
| PipelineBranch | branchOf (GstObject *object) |
The branch of object's nearest marked ancestor (itself included). Thread-safe. | |
| QList< MissingPluginFeature > | missingPluginFeatures (const std::function< bool(const char *factoryName)> &hasFactory) |
| bool | completeInit (std::optional< int > debugLevel=std::nullopt) |
debugLevel: the debug threshold to start with (none when unset), unless GST_DEBUG is set. | |
| bool | initialize (const VideoBackend::InitParams ¶ms) |
| GstElement * | createVideoSink (const QByteArray &conversionElement, bool disablePixelAspectRatio, bool gpuZeroCopy) |
| QGCQVideoSinkController * | setupQVideoSinkElement (GstElement *sinkBin, QVideoSink *videoSink, QObject *controllerParent) |
| void | onMainWindowReady (QQuickWindow *window) |
| void | setDebugLevel (int level) |
| RankPlan | planRanks (VideoDecoderOption option, const QList< DecoderInfo > &decoders, const RankTraits &traits) |
The rank changes option makes to decoders, from their original ranks, on a platform with traits. | |
| void | forEachVideoDecoderFactory (GstRank minRank, const std::function< void(GstElementFactory *)> &visitor) |
| VideoDecoderOption | decoderFamilyForFactory (const char *factoryName) |
| bool | isHardwareDecoderFactory (GstElementFactory *factory) |
| QString | describeDecoderFactory (GstElementFactory *factory) |
| "[HW|SW] <plugin>/<factory> rank=<rank> (<klass>)" for decoder logs. | |
| bool | changeFeatureRank (GstRegistry *registry, const char *featureName, uint16_t rank) |
| DecoderRankApplier::setRank() on the process's applier, so setCodecPriorities() restores the rank too. | |
| void | setCodecPriorities (VideoDecoderOption option) |
| DecoderRankApplier::apply() on the process's applier. GUI thread. | |
| bool | demoteFailedDecoder (const char *factoryName, const GstCaps *caps) |
| DecoderRankApplier::demoteFailedDecoder() on the process's applier. Any thread. | |
| QList< VideoDecoderOption > | availableDecoderFamilies () |
| void | logDecoderRanks () |
| void | disposeChild (GstElement *element) |
| void | flushAndDisposeChild (GstElement *element) |
| void | disposeChildAsync (GstElement *element) |
| GstElement * | addToBin (GstElement *bin, GstElementPtr element, const char *what) |
| QByteArray | glibFileName (const QString &file) |
| void | requestKeyframe (GstPad *sinkPad) |
| void | sendEventAsync (GstPad *pad, GstEvent *event) |
| GstPadPtr | firstSrcPad (GstElement *element) |
element's first src pad, or null when it has none (yet). | |
| const char * | factoryNameOf (GstObject *object) |
The name of the factory that made object ("rtph264depay"); null when it is no element or has no factory. | |
| std::function< void()> | holdPadUntilLinked (GstPad *pad, std::function< void(GstPad *pad)> link) |
| void | forEachPlugin (GstRegistry *registry, const std::function< void(GstPlugin *)> &visitor) |
| QLatin1StringView | libavcodecVersion () |
| bool | avoidHevcWavefrontDeadlock (GstElement *decoder, QLatin1StringView version) |
| bool | externalPluginLoaderFailed () |
| void | resetExternalPluginLoaderFailed () |
| void | redirectGLibLogging () |
| bool | nativeDebugLogRequested () |
| void | qtGstLog (GstDebugCategory *category, GstDebugLevel level, const gchar *file, const gchar *function, gint line, GObject *object, GstDebugMessage *message, gpointer data) |
| void | configureDebugLogging (std::optional< int > level) |
| void | serializeUdpSrcUnlock () |
| bool | udpSrcUnlockSerialized () |
| Whether serializeUdpSrcUnlock() patched udpsrc. | |
| GstObjectPtr | adoptObject (GstObject *object) noexcept |
| GstElementPtr | adoptElement (GstElement *element) noexcept |
| GstPadPtr | adoptPad (GstPad *pad) noexcept |
| GstBusPtr | adoptBus (GstBus *bus) noexcept |
| GstFactoryPtr | adoptFactory (GstElementFactory *factory) noexcept |
| GstFeaturePtr | adoptFeature (GstPluginFeature *feature) noexcept |
| GstQueryPtr | adoptQuery (GstQuery *query) noexcept |
| GstCapsPtr | adoptCaps (GstCaps *caps) noexcept |
| GstMessagePtr | adoptMessage (GstMessage *message) noexcept |
| GstEventPtr | adoptEvent (GstEvent *event) noexcept |
| GstContextPtr | adoptContext (GstContext *context) noexcept |
| GstStructurePtr | adoptStructure (GstStructure *structure) noexcept |
| GCharPtr | adoptGChar (gchar *str) noexcept |
| GErrorPtr | adoptError (GError *error) noexcept |
| MessageError | parseMessageError (GstMessage *message) |
| gst_message_parse_error(), or gst_message_parse_warning() for a WARNING message. | |
| template<typename T> | |
| std::shared_ptr< T > | shareObject (T *object) |
A copyable owner of a new ref on object, for tasks that must be copyable (std::function). | |
| template<typename T> | |
| std::unique_ptr< T, GstObjectDeleter > | adoptFloating (T *object) noexcept |
Sinks the floating ref of a new object (pipeline, bin, pad, element) and owns it. Null for null. | |
| GstElementPtr | makeElement (const char *factory, const char *name=nullptr) |
| bool | hasElementFactory (const char *name) |
| bool | countRtpPackets (GstElement *bin, GstPad *pad, int clockRate) |
| std::optional< RtpPacketCounts > | rtpPacketCounts (GstElement *bin) |
What countRtpPackets() counted for bin so far, from any thread; nullopt for a bin without it, or a null one. | |
Scoped owners for transfer-full GStreamer returns so refs can't leak on early return. Use the adopt* helpers at the transfer-full call boundary; .get() yields a non-owning view. Floating refs (e.g. gst_element_factory_make) are consumed by gst_bin_add/gst_element_add_pad even when the call fails, so release() the owner into the call, or sink them at creation with makeElement() or adoptFloating().
| using GStreamer::GCharPtr = std::unique_ptr<gchar, GFreeDeleter> |
Definition at line 71 of file GstScoped.h.
| using GStreamer::GErrorPtr = std::unique_ptr<GError, GErrorDeleter> |
Definition at line 72 of file GstScoped.h.
| using GStreamer::GstBusPtr = std::unique_ptr<GstBus, GstObjectDeleter> |
Definition at line 62 of file GstScoped.h.
| using GStreamer::GstCapsPtr = std::unique_ptr<GstCaps, GstCapsDeleter> |
Definition at line 66 of file GstScoped.h.
| using GStreamer::GstContextPtr = std::unique_ptr<GstContext, GstContextDeleter> |
Definition at line 69 of file GstScoped.h.
| using GStreamer::GstElementPtr = std::unique_ptr<GstElement, GstObjectDeleter> |
Definition at line 60 of file GstScoped.h.
| using GStreamer::GstEventPtr = std::unique_ptr<GstEvent, GstEventDeleter> |
Definition at line 68 of file GstScoped.h.
| using GStreamer::GstFactoryPtr = std::unique_ptr<GstElementFactory, GstObjectDeleter> |
Definition at line 63 of file GstScoped.h.
| using GStreamer::GstFeaturePtr = std::unique_ptr<GstPluginFeature, GstObjectDeleter> |
Definition at line 64 of file GstScoped.h.
| using GStreamer::GstMessagePtr = std::unique_ptr<GstMessage, GstMessageDeleter> |
Definition at line 67 of file GstScoped.h.
| using GStreamer::GstObjectPtr = std::unique_ptr<GstObject, GstObjectDeleter> |
Definition at line 59 of file GstScoped.h.
| using GStreamer::GstPadPtr = std::unique_ptr<GstPad, GstObjectDeleter> |
Definition at line 61 of file GstScoped.h.
| using GStreamer::GstQueryPtr = std::unique_ptr<GstQuery, GstQueryDeleter> |
Definition at line 65 of file GstScoped.h.
| using GStreamer::GstStructurePtr = std::unique_ptr<GstStructure, GstStructureDeleter> |
Definition at line 70 of file GstScoped.h.
|
strong |
The D3D decoder API a Windows QRhi backend samples zero-copy.
| Enumerator | |
|---|---|
| D3D11 | |
| D3D12 | |
Definition at line 28 of file GStreamerDecoderRankPlan.h.
|
strong |
The tee branch a pipeline element belongs to, so a bus message can be blamed on the part that failed.
| Enumerator | |
|---|---|
| None | The source, the tee, or the pipeline itself. |
| Decoding | |
| Recording | |
Definition at line 16 of file BranchContext.h.
| GstElement * GStreamer::addToBin | ( | GstElement * | bin, |
| GstElementPtr | element, | ||
| const char * | what ) |
Adds element, which must not be floating (see makeElement()), to bin, which takes its own ref; ours is dropped. Returns the borrowed (bin-owned) element, or null if the bin rejected it; what names it in the warning.
Definition at line 77 of file GStreamerHelpers.cc.
References addToBin().
Referenced by addToBin(), TeeBranchHead::build(), GStreamer::SourceFactory::create(), GStreamer::SelfTest::decodeSample(), RecordingBranch::makeFileSink(), GStreamer::SelfTest::readBack(), and GStreamer::SelfTest::recordSample().
|
inlinenoexcept |
Definition at line 89 of file GstScoped.h.
Referenced by GstBusPump::attach().
|
inlinenoexcept |
Definition at line 109 of file GstScoped.h.
Referenced by GStreamer::SelfTest::decodeSample(), GStreamer::SelfTest::hasDecoderFor(), and PipelineStatsProbe::sample().
|
inlinenoexcept |
Definition at line 124 of file GstScoped.h.
|
inlinenoexcept |
Definition at line 79 of file GstScoped.h.
Referenced by GStreamer::SourceFactory::create(), GstQgc::frameStats(), sendEventAsync(), and DecodingBranch::setVideoSink().
|
inlinenoexcept |
Definition at line 139 of file GstScoped.h.
Referenced by parseMessageError().
|
inlinenoexcept |
Definition at line 119 of file GstScoped.h.
Referenced by sendEventAsync().
|
inlinenoexcept |
Definition at line 94 of file GstScoped.h.
Referenced by createVideoSink(), gst_qgc_video_sink_bin_make_conversion_element(), hasElementFactory(), and serializeUdpSrcUnlock().
|
inlinenoexcept |
Definition at line 99 of file GstScoped.h.
Referenced by serializeUdpSrcUnlock().
|
noexcept |
Sinks the floating ref of a new object (pipeline, bin, pad, element) and owns it. Null for null.
Definition at line 171 of file GstScoped.h.
Referenced by GStreamer::SelfTest::decodeSample(), makeElement(), RecordingBranch::makeFileSink(), GStreamer::SelfTest::readBack(), GStreamer::SelfTest::recordSample(), and PipelineSession::start().
|
inlinenoexcept |
Definition at line 134 of file GstScoped.h.
Referenced by isHardwareDecoderFactory(), parseMessageError(), qtGstLog(), and PipelineDotDumper::writePipelineDot().
|
inlinenoexcept |
Definition at line 114 of file GstScoped.h.
Referenced by GstBusPump::drain(), RecordingBranch::onBusElement(), GstBusPump::pop(), and GstBusPump::pumpUntil().
|
inlinenoexcept |
Definition at line 74 of file GstScoped.h.
Referenced by branchOf(), and describeDecoderFactory().
|
inlinenoexcept |
Definition at line 84 of file GstScoped.h.
Referenced by TeeBranchHead::absorbFlowErrors(), GStreamer::PadProbe::add(), RecordingBranch::beginTeardown(), DecodingBranch::build(), RecordingBranch::completeTeardown(), GStreamer::SourceFactory::configureH26xRtpDepayloader(), GStreamer::SelfTest::decodeSample(), firstSrcPad(), RecordingBranch::makeFileSink(), GStreamer::SelfTest::readBack(), TeeBranchHead::requestKeyframe(), PipelineStatsProbe::sample(), sendEventAsync(), and DecodingBranch::setVideoSink().
|
inlinenoexcept |
Definition at line 104 of file GstScoped.h.
Referenced by PipelineStatsProbe::queryLatency().
|
inlinenoexcept |
Definition at line 129 of file GstScoped.h.
Referenced by GstQgc::frameStats().
| QList< VideoDecoderOption > GStreamer::availableDecoderFamilies | ( | ) |
Hardware decoder families currently present in the GStreamer registry (never VideoDecoderOption::Default or Software). Lets the settings layer validate a persisted forceVideoDecoder choice against what the running build can actually provide. Vulkan is only offered with the opt-in Vulkan GPU path.
Definition at line 363 of file GStreamerDecoderRanks.cc.
References decoderFamilyForFactory(), Default, forEachVideoDecoderFactory(), and Vulkan.
Referenced by GStreamerVideoBackend::availableDecoderFamilies().
| bool GStreamer::avoidHevcWavefrontDeadlock | ( | GstElement * | decoder, |
| QLatin1StringView | version = libavcodecVersion() ) |
FFmpeg defect, in FFmpeg 7.1.0 (libavcodec 61.19.100), which GStreamer's 1.28 packages for Android, iOS, macOS and Windows carry: it decodes the wavefront rows of an HEVC picture on slice threads that wait for one another through condition variables indexed by thread, not by row. With more rows than threads a row can wait forever, and avdec_h265's streaming thread with it, so that the decoder can be neither stopped nor replaced. FFmpeg 7.1.1 has the fix, and this can go once no package QGC builds with has 7.1.0. libav decodes on slice threads behind a live source, and where decodeWithoutDelay() asks for them. With that version this has decoder, when it is avdec_h265, decode on one thread, which takes the rows in order. Returns whether it changed the decoder.
Definition at line 18 of file GStreamerLibavWorkaround.cc.
References factoryNameOf().
|
inline |
The branch of object's nearest marked ancestor (itself included). Thread-safe.
Definition at line 36 of file BranchContext.h.
References adoptObject(), None, and pipelineBranchQuark().
| bool GStreamer::changeFeatureRank | ( | GstRegistry * | registry, |
| const char * | featureName, | ||
| uint16_t | rank ) |
DecoderRankApplier::setRank() on the process's applier, so setCodecPriorities() restores the rank too.
Definition at line 348 of file GStreamerDecoderRanks.cc.
References GStreamer::DecoderRankApplier::instance(), and GStreamer::DecoderRankApplier::setRank().
| bool GStreamer::completeInit | ( | std::optional< int > | debugLevel | ) |
debugLevel: the debug threshold to start with (none when unset), unless GST_DEBUG is set.
Definition at line 200 of file GStreamer.cc.
References configureDebugLogging(), logDecoderRanks(), and serializeUdpSrcUnlock().
Referenced by initialize().
| void GStreamer::configureDebugLogging | ( | std::optional< int > | level | ) |
Definition at line 148 of file GStreamerLogging.cc.
References nativeDebugLogRequested(), and qtGstLog().
Referenced by completeInit(), and initialize().
| bool GStreamer::countRtpPackets | ( | GstElement * | bin, |
| GstPad * | pad, | ||
| int | clockRate ) |
Counts the RTP packets pad pushes from now on with an RtpPacketCounter, as bin's: for a source without a jitter buffer, which nothing else counts. clockRate: of their timestamps, in Hz. False when the pad takes no probe.
The probe runs on the pad's streaming thread for every packet, in buffers and buffer lists alike: it reads the fixed header of each packet that is RTP version 2 and not an RTCP packet sent to the same port, takes the buffer's DTS (else PTS) as its arrival time, as a jitter buffer does, and neither allocates nor logs. The totals are handed over in atomics.
Definition at line 81 of file GstRtpPacketProbe.cc.
| GstElement * GStreamer::createVideoSink | ( | const QByteArray & | conversionElement, |
| bool | disablePixelAspectRatio, | ||
| bool | gpuZeroCopy ) |
A new qgcvideosinkbin with the construct-only settings of a VideoReceiver::DisplayConfig, returned as an owned, non-floating reference (adopt it), or nullptr.
Definition at line 258 of file GStreamer.cc.
References adoptFactory().
| VideoDecoderOption GStreamer::decoderFamilyForFactory | ( | const char * | factoryName | ) |
The decoder family that claims decoder factory factoryName by name prefix, or VideoDecoderOption::Default when it belongs to no user-selectable hardware family.
Definition at line 76 of file GStreamerDecoderRanks.cc.
References decoderFamilyForFactory(), and Default.
Referenced by availableDecoderFamilies(), and decoderFamilyForFactory().
| bool GStreamer::demoteFailedDecoder | ( | const char * | factoryName, |
| const GstCaps * | caps ) |
DecoderRankApplier::demoteFailedDecoder() on the process's applier. Any thread.
Definition at line 358 of file GStreamerDecoderRanks.cc.
References GStreamer::DecoderRankApplier::demoteFailedDecoder(), and GStreamer::DecoderRankApplier::instance().
| QString GStreamer::describeDecoderFactory | ( | GstElementFactory * | factory | ) |
"[HW|SW] <plugin>/<factory> rank=<rank> (<klass>)" for decoder logs.
Definition at line 113 of file GStreamerDecoderRanks.cc.
References adoptObject(), describeDecoderFactory(), and isHardwareDecoderFactory().
Referenced by describeDecoderFactory(), and logDecoderRanks().
| void GStreamer::disposeChild | ( | GstElement * | element | ) |
Takes element out of its parent bin, then sets it to NULL. Removed first, so nothing it posts while stopping reaches the bin's bus, and with the bin's state lock held, so a state change of the bin can't bring it back up. No-op when element has no parent. The caller's refs on element, if any, stay valid.
Definition at line 51 of file GStreamerHelpers.cc.
References disposeChild().
Referenced by disposeChild(), and disposeChildAsync().
| void GStreamer::disposeChildAsync | ( | GstElement * | element | ) |
disposeChild() from GStreamer's thread pool, for a streaming thread: a state change of the bin holds the state lock that disposeChild() takes while it waits for the streaming threads to stop. element is kept alive until then.
Definition at line 61 of file GStreamerHelpers.cc.
References disposeChild(), and disposeChildAsync().
Referenced by disposeChildAsync().
| bool GStreamer::externalPluginLoaderFailed | ( | ) |
Whether GStreamer warned, through the GLib log redirectGLibLogging() installs, that its gst-plugin-scanner helper failed ("External plugin loader failed") since resetExternalPluginLoaderFailed(). GStreamer then loads the plugins in-process, so video still works; only the self-test fails on it.
Definition at line 83 of file GStreamerLogging.cc.
| const char * GStreamer::factoryNameOf | ( | GstObject * | object | ) |
The name of the factory that made object ("rtph264depay"); null when it is no element or has no factory.
Definition at line 159 of file GStreamerHelpers.cc.
References factoryNameOf().
Referenced by avoidHevcWavefrontDeadlock(), GStreamer::SourceFactory::configureH26xParser(), GStreamer::SourceFactory::configureH26xRtpDepayloader(), and factoryNameOf().
| GstPadPtr GStreamer::firstSrcPad | ( | GstElement * | element | ) |
element's first src pad, or null when it has none (yet).
Definition at line 145 of file GStreamerHelpers.cc.
References adoptPad(), and firstSrcPad().
Referenced by firstSrcPad().
| void GStreamer::flushAndDisposeChild | ( | GstElement * | element | ) |
As disposeChild(), but sends a FLUSH_START into element's sink pads before setting it to NULL. The flush wakes streaming threads parked inside element, which going NULL would otherwise wait on.
Definition at line 56 of file GStreamerHelpers.cc.
References flushAndDisposeChild().
Referenced by flushAndDisposeChild(), and RecordingBranch::reset().
| void GStreamer::forEachPlugin | ( | GstRegistry * | registry, |
| const std::function< void(GstPlugin *)> & | visitor ) |
Walk every plugin in the GStreamer registry, invoking visitor for each; frees the GList internally. The plugin pointer is valid only for the duration of the call (don't ref it).
Definition at line 179 of file GStreamerHelpers.cc.
References forEachPlugin().
Referenced by forEachPlugin().
| void GStreamer::forEachVideoDecoderFactory | ( | GstRank | minRank, |
| const std::function< void(GstElementFactory *)> & | visitor ) |
Invokes visitor for every video decoder factory of at least minRank in the default registry. The factory is valid only for the duration of the call.
Definition at line 21 of file GStreamerDecoderRanks.cc.
References forEachVideoDecoderFactory().
Referenced by availableDecoderFamilies(), forEachVideoDecoderFactory(), GStreamer::SelfTest::hasDecoderFor(), and logDecoderRanks().
| QByteArray GStreamer::glibFileName | ( | const QString & | file | ) |
file as GLib's file functions name it, for the "location" of a file source or sink: UTF-8 on Windows, where QFile::encodeName() gives the bytes of the ANSI code page instead, and the file system's encoding elsewhere.
Definition at line 94 of file GStreamerHelpers.cc.
References glibFileName().
Referenced by glibFileName(), RecordingBranch::makeFileSink(), and GStreamer::SelfTest::readBack().
|
inline |
Definition at line 183 of file GstScoped.h.
References adoptFactory().
Referenced by MockVideoStreamServer::isStreamTypeAvailable(), and select_gpu_bin().
| std::function< void()> GStreamer::holdPadUntilLinked | ( | GstPad * | pad, |
| std::function< void(GstPad *pad)> | link ) |
For a pad a streaming thread just added: blocks its data, since a push on an unlinked pad would fail the stream, and returns the task for the thread that changes the pipeline, which calls link with the pad and unblocks it.
Definition at line 166 of file GStreamerHelpers.cc.
References holdPadUntilLinked(), and shareObject().
Referenced by holdPadUntilLinked().
| bool GStreamer::initialize | ( | const VideoBackend::InitParams & | params | ) |
Definition at line 232 of file GStreamer.cc.
References VideoBackend::InitParams::arguments, completeInit(), configureDebugLogging(), VideoBackend::InitParams::debugLevel, VideoBackend::InitParams::environment, redirectGLibLogging(), and resetExternalPluginLoaderFailed().
Referenced by GStreamerVideoBackend::initialize().
| bool GStreamer::isHardwareDecoderFactory | ( | GstElementFactory * | factory | ) |
Definition at line 86 of file GStreamerDecoderRanks.cc.
References adoptGChar(), and isHardwareDecoderFactory().
Referenced by describeDecoderFactory(), and isHardwareDecoderFactory().
| QLatin1StringView GStreamer::libavcodecVersion | ( | ) |
The version of the libavcodec this build's libav plugin decodes with, from its pkg-config file at configure time; empty when the file was not there.
Definition at line 9 of file GStreamerLibavWorkaround.cc.
| void GStreamer::logDecoderRanks | ( | ) |
Definition at line 382 of file GStreamerDecoderRanks.cc.
References describeDecoderFactory(), and forEachVideoDecoderFactory().
Referenced by completeInit().
|
inline |
gst_element_factory_make() with the floating ref sunk, so the caller owns a plain ref that adding the element to a bin never consumes. Null when the factory is missing.
Definition at line 178 of file GstScoped.h.
References adoptFloating().
Referenced by TeeBranchHead::build(), GStreamer::SourceFactory::buildRtspSource(), GStreamer::SelfTest::decodeSample(), RecordingBranch::makeFileSink(), GStreamer::SelfTest::readBack(), and GStreamer::SelfTest::recordSample().
|
inline |
Marks element and everything inside it as part of branch.
Definition at line 30 of file BranchContext.h.
References pipelineBranchQuark().
Referenced by TeeBranchHead::build(), RecordingBranch::makeFileSink(), and DecodingBranch::setVideoSink().
| QList< MissingPluginFeature > GStreamer::missingPluginFeatures | ( | const std::function< bool(const char *factoryName)> & | hasFactory | ) |
The features in GStreamer.cc's plugin policy that miss an element factory, as reported by hasFactory. completeInit() fails only when a required one is missing, and warns about the others.
Definition at line 134 of file GStreamer.cc.
| bool GStreamer::nativeDebugLogRequested | ( | ) |
True when GST_DEBUG, GST_DEBUG_FILE or GST_TRACERS is set: the user asked for GStreamer's own debug output, so QGC keeps gst_debug_log_default (which alone honours GST_DEBUG_FILE and writes the format gst-stats and tracer tools parse) and does not bridge GStreamer's log into Qt logging.
Definition at line 100 of file GStreamerLogging.cc.
Referenced by configureDebugLogging().
| void GStreamer::onMainWindowReady | ( | QQuickWindow * | window | ) |
Definition at line 317 of file GStreamer.cc.
References GstQgc::RenderTarget::backend, HwBuffers::connectMainWindow(), GstQgc::currentRenderTarget(), GStreamer::DecoderRankApplier::instance(), GStreamer::DecoderRankApplier::reapply(), HwBuffers::setGraphicsDevicePublishedHandler(), GstQgc::toString(), and GstQgc::zeroCopyPathName().
Referenced by GStreamerVideoBackend::onMainWindowReady().
|
inline |
gst_message_parse_error(), or gst_message_parse_warning() for a WARNING message.
Definition at line 152 of file GstScoped.h.
References adoptError(), and adoptGChar().
|
inline |
Definition at line 23 of file BranchContext.h.
Referenced by branchOf(), and markBranch().
| RankPlan GStreamer::planRanks | ( | VideoDecoderOption | option, |
| const QList< DecoderInfo > & | decoders, | ||
| const RankTraits & | traits ) |
The rank changes option makes to decoders, from their original ranks, on a platform with traits.
Definition at line 126 of file GStreamerDecoderRankPlan.cc.
References GStreamer::RankPlan::changes, D3D11, GStreamer::RankTraits::d3d11OpensD3D12, D3D12, Default, DirectX3D, Hardware, Intel, NVIDIA, GStreamer::RankTraits::preferZeroCopyDecoders, GStreamer::RankTraits::rhiAdapterLuid, GStreamer::RankTraits::rhiD3DApi, Software, GStreamer::RankTraits::softwareRendering, VAAPI, VideoToolbox, Vulkan, and GStreamer::RankPlan::warnings.
Referenced by GStreamer::DecoderRankApplier::apply().
| void GStreamer::qtGstLog | ( | GstDebugCategory * | category, |
| GstDebugLevel | level, | ||
| const gchar * | file, | ||
| const gchar * | function, | ||
| gint | line, | ||
| GObject * | object, | ||
| GstDebugMessage * | message, | ||
| gpointer | data ) |
Definition at line 106 of file GStreamerLogging.cc.
References adoptGChar().
Referenced by configureDebugLogging().
| void GStreamer::redirectGLibLogging | ( | ) |
Definition at line 93 of file GStreamerLogging.cc.
Referenced by initialize().
| void GStreamer::requestKeyframe | ( | GstPad * | sinkPad | ) |
Asks the encoder upstream of sinkPad for a keyframe with its parameter sets. On RTSP, rtpbin turns this into an RTCP PLI when the stream's SDP advertises that feedback, which GstRtspSource has it do for video. A plain UDP stream has no way back to its sender, so nothing comes of the request there. Doesn't block: the event is not serialized.
Definition at line 103 of file GStreamerHelpers.cc.
References requestKeyframe().
Referenced by requestKeyframe(), and TeeBranchHead::requestKeyframe().
| void GStreamer::resetExternalPluginLoaderFailed | ( | ) |
Definition at line 88 of file GStreamerLogging.cc.
Referenced by initialize().
| std::optional< RtpPacketCounts > GStreamer::rtpPacketCounts | ( | GstElement * | bin | ) |
What countRtpPackets() counted for bin so far, from any thread; nullopt for a bin without it, or a null one.
Definition at line 98 of file GstRtpPacketProbe.cc.
Referenced by PipelineStatsProbe::sample().
| void GStreamer::sendEventAsync | ( | GstPad * | pad, |
| GstEvent * | event ) |
Sends event into pad from GStreamer's thread pool, so a serialized event waiting for a busy streaming thread never blocks the caller. Takes event; the pad is kept alive until the send returns.
Definition at line 111 of file GStreamerHelpers.cc.
References adoptElement(), adoptEvent(), adoptPad(), and sendEventAsync().
Referenced by RecordingBranch::beginTeardown(), and sendEventAsync().
| void GStreamer::serializeUdpSrcUnlock | ( | ) |
GStreamer defect, fixed in gst-plugins-good 1.24.10: udpsrc's unlock_stop() replaces its GCancellable on the streaming thread (basesrc defers it to the first create() after PLAYING) while unlock() cancels it from the thread leaving PLAYING. A pipeline stopped right after it started then cancels a freed GCancellable and corrupts the heap. On the versions before that one this wraps the two udpsrc class methods to serialize them, as the upstream fix does (gstreamer!7897); on newer ones, or without udpsrc, it does nothing. Runs once per process, after gst_init().
Definition at line 40 of file GStreamerUdpSrcWorkaround.cc.
References adoptFactory(), adoptFeature(), and serializeUdpSrcUnlock().
Referenced by completeInit(), and serializeUdpSrcUnlock().
| void GStreamer::setCodecPriorities | ( | VideoDecoderOption | option | ) |
DecoderRankApplier::apply() on the process's applier. GUI thread.
Definition at line 353 of file GStreamerDecoderRanks.cc.
References GStreamer::DecoderRankApplier::apply(), and GStreamer::DecoderRankApplier::instance().
Referenced by GStreamerVideoBackend::applyDecoderPriorities().
| void GStreamer::setDebugLevel | ( | int | level | ) |
Definition at line 168 of file GStreamerLogging.cc.
Referenced by GStreamerVideoBackend::setDebugLevel().
| QGCQVideoSinkController * GStreamer::setupQVideoSinkElement | ( | GstElement * | sinkBin, |
| QVideoSink * | videoSink, | ||
| QObject * | controllerParent ) |
Binds the qgcqvideosink inside sinkBin, a new bin as createVideoSink() returns it, to videoSink through a new QGCQVideoSinkController, a child of controllerParent. Returns the controller, or nullptr on failure.
Definition at line 287 of file GStreamer.cc.
References gst_qgc_video_sink_bin_get_qvideosink(), and HwBuffers::onPipelineRestart().
| std::shared_ptr< T > GStreamer::shareObject | ( | T * | object | ) |
A copyable owner of a new ref on object, for tasks that must be copyable (std::function).
Definition at line 164 of file GstScoped.h.
Referenced by holdPadUntilLinked().
| bool GStreamer::udpSrcUnlockSerialized | ( | ) |
Whether serializeUdpSrcUnlock() patched udpsrc.
Definition at line 72 of file GStreamerUdpSrcWorkaround.cc.
References udpSrcUnlockSerialized().
Referenced by udpSrcUnlockSerialized().