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

#include <mythmmalcontext.h>

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

Public Member Functions

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

Static Public Member Functions

static MythCodecID GetSupportedCodec (AVCodecContext **Context, AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
 
static bool GetBuffer (AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int)
 
static enum AVPixelFormat GetFormat (AVCodecContext *, const AVPixelFormat *PixFmt)
 
static void GetDecoderList (QStringList &Decoders)
 
static bool HaveMMAL (void)
 
static bool CheckCodecSize (int Width, int Height, MythCodecContext::CodecProfile Profile)
 
- Static Public Member Functions inherited from MythCodecContext
static MythCodecContextCreateContext (DecoderBase *Parent, MythCodecID Codec)
 
static void GetDecoders (RenderOptions &Opts)
 
static QStringList GetDecoderDescription (void)
 
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 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 QString GetProfileDescription (CodecProfile Profile, QSize Size, VideoFrameType Format=FMT_NONE, uint ColorDepth=0)
 
static CodecProfile FFmpegToMythProfile (AVCodecID CodecID, int Profile)
 

Static Protected Member Functions

static const MMALProfilesGetProfiles (void)
 
- Static Protected Member Functions inherited from MythCodecContext
static void DestroyInterop (MythOpenGLInterop *Interop)
 
static void NewHardwareFramesContext (void)
 Track the number of concurrent frames contexts. More...
 

Protected Attributes

MythMMALInteropm_interop { nullptr }
 
- Protected Attributes inherited from MythCodecContext
DecoderBasem_parent { nullptr }
 
MythCodecID m_codecID { kCodec_NONE }
 
bool m_resetRequired { false }
 

Additional Inherited Members

- Public Types inherited from MythCodecContext
enum  CodecProfile {
  NoProfile = 0, MPEG1, MPEG2, MPEG2Simple,
  MPEG2Main, MPEG2422, MPEG2High, MPEG2Spatial,
  MPEG2SNR, MPEG4, MPEG4Simple, MPEG4SimpleScaleable,
  MPEG4Core, MPEG4Main, MPEG4NBit, MPEG4ScaleableTexture,
  MPEG4SimpleFace, MPEG4BasicAnimated, MPEG4Hybrid, MPEG4AdvancedRT,
  MPEG4CoreScaleable, MPEG4AdvancedCoding, MPEG4AdvancedCore, MPEG4AdvancedScaleableTexture,
  MPEG4SimpleStudio, MPEG4AdvancedSimple, H263, H264,
  H264Baseline, H264ConstrainedBaseline, H264Main, H264MainExtended,
  H264High, H264High10, H264Extended, H264High422,
  H264High444, H264ConstrainedHigh, HEVC, HEVCMain,
  HEVCMain10, HEVCMainStill, HEVCRext, HEVCMain10HDR,
  HEVCMain10HDRPlus, VC1, VC1Simple, VC1Main,
  VC1Complex, VC1Advanced, VP8, VP9,
  VP9_0, VP9_1, VP9_2, VP9_3,
  VP9_2HDR, VP9_2HDRPlus, VP9_3HDR, VP9_3HDRPlus,
  AV1, AV1Main, AV1High, AV1Professional,
  MJPEG
}
 
- Protected Member Functions inherited from MythCodecContext
virtual bool RetrieveHWFrame (VideoFrame *Frame, AVFrame *AvFrame)
 
- Static Protected Attributes inherited from MythCodecContext
static QAtomicInt s_hwFramesContextCount
 

Detailed Description

Definition at line 10 of file mythmmalcontext.h.

Constructor & Destructor Documentation

◆ MythMMALContext()

MythMMALContext::MythMMALContext ( DecoderBase Parent,
MythCodecID  Codec 
)

Definition at line 12 of file mythmmalcontext.cpp.

◆ ~MythMMALContext()

MythMMALContext::~MythMMALContext ( )
override

Definition at line 17 of file mythmmalcontext.cpp.

Member Function Documentation

◆ GetSupportedCodec()

MythCodecID MythMMALContext::GetSupportedCodec ( AVCodecContext **  Context,
AVCodec **  Codec,
const QString &  Decoder,
AVStream *  Stream,
uint  StreamType 
)
static

Definition at line 39 of file mythmmalcontext.cpp.

Referenced by MythCodecContext::FindDecoder().

◆ InitVideoCodec()

void MythMMALContext::InitVideoCodec ( AVCodecContext *  Context,
bool  SelectedStream,
bool DirectRendering 
)
overridevirtual

Reimplemented from MythCodecContext.

Definition at line 118 of file mythmmalcontext.cpp.

◆ RetrieveFrame()

bool MythMMALContext::RetrieveFrame ( AVCodecContext *  Context,
VideoFrame Frame,
AVFrame AvFrame 
)
overridevirtual

Reimplemented from MythCodecContext.

Definition at line 135 of file mythmmalcontext.cpp.

◆ HwDecoderInit()

int MythMMALContext::HwDecoderInit ( AVCodecContext *  Context)
overridevirtual

Reimplemented from MythCodecContext.

Definition at line 145 of file mythmmalcontext.cpp.

◆ SetDecoderOptions()

void MythMMALContext::SetDecoderOptions ( AVCodecContext *  Context,
AVCodec *  Codec 
)
overridevirtual

Reimplemented from MythCodecContext.

Definition at line 161 of file mythmmalcontext.cpp.

◆ GetBuffer()

bool MythMMALContext::GetBuffer ( AVCodecContext *  Context,
VideoFrame Frame,
AVFrame AvFrame,
int   
)
static

Definition at line 173 of file mythmmalcontext.cpp.

Referenced by RetrieveFrame().

◆ GetBuffer2()

bool MythMMALContext::GetBuffer2 ( AVCodecContext *  Context,
VideoFrame Frame,
AVFrame AvFrame,
int   
)

Definition at line 213 of file mythmmalcontext.cpp.

Referenced by RetrieveFrame().

◆ GetFormat()

AVPixelFormat MythMMALContext::GetFormat ( AVCodecContext *  ,
const AVPixelFormat *  PixFmt 
)
static

Definition at line 249 of file mythmmalcontext.cpp.

Referenced by InitVideoCodec().

◆ GetDecoderList()

void MythMMALContext::GetDecoderList ( QStringList &  Decoders)
static

Definition at line 283 of file mythmmalcontext.cpp.

Referenced by MythCodecContext::GetDecoderDescription().

◆ HaveMMAL()

bool MythMMALContext::HaveMMAL ( void  )
static

Definition at line 260 of file mythmmalcontext.cpp.

Referenced by MythCodecContext::GetDecoders().

◆ CheckCodecSize()

bool MythMMALContext::CheckCodecSize ( int  Width,
int  Height,
MythCodecContext::CodecProfile  Profile 
)
static

Definition at line 23 of file mythmmalcontext.cpp.

Referenced by GetSupportedCodec(), and MythV4L2M2MContext::GetSupportedCodec().

◆ GetProfiles()

const MMALProfiles & MythMMALContext::GetProfiles ( void  )
staticprotected

Definition at line 300 of file mythmmalcontext.cpp.

Referenced by GetDecoderList(), GetSupportedCodec(), and HaveMMAL().

Member Data Documentation

◆ m_interop

MythMMALInterop* MythMMALContext::m_interop { nullptr }
protected

Definition at line 33 of file mythmmalcontext.h.

Referenced by GetBuffer2(), HwDecoderInit(), and ~MythMMALContext().


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