Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QFFmpeg Namespace Reference

Classes

class  AudioEncoder
 
class  AudioRenderer
 
class  AudioSourceIO
 
struct  AVDeleter
 
struct  AVDictionaryHolder
 
struct  AVFormatContextDeleter
 
class  Clock
 
class  ClockController
 
class  Codec
 
class  Demuxer
 
class  Encoder
 
class  EncoderThread
 
class  EncodingFinalizer
 
struct  Frame
 
class  HWAccel
 
struct  LoopOffset
 
class  MediaCodecTextureConverter
 
class  MediaCodecTextureSet
 
class  MediaDataHolder
 
class  Muxer
 
struct  Packet
 
class  PlaybackEngine
 
class  PlaybackEngineObject
 
struct  PositionWithOffset
 
class  Renderer
 
class  Resampler
 
class  StreamDecoder
 
class  SubtitleRenderer
 
class  TextureConverter
 
class  TextureConverterBackend
 
class  TextureSet
 
class  Thread
 
class  TimeController
 
class  VAAPITextureSet
 
class  VideoEncoder
 
class  VideoFrameEncoder
 
class  VideoRenderer
 

Typedefs

using StreamIndexes = std::array< int, 3 >
 
using AVFrameUPtr = std::unique_ptr< AVFrame, AVDeleter< decltype(&av_frame_free), &av_frame_free > >
 
using AVPacketUPtr = std::unique_ptr< AVPacket, AVDeleter< decltype(&av_packet_free), &av_packet_free > >
 
using AVCodecContextUPtr = std::unique_ptr< AVCodecContext, AVDeleter< decltype(&avcodec_free_context), &avcodec_free_context > >
 
using AVBufferUPtr = std::unique_ptr< AVBufferRef, AVDeleter< decltype(&av_buffer_unref), &av_buffer_unref > >
 
using AVHWFramesConstraintsUPtr = std::unique_ptr< AVHWFramesConstraints, AVDeleter< decltype(&av_hwframe_constraints_free), &av_hwframe_constraints_free > >
 
using PixelOrSampleFormat = int
 
using AVScore = int
 
using ApplyOptions = void(*)(const QMediaEncoderSettings &settings, AVCodecContext *codec, AVDictionary **opts)
 

Functions

static Q_LOGGING_CATEGORY (qLcDemuxer, "qt.multimedia.ffmpeg.demuxer")
 
static qint64 streamTimeToUs (const AVStream *stream, qint64 time)
 
static Q_LOGGING_CATEGORY (qLcRenderer, "qt.multimedia.ffmpeg.renderer")
 
const AVCodec * findAVDecoder (AVCodecID codecId, const std::optional< AVHWDeviceType > &deviceType, const std::optional< PixelOrSampleFormat > &format)
 
const AVCodec * findAVEncoder (AVCodecID codecId, const std::optional< AVHWDeviceType > &deviceType, const std::optional< PixelOrSampleFormat > &format)
 
const AVCodec * findAVEncoder (AVCodecID codecId, const std::function< AVScore(const AVCodec *)> &scoresGetter)
 
bool isAVFormatSupported (const AVCodec *codec, PixelOrSampleFormat format)
 
bool isHwPixelFormat (AVPixelFormat format)
 
AVPixelFormat pixelFormatForHwDevice (AVHWDeviceType deviceType)
 
std::optional< qint64mul (qint64 a, AVRational b)
 
std::optional< qrealmul (qreal a, AVRational b)
 
std::optional< qint64timeStampMs (qint64 ts, AVRational base)
 
std::optional< qint64timeStampUs (qint64 ts, AVRational base)
 
std::optional< float > toFloat (AVRational r)
 
QString err2str (int errnum)
 
void setAVFrameTime (AVFrame &frame, int64_t pts, const AVRational &timeBase)
 
void getAVFrameTime (const AVFrame &frame, int64_t &pts, AVRational &timeBase)
 
int64_t getAVFrameDuration (const AVFrame &frame)
 
AVFrameUPtr makeAVFrame ()
 
template<typename Format >
bool hasAVFormat (const Format *fmts, Format format)
 
template<typename Format , typename Predicate >
Format findAVFormat (const Format *fmts, const Predicate &predicate)
 
template<typename Format , typename CalculateScore >
std::pair< Format, AVScorefindBestAVFormat (const Format *fmts, const CalculateScore &calculateScore)
 
bool isSwPixelFormat (AVPixelFormat format)
 
void applyVideoEncoderOptions (const QMediaEncoderSettings &settings, const QByteArray &codecName, AVCodecContext *codec, AVDictionary **opts)
 
void applyAudioEncoderOptions (const QMediaEncoderSettings &settings, const QByteArray &codecName, AVCodecContext *codec, AVDictionary **opts)
 
static std::vector< AVHWDeviceType > deviceTypes (const char *envVarName)
 
static AVBufferRef * loadHWContext (const AVHWDeviceType type)
 
template<typename CodecFinder >
std::pair< const AVCodec *, std::unique_ptr< HWAccel > > findCodecWithHwAccel (AVCodecID id, const std::vector< AVHWDeviceType > &deviceTypes, CodecFinder codecFinder, const std::function< bool(const HWAccel &)> &hwAccelPredicate)
 
static bool isNoConversionFormat (AVPixelFormat f)
 
AVPixelFormat getFormat (AVCodecContext *codecContext, const AVPixelFormat *suggestedFormats)
 
 Q_GLOBAL_STATIC (AndroidSurfaceTexture, androidSurfaceTexture, 0)
 
enum AVPixelFormat getFormat (struct AVCodecContext *s, const enum AVPixelFormat *fmt)
 
static const quint32fourccFromPixelFormat (const QVideoFrameFormat::PixelFormat format)
 
static Q_LOGGING_CATEGORY (qLcPlaybackEngine, "qt.multimedia.ffmpeg.playbackengine")
 
template<typename Array >
Array defaultObjectsArray ()
 
static AVScore calculateTargetSwFormatScore (const AVPixFmtDescriptor *sourceSwFormatDesc, AVPixelFormat fmt)
 
static AVScore calculateTargetFormatScore (const HWAccel *accel, AVPixelFormat sourceFormat, const AVPixFmtDescriptor *sourceSwFormatDesc, AVPixelFormat fmt)
 
static auto targetFormatScoreCalculator (const HWAccel *accel, AVPixelFormat sourceFormat, AVPixelFormat sourceSWFormat)
 
AVPixelFormat findTargetSWFormat (AVPixelFormat sourceSWFormat, const HWAccel &accel)
 
AVPixelFormat findTargetFormat (AVPixelFormat sourceFormat, AVPixelFormat sourceSWFormat, const AVCodec *codec, const HWAccel *accel)
 
std::pair< const AVCodec *, std::unique_ptr< HWAccel > > findHwEncoder (AVCodecID codecID, const QSize &sourceSize)
 
const AVCodec * findSwEncoder (AVCodecID codecID, AVPixelFormat sourceFormat, AVPixelFormat sourceSWFormat)
 

Variables

static std::atomic< PlaybackEngineObject::IdPersistentId = 0
 
constexpr AVScore BestAVScore = std::numeric_limits<AVScore>::max()
 
constexpr AVScore DefaultAVScore = 0
 
constexpr AVScore NotSuitableAVScore = std::numeric_limits<AVScore>::min()
 
constexpr AVScore MinAVScore = NotSuitableAVScore + 1
 
struct { 
 
   const char *   QFFmpeg::name 
 
   ApplyOptions   QFFmpeg::apply 
 
videoCodecOptionTable [] 
 
struct { 
 
   const char *   QFFmpeg::name 
 
   ApplyOptions   QFFmpeg::apply 
 
audioCodecOptionTable [] 
 
static const std::initializer_list< AVHWDeviceType > preferredHardwareAccelerators
 
static constexpr bool shouldPauseStreams = false
 

Typedef Documentation

◆ ApplyOptions

using QFFmpeg::ApplyOptions = typedef void (*)(const QMediaEncoderSettings &settings, AVCodecContext *codec, AVDictionary **opts)

Definition at line 259 of file qffmpegencoderoptions.cpp.

◆ AVBufferUPtr

using QFFmpeg::AVBufferUPtr = typedef std::unique_ptr<AVBufferRef, AVDeleter<decltype(&av_buffer_unref), &av_buffer_unref> >

Definition at line 131 of file qffmpeg_p.h.

◆ AVCodecContextUPtr

using QFFmpeg::AVCodecContextUPtr = typedef std::unique_ptr<AVCodecContext, AVDeleter<decltype(&avcodec_free_context), &avcodec_free_context> >

Definition at line 127 of file qffmpeg_p.h.

◆ AVFrameUPtr

using QFFmpeg::AVFrameUPtr = typedef std::unique_ptr<AVFrame, AVDeleter<decltype(&av_frame_free), &av_frame_free> >

Definition at line 117 of file qffmpeg_p.h.

◆ AVHWFramesConstraintsUPtr

using QFFmpeg::AVHWFramesConstraintsUPtr = typedef std::unique_ptr< AVHWFramesConstraints, AVDeleter<decltype(&av_hwframe_constraints_free), &av_hwframe_constraints_free> >

Definition at line 134 of file qffmpeg_p.h.

◆ AVPacketUPtr

using QFFmpeg::AVPacketUPtr = typedef std::unique_ptr<AVPacket, AVDeleter<decltype(&av_packet_free), &av_packet_free> >

Definition at line 124 of file qffmpeg_p.h.

◆ AVScore

using QFFmpeg::AVScore = typedef int

Definition at line 139 of file qffmpeg_p.h.

◆ PixelOrSampleFormat

using QFFmpeg::PixelOrSampleFormat = typedef int

Definition at line 138 of file qffmpeg_p.h.

◆ StreamIndexes

using QFFmpeg::StreamIndexes = typedef std::array<int, 3>

Definition at line 30 of file qffmpegplaybackenginedefs_p.h.

Function Documentation

◆ applyAudioEncoderOptions()

void QFFmpeg::applyAudioEncoderOptions ( const QMediaEncoderSettings settings,
const QByteArray codecName,
AVCodecContext *  codec,
AVDictionary **  opts 
)

Definition at line 316 of file qffmpegencoderoptions.cpp.

References audioCodecOptionTable, QMediaRecorder::AverageBitRateEncoding, codec, QMediaRecorder::ConstantBitRateEncoding, and settings.

Referenced by Q_LOGGING_CATEGORY().

+ Here is the caller graph for this function:

◆ applyVideoEncoderOptions()

void QFFmpeg::applyVideoEncoderOptions ( const QMediaEncoderSettings settings,
const QByteArray codecName,
AVCodecContext *  codec,
AVDictionary **  opts 
)

Definition at line 301 of file qffmpegencoderoptions.cpp.

References codec, settings, and videoCodecOptionTable.

Referenced by Q_LOGGING_CATEGORY().

+ Here is the caller graph for this function:

◆ calculateTargetFormatScore()

static AVScore QFFmpeg::calculateTargetFormatScore ( const HWAccel accel,
AVPixelFormat  sourceFormat,
const AVPixFmtDescriptor *  sourceSwFormatDesc,
AVPixelFormat  fmt 
)
static

Definition at line 56 of file qffmpegvideoencoderutils.cpp.

References BestAVScore, calculateTargetSwFormatScore(), fmt, QFFmpeg::HWAccel::hwFormat(), isHwPixelFormat(), and NotSuitableAVScore.

Referenced by targetFormatScoreCalculator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ calculateTargetSwFormatScore()

static AVScore QFFmpeg::calculateTargetSwFormatScore ( const AVPixFmtDescriptor *  sourceSwFormatDesc,
AVPixelFormat  fmt 
)
static

Definition at line 14 of file qffmpegvideoencoderutils.cpp.

References DefaultAVScore, desc, fmt, and NotSuitableAVScore.

Referenced by calculateTargetFormatScore().

+ Here is the caller graph for this function:

◆ defaultObjectsArray()

template<typename Array >
Array QFFmpeg::defaultObjectsArray ( )
inline

Definition at line 26 of file qffmpegplaybackengine.cpp.

◆ deviceTypes()

static std::vector< AVHWDeviceType > QFFmpeg::deviceTypes ( const char *  envVarName)
static

Definition at line 48 of file qffmpeghwaccel.cpp.

References deviceType(), QString::fromUtf8(), preferredHardwareAccelerators, qgetenv(), qWarning, and QString::toLower().

Referenced by QFFmpeg::HWAccel::decodingDeviceTypes(), QFFmpeg::HWAccel::encodingDeviceTypes(), and findCodecWithHwAccel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ err2str()

QString QFFmpeg::err2str ( int  errnum)
inline

Definition at line 56 of file qffmpeg_p.h.

References QString::fromLocal8Bit().

Referenced by QFFmpeg::Codec::create(), QFFmpeg::HWAccel::createFramesContext(), Q_LOGGING_CATEGORY(), and Q_LOGGING_CATEGORY().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAVDecoder()

const AVCodec * QFFmpeg::findAVDecoder ( AVCodecID  codecId,
const std::optional< AVHWDeviceType > &  deviceType,
const std::optional< PixelOrSampleFormat > &  format 
)

Definition at line 270 of file qffmpeg.cpp.

References codecId(), and deviceType().

Referenced by QFFmpegMediaFormatInfo::QFFmpegMediaFormatInfo(), QFFmpeg::Codec::create(), and QFFmpeg::HWAccel::findDecoderWithHwAccel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAVEncoder() [1/2]

const AVCodec * QFFmpeg::findAVEncoder ( AVCodecID  codecId,
const std::function< AVScore(const AVCodec *)> &  scoresGetter 
)

Definition at line 282 of file qffmpeg.cpp.

References codecId().

+ Here is the call graph for this function:

◆ findAVEncoder() [2/2]

const AVCodec * QFFmpeg::findAVEncoder ( AVCodecID  codecId,
const std::optional< AVHWDeviceType > &  deviceType,
const std::optional< PixelOrSampleFormat > &  format 
)

Definition at line 276 of file qffmpeg.cpp.

References codecId(), and deviceType().

Referenced by QFFmpegMediaFormatInfo::QFFmpegMediaFormatInfo(), QFFmpeg::HWAccel::findEncoderWithHwAccel(), findSwEncoder(), and Q_LOGGING_CATEGORY().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findAVFormat()

template<typename Format , typename Predicate >
Format QFFmpeg::findAVFormat ( const Format fmts,
const Predicate &  predicate 
)

Definition at line 165 of file qffmpeg_p.h.

References BestAVScore, findBestAVFormat(), fmt, NotSuitableAVScore, and predicate.

Referenced by getFormat(), and hasAVFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findBestAVFormat()

template<typename Format , typename CalculateScore >
std::pair< Format, AVScore > QFFmpeg::findBestAVFormat ( const Format fmts,
const CalculateScore &  calculateScore 
)

Definition at line 174 of file qffmpeg_p.h.

References BestAVScore, and NotSuitableAVScore.

Referenced by findAVFormat(), findSwEncoder(), findTargetFormat(), findTargetSWFormat(), and getFormat().

+ Here is the caller graph for this function:

◆ findCodecWithHwAccel()

template<typename CodecFinder >
std::pair< const AVCodec *, std::unique_ptr< HWAccel > > QFFmpeg::findCodecWithHwAccel ( AVCodecID  id,
const std::vector< AVHWDeviceType > &  deviceTypes,
CodecFinder  codecFinder,
const std::function< bool(const HWAccel &)> &  hwAccelPredicate 
)

Definition at line 98 of file qffmpeghwaccel.cpp.

References codec, QFFmpeg::HWAccel::create(), deviceTypes(), and qCDebug.

Referenced by QFFmpeg::HWAccel::findDecoderWithHwAccel(), and QFFmpeg::HWAccel::findEncoderWithHwAccel().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ findHwEncoder()

std::pair< const AVCodec *, std::unique_ptr< HWAccel > > QFFmpeg::findHwEncoder ( AVCodecID  codecID,
const QSize sourceSize 
)

Definition at line 126 of file qffmpegvideoencoderutils.cpp.

References QFFmpeg::HWAccel::findEncoderWithHwAccel(), QSize::height(), Q_ASSERT, and QSize::width().

+ Here is the call graph for this function:

◆ findSwEncoder()

const AVCodec * QFFmpeg::findSwEncoder ( AVCodecID  codecID,
AVPixelFormat  sourceFormat,
AVPixelFormat  sourceSWFormat 
)

Definition at line 147 of file qffmpegvideoencoderutils.cpp.

References codec, findAVEncoder(), findBestAVFormat(), MinAVScore, and targetFormatScoreCalculator().

+ Here is the call graph for this function:

◆ findTargetFormat()

AVPixelFormat QFFmpeg::findTargetFormat ( AVPixelFormat  sourceFormat,
AVPixelFormat  sourceSWFormat,
const AVCodec *  codec,
const HWAccel accel 
)

Definition at line 112 of file qffmpegvideoencoderutils.cpp.

References codec, findBestAVFormat(), isHwPixelFormat(), qWarning, and targetFormatScoreCalculator().

+ Here is the call graph for this function:

◆ findTargetSWFormat()

AVPixelFormat QFFmpeg::findTargetSWFormat ( AVPixelFormat  sourceSWFormat,
const HWAccel accel 
)

Definition at line 93 of file qffmpegvideoencoderutils.cpp.

References QFFmpeg::HWAccel::constraints(), findBestAVFormat(), and fmt.

+ Here is the call graph for this function:

◆ fourccFromPixelFormat()

◆ getAVFrameDuration()

int64_t QFFmpeg::getAVFrameDuration ( const AVFrame &  frame)
inline

Definition at line 83 of file qffmpeg_p.h.

References frame, and Q_UNUSED.

Referenced by QFFmpeg::Frame::Data::Data().

+ Here is the caller graph for this function:

◆ getAVFrameTime()

void QFFmpeg::getAVFrameTime ( const AVFrame &  frame,
int64_t &  pts,
AVRational &  timeBase 
)
inline

Definition at line 73 of file qffmpeg_p.h.

References frame.

Referenced by Q_LOGGING_CATEGORY().

+ Here is the caller graph for this function:

◆ getFormat() [1/2]

AVPixelFormat QFFmpeg::getFormat ( AVCodecContext *  codecContext,
const AVPixelFormat *  suggestedFormats 
)

Definition at line 139 of file qffmpeghwaccel.cpp.

References DefaultAVScore, findAVFormat(), findBestAVFormat(), i, isAVFormatSupported(), isHwPixelFormat(), isNoConversionFormat(), NotSuitableAVScore, qCDebug, and QFFmpeg::MediaCodecTextureConverter::setupDecoderSurface().

Referenced by QFFmpeg::Codec::create().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getFormat() [2/2]

enum AVPixelFormat QFFmpeg::getFormat ( struct AVCodecContext *  s,
const enum AVPixelFormat *  fmt 
)

◆ hasAVFormat()

template<typename Format >
bool QFFmpeg::hasAVFormat ( const Format fmts,
Format  format 
)

Definition at line 159 of file qffmpeg_p.h.

References findAVFormat().

Referenced by isAVFormatSupported().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAVFormatSupported()

bool QFFmpeg::isAVFormatSupported ( const AVCodec *  codec,
PixelOrSampleFormat  format 
)

Definition at line 288 of file qffmpeg.cpp.

References codec, and hasAVFormat().

Referenced by getFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isHwPixelFormat()

bool QFFmpeg::isHwPixelFormat ( AVPixelFormat  format)

Definition at line 299 of file qffmpeg.cpp.

References desc.

Referenced by calculateTargetFormatScore(), findTargetFormat(), getFormat(), and isSwPixelFormat().

+ Here is the caller graph for this function:

◆ isNoConversionFormat()

static bool QFFmpeg::isNoConversionFormat ( AVPixelFormat  f)
static

Definition at line 131 of file qffmpeghwaccel.cpp.

References QFFmpegVideoBuffer::toQtPixelFormat().

Referenced by getFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isSwPixelFormat()

bool QFFmpeg::isSwPixelFormat ( AVPixelFormat  format)
inline

Definition at line 191 of file qffmpeg_p.h.

References isHwPixelFormat().

+ Here is the call graph for this function:

◆ loadHWContext()

static AVBufferRef * QFFmpeg::loadHWContext ( const AVHWDeviceType  type)
static

Definition at line 83 of file qffmpeghwaccel.cpp.

References qCDebug, and ret.

Referenced by QFFmpeg::HWAccel::create().

+ Here is the caller graph for this function:

◆ makeAVFrame()

AVFrameUPtr QFFmpeg::makeAVFrame ( )
inline

Definition at line 119 of file qffmpeg_p.h.

Referenced by allocHWFrame(), QAVFSampleBufferDelegate::captureOutput:didOutputSampleBuffer:fromConnection:, QFFmpegVideoBuffer::convertSWFrame(), QAndroidCamera::frameAvailable(), QFFmpegVideoBuffer::map(), Q_LOGGING_CATEGORY(), and Q_LOGGING_CATEGORY().

+ Here is the caller graph for this function:

◆ mul() [1/2]

std::optional< qint64 > QFFmpeg::mul ( qint64  a,
AVRational  b 
)
inline

Definition at line 31 of file qffmpeg_p.h.

Referenced by QFFmpeg::Frame::Data::Data(), QFFmpegVideoBuffer::maxNits(), streamTimeToUs(), timeStampMs(), and timeStampUs().

+ Here is the caller graph for this function:

◆ mul() [2/2]

std::optional< qreal > QFFmpeg::mul ( qreal  a,
AVRational  b 
)
inline

Definition at line 36 of file qffmpeg_p.h.

◆ pixelFormatForHwDevice()

AVPixelFormat QFFmpeg::pixelFormatForHwDevice ( AVHWDeviceType  deviceType)

Definition at line 305 of file qffmpeg.cpp.

References deviceType().

Referenced by QFFmpeg::HWAccel::hwFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Q_GLOBAL_STATIC()

QFFmpeg::Q_GLOBAL_STATIC ( AndroidSurfaceTexture  ,
androidSurfaceTexture  ,
 
)

◆ Q_LOGGING_CATEGORY() [1/3]

static QFFmpeg::Q_LOGGING_CATEGORY ( qLcDemuxer  ,
"qt.multimedia.ffmpeg.demuxer"   
)
static

◆ Q_LOGGING_CATEGORY() [2/3]

static QFFmpeg::Q_LOGGING_CATEGORY ( qLcPlaybackEngine  ,
"qt.multimedia.ffmpeg.playbackengine"   
)
static

◆ Q_LOGGING_CATEGORY() [3/3]

static QFFmpeg::Q_LOGGING_CATEGORY ( qLcRenderer  ,
"qt.multimedia.ffmpeg.renderer"   
)
static

◆ setAVFrameTime()

void QFFmpeg::setAVFrameTime ( AVFrame &  frame,
int64_t  pts,
const AVRational &  timeBase 
)
inline

Definition at line 63 of file qffmpeg_p.h.

References frame, and Q_UNUSED.

Referenced by Q_LOGGING_CATEGORY(), and Q_LOGGING_CATEGORY().

+ Here is the caller graph for this function:

◆ streamTimeToUs()

static qint64 QFFmpeg::streamTimeToUs ( const AVStream *  stream,
qint64  time 
)
static

Definition at line 19 of file qffmpegdemuxer.cpp.

References mul(), Q_ASSERT, and time.

Referenced by QFFmpeg::Demuxer::doNextStep(), and QFFmpeg::Demuxer::onPacketProcessed().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ targetFormatScoreCalculator()

static auto QFFmpeg::targetFormatScoreCalculator ( const HWAccel accel,
AVPixelFormat  sourceFormat,
AVPixelFormat  sourceSWFormat 
)
static

Definition at line 84 of file qffmpegvideoencoderutils.cpp.

References calculateTargetFormatScore(), and fmt.

Referenced by findSwEncoder(), and findTargetFormat().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timeStampMs()

std::optional< qint64 > QFFmpeg::timeStampMs ( qint64  ts,
AVRational  base 
)
inline

Definition at line 41 of file qffmpeg_p.h.

References base, and mul().

Referenced by Q_LOGGING_CATEGORY(), and QFFmpeg::Codec::toMs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timeStampUs()

std::optional< qint64 > QFFmpeg::timeStampUs ( qint64  ts,
AVRational  base 
)
inline

Definition at line 46 of file qffmpeg_p.h.

References base, and mul().

Referenced by QFFmpeg::Codec::toUs().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toFloat()

std::optional< float > QFFmpeg::toFloat ( AVRational  r)
inline

Definition at line 51 of file qffmpeg_p.h.

Referenced by Q_LOGGING_CATEGORY().

+ Here is the caller graph for this function:

Variable Documentation

◆ apply

ApplyOptions QFFmpeg::apply

Definition at line 263 of file qffmpegencoderoptions.cpp.

◆ [struct]

const struct { ... } QFFmpeg::audioCodecOptionTable[]
Initial value:
= {
{ nullptr, nullptr }
}

Referenced by applyAudioEncoderOptions().

◆ BestAVScore

constexpr AVScore QFFmpeg::BestAVScore = std::numeric_limits<AVScore>::max()
constexpr

Definition at line 140 of file qffmpeg_p.h.

Referenced by calculateTargetFormatScore(), findAVFormat(), and findBestAVFormat().

◆ DefaultAVScore

constexpr AVScore QFFmpeg::DefaultAVScore = 0
constexpr

Definition at line 141 of file qffmpeg_p.h.

Referenced by calculateTargetSwFormatScore(), and getFormat().

◆ MinAVScore

constexpr AVScore QFFmpeg::MinAVScore = NotSuitableAVScore + 1
constexpr

Definition at line 143 of file qffmpeg_p.h.

Referenced by findSwEncoder().

◆ name

const char* QFFmpeg::name

Definition at line 262 of file qffmpegencoderoptions.cpp.

◆ NotSuitableAVScore

constexpr AVScore QFFmpeg::NotSuitableAVScore = std::numeric_limits<AVScore>::min()
constexpr

◆ PersistentId

std::atomic<PlaybackEngineObject::Id> QFFmpeg::PersistentId = 0
static

Definition at line 10 of file qffmpegplaybackengineobject.cpp.

◆ preferredHardwareAccelerators

const std::initializer_list<AVHWDeviceType> QFFmpeg::preferredHardwareAccelerators
static
Initial value:
= {
}

Definition at line 34 of file qffmpeghwaccel.cpp.

Referenced by deviceTypes().

◆ shouldPauseStreams

constexpr bool QFFmpeg::shouldPauseStreams = false
staticconstexpr

Definition at line 39 of file qffmpegplaybackengine.cpp.

◆ [struct]

const struct { ... } QFFmpeg::videoCodecOptionTable[]
Initial value:
= { { "libx264", apply_x264 },
{ "libx265xx", apply_x265 },
{ "libvpx", apply_libvpx },
{ "libvpx_vp9", apply_libvpx },
{ "h264_nvenc", apply_nvenc },
{ "hevc_nvenc", apply_nvenc },
{ nullptr, nullptr } }
static void apply_libvpx(const QMediaEncoderSettings &settings, AVCodecContext *codec, AVDictionary **opts)
static void apply_x265(const QMediaEncoderSettings &settings, AVCodecContext *codec, AVDictionary **opts)
static void apply_nvenc(const QMediaEncoderSettings &settings, AVCodecContext *codec, AVDictionary **)
static void apply_x264(const QMediaEncoderSettings &settings, AVCodecContext *codec, AVDictionary **opts)

Referenced by applyVideoEncoderOptions().