Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
qffmpeghwaccel_videotoolbox_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3#ifndef QFFMPEGHWACCEL_VIDEOTOOLBOX_P_H
4#define QFFMPEGHWACCEL_VIDEOTOOLBOX_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include "qffmpeghwaccel_p.h"
18
19#ifdef Q_OS_DARWIN
20
21#include <CoreVideo/CVBase.h>
22#include <CoreVideo/CVPixelBuffer.h>
23#include <CoreVideo/CVImageBuffer.h>
24
25#include <CoreVideo/CVMetalTexture.h>
26#if defined(Q_OS_MACOS)
27#include <CoreVideo/CVOpenGLTextureCache.h>
28#elif defined(Q_OS_IOS)
29#include <CoreVideo/CVOpenGLESTextureCache.h>
30#endif
31
33
34class QRhi;
35
36namespace QFFmpeg {
37
38class VideoToolBoxTextureConverter : public TextureConverterBackend
39{
40public:
41 VideoToolBoxTextureConverter(QRhi *rhi);
42 ~VideoToolBoxTextureConverter();
43 TextureSet *getTextures(AVFrame *frame) override;
44
45private:
46 void freeTextureCaches();
47
48 // can not forward declare that type from C++ :/
49 void *cvMetalTextureCache = nullptr;
50#if defined(Q_OS_MACOS)
51 CVOpenGLTextureCacheRef cvOpenGLTextureCache = nullptr;
52#elif defined(Q_OS_IOS)
53 CVOpenGLESTextureCacheRef cvOpenGLESTextureCache = nullptr;
54#endif
55};
56
57}
58
60
61#endif
62
63#endif
\inmodule QtGui
Definition qrhi.h:1767
Combined button and popup list for selecting options.
QFrame frame
[0]