QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GstContextBridgeCommon.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/qglobal.h>
4
5#if defined(QGC_HAS_ANY_GPU_PATH)
6
7#include <QtCore/QMutex>
8#include <gst/gst.h>
9
10QT_FORWARD_DECLARE_CLASS(QLoggingCategory)
11
12
17namespace GstContextBridge {
18
21struct BridgeVTable
22{
23 const char* apiName;
24 const char* const* contextTypes;
25 int contextTypeCount;
26 const QLoggingCategory& (*cat)(void* user);
27 QMutex& (*mutex)(void* user);
28 bool (*primeLocked)(void* user);
29 GstObject* (*refObject)(void* user, const char* contextType);
31 GstContext* (*buildContext)(void* user, const char* contextType,
32 GstObject* object);
34 void (*onHandoff)(void* user, GstElement* element, const char* contextType);
36};
37
39const char* matchContextType(const BridgeVTable& vt, const char* type);
40
42GstBusSyncReply handleSyncMessage(const BridgeVTable& vt, void* user, GstMessage* message);
43
45bool answerContextQuery(const BridgeVTable& vt, void* user, GstQuery* query);
46
49void registerBridge(const QLoggingCategory& cat, const char* apiName, GstBusSyncReply (*handler)(GstMessage*),
50 void (*reset)());
51
52} // namespace GstContextBridge
53
54#endif // QGC_HAS_ANY_GPU_PATH
struct _GstElement GstElement