Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qavfsamplebufferdelegate_p.h
Go to the documentation of this file.
1
// Copyright (C) 2022 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
4
#
ifndef
QAVFSAMPLEBUFFERDELEGATE_P_H
5
#
define
QAVFSAMPLEBUFFERDELEGATE_P_H
6
7
//
8
// W A R N I N G
9
// -------------
10
//
11
// This file is not part of the Qt API. It exists purely as an
12
// implementation detail. This header file may change from version to
13
// version without notice, or even be removed.
14
//
15
// We mean it.
16
//
17
18
#
import
<
AVFoundation
/
AVFoundation
.
h
>
19
#
import
<
CoreVideo
/
CoreVideo
.
h
>
20
21
#
include
<
QtCore
/
qtconfigmacros
.
h
>
22
#
include
<
QtCore
/
qtypes
.
h
>
23
24
#
include
<
QtMultimedia
/
private
/
qvideotransformation_p
.
h
>
25
26
#
include
<
functional
>
27
#
include
<
memory
>
28
29
QT_BEGIN_NAMESPACE
30
31
class
QAVSampleBufferDelegateFrameHandler;
32
class
QVideoFrame;
33
namespace
QFFmpeg
{
34
class
HWAccel
;
35
36
struct
QAVFSampleBufferDelegateTransform
{
37
VideoTransformation
surfaceTransform
;
38
VideoTransformation
presentationTransform
;
39
};
40
41
using
QAVFSampleBufferDelegateTransformProvider
=
std
::function<
QAVFSampleBufferDelegateTransform
(
42
const
AVCaptureConnection *)>;
43
44
}
// namespace QFFmpeg
45
46
QT_END_NAMESPACE
47
48
// This type is used by screencapture and camera-capture.
49
@interface QT_MANGLE_NAMESPACE(QAVFSampleBufferDelegate) : NSObject <AVCaptureVideoDataOutputSampleBufferDelegate>
50
51
// These parameters are called during the captureOutput callback.
52
//
53
// The handler parameter is called at the end, when the QVideoFrame is constructed and configured.
54
//
55
// The modifier is called to modify the frame before it is finally sent to the handler.
56
// This can be used to i.e add metadata to the frame.
57
- (instancetype)initWithFrameHandler:(std::function<
void
(
const
QVideoFrame &)>)handler;
58
59
// Clears the frame handler, so future samples are discarded.
60
// Not thread safe.
61
- (
void
)discardFutureSamples;
62
63
// Allows the object to update the QVideoFrame metadata based on rotatation and mirroring.
64
// This does NOT rotate the pixel buffer.
65
- (
void
)setTransformationProvider:
66
(
const
QT_PREPEND_NAMESPACE(QFFmpeg::QAVFSampleBufferDelegateTransformProvider) &)provider;
67
68
- (
void
)captureOutput:(AVCaptureOutput *)captureOutput
69
didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer
70
fromConnection:(AVCaptureConnection *)connection;
71
72
- (
void
)setHWAccel:(std::unique_ptr<QT_PREPEND_NAMESPACE(QFFmpeg::HWAccel)> &&)accel;
73
74
- (
void
)setVideoFormatFrameRate:(qreal)frameRate;
75
76
@end
77
78
QT_BEGIN_NAMESPACE
79
80
namespace
QFFmpeg
{
81
82
using
QAVFSampleBufferDelegate
=
QT_MANGLE_NAMESPACE
(
QAVFSampleBufferDelegate
);
83
84
}
// namespace QFFmpeg
85
86
QT_END_NAMESPACE
87
88
#
endif
QFFmpeg::HWAccel
Definition
qffmpeghwaccel_p.h:65
QFFmpeg
Definition
qandroidcacertificates.cpp:26
QFFmpeg::QAVFSampleBufferDelegateTransformProvider
std::function< QAVFSampleBufferDelegateTransform( const AVCaptureConnection *)> QAVFSampleBufferDelegateTransformProvider
Definition
qavfsamplebufferdelegate_p.h:41
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
QFFmpeg::QAVFSampleBufferDelegateTransform
Definition
qavfsamplebufferdelegate_p.h:36
QFFmpeg::QAVFSampleBufferDelegateTransform::presentationTransform
VideoTransformation presentationTransform
Definition
qavfsamplebufferdelegate_p.h:38
QFFmpeg::QAVFSampleBufferDelegateTransform::surfaceTransform
VideoTransformation surfaceTransform
Definition
qavfsamplebufferdelegate_p.h:37
qtmultimedia
src
plugins
multimedia
ffmpeg
darwin
qavfsamplebufferdelegate_p.h
Generated on
for Qt by
1.18.0