Support per-plane strides and data offsets in QVideoFrame.

Since just adding a new virtual isn't binary compatible add a new derivative
type with a virtual member and connect it up through a virtual in the private
class.

[ChangeLog] Support for per-plane strides and data offsets in QVideoFrame.

Task-number: QTBUG-38345
Change-Id: I1974c2b0b454d130e17971ce549031259d61f9cd
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
Andrew den Exter
2014-04-12 13:12:52 +10:00
committed by Yoann Lopes
parent ab379c3da2
commit 1a3ae99441
7 changed files with 458 additions and 40 deletions

View File

@@ -85,6 +85,7 @@ public:
virtual MapMode mapMode() const = 0;
virtual uchar *map(MapMode mode, int *numBytes, int *bytesPerLine) = 0;
int mapPlanes(MapMode mode, int *numBytes, int bytesPerLine[4], uchar *data[4]);
virtual void unmap() = 0;
virtual QVariant handle() const;
@@ -100,6 +101,23 @@ private:
Q_DISABLE_COPY(QAbstractVideoBuffer)
};
class QAbstractPlanarVideoBufferPrivate;
class Q_MULTIMEDIA_EXPORT QAbstractPlanarVideoBuffer : public QAbstractVideoBuffer
{
public:
QAbstractPlanarVideoBuffer(HandleType type);
virtual ~QAbstractPlanarVideoBuffer();
uchar *map(MapMode mode, int *numBytes, int *bytesPerLine);
virtual int map(MapMode mode, int *numBytes, int bytesPerLine[4], uchar *data[4]) = 0;
protected:
QAbstractPlanarVideoBuffer(QAbstractPlanarVideoBufferPrivate &dd, HandleType type);
private:
Q_DISABLE_COPY(QAbstractPlanarVideoBuffer)
};
#ifndef QT_NO_DEBUG_STREAM
Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, QAbstractVideoBuffer::HandleType);
Q_MULTIMEDIA_EXPORT QDebug operator<<(QDebug, QAbstractVideoBuffer::MapMode);