Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgstvideorenderersink.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 Jolla Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <QtMultimedia/qvideoframe.h>
7#include <QtMultimedia/qvideosink.h>
8#include <QtMultimedia/private/qvideoframe_p.h>
9#include <QtGui/rhi/qrhi.h>
10#include <QtGui/qguiapplication.h>
11#include <QtGui/qopenglcontext.h>
12#include <QtCore/qcoreapplication.h>
13#include <QtCore/qdebug.h>
14#include <QtCore/qloggingcategory.h>
15#include <QtCore/private/qfactoryloader_p.h>
16#include <QtCore/private/quniquehandle_p.h>
17
18#include <common/qgst_debug_p.h>
19#include <common/qgstreamermetadata_p.h>
20#include <common/qgstreamervideosink_p.h>
21#include <common/qgstutils_p.h>
22#include <common/qgstvideobuffer_p.h>
23
24#include <gst/video/video.h>
25#include <gst/video/gstvideometa.h>
26
27
28#if QT_CONFIG(gstreamer_gl)
29#include <gst/gl/gl.h>
30#endif // #if QT_CONFIG(gstreamer_gl)
31
32// DMA support
33#if QT_CONFIG(gstreamer_gl_egl) && QT_CONFIG(linux_dmabuf)
34# include <common/qgstreameregldisplay_p.h>
35# include <gst/allocators/gstdmabuf.h>
36#endif
37
38// NOLINTBEGIN(readability-convert-member-functions-to-static)
39
40Q_STATIC_LOGGING_CATEGORY(qLcGstVideoRenderer, "qt.multimedia.gstvideorenderer");
41
42QT_BEGIN_NAMESPACE
43
44QGstVideoRenderer::QGstVideoRenderer(QGstreamerRelayVideoSink *sink)
45 : m_sink(sink), m_surfaceCaps(createSurfaceCaps(sink))
46{
47 QObject::connect(
48 sink, &QGstreamerRelayVideoSink::aboutToBeDestroyed, this,
49 [this] {
50 QMutexLocker locker(&m_sinkMutex);
51 m_sink = nullptr;
52 },
53 Qt::DirectConnection);
54}
55
57
58QGstCaps QGstVideoRenderer::createSurfaceCaps([[maybe_unused]] QGstreamerRelayVideoSink *sink)
59{
61
62 // All the formats that both we and gstreamer support
63 auto formats = QList<QVideoFrameFormat::PixelFormat>()
64 << QVideoFrameFormat::Format_YUV420P
65 << QVideoFrameFormat::Format_YUV422P
66 << QVideoFrameFormat::Format_YV12
67 << QVideoFrameFormat::Format_UYVY
68 << QVideoFrameFormat::Format_YUYV
69 << QVideoFrameFormat::Format_NV12
70 << QVideoFrameFormat::Format_NV21
71 << QVideoFrameFormat::Format_AYUV
72 << QVideoFrameFormat::Format_P010
73 << QVideoFrameFormat::Format_XRGB8888
74 << QVideoFrameFormat::Format_XBGR8888
75 << QVideoFrameFormat::Format_RGBX8888
76 << QVideoFrameFormat::Format_BGRX8888
77 << QVideoFrameFormat::Format_ARGB8888
78 << QVideoFrameFormat::Format_ABGR8888
79 << QVideoFrameFormat::Format_RGBA8888
80 << QVideoFrameFormat::Format_BGRA8888
81 << QVideoFrameFormat::Format_Y8
82 << QVideoFrameFormat::Format_Y16
83 ;
84 caps.addPixelFormats(formats);
85#if QT_CONFIG(gstreamer_gl)
86 QRhi *rhi = sink->rhi();
87 if (rhi && rhi->backend() == QRhi::OpenGLES2) {
88 caps.addPixelFormats(formats, GST_CAPS_FEATURE_MEMORY_GL_MEMORY);
89# if QT_CONFIG(gstreamer_gl_egl) && QT_CONFIG(linux_dmabuf)
90 if (qGstEglCanMapDmaBuf(rhi)) {
91 caps.addPixelFormats(formats, GST_CAPS_FEATURE_MEMORY_DMABUF);
92 }
93# endif
94 }
95#endif
96 return caps;
97}
98
99void QGstVideoRenderer::customEvent(QEvent *event)
100{
101QT_WARNING_PUSH
102QT_WARNING_DISABLE_GCC("-Wswitch") // case value not in enumerated type ‘QEvent::Type’
103
104 switch (event->type()) {
105 case renderFramesEvent: {
106 // LATER: we currently show every frame. however it may be reasonable to drop frames
107 // here if the queue contains more than one frame
108 while (std::optional<RenderBufferState> nextState = m_bufferQueue.dequeue())
109 handleNewBuffer(std::move(*nextState));
110 return;
111 }
112 case stopEvent: {
113 m_currentPipelineFrame = {};
114 updateCurrentVideoFrame(m_currentVideoFrame);
115 return;
116 }
117
118 default:
119 return;
120 }
121QT_WARNING_POP
122}
123
124
125void QGstVideoRenderer::handleNewBuffer(RenderBufferState state)
126{
127 QVideoFrame frame =
128 qCreateFrameFromGstBuffer(state.buffer, state.videoInfo, state.format);
129 QGstUtils::setFrameTimeStampsFromBuffer(&frame, state.buffer.get());
130 m_currentPipelineFrame = std::move(frame);
131
132 if (!m_isActive) {
133 qCDebug(qLcGstVideoRenderer) << " showing empty video frame";
134 updateCurrentVideoFrame({});
135 return;
136 }
137
138 updateCurrentVideoFrame(m_currentPipelineFrame);
139}
140
142{
143 return m_surfaceCaps;
144}
145
147{
148 qCDebug(qLcGstVideoRenderer) << "QGstVideoRenderer::start" << caps;
149
150 auto optionalVideoInfo = caps.videoInfo();
151 if (optionalVideoInfo) {
152 m_videoInfo = std::move(*optionalVideoInfo);
153 m_format = qVideoFrameFormatFromGstVideoInfo(m_videoInfo);
154 } else {
155 m_format = {};
156 m_videoInfo = {};
157 }
158 m_capsMemoryFormat = caps.memoryFormat();
159
160 // NOTE: m_format will not be fully populated until GST_EVENT_TAG is processed
161
162 return true;
163}
164
166{
167 qCDebug(qLcGstVideoRenderer) << "QGstVideoRenderer::stop";
168
169 m_bufferQueue.clear();
170 QCoreApplication::postEvent(this, new QEvent(stopEvent));
171}
172
174{
175 qCDebug(qLcGstVideoRenderer) << "QGstVideoRenderer::unlock";
176}
177
179{
180 if (!query || GST_QUERY_TYPE(query) != GST_QUERY_ALLOCATION)
181 return false;
182
183 GstCaps *queryCaps = nullptr;
184 gboolean needPool = false;
185 gst_query_parse_allocation(query, &queryCaps, &needPool);
186 GstVideoInfo info;
187 int size = 0;
188 if (queryCaps && gst_video_info_from_caps(&info, queryCaps)) {
189 size = info.size;
190 } else {
191 qWarning(qLcGstVideoRenderer) << "QGstVideoRenderer::proposeAllocation failed to "
192 "get size from query caps";
193 return true;
194 }
195
196 constexpr int defaultMinBuffers = 3;
197 static const int env
198 = qEnvironmentVariableIntValue("QT_GSTREAMER_PROPOSE_ALLOCATION_MIN_BUFFERS");
199 static const int minBuffers = env ? env : defaultMinBuffers;
200 qCDebug(qLcGstVideoRenderer) << "QGstVideoRenderer::proposeAllocation: "
201 "needPool:" << needPool
202 << "size:" << size
203 << "minBuffers:" << minBuffers;
204
205 // This call is needed to avoid enabling of copy threshold by v4l2 decoders, which can result
206 // in a mix of dmabuf and system memory buffers. The query sender should use its own buffer
207 // pool, and will only take the size value and our suggested minimum buffers into account.
208 // The driver can force a higher minimum if minBuffers is set too low, making 3 sufficient.
209 gst_query_add_allocation_pool(query, nullptr, size, minBuffers, 0);
210
211 // Advertise GstVideoMeta support, often needed for DMA buffer negotiation.
212 gst_query_add_allocation_meta(query, GST_VIDEO_META_API_TYPE, nullptr);
213
214 return true;
215}
216
218{
219 qCDebug(qLcGstVideoRenderer) << "QGstVideoRenderer::render";
220
221 if (m_flushing) {
222 qCDebug(qLcGstVideoRenderer)
223 << " buffer received while flushing the sink ... discarding buffer";
224 return GST_FLOW_FLUSHING;
225 }
226
227 GstVideoCropMeta *meta = gst_buffer_get_video_crop_meta(buffer);
228 if (meta) {
229 QRect vp(meta->x, meta->y, meta->width, meta->height);
230 if (m_format.viewport() != vp) {
231 qCDebug(qLcGstVideoRenderer)
232 << Q_FUNC_INFO << " Update viewport on Metadata: [" << meta->height << "x"
233 << meta->width << " | " << meta->x << "x" << meta->y << "]";
234 // Update viewport if data is not the same
235 m_format.setViewport(vp);
236 }
237 }
238
239 // Some gst elements, like v4l2h264dec, can provide Direct Memory Access buffers (DMA-BUF)
240 // without specifying it in their caps. So we check the memory format manually:
241 QGstCaps::MemoryFormat bufferMemoryFormat = [&] {
242 if (m_capsMemoryFormat != QGstCaps::CpuMemory)
243 return m_capsMemoryFormat;
244
245 return qMemoryFormatFromGstBuffer(buffer);
246 }();
247
248 qCDebug(qLcGstVideoRenderer) << "m_capsMemoryFormat" << m_capsMemoryFormat
249 << "bufferMemoryFormat" << bufferMemoryFormat;
250
251 QVideoFrameFormat bufferVideoFrameFormat = m_format;
252
253 // When rendering DMAbuf frames with OpenGLES, EGL seems to do implicit
254 // YUV->RGB conversion for UYVY and YUYV (YUY2), so we need to change the
255 // pixel format to Format_RGBA8888 to select the correct shader. Likewise,
256 // glTexDirectVIVMap converts all Vivante phys-mem frames to a single RGB
257 // texture. That texture also covers the decoder's padding, so the frame
258 // size is set to the padded size, with the viewport cropping the padding
259 // away.
260 [[maybe_unused]] std::optional<QSize> vivantePaddedSize;
261 const bool setFormat_RGBA8888 = [&] {
262#if QT_CONFIG(gpu_vivante)
263 if (bufferMemoryFormat == QGstCaps::VivantePhysMemory) {
264 QRhi *rhi = m_sink ? m_sink->rhi() : nullptr;
265 const GstVideoInfo &videoInfo = m_videoInfo.gstVideoInfo;
266 if (!rhi || rhi->backend() != QRhi::OpenGLES2
267 || !qGstVivFormatTokenFromGstVideoFormat(GST_VIDEO_INFO_FORMAT(&videoInfo)))
268 return false;
269 vivantePaddedSize = qGstVivantePaddedFrameSize(buffer, videoInfo);
270 return vivantePaddedSize.has_value();
271 }
272#endif
273#if QT_CONFIG(gstreamer_gl_egl) && QT_CONFIG(linux_dmabuf)
274 QRhi *rhi = m_sink ? m_sink->rhi() : nullptr;
275 if ((m_format.pixelFormat() == QVideoFrameFormat::Format_UYVY
276 || m_format.pixelFormat() == QVideoFrameFormat::Format_YUYV)
277 && bufferMemoryFormat == QGstCaps::DMABuf && qGstEglCanMapDmaBuf(rhi)) {
278
279 if (!rhi || rhi->backend() != QRhi::OpenGLES2)
280 return false;
281
282 auto *nativeHandles = static_cast<const QRhiGles2NativeHandles *>(rhi->nativeHandles());
283 QOpenGLContext *glContext = nativeHandles ? nativeHandles->context : nullptr;
284 return glContext && glContext->isOpenGLES();
285 }
286#endif
287 return false;
288 }();
289 if (setFormat_RGBA8888) {
290 // TODO: Replace with new private setter of pixel format.
291 qCDebug(qLcGstVideoRenderer) << "Setting pixel format to Format_RGBA8888";
292 bufferVideoFrameFormat = QVideoFrameFormat(m_format.frameSize(),
293 QVideoFrameFormat::Format_RGBA8888);
294 bufferVideoFrameFormat.setStreamFrameRate(m_format.streamFrameRate());
295 bufferVideoFrameFormat.setColorRange(m_format.colorRange());
296 bufferVideoFrameFormat.setColorTransfer(m_format.colorTransfer());
297 bufferVideoFrameFormat.setColorSpace(m_format.colorSpace());
298
299 if (vivantePaddedSize && *vivantePaddedSize != m_format.frameSize()) {
300 qCDebug(qLcGstVideoRenderer) << "Cropping padded Vivante frame" << *vivantePaddedSize
301 << "to" << m_format.viewport();
302 bufferVideoFrameFormat.setFrameSize(*vivantePaddedSize);
303 bufferVideoFrameFormat.setViewport(m_format.viewport());
304 }
305 }
306
307 RenderBufferState state{
308 QGstBufferHandle{ buffer, QGstBufferHandle::NeedsRef },
309 bufferVideoFrameFormat,
310 m_videoInfo,
311 bufferMemoryFormat,
312 };
313
314 qCDebug(qLcGstVideoRenderer) << " sending video frame";
315
316 qsizetype sizeOfQueue = m_bufferQueue.enqueue(std::move(state));
317 if (sizeOfQueue == 1)
318 // we only need to wake up, if we don't have a pending frame
319 QCoreApplication::postEvent(this, new QEvent(renderFramesEvent));
320
321 return GST_FLOW_OK;
322}
323
324bool QGstVideoRenderer::query(GstQuery *query)
325{
326#if QT_CONFIG(gstreamer_gl)
327 if (GST_QUERY_TYPE(query) == GST_QUERY_CONTEXT) {
328 const gchar *type = nullptr;
329 gst_query_parse_context_type(query, &type);
330
331 QLatin1StringView typeStr(type);
332 if (typeStr != QLatin1StringView("gst.gl.GLDisplay")
333 && typeStr != QLatin1StringView("gst.gl.local_context")) {
334 return false;
335 }
336
337 QMutexLocker locker(&m_sinkMutex);
338 if (!m_sink)
339 return false;
340
341 auto *gstGlContext = typeStr == QLatin1StringView("gst.gl.GLDisplay")
342 ? m_sink->gstGlDisplayContext() : m_sink->gstGlLocalContext();
343 if (!gstGlContext)
344 return false;
345
346 gst_query_set_context(query, gstGlContext);
347
348 return true;
349 }
350#else
351 Q_UNUSED(query);
352#endif
353 return false;
354}
355
356void QGstVideoRenderer::gstEvent(GstEvent *event)
357{
358 qCDebug(qLcGstVideoRenderer) << "QGstVideoRenderer::gstEvent:" << event;
359
360 switch (GST_EVENT_TYPE(event)) {
361 case GST_EVENT_TAG:
362 return gstEventHandleTag(event);
363 case GST_EVENT_EOS:
364 return gstEventHandleEOS(event);
365 case GST_EVENT_FLUSH_START:
366 return gstEventHandleFlushStart(event);
367 case GST_EVENT_FLUSH_STOP:
368 return gstEventHandleFlushStop(event);
369
370 default:
371 return;
372 }
373}
374
375void QGstVideoRenderer::setActive(bool isActive)
376{
377 if (isActive == m_isActive)
378 return;
379
380 m_isActive = isActive;
381 if (isActive)
382 updateCurrentVideoFrame(m_currentPipelineFrame);
383 else
384 updateCurrentVideoFrame({});
385}
386
387void QGstVideoRenderer::updateCurrentVideoFrame(QVideoFrame frame)
388{
389 m_currentVideoFrame = std::move(frame);
390 if (m_sink)
391 m_sink->setVideoFrame(m_currentVideoFrame);
392}
393
394void QGstVideoRenderer::gstEventHandleTag(GstEvent *event)
395{
396 GstTagList *taglist = nullptr;
397 gst_event_parse_tag(event, &taglist);
398 if (!taglist)
399 return;
400
401 qCDebug(qLcGstVideoRenderer) << "QGstVideoRenderer::gstEventHandleTag:" << taglist;
402
403 QGString value;
404 if (!gst_tag_list_get_string(taglist, GST_TAG_IMAGE_ORIENTATION, &value))
405 return;
406
407 RotationResult parsed = parseRotationTag(value.get());
408
409 m_format.setMirrored(parsed.flip);
410 m_format.setRotation(parsed.rotation);
411}
412
413void QGstVideoRenderer::gstEventHandleEOS(GstEvent *)
414{
415 stop();
416}
417
418void QGstVideoRenderer::gstEventHandleFlushStart(GstEvent *)
419{
420 // "data is to be discarded"
421 m_flushing = true;
422 m_bufferQueue.clear();
423}
424
425void QGstVideoRenderer::gstEventHandleFlushStop(GstEvent *)
426{
427 // "data is allowed again"
428 m_flushing = false;
429}
430
433
434#define VO_SINK(s) QGstVideoRendererSink *sink(reinterpret_cast<QGstVideoRendererSink *>(s))
435
437{
438 setSink(sink);
439 QGstVideoRendererSink *gstSink = reinterpret_cast<QGstVideoRendererSink *>(
440 g_object_new(QGstVideoRendererSink::get_type(), nullptr));
441
442 return QGstVideoRendererSinkElement{
443 gstSink,
444 QGstElement::NeedsRef,
445 };
446}
447
449{
450 gvrs_current_sink = sink;
451}
452
453GType QGstVideoRendererSink::get_type()
454{
455 static const GTypeInfo info =
456 {
457 sizeof(QGstVideoRendererSinkClass), // class_size
458 base_init, // base_init
459 nullptr, // base_finalize
460 class_init, // class_init
461 nullptr, // class_finalize
462 nullptr, // class_data
463 sizeof(QGstVideoRendererSink), // instance_size
464 0, // n_preallocs
465 instance_init, // instance_init
466 nullptr // value_table
467 };
468
469 static const GType type = g_type_register_static(GST_TYPE_VIDEO_SINK, "QGstVideoRendererSink",
470 &info, GTypeFlags(0));
471
472 return type;
473}
474
475void QGstVideoRendererSink::class_init(gpointer g_class, gpointer class_data)
476{
477 Q_UNUSED(class_data);
478
479 gvrs_sink_parent_class = reinterpret_cast<GstVideoSinkClass *>(g_type_class_peek_parent(g_class));
480
481 GstVideoSinkClass *video_sink_class = reinterpret_cast<GstVideoSinkClass *>(g_class);
482 video_sink_class->show_frame = QGstVideoRendererSink::show_frame;
483
484 GstBaseSinkClass *base_sink_class = reinterpret_cast<GstBaseSinkClass *>(g_class);
485 base_sink_class->get_caps = QGstVideoRendererSink::get_caps;
486 base_sink_class->set_caps = QGstVideoRendererSink::set_caps;
487 base_sink_class->propose_allocation = QGstVideoRendererSink::propose_allocation;
488 base_sink_class->stop = QGstVideoRendererSink::stop;
489 base_sink_class->unlock = QGstVideoRendererSink::unlock;
490 base_sink_class->query = QGstVideoRendererSink::query;
491 base_sink_class->event = QGstVideoRendererSink::event;
492
493 GstElementClass *element_class = reinterpret_cast<GstElementClass *>(g_class);
494 element_class->change_state = QGstVideoRendererSink::change_state;
495 gst_element_class_set_metadata(element_class,
496 "Qt built-in video renderer sink",
497 "Sink/Video",
498 "Qt default built-in video renderer sink",
499 "The Qt Company");
500
501 GObjectClass *object_class = reinterpret_cast<GObjectClass *>(g_class);
502 object_class->finalize = QGstVideoRendererSink::finalize;
503}
504
505void QGstVideoRendererSink::base_init(gpointer g_class)
506{
507 static GstStaticPadTemplate sink_pad_template = GST_STATIC_PAD_TEMPLATE(
508 "sink", GST_PAD_SINK, GST_PAD_ALWAYS, GST_STATIC_CAPS(
509 "video/x-raw, "
510 "framerate = (fraction) [ 0, MAX ], "
511 "width = (int) [ 1, MAX ], "
512 "height = (int) [ 1, MAX ]"));
513
514 gst_element_class_add_pad_template(
515 GST_ELEMENT_CLASS(g_class), gst_static_pad_template_get(&sink_pad_template));
516}
517
518void QGstVideoRendererSink::instance_init(GTypeInstance *instance, gpointer g_class)
519{
520 Q_UNUSED(g_class);
521 VO_SINK(instance);
522
523 Q_ASSERT(gvrs_current_sink);
524
525 sink->renderer = new QGstVideoRenderer(gvrs_current_sink);
526 sink->renderer->moveToThread(gvrs_current_sink->thread());
527 gvrs_current_sink = nullptr;
528}
529
530void QGstVideoRendererSink::finalize(GObject *object)
531{
532 VO_SINK(object);
533
534 delete sink->renderer;
535
536 // Chain up
537 G_OBJECT_CLASS(gvrs_sink_parent_class)->finalize(object);
538}
539
540GstStateChangeReturn QGstVideoRendererSink::change_state(
541 GstElement *element, GstStateChange transition)
542{
543 GstStateChangeReturn ret =
544 GST_ELEMENT_CLASS(gvrs_sink_parent_class)->change_state(element, transition);
545 qCDebug(qLcGstVideoRenderer) << "QGstVideoRenderer::change_state:" << transition << ret;
546 return ret;
547}
548
549GstCaps *QGstVideoRendererSink::get_caps(GstBaseSink *base, GstCaps *filter)
550{
551 VO_SINK(base);
552
553 QGstCaps caps = sink->renderer->caps();
554 if (filter)
555 caps = QGstCaps(gst_caps_intersect(caps.caps(), filter), QGstCaps::HasRef);
556
557 return caps.release();
558}
559
560gboolean QGstVideoRendererSink::set_caps(GstBaseSink *base, GstCaps *gcaps)
561{
562 VO_SINK(base);
563 auto caps = QGstCaps(gcaps, QGstCaps::NeedsRef);
564
565 qCDebug(qLcGstVideoRenderer) << "set_caps:" << caps;
566
567 if (!caps) {
568 sink->renderer->stop();
569 return TRUE;
570 }
571
572 return sink->renderer->start(caps);
573}
574
575gboolean QGstVideoRendererSink::propose_allocation(GstBaseSink *base, GstQuery *query)
576{
577 VO_SINK(base);
578 return sink->renderer->proposeAllocation(query);
579}
580
581gboolean QGstVideoRendererSink::stop(GstBaseSink *base)
582{
583 VO_SINK(base);
584 sink->renderer->stop();
585 return TRUE;
586}
587
588gboolean QGstVideoRendererSink::unlock(GstBaseSink *base)
589{
590 VO_SINK(base);
591 sink->renderer->unlock();
592 return TRUE;
593}
594
595GstFlowReturn QGstVideoRendererSink::show_frame(GstVideoSink *base, GstBuffer *buffer)
596{
597 VO_SINK(base);
598 return sink->renderer->render(buffer);
599}
600
601gboolean QGstVideoRendererSink::query(GstBaseSink *base, GstQuery *query)
602{
603 VO_SINK(base);
604 if (sink->renderer->query(query))
605 return TRUE;
606
607 return GST_BASE_SINK_CLASS(gvrs_sink_parent_class)->query(base, query);
608}
609
610gboolean QGstVideoRendererSink::event(GstBaseSink *base, GstEvent * event)
611{
612 VO_SINK(base);
613 sink->renderer->gstEvent(event);
614 return GST_BASE_SINK_CLASS(gvrs_sink_parent_class)->event(base, event);
615}
616
625
627{
628 qGstVideoRendererSink()->renderer->setActive(isActive);
629}
630
632{
633 return reinterpret_cast<QGstVideoRendererSink *>(element());
634}
635
636QT_END_NAMESPACE
MemoryFormat memoryFormat() const
Definition qgst.cpp:616
static QGstCaps create()
Definition qgst.cpp:643
MemoryFormat
Definition qgst_p.h:394
@ CpuMemory
Definition qgst_p.h:394
QGstVideoRendererSinkElement(QGstVideoRendererSink *, RefMode)
QGstVideoRendererSink * qGstVideoRendererSink() const
static QGstVideoRendererSinkElement createSink(QGstreamerRelayVideoSink *surface)
GstFlowReturn render(GstBuffer *)
~QGstVideoRenderer() override
void customEvent(QEvent *) override
This event handler can be reimplemented in a subclass to receive custom events.
bool start(const QGstCaps &)
QGstVideoRenderer(QGstreamerRelayVideoSink *)
bool proposeAllocation(GstQuery *)
void setFrameTimeStampsFromBuffer(QVideoFrame *frame, GstBuffer *buffer)
typedefQT_BEGIN_NAMESPACE struct _GstBuffer GstBuffer
#define VO_SINK(s)
static GstVideoSinkClass * gvrs_sink_parent_class
static QGstreamerRelayVideoSink * gvrs_current_sink
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)