Gst backend: allow rendering other video buffers than allocated
Moved checking the buffer type to the buffer pool instead of comparing the buffer type in QVideoSurfaceGstSink. Some gstreamer elements may push other buffer instance than provided by sink but with the same data pointer. Change-Id: Iab3bf4da2d5eeb5d2a9375aa609a89515b067ce3 Reviewed-by: Lev Zelenskiy <lev.zelenskiy@nokia.com> Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
08d45baac2
commit
fdb5c419c4
@@ -73,16 +73,14 @@ public:
|
||||
virtual ~QGstBufferPoolInterface() {}
|
||||
|
||||
virtual bool isFormatSupported(const QVideoSurfaceFormat &format) const = 0;
|
||||
|
||||
virtual GType bufferType() const = 0;
|
||||
virtual GstBuffer *takeBuffer(const QVideoSurfaceFormat &format, GstCaps *caps) = 0;
|
||||
virtual void clear() = 0;
|
||||
|
||||
virtual QAbstractVideoBuffer::HandleType handleType() const = 0;
|
||||
|
||||
/*!
|
||||
Build an QAbstractVideoBuffer instance from compatible (mathcing gst buffer type)
|
||||
GstBuffer.
|
||||
Build an QAbstractVideoBuffer instance from GstBuffer.
|
||||
Returns NULL if GstBuffer is not compatible with this buffer pool.
|
||||
|
||||
This method is called from gstreamer video sink thread.
|
||||
*/
|
||||
@@ -101,16 +99,14 @@ public:
|
||||
virtual ~QGstBufferPoolPlugin() {}
|
||||
|
||||
virtual bool isFormatSupported(const QVideoSurfaceFormat &format) const = 0;
|
||||
|
||||
virtual GType bufferType() const = 0;
|
||||
virtual GstBuffer *takeBuffer(const QVideoSurfaceFormat &format, GstCaps *caps) = 0;
|
||||
virtual void clear() = 0;
|
||||
|
||||
virtual QAbstractVideoBuffer::HandleType handleType() const = 0;
|
||||
|
||||
/*!
|
||||
Build an QAbstractVideoBuffer instance from compatible (mathcing gst buffer type)
|
||||
GstBuffer.
|
||||
Build an QAbstractVideoBuffer instance from compatible GstBuffer.
|
||||
Returns NULL if GstBuffer is not compatible with this buffer pool.
|
||||
|
||||
This method is called from gstreamer video sink thread.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user