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>
28#import <MetalKit/MetalKit.h>
32class AVFVideoSinkInterface;
44 void setRhi(QRhi *rhi)
override;
52 QRhi *m_rhi =
nullptr;
64 virtual void setRhi(QRhi *);
65 virtual void setLayer(CALayer *layer);
75#if defined(Q_OS_MACOS)
77#elif defined(Q_OS_IOS)
81 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.