Commit 73651e1d authored by Andrew Voznytsa's avatar Andrew Voznytsa

Enable overriding video sink release op (completes video sink customization API)

parent bbf9de58
......@@ -71,7 +71,7 @@ VideoManager::~VideoManager()
}
#if defined(QGC_GST_STREAMING)
if (_videoSink[i] != nullptr) {
GStreamer::releaseVideoSink(_videoSink[i]);
qgcApp()->toolbox()->corePlugin()->releaseVideoSink(_videoSink[i]);
_videoSink[i] = nullptr;
}
#endif
......
......@@ -485,6 +485,15 @@ void* QGCCorePlugin::createVideoSink(QObject* parent, QQuickItem* widget)
#endif
}
void QGCCorePlugin::releaseVideoSink(void* sink)
{
#if defined(QGC_GST_STREAMING)
GStreamer::releaseVideoSink(sink);
#else
Q_UNUSED(sink)
#endif
}
bool QGCCorePlugin::guidedActionsControllerLogging() const
{
return GuidedActionsControllerLog().isDebugEnabled();
......
......@@ -119,6 +119,8 @@ public:
virtual VideoReceiver* createVideoReceiver(QObject* parent);
/// Allows the plugin to override the creation of VideoSink.
virtual void* createVideoSink(QObject* parent, QQuickItem* widget);
/// Allows the plugin to override the release of VideoSink.
virtual void releaseVideoSink(void* sink);
/// Allows the plugin to see all mavlink traffic to a vehicle
/// @return true: Allow vehicle to continue processing, false: Vehicle should not process message
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment