MythTV  master
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Vaapi2Context Class Reference

#include <vaapi2context.h>

Inheritance diagram for Vaapi2Context:
Inheritance graph
[legend]
Collaboration diagram for Vaapi2Context:
Collaboration graph
[legend]

Public Member Functions

 Vaapi2Context (void)=default
 
 ~Vaapi2Context () override
 
virtual int FilteredReceiveFrame (AVCodecContext *ctx, AVFrame *frame) override
 Retrieve and process/filter AVFrame. More...
 
- Public Member Functions inherited from MythCodecContext
 MythCodecContext (DecoderBase *Parent, MythCodecID CodecID)
 
virtual ~MythCodecContext ()=default
 
virtual void InitVideoCodec (AVCodecContext *Context, bool SelectedStream, bool &DirectRendering)
 
virtual int HwDecoderInit (AVCodecContext *)
 
virtual bool RetrieveFrame (AVCodecContext *, VideoFrame *, AVFrame *)
 
virtual void SetDeinterlacing (AVCodecContext *, VideoDisplayProfile *, bool)
 
virtual void PostProcessFrame (AVCodecContext *, VideoFrame *)
 
virtual bool IsDeinterlacing (bool &, bool=false)
 
virtual void SetDecoderOptions (AVCodecContext *, AVCodec *)
 
virtual bool DecoderWillResetOnFlush (void)
 
virtual bool DecoderWillResetOnAspect (void)
 
virtual bool DecoderNeedsReset (AVCodecContext *)
 

Protected Member Functions

int InitDeinterlaceFilter (AVCodecContext *ctx, AVFrame *frame) override
 
void CloseFilters ()
 
virtual int InitDeinterlaceFilter (AVCodecContext *ctx, AVFrame *frame)
 
- Protected Member Functions inherited from MythCodecContext
virtual bool RetrieveHWFrame (VideoFrame *Frame, AVFrame *AvFrame)
 

Protected Attributes

AVStream * m_stream {nullptr}
 
AVFilterContext * m_bufferSinkCtx {nullptr}
 
AVFilterContext * m_bufferSrcCtx {nullptr}
 
AVFilterGraph * m_filterGraph {nullptr}
 
bool m_filtersInitialized {false}
 
AVBufferRef * m_hwFramesCtx {nullptr}
 
int64_t m_priorPts [2] {0,0}
 
int64_t m_ptsUsed {0}
 
int m_width {0}
 
int m_height {0}
 
bool m_doubleRate {false}
 
- Protected Attributes inherited from MythCodecContext
DecoderBasem_parent { nullptr }
 
MythCodecID m_codecID { kCodec_NONE }
 
bool m_resetRequired { false }
 

Additional Inherited Members

- Static Public Member Functions inherited from MythCodecContext
static MythCodecContextCreateContext (DecoderBase *Parent, MythCodecID Codec)
 
static void GetDecoders (RenderOptions &Opts)
 
static MythCodecID FindDecoder (const QString &Decoder, AVStream *Stream, AVCodecContext **Context, AVCodec **Codec)
 
static int GetBuffer (struct AVCodecContext *Context, AVFrame *Frame, int Flags)
 A generic hardware buffer initialisation method when using AVHWFramesContext. More...
 
static bool GetBuffer2 (struct AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int Flags)
 A generic hardware buffer initialisation method when AVHWFramesContext is NOT used. More...
 
static int InitialiseDecoder (AVCodecContext *Context, CreateHWDecoder Callback, const QString &Debug)
 Initialise a hardware decoder that is expected to use AVHWFramesContext. More...
 
static int InitialiseDecoder2 (AVCodecContext *Context, CreateHWDecoder Callback, const QString &Debug)
 Initialise a hardware decoder that is NOT expected to use AVHWFramesContext. More...
 
static void ReleaseBuffer (void *Opaque, uint8_t *Data)
 
static void FramesContextFinished (AVHWFramesContext *Context)
 
static void DeviceContextFinished (AVHWDeviceContext *Context)
 
static void DestroyInteropCallback (void *Wait, void *Interop, void *)
 
static void CreateDecoderCallback (void *Wait, void *Context, void *Callback)
 
static AVBufferRef * CreateDevice (AVHWDeviceType Type, MythOpenGLInterop *Interop, const QString &Device=QString())
 
static bool IsUnsupportedProfile (AVCodecContext *Context)
 Most hardware decoders do not support these codecs/profiles. More...
 
- Static Protected Member Functions inherited from MythCodecContext
static void DestroyInterop (MythOpenGLInterop *Interop)
 
static void NewHardwareFramesContext (void)
 Track the number of concurrent frames contexts. More...
 
- Static Protected Attributes inherited from MythCodecContext
static QAtomicInt s_hwFramesContextCount
 

Detailed Description

Definition at line 37 of file vaapi2context.h.

Constructor & Destructor Documentation

◆ Vaapi2Context()

Vaapi2Context::Vaapi2Context ( void  )
default

◆ ~Vaapi2Context()

Vaapi2Context::~Vaapi2Context ( )
override

Definition at line 43 of file vaapi2context.cpp.

Member Function Documentation

◆ FilteredReceiveFrame()

int Vaapi2Context::FilteredReceiveFrame ( AVCodecContext *  Context,
AVFrame Frame 
)
overridevirtual

Retrieve and process/filter AVFrame.

Note
This default implementation implements no processing/filtering

Reimplemented from MythCodecContext.

Definition at line 52 of file vaapi2context.cpp.

◆ InitDeinterlaceFilter() [1/2]

int Vaapi2Context::InitDeinterlaceFilter ( AVCodecContext *  ctx,
AVFrame frame 
)
overrideprotected

Definition at line 118 of file vaapi2context.cpp.

Referenced by FilteredReceiveFrame().

◆ CloseFilters()

void Vaapi2Context::CloseFilters ( )
protected

Definition at line 270 of file vaapi2context.cpp.

Referenced by InitDeinterlaceFilter(), and ~Vaapi2Context().

◆ InitDeinterlaceFilter() [2/2]

virtual int Vaapi2Context::InitDeinterlaceFilter ( AVCodecContext *  ctx,
AVFrame frame 
)
protectedvirtual

Member Data Documentation

◆ m_stream

AVStream* Vaapi2Context::m_stream {nullptr}
protected

Definition at line 51 of file vaapi2context.h.

Referenced by InitDeinterlaceFilter().

◆ m_bufferSinkCtx

AVFilterContext* Vaapi2Context::m_bufferSinkCtx {nullptr}
protected

Definition at line 52 of file vaapi2context.h.

Referenced by CloseFilters(), FilteredReceiveFrame(), and InitDeinterlaceFilter().

◆ m_bufferSrcCtx

AVFilterContext* Vaapi2Context::m_bufferSrcCtx {nullptr}
protected

Definition at line 53 of file vaapi2context.h.

Referenced by CloseFilters(), FilteredReceiveFrame(), and InitDeinterlaceFilter().

◆ m_filterGraph

AVFilterGraph* Vaapi2Context::m_filterGraph {nullptr}
protected

Definition at line 54 of file vaapi2context.h.

Referenced by CloseFilters(), FilteredReceiveFrame(), and InitDeinterlaceFilter().

◆ m_filtersInitialized

bool Vaapi2Context::m_filtersInitialized {false}
protected

Definition at line 55 of file vaapi2context.h.

Referenced by CloseFilters(), FilteredReceiveFrame(), and InitDeinterlaceFilter().

◆ m_hwFramesCtx

AVBufferRef* Vaapi2Context::m_hwFramesCtx {nullptr}
protected

Definition at line 56 of file vaapi2context.h.

Referenced by CloseFilters(), and InitDeinterlaceFilter().

◆ m_priorPts

int64_t Vaapi2Context::m_priorPts[2] {0,0}
protected

Definition at line 57 of file vaapi2context.h.

Referenced by CloseFilters().

◆ m_ptsUsed

int64_t Vaapi2Context::m_ptsUsed {0}
protected

Definition at line 58 of file vaapi2context.h.

Referenced by CloseFilters().

◆ m_width

int Vaapi2Context::m_width {0}
protected

Definition at line 59 of file vaapi2context.h.

Referenced by CloseFilters().

◆ m_height

int Vaapi2Context::m_height {0}
protected

Definition at line 60 of file vaapi2context.h.

Referenced by CloseFilters().

◆ m_doubleRate

bool Vaapi2Context::m_doubleRate {false}
protected

Definition at line 61 of file vaapi2context.h.

Referenced by InitDeinterlaceFilter().


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