QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstAppSinkAdapter Class Reference

#include <GstAppSinkAdapter.h>

+ Inheritance diagram for GstAppSinkAdapter:
+ Collaboration diagram for GstAppSinkAdapter:

Public Member Functions

 GstAppSinkAdapter (QObject *parent=nullptr)
 
 ~GstAppSinkAdapter () override
 
bool setup (GstElement *sinkBin, QVideoSink *videoSink)
 
void teardown ()
 Disconnect the callback (safe to call multiple times).
 

Detailed Description

Bridges a GStreamer appsink to a Qt QVideoSink.

Each decoded frame arriving at the appsink is copied into a QVideoFrame and pushed to the QVideoSink, which renders through Qt's native RHI backend (Metal on macOS, Vulkan/D3D elsewhere).

Definition at line 14 of file GstAppSinkAdapter.h.

Constructor & Destructor Documentation

◆ GstAppSinkAdapter()

GstAppSinkAdapter::GstAppSinkAdapter ( QObject *  parent = nullptr)
explicit

Definition at line 14 of file GstAppSinkAdapter.cc.

◆ ~GstAppSinkAdapter()

GstAppSinkAdapter::~GstAppSinkAdapter ( )
override

Definition at line 19 of file GstAppSinkAdapter.cc.

References teardown().

Member Function Documentation

◆ setup()

bool GstAppSinkAdapter::setup ( GstElement sinkBin,
QVideoSink *  videoSink 
)

Connect to the named appsink inside sinkBin and push frames to videoSink. Returns true on success.

Definition at line 24 of file GstAppSinkAdapter.cc.

References teardown().

◆ teardown()

void GstAppSinkAdapter::teardown ( )

Disconnect the callback (safe to call multiple times).

Definition at line 50 of file GstAppSinkAdapter.cc.

Referenced by setup(), and ~GstAppSinkAdapter().


The documentation for this class was generated from the following files: