QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstQgc Namespace Reference

Classes

struct  VideoFormatEntry
 

Functions

void populateAllocationQuery (GstQuery *query)
 
GstPadProbeReturn videosinkQueryProbe (GstPad *pad, GstPadProbeInfo *info, gpointer user_data)
 
std::string buildCpuCapsString ()
 
std::string buildGpuCapsString ()
 
std::string advertisedFormatList ()
 "{ NV12, NV21, ... }" — the advertised format list for a caps string. Built once at caps setup.
 

Variables

constexpr VideoFormatEntry kVideoFormatTable []
 

Function Documentation

◆ advertisedFormatList()

std::string GstQgc::advertisedFormatList ( )
inline

"{ NV12, NV21, ... }" — the advertised format list for a caps string. Built once at caps setup.

Definition at line 47 of file GstQgcVideoFormats.h.

References GstQgc::VideoFormatEntry::capsToken, and kVideoFormatTable.

Referenced by buildCpuCapsString(), and buildGpuCapsString().

◆ buildCpuCapsString()

std::string GstQgc::buildCpuCapsString ( )

System-memory caps for the CPU branch's format capsfilter; shares the Qt-renderable format set with buildGpuCapsString() so the two can't drift.

Definition at line 11 of file GstQgcCaps.cc.

References advertisedFormatList().

Referenced by wireCpuPath().

◆ buildGpuCapsString()

std::string GstQgc::buildGpuCapsString ( )

Builds the upstream caps string for gpu_zerocopy=TRUE, branching on enabled GPU paths and the bin variant. Pure policy: no GObject state, no allocations.

Definition at line 16 of file GstQgcCaps.cc.

References advertisedFormatList(), GstHw::buildLinearDmaDrmCaps(), GstHw::buildSupportedDmaDrmCaps(), and HwBuffers::hwBufferEnvConfig().

Referenced by wireGpuPath().

◆ populateAllocationQuery()

void GstQgc::populateAllocationQuery ( GstQuery *  query)

Populate an ALLOCATION query with qgcqvideosink's consumed metas and, when needed, a min-buffer pool hint. Called from the sink's propose_allocation vmethod.

Definition at line 164 of file GstQgcAllocation.cc.

References GstHw::dmaDrmAwareVideoInfo().

Referenced by gst_qgc_q_video_sink_propose_allocation(), and videosinkQueryProbe().

◆ videosinkQueryProbe()

GstPadProbeReturn GstQgc::videosinkQueryProbe ( GstPad *  pad,
GstPadProbeInfo *  info,
gpointer  user_data 
)

Downstream query probe for qgcqvideosink's sink pad. Answers CONTEXT queries synchronously, so negotiation terminates at the sink instead of racing NEED_CONTEXT bus fallback.

Definition at line 200 of file GstQgcAllocation.cc.

References HwBuffers::answerSinkBinContextQuery(), and populateAllocationQuery().

Referenced by gst_qgc_video_sink_bin_setup().

Variable Documentation

◆ kVideoFormatTable

constexpr VideoFormatEntry GstQgc::kVideoFormatTable[]
inlineconstexpr
Initial value:
= {
{GST_VIDEO_FORMAT_NV12, QVideoFrameFormat::Format_NV12, "NV12"},
{GST_VIDEO_FORMAT_NV21, QVideoFrameFormat::Format_NV21, "NV21"},
{GST_VIDEO_FORMAT_I420, QVideoFrameFormat::Format_YUV420P, "I420"},
{GST_VIDEO_FORMAT_YV12, QVideoFrameFormat::Format_YV12, "YV12"},
{GST_VIDEO_FORMAT_Y42B, QVideoFrameFormat::Format_YUV422P, "Y42B"},
{GST_VIDEO_FORMAT_P010_10LE, QVideoFrameFormat::Format_P010, "P010_10LE"},
{GST_VIDEO_FORMAT_AYUV, QVideoFrameFormat::Format_AYUV, "AYUV"},
{GST_VIDEO_FORMAT_YUY2, QVideoFrameFormat::Format_YUYV, "YUY2"},
{GST_VIDEO_FORMAT_UYVY, QVideoFrameFormat::Format_UYVY, "UYVY"},
{GST_VIDEO_FORMAT_GRAY8, QVideoFrameFormat::Format_Y8, "GRAY8"},
{GST_VIDEO_FORMAT_GRAY16_LE, QVideoFrameFormat::Format_Y16, "GRAY16_LE"},
{GST_VIDEO_FORMAT_BGRA, QVideoFrameFormat::Format_BGRA8888, "BGRA"},
{GST_VIDEO_FORMAT_RGBA, QVideoFrameFormat::Format_RGBA8888, "RGBA"},
{GST_VIDEO_FORMAT_BGRx, QVideoFrameFormat::Format_BGRX8888, nullptr},
{GST_VIDEO_FORMAT_RGBx, QVideoFrameFormat::Format_RGBX8888, nullptr},
{GST_VIDEO_FORMAT_ARGB, QVideoFrameFormat::Format_ARGB8888, nullptr},
{GST_VIDEO_FORMAT_xRGB, QVideoFrameFormat::Format_XRGB8888, nullptr},
{GST_VIDEO_FORMAT_I420_10LE, QVideoFrameFormat::Format_YUV420P10, nullptr},
{GST_VIDEO_FORMAT_P016_LE, QVideoFrameFormat::Format_P016, nullptr},
}

Definition at line 20 of file GstQgcVideoFormats.h.

Referenced by advertisedFormatList(), and toQtPixelFormat().