Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QFFmpeg::HWAccel Class Reference

#include <qffmpeghwaccel_p.h>

+ Collaboration diagram for QFFmpeg::HWAccel:

Public Member Functions

 ~HWAccel ()
 
AVHWDeviceType deviceType () const
 
AVBufferRef * hwDeviceContextAsBuffer () const
 
AVHWDeviceContext * hwDeviceContext () const
 
AVPixelFormat hwFormat () const
 
AVHWFramesConstraintsUPtr constraints () const
 
void createFramesContext (AVPixelFormat swFormat, const QSize &size)
 
AVBufferRef * hwFramesContextAsBuffer () const
 
AVHWFramesContext * hwFramesContext () const
 

Static Public Member Functions

static std::unique_ptr< HWAccelcreate (AVHWDeviceType deviceType)
 
static std::pair< const AVCodec *, std::unique_ptr< HWAccel > > findEncoderWithHwAccel (AVCodecID id, const std::function< bool(const HWAccel &)> &hwAccelPredicate=nullptr)
 
static std::pair< const AVCodec *, std::unique_ptr< HWAccel > > findDecoderWithHwAccel (AVCodecID id, const std::function< bool(const HWAccel &)> &hwAccelPredicate=nullptr)
 
static AVPixelFormat format (AVFrame *frame)
 
static const std::vector< AVHWDeviceType > & encodingDeviceTypes ()
 
static const std::vector< AVHWDeviceType > & decodingDeviceTypes ()
 

Detailed Description

Definition at line 84 of file qffmpeghwaccel_p.h.

Constructor & Destructor Documentation

◆ ~HWAccel()

QFFmpeg::HWAccel::~HWAccel ( )
default

Member Function Documentation

◆ constraints()

AVHWFramesConstraintsUPtr QFFmpeg::HWAccel::constraints ( ) const

Definition at line 256 of file qffmpeghwaccel.cpp.

References hwDeviceContextAsBuffer().

Referenced by QFFmpeg::findTargetSWFormat().

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

◆ create()

std::unique_ptr< HWAccel > QFFmpeg::HWAccel::create ( AVHWDeviceType  deviceType)
static

Definition at line 216 of file qffmpeghwaccel.cpp.

References deviceType(), and QFFmpeg::loadHWContext().

Referenced by QFFmpeg::findCodecWithHwAccel().

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

◆ createFramesContext()

void QFFmpeg::HWAccel::createFramesContext ( AVPixelFormat  swFormat,
const QSize size 
)

Definition at line 282 of file qffmpeghwaccel.cpp.

References QFFmpeg::err2str(), hwFormat(), qCDebug, and qWarning.

Referenced by QFFmpeg::VideoRenderer::renderInternal().

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

◆ decodingDeviceTypes()

const std::vector< AVHWDeviceType > & QFFmpeg::HWAccel::decodingDeviceTypes ( )
static

Definition at line 240 of file qffmpeghwaccel.cpp.

References QFFmpeg::deviceTypes().

Referenced by findDecoderWithHwAccel().

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

◆ deviceType()

AVHWDeviceType QFFmpeg::HWAccel::deviceType ( ) const

Definition at line 277 of file qffmpeghwaccel.cpp.

References hwDeviceContext().

Referenced by create(), and hwFormat().

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

◆ encodingDeviceTypes()

const std::vector< AVHWDeviceType > & QFFmpeg::HWAccel::encodingDeviceTypes ( )
static

Definition at line 234 of file qffmpeghwaccel.cpp.

References QFFmpeg::deviceTypes().

Referenced by findEncoderWithHwAccel().

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

◆ findDecoderWithHwAccel()

std::pair< const AVCodec *, std::unique_ptr< HWAccel > > QFFmpeg::HWAccel::findDecoderWithHwAccel ( AVCodecID  id,
const std::function< bool(const HWAccel &)> &  hwAccelPredicate = nullptr 
)
static

Definition at line 271 of file qffmpeghwaccel.cpp.

References decodingDeviceTypes(), QFFmpeg::findAVDecoder(), and QFFmpeg::findCodecWithHwAccel().

+ Here is the call graph for this function:

◆ findEncoderWithHwAccel()

std::pair< const AVCodec *, std::unique_ptr< HWAccel > > QFFmpeg::HWAccel::findEncoderWithHwAccel ( AVCodecID  id,
const std::function< bool(const HWAccel &)> &  hwAccelPredicate = nullptr 
)
static

Definition at line 263 of file qffmpeghwaccel.cpp.

References encodingDeviceTypes(), QFFmpeg::findAVEncoder(), and QFFmpeg::findCodecWithHwAccel().

Referenced by QFFmpeg::findHwEncoder().

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

◆ format()

AVPixelFormat QFFmpeg::HWAccel::format ( AVFrame *  frame)
static

Definition at line 224 of file qffmpeghwaccel.cpp.

References frame, hwFramesContext(), and Q_ASSERT.

Referenced by QFFmpegVideoBuffer::QFFmpegVideoBuffer().

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

◆ hwDeviceContext()

AVHWDeviceContext * QFFmpeg::HWAccel::hwDeviceContext ( ) const

Definition at line 246 of file qffmpeghwaccel.cpp.

Referenced by deviceType().

+ Here is the caller graph for this function:

◆ hwDeviceContextAsBuffer()

AVBufferRef * QFFmpeg::HWAccel::hwDeviceContextAsBuffer ( ) const
inline

Definition at line 104 of file qffmpeghwaccel_p.h.

Referenced by constraints().

+ Here is the caller graph for this function:

◆ hwFormat()

AVPixelFormat QFFmpeg::HWAccel::hwFormat ( ) const

Definition at line 251 of file qffmpeghwaccel.cpp.

References deviceType(), and QFFmpeg::pixelFormatForHwDevice().

Referenced by QFFmpeg::calculateTargetFormatScore(), and createFramesContext().

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

◆ hwFramesContext()

AVHWFramesContext * QFFmpeg::HWAccel::hwFramesContext ( ) const

Definition at line 306 of file qffmpeghwaccel.cpp.

Referenced by format(), and QFFmpeg::VideoRenderer::renderInternal().

+ Here is the caller graph for this function:

◆ hwFramesContextAsBuffer()

AVBufferRef * QFFmpeg::HWAccel::hwFramesContextAsBuffer ( ) const
inline

Definition at line 110 of file qffmpeghwaccel_p.h.

Referenced by QFFmpeg::VideoRenderer::renderInternal().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: