Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qffmpegencodingformatcontext_p.h
Go to the documentation of this file.
1// Copyright (C) 2024 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 QFFMPEGENCODINGFORMATCONTEXT_P_H
5#define QFFMPEGENCODINGFORMATCONTEXT_P_H
6
7#include <QtFFmpegMediaPluginImpl/private/qffmpegdefs_p.h>
8#include "qmediaformat.h"
9
10//
11// W A R N I N G
12// -------------
13//
14// This file is not part of the Qt API. It exists purely as an
15// implementation detail. This header file may change from version to
16// version without notice, or even be removed.
17//
18// We mean it.
19//
20
22
23class QIODevice;
24class QFile;
25
26namespace QFFmpeg {
27
29{
30public:
31 explicit EncodingFormatContext(QMediaFormat::FileFormat fileFormat);
33
34 void openAVIO(const QString &filePath);
35
36 void openAVIO(QIODevice *device);
37
38 bool isAVIOOpen() const { return m_avFormatContext->pb != nullptr; }
39
40 void closeAVIO();
41
42 AVFormatContext *avFormatContext() { return m_avFormatContext; }
43
44 const AVFormatContext *avFormatContext() const { return m_avFormatContext; }
45
46private:
48
50
51private:
52 AVFormatContext *m_avFormatContext;
53 std::unique_ptr<QFile> m_outputFile;
54};
55
56} // namespace QFFmpeg
57
58QT_END_NAMESPACE
59
60#endif // QFFMPEGENCODINGFORMATCONTEXT_P_H
EncodingFormatContext(QMediaFormat::FileFormat fileFormat)
const AVFormatContext * avFormatContext() const
Q_STATIC_LOGGING_CATEGORY(qLcEncodingFormatContext, "qt.multimedia.ffmpeg.encodingformatcontext")
std::conditional_t< QT_FFMPEG_AVIO_WRITE_CONST, const uint8_t *, uint8_t * > AvioWriteBufferType