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
QD3D11TextureVideoBuffer Class Reference
Inheritance diagram for QD3D11TextureVideoBuffer:
Collaboration diagram for QD3D11TextureVideoBuffer:

Public Member Functions

 QD3D11TextureVideoBuffer (const ComPtr< ID3D11Device > &device, std::shared_ptr< QMutex > &mutex, const ComPtr< ID3D11Texture2D > &texture)
 ~QD3D11TextureVideoBuffer ()
MapData map (QVideoFrame::MapMode mode) override
 Maps the planes of a video buffer to memory.
void unmap () override
 Releases the memory mapped by the map() function.
QVideoFrameFormat format () const override
 Gets \l QVideoFrameFormat of the underlying video buffer.
QSize getSize () const
 QD3D11TextureVideoBuffer (const ComPtr< ID3D11Device > &device, std::shared_ptr< QMutex > &mutex, const ComPtr< ID3D11Texture2D > &texture)
 ~QD3D11TextureVideoBuffer ()
MapData map (QVideoFrame::MapMode mode) override
 Maps the planes of a video buffer to memory.
void unmap () override
 Releases the memory mapped by the map() function.
QVideoFrameFormat format () const override
 Gets \l QVideoFrameFormat of the underlying video buffer.
QSize getSize () const
Public Member Functions inherited from QAbstractVideoBuffer
virtual ~QAbstractVideoBuffer ()
 \variable QAbstractVideoBuffer::MapData::planeCount

Detailed Description

Definition at line 66 of file qffmpegscreencapture_dxgi.cpp.

Constructor & Destructor Documentation

◆ QD3D11TextureVideoBuffer() [1/2]

QD3D11TextureVideoBuffer::QD3D11TextureVideoBuffer ( const ComPtr< ID3D11Device > & device,
std::shared_ptr< QMutex > & mutex,
const ComPtr< ID3D11Texture2D > & texture )
inline

Definition at line 69 of file qffmpegscreencapture_dxgi.cpp.

References QD3D11TextureVideoBuffer().

Referenced by QD3D11TextureVideoBuffer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~QD3D11TextureVideoBuffer() [1/2]

QD3D11TextureVideoBuffer::~QD3D11TextureVideoBuffer ( )
inline

Definition at line 74 of file qffmpegscreencapture_dxgi.cpp.

◆ QD3D11TextureVideoBuffer() [2/2]

QD3D11TextureVideoBuffer::QD3D11TextureVideoBuffer ( const ComPtr< ID3D11Device > & device,
std::shared_ptr< QMutex > & mutex,
const ComPtr< ID3D11Texture2D > & texture )
inline

Definition at line 69 of file qffmpegscreencapture_dxgi.cpp.

◆ ~QD3D11TextureVideoBuffer() [2/2]

QD3D11TextureVideoBuffer::~QD3D11TextureVideoBuffer ( )
inline

Definition at line 74 of file qffmpegscreencapture_dxgi.cpp.

Member Function Documentation

◆ format() [1/2]

QVideoFrameFormat QD3D11TextureVideoBuffer::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 132 of file qffmpegscreencapture_dxgi.cpp.

◆ format() [2/2]

QVideoFrameFormat QD3D11TextureVideoBuffer::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 132 of file qffmpegscreencapture_dxgi.cpp.

◆ getSize() [1/2]

QSize QD3D11TextureVideoBuffer::getSize ( ) const
inline

Definition at line 134 of file qffmpegscreencapture_dxgi.cpp.

◆ getSize() [2/2]

QSize QD3D11TextureVideoBuffer::getSize ( ) const
inline

Definition at line 134 of file qffmpegscreencapture_dxgi.cpp.

◆ map() [1/2]

MapData QD3D11TextureVideoBuffer::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 76 of file qffmpegscreencapture_dxgi.cpp.

◆ map() [2/2]

MapData QD3D11TextureVideoBuffer::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 76 of file qffmpegscreencapture_dxgi.cpp.

◆ unmap() [1/2]

void QD3D11TextureVideoBuffer::unmap ( )
inlineoverridevirtual

Releases the memory mapped by the map() function.

If the \l {QVideoFrame::MapMode}{MapMode} included the QVideoFrame::WriteOnly flag this will write the current content of the mapped memory back to the video frame.

For CPU video buffers, the function may be not overridden. The default implementation of unmap does nothing.

See also
map()

Reimplemented from QAbstractVideoBuffer.

Definition at line 118 of file qffmpegscreencapture_dxgi.cpp.

◆ unmap() [2/2]

void QD3D11TextureVideoBuffer::unmap ( )
inlineoverridevirtual

Releases the memory mapped by the map() function.

If the \l {QVideoFrame::MapMode}{MapMode} included the QVideoFrame::WriteOnly flag this will write the current content of the mapped memory back to the video frame.

For CPU video buffers, the function may be not overridden. The default implementation of unmap does nothing.

See also
map()

Reimplemented from QAbstractVideoBuffer.

Definition at line 118 of file qffmpegscreencapture_dxgi.cpp.


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