4#ifndef AVFVIDEOBUFFER_H
5#define AVFVIDEOBUFFER_H
18#include <private/qhwvideobuffer_p.h>
19#include <private/qcore_mac_p.h>
21#include <QtCore/qobject.h>
22#include <QtCore/qmutex.h>
23#include <avfvideosink_p.h>
25#include <CoreVideo/CVImageBuffer.h>
27#import "Metal/Metal.h"
31struct AVFMetalTexture;
38 MapData map(QVideoFrame::MapMode mode)
override;
49#if defined(Q_OS_MACOS)
51#elif defined(Q_OS_IOS)
56 QCFType<CVImageBufferRef> m_buffer;
57 QCFType<CVMetalTextureCacheRef> metalCache;
58 QCFType<CVMetalTextureRef> cvMetalTexture[3];
61 QVideoFrameFormat m_format;
static MTLPixelFormat rhiTextureFormatToMetalFormat(QRhiTexture::Format f)
MapData map(QVideoFrame::MapMode mode) override
Maps the planes of a video buffer to memory.
QVideoFrameFormat videoFormat() const
~AVFVideoBuffer() override
quint64 textureHandle(QRhi &, int plane) override
void unmap() override
Releases the memory mapped by the map() function.
AVFVideoBuffer(AVFVideoSinkInterface *sink, QCFType< CVImageBufferRef > buffer)
Combined button and popup list for selecting options.