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
qffmpeg_p.h File Reference

(6d2b3498b1c16962e861501a21cb56248b35d705)

#include <QtFFmpegMediaPluginImpl/private/qffmpegdefs_p.h>
#include <QtFFmpegMediaPluginImpl/private/qffmpegcodec_p.h>
#include <QtFFmpegMediaPluginImpl/private/qffmpegavaudioformat_p.h>
#include <QtMultimedia/qvideoframeformat.h>
#include <QtMultimedia/private/qmultimedia_ranges_p.h>
#include <qstring.h>
#include <optional>
Include dependency graph for qffmpeg_p.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  QFFmpeg::AVDictionaryHolder
struct  QFFmpeg::AVDeleter< F >
struct  QFFmpeg::ValueAndScore< ValueT, ScoreT >

Namespaces

namespace  QFFmpeg

Typedefs

using QFFmpeg::AVFrameUPtr = std::unique_ptr<AVFrame, AVDeleter<av_frame_free>>
using QFFmpeg::AVPacketUPtr = std::unique_ptr<AVPacket, AVDeleter<av_packet_free>>
using QFFmpeg::AVCodecContextUPtr = std::unique_ptr<AVCodecContext, AVDeleter<avcodec_free_context>>
using QFFmpeg::AVBufferUPtr = std::unique_ptr<AVBufferRef, AVDeleter<av_buffer_unref>>
using QFFmpeg::AVHWFramesConstraintsUPtr
using QFFmpeg::SwrContextUPtr = std::unique_ptr<SwrContext, AVDeleter<swr_free>>
using QFFmpeg::SwsContextUPtr = std::unique_ptr<SwsContext, AVDeleter<sws_freeContext>>

Enumerations

enum class  QFFmpeg::AVError : int { QFFmpeg::Success = 0 }
enum class  QFFmpeg::AVCodecCapabilities : uint64_t
enum class  QFFmpeg::AVPixelFormatFlags : uint64_t
enum class  QFFmpeg::AVHwConfigMethods : uint64_t

Functions

static bool operator== (const AVRational &lhs, const AVRational &rhs)
static bool operator!= (const AVRational &lhs, const AVRational &rhs)
std::optional< qint64QFFmpeg::mul (qint64 a, AVRational b)
std::optional< qrealQFFmpeg::mul (qreal a, AVRational b)
std::optional< qint64QFFmpeg::timeStampMs (qint64 ts, AVRational base)
std::optional< qint64QFFmpeg::timeStampUs (qint64 ts, AVRational base)
std::optional< float > QFFmpeg::toFloat (AVRational r)
QString QFFmpeg::err2str (int errnum)
void QFFmpeg::setAVFrameTime (AVFrame &frame, int64_t pts, const AVRational &timeBase)
void QFFmpeg::getAVFrameTime (const AVFrame &frame, int64_t &pts, AVRational &timeBase)
int64_t QFFmpeg::getAVFrameDuration (const AVFrame &frame)
AVFrameUPtr QFFmpeg::makeAVFrame ()
bool QFFmpeg::isAVFormatSupported (const Codec &codec, const PixelOrSampleFormat &format)
template<typename Value, typename Predicate>
std::optional< Value > QFFmpeg::findIf (QSpan< const Value > range, const Predicate &predicate)
template<typename Predicate>
std::optional< AVPixelFormat > QFFmpeg::findAVPixelFormat (const Codec &codec, const Predicate &predicate)
template<typename Function>
void QFFmpeg::forEachAVPixelFormat (const Codec &codec, const Function &function)
template<typename ValueRange, typename CalculateScore, typename Value = QtMultimediaPrivate::ranges::range_value_t<ValueRange>, typename ScoreType = std::invoke_result_t<CalculateScore, Value>>
std::optional< ValueAndScore< Value, ScoreType > > QFFmpeg::findBestAVValueWithScore (ValueRange &&values, const CalculateScore &calculateScore)
template<typename ValueRange, typename CalculateScore, typename Value = QtMultimediaPrivate::ranges::range_value_t<ValueRange>>
std::optional< Value > QFFmpeg::findBestAVValue (ValueRange &&values, const CalculateScore &calculateScore)
bool QFFmpeg::isHwPixelFormat (AVPixelFormat format)
bool QFFmpeg::isSwPixelFormat (AVPixelFormat format)
void QFFmpeg::applyExperimentalCodecOptions (const Codec &codec, AVDictionary **opts)
AVPixelFormat QFFmpeg::pixelFormatForHwDevice (AVHWDeviceType deviceType)
AVPacketSideData * QFFmpeg::addStreamSideData (AVStream *stream, AVPacketSideData sideData)
const AVPacketSideData * QFFmpeg::streamSideData (const AVStream *stream, AVPacketSideDataType type)
SwrContextUPtr QFFmpeg::createResampleContext (const AVAudioFormat &inputFormat, const AVAudioFormat &outputFormat)
QVideoFrameFormat::ColorTransfer QFFmpeg::fromAvColorTransfer (AVColorTransferCharacteristic colorTrc)
AVColorTransferCharacteristic QFFmpeg::toAvColorTransfer (QVideoFrameFormat::ColorTransfer colorTrc)
QVideoFrameFormat::ColorSpace QFFmpeg::fromAvColorSpace (AVColorSpace colorSpace)
AVColorSpace QFFmpeg::toAvColorSpace (QVideoFrameFormat::ColorSpace colorSpace)
QVideoFrameFormat::ColorRange QFFmpeg::fromAvColorRange (AVColorRange colorRange)
AVColorRange QFFmpeg::toAvColorRange (QVideoFrameFormat::ColorRange colorRange)
AVHWDeviceContext * QFFmpeg::avFrameDeviceContext (const AVFrame *frame)
SwsContextUPtr QFFmpeg::createSwsContext (const QSize &srcSize, AVPixelFormat srcPixFmt, const QSize &dstSize, AVPixelFormat dstPixFmt, SwsFlags conversionType)
QString QFFmpeg::toString (AVCodecCapabilities capabilities)
QString QFFmpeg::toString (AVPixelFormatFlags flags)
QString QFFmpeg::toString (AVHwConfigMethods methods)
QDebug operator<< (QDebug, const AVRational &)
QDebug operator<< (QDebug, const AVDictionary &)
QDebug operator<< (QDebug, const QFFmpeg::AVDictionaryHolder &)
QDebug operator<< (QDebug, QFFmpeg::AVError)
QDebug operator<< (QDebug, AVPixelFormat)
QDebug operator<< (QDebug, AVHWDeviceType)
QDebug operator<< (QDebug, AVMediaType)
QDebug operator<< (QDebug, AVCodecID)
QDebug operator<< (QDebug, const AVOutputFormat *)
QDebug operator<< (QDebug, const AVInputFormat *)
QDebug operator<< (QDebug, QFFmpeg::AVCodecCapabilities)
QDebug operator<< (QDebug, QFFmpeg::AVPixelFormatFlags)
QDebug operator<< (QDebug, QFFmpeg::AVHwConfigMethods)

Function Documentation

◆ operator!=()

bool operator!= ( const AVRational & lhs,
const AVRational & rhs )
inlinestatic

Definition at line 31 of file qffmpeg_p.h.

◆ operator<<() [1/13]

QDebug operator<< ( QDebug dbg,
AVCodecID id )

Definition at line 431 of file qffmpeg.cpp.

◆ operator<<() [2/13]

QDebug operator<< ( QDebug dbg,
AVHWDeviceType type )

Definition at line 411 of file qffmpeg.cpp.

◆ operator<<() [3/13]

QDebug operator<< ( QDebug dbg,
AVMediaType type )

Definition at line 421 of file qffmpeg.cpp.

◆ operator<<() [4/13]

QDebug operator<< ( QDebug dbg,
AVPixelFormat fmt )

Definition at line 401 of file qffmpeg.cpp.

◆ operator<<() [5/13]

QDebug operator<< ( QDebug dbg,
const AVDictionary & dict )

Definition at line 365 of file qffmpeg.cpp.

◆ operator<<() [6/13]

QDebug operator<< ( QDebug dbg,
const AVInputFormat * fmt )

Definition at line 456 of file qffmpeg.cpp.

◆ operator<<() [7/13]

QDebug operator<< ( QDebug dbg,
const AVOutputFormat * fmt )

Definition at line 441 of file qffmpeg.cpp.

◆ operator<<() [8/13]

QDebug operator<< ( QDebug dbg,
const AVRational & value )

Definition at line 359 of file qffmpeg.cpp.

◆ operator<<() [9/13]

QDebug operator<< ( QDebug dbg,
const QFFmpeg::AVDictionaryHolder & dict )

Definition at line 380 of file qffmpeg.cpp.

◆ operator<<() [10/13]

QDebug operator<< ( QDebug dbg,
QFFmpeg::AVCodecCapabilities caps )

Definition at line 605 of file qffmpeg.cpp.

◆ operator<<() [11/13]

QDebug operator<< ( QDebug dbg,
QFFmpeg::AVError error )

Definition at line 389 of file qffmpeg.cpp.

References QFFmpeg::Success.

◆ operator<<() [12/13]

QDebug operator<< ( QDebug dbg,
QFFmpeg::AVHwConfigMethods methods )

Definition at line 615 of file qffmpeg.cpp.

◆ operator<<() [13/13]

QDebug operator<< ( QDebug dbg,
QFFmpeg::AVPixelFormatFlags flags )

Definition at line 610 of file qffmpeg.cpp.

◆ operator==()

bool operator== ( const AVRational & lhs,
const AVRational & rhs )
inlinestatic

Definition at line 26 of file qffmpeg_p.h.