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
qffmpegcodecstorage_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 QFFMPEGCODECSTORAGE_P_H
5#define QFFMPEGCODECSTORAGE_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#include <QtFFmpegMediaPluginImpl/private/qffmpegdefs_p.h>
19#include <QtFFmpegMediaPluginImpl/private/qffmpegcodec_p.h>
20#include <QtMultimedia/qtmultimediaglobal.h>
21
22#include <QtCore/qxpfunctional.h>
23
24#include <optional>
25
26QT_BEGIN_NAMESPACE
27
28namespace QFFmpeg {
29
34
40
43 const qxp::function_ref<AVScore(const Codec &)> &scoreFunction);
44
45// note: Sorted by score descending, so the first element is the best match.
47findAndScoreEncoders(AVCodecID codecId,
48 const qxp::function_ref<AVScore(const Codec &)> &scoreFunction)
49{
50 return findAndScoreCodecs(CodecRole::Encoders, codecId, scoreFunction);
51}
52
53std::optional<Codec> findAVDecoder(AVCodecID codecId,
54 const std::optional<PixelOrSampleFormat> &format = {});
55
56std::optional<Codec> findAVEncoder(AVCodecID codecId,
57 const std::optional<PixelOrSampleFormat> &format = {});
58
59} // namespace QFFmpeg
60
61QT_END_NAMESPACE
62
63#endif // QFFMPEGCODECSTORAGE_P_H
TrackDuration toTrackDuration(AVStreamDuration duration) const
TrackPosition toTrackPosition(AVStreamPosition streamPosition) const
AVCodecContext * context() const
static q23::expected< CodecContext, QString > create(AVStream *stream, AVFormatContext *formatContext, const QPlaybackOptions &options)
AVRational pixelAspectRatio(AVFrame *frame) const
The QPlaybackOptions class enables low-level control of media playback options.
std::vector< CodecScoreRecord > findAndScoreCodecs(CodecRole, AVCodecID, const qxp::function_ref< AVScore(const Codec &)> &scoreFunction)
QT_MANGLE_NAMESPACE(QMacScreenCaptureStreamDelegate) QMacScreenCaptureStreamDelegate
std::vector< CodecScoreRecord > findAndScoreEncoders(AVCodecID codecId, const qxp::function_ref< AVScore(const Codec &)> &scoreFunction)
std::optional< Codec > findAVEncoder(AVCodecID codecId, const std::optional< PixelOrSampleFormat > &format={})
std::optional< Codec > findAVDecoder(AVCodecID codecId, const std::optional< PixelOrSampleFormat > &format={})
Combined button and popup list for selecting options.
QT_BEGIN_NAMESPACE Q_STATIC_LOGGING_CATEGORY(lcSynthesizedIterableAccess, "qt.iterable.synthesized", QtWarningMsg)