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
QAndroidVideoFrameBuffer Class Reference

#include <qandroidvideoframebuffer_p.h>

Inheritance diagram for QAndroidVideoFrameBuffer:
Collaboration diagram for QAndroidVideoFrameBuffer:

Classes

class  FrameReleaseDelegate

Public Types

enum class  MemoryPolicy { Copy , Reuse }

Public Member Functions

 QAndroidVideoFrameBuffer (QJniObject frame, std::shared_ptr< FrameReleaseDelegate > frameReleaseDelegate, MemoryPolicy policy, QtVideo::Rotation rotation=QtVideo::Rotation::None)
 ~QAndroidVideoFrameBuffer ()
MapData map (QVideoFrame::MapMode) override
 Maps the planes of a video buffer to memory.
QVideoFrameFormat format () const override
 Gets \l QVideoFrameFormat of the underlying video buffer.
long timestamp () const
bool isParsed () const
Public Member Functions inherited from QAbstractVideoBuffer
virtual ~QAbstractVideoBuffer ()
 \variable QAbstractVideoBuffer::MapData::planeCount
virtual void unmap ()
 Releases the memory mapped by the map() function.

Detailed Description

Definition at line 36 of file qandroidvideoframebuffer_p.h.

Member Enumeration Documentation

◆ MemoryPolicy

Enumerator
Copy 
Reuse 

Definition at line 44 of file qandroidvideoframebuffer_p.h.

Constructor & Destructor Documentation

◆ QAndroidVideoFrameBuffer()

QAndroidVideoFrameBuffer::QAndroidVideoFrameBuffer ( QJniObject frame,
std::shared_ptr< FrameReleaseDelegate > frameReleaseDelegate,
MemoryPolicy policy,
QtVideo::Rotation rotation = QtVideo::Rotation::None )

Definition at line 230 of file qandroidvideoframebuffer.cpp.

◆ ~QAndroidVideoFrameBuffer()

QAndroidVideoFrameBuffer::~QAndroidVideoFrameBuffer ( )

Definition at line 250 of file qandroidvideoframebuffer.cpp.

Member Function Documentation

◆ format()

QVideoFrameFormat QAndroidVideoFrameBuffer::format ( ) const
inlineoverridevirtual

Gets \l QVideoFrameFormat of the underlying video buffer.

The format must be available upon construction of \l QVideoFrame. QVideoFrame will contain won instance of the given format, that can be detached and modified.

Implements QAbstractVideoBuffer.

Definition at line 56 of file qandroidvideoframebuffer_p.h.

◆ isParsed()

bool QAndroidVideoFrameBuffer::isParsed ( ) const
inline

Definition at line 58 of file qandroidvideoframebuffer_p.h.

◆ map()

MapData QAndroidVideoFrameBuffer::map ( QVideoFrame::MapMode mode)
inlineoverridevirtual

Maps the planes of a video buffer to memory.

Returns a \l MapData structure that contains information about the plane layout of the mapped current video data. If the mapping fails, the method returns the default structure. For CPU memory buffers, the data is considered as already mapped, so the function just returns the plane layout of the preallocated underlying data.

The map mode indicates whether the contents of the mapped memory should be read from and/or written to the buffer. If the map mode includes the QVideoFrame::ReadOnly flag the mapped memory will be populated with the content of the buffer when initially mapped. If the map mode includes the QVideoFrame::WriteOnly flag the content of the possibly modified mapped memory will be written back to the buffer when unmapped.

When access to the data is no longer needed, the \l unmap function is called to release the mapped memory and possibly update the buffer contents.

If the format of the video data is multiplanar, the method may map the whole pixel data as a single plane. In this case, mapping a buffer with \l QVideoFrame will calculate additional planes from the specified line stride of the first plane, the frame height, and the data size.

Implements QAbstractVideoBuffer.

Definition at line 55 of file qandroidvideoframebuffer_p.h.

◆ timestamp()

long QAndroidVideoFrameBuffer::timestamp ( ) const
inline

Definition at line 57 of file qandroidvideoframebuffer_p.h.


The documentation for this class was generated from the following files: