44 #include <private/qimagevideobuffer_p.h> 45 #include <private/qmemoryvideobuffer_p.h> 690 case QImage::NImageFormats:
The QVariant class acts like a union for the most common Qt data types.
uchar * bits()
Returns a pointer to the start of the frame data buffer.
QVideoFrame()
Constructs a null video frame.
Format
The following image formats are available in Qt.
MapMode
Enumerates how a video buffer's data is mapped to memory.
virtual void unmap()=0
Releases the memory mapped by the map() function.
#define QT_END_NAMESPACE
This macro expands to.
PixelFormat pixelFormat() const
Returns the color format of a video frame.
The QByteArray class provides an array of bytes.
int mappedBytes() const
Returns the number of bytes occupied by the mapped frame data.
static PixelFormat pixelFormatFromImageFormat(QImage::Format format)
Returns an video pixel format equivalent to an image format.
int bytesPerLine() const
Returns the number of bytes in a scan line.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
bool isWritable() const
Identifies if the mapped contents of a video frame will be persisted when the frame is unmapped...
QVideoFrame & operator=(const QVideoFrame &other)
Assigns the contents of other to a video frame.
The QVideoFrame class provides a representation of a frame of video data.
HandleType
Identifies the type of a video buffers handle.
void unmap()
Releases the memory mapped by the map() function.
QAbstractVideoBuffer * buffer
virtual MapMode mapMode() const =0
Returns the mode a video buffer is mapped in.
int width() const
Returns the width.
PixelFormat
Enumerates video data types.
#define QT_BEGIN_NAMESPACE
This macro expands to.
static QImage::Format imageFormatFromPixelFormat(PixelFormat format)
Returns an image format equivalent to a video frame pixel format.
QAbstractVideoBuffer::MapMode mapMode() const
Returns the mode a video frame was mapped to system memory in.
QSize size() const
Returns the size of a video frame.
void setFieldType(FieldType)
Sets the field an interlaced video frame belongs to.
virtual uchar * map(MapMode mode, int *numBytes, int *bytesPerLine)=0
Maps the contents of a video buffer to memory.
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
~QVideoFrame()
Destroys a video frame.
void setEndTime(qint64 time)
Sets the presentation time when a frame should stop being displayed.
int height() const
Returns the height of a video frame.
void setStartTime(qint64 time)
Sets the presentation time when the frame should be displayed.
FieldType fieldType() const
Returns the field an interlaced video frame belongs to.
QAbstractVideoBuffer::HandleType handleType() const
Returns the type of a video frame's handle.
The QSharedData class is a base class for shared data objects.
The QMemoryVideoBuffer class provides a system memory allocated video data buffer.
The QAbstractVideoBuffer class is an abstraction for video data.
QVideoFrame::FieldType fieldType
void resize(int size)
Sets the size of the byte array to size bytes.
int height() const
Returns the height.
bool isMapped() const
Identifies if a video frame's contents are currently mapped to system memory.
virtual QVariant handle() const
Returns a type specific handle to the data buffer.
qint64 startTime() const
Returns the presentation time when the frame should be displayed.
bool isReadable() const
Identifies if the mapped contents of a video frame were read from the frame when it was mapped...
int width() const
Returns the width of a video frame.
QVideoFramePrivate(const QSize &size, QVideoFrame::PixelFormat format)
QVideoFrame::PixelFormat pixelFormat
qint64 endTime() const
Returns the presentation time when a frame should stop being displayed.
bool isValid() const
Identifies whether a video frame is valid.
bool isEmpty() const
Returns true if the byte array has size 0; otherwise returns false.
The QSize class defines the size of a two-dimensional object using integer point precision.
QExplicitlySharedDataPointer< QVideoFramePrivate > d
HandleType handleType() const
Returns the type of a video buffer's handle.
QVariant handle() const
Returns a type specific handle to a video frame's buffer.
bool map(QAbstractVideoBuffer::MapMode mode)
Maps the contents of a video frame to memory.
FieldType
Specifies the field an interlaced video frame belongs to.