4#ifndef AVFVIDEOWINDOWCONTROL_H
5#define AVFVIDEOWINDOWCONTROL_H
18#include "private/qplatformvideosink_p.h"
20#include <QtCore/private/qcore_mac_p.h>
22#include <CoreVideo/CVBase.h>
23#include <CoreVideo/CVImageBuffer.h>
24#include <CoreVideo/CVPixelBuffer.h>
26#import <AVFoundation/AVFoundation.h>
27#import <Metal/Metal.h>
31class AVFVideoSinkInterface;
43 void setRhi(QRhi *rhi)
override;
51 QRhi *m_rhi =
nullptr;
63 virtual void setRhi(QRhi *);
64 virtual void setLayer(CALayer *layer);
74#if defined(Q_OS_MACOS)
76#elif defined(Q_OS_IOS)
80 void freeTextureCaches();
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)
virtual void setLayer(CALayer *layer)
QCFType< CVMetalTextureCacheRef > cvMetalTextureCache
NSDictionary * m_outputSettings
virtual void setOutputSettings()
virtual void setRhi(QRhi *)
virtual void reconfigure()=0
void setVideoSink(AVFVideoSink *sink)
void setRhi(QRhi *rhi) override
void setVideoSinkInterface(AVFVideoSinkInterface *interface)
void setNativeSize(QSize size)
Combined button and popup list for selecting options.