MythTV  master
mythmmalcontext.h
Go to the documentation of this file.
1 #ifndef MYTHMMALCONTEXT_H
2 #define MYTHMMALCONTEXT_H
3 
4 // MythTV
5 #include "mythcodeccontext.h"
7 
8 using MMALProfiles = QList<MythCodecContext::CodecProfile>;
9 
11 {
12  public:
13  MythMMALContext(DecoderBase *Parent, MythCodecID Codec);
14  ~MythMMALContext() override;
15  static MythCodecID GetSupportedCodec(AVCodecContext **Context,
16  const AVCodec **Codec,
17  const QString &Decoder,
18  AVStream *Stream,
19  uint StreamType);
20  void InitVideoCodec (AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override;
21  bool RetrieveFrame (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override;
22  int HwDecoderInit (AVCodecContext *Context) override;
23  void SetDecoderOptions (AVCodecContext *Context, const AVCodec *Codec) override;
24  static bool GetBuffer (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int);
25  bool GetBuffer2 (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int);
26  static enum AVPixelFormat GetFormat (AVCodecContext*, const AVPixelFormat *PixFmt);
27  static void GetDecoderList (QStringList &Decoders);
28  static bool HaveMMAL (bool Reinit = false);
29  static bool CheckCodecSize (int Width, int Height, MythCodecContext::CodecProfile Profile);
30 
31  protected:
32  static const MMALProfiles& GetProfiles(void);
33  MythMMALInterop* m_interop { nullptr };
34 };
35 
36 #endif // MYTHMMALCONTEXT_H
MythMMALContext::CheckCodecSize
static bool CheckCodecSize(int Width, int Height, MythCodecContext::CodecProfile Profile)
Definition: mythmmalcontext.cpp:24
MythMMALContext::HaveMMAL
static bool HaveMMAL(bool Reinit=false)
Definition: mythmmalcontext.cpp:244
MythMMALInterop
Definition: mythmmalinterop.h:13
MythCodecContext::CodecProfile
CodecProfile
Definition: mythcodeccontext.h:55
Frame
Definition: zmdefines.h:93
MythMMALContext::GetBuffer
static bool GetBuffer(AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int)
Definition: mythmmalcontext.cpp:163
MythCodecID
MythCodecID
Definition: mythcodecid.h:10
AVFrame
struct AVFrame AVFrame
Definition: BorderDetector.h:15
Decoder
Definition: decoder.h:70
MythMMALContext::GetSupportedCodec
static MythCodecID GetSupportedCodec(AVCodecContext **Context, const AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
Definition: mythmmalcontext.cpp:40
MythMMALContext::GetFormat
static enum AVPixelFormat GetFormat(AVCodecContext *, const AVPixelFormat *PixFmt)
Definition: mythmmalcontext.cpp:233
MythMMALContext::InitVideoCodec
void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override
Definition: mythmmalcontext.cpp:106
mythmmalinterop.h
uint
unsigned int uint
Definition: compat.h:81
MythMMALContext::m_interop
MythMMALInterop * m_interop
Definition: mythmmalcontext.h:33
MMALProfiles
QList< MythCodecContext::CodecProfile > MMALProfiles
Definition: mythmmalcontext.h:8
MythMMALContext::RetrieveFrame
bool RetrieveFrame(AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override
Definition: mythmmalcontext.cpp:123
MythMMALContext::GetProfiles
static const MMALProfiles & GetProfiles(void)
Definition: mythmmalcontext.cpp:284
MythMMALContext::HwDecoderInit
int HwDecoderInit(AVCodecContext *Context) override
Definition: mythmmalcontext.cpp:133
MythMMALContext::MythMMALContext
MythMMALContext(DecoderBase *Parent, MythCodecID Codec)
Definition: mythmmalcontext.cpp:13
MythMMALContext::GetBuffer2
bool GetBuffer2(AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int)
Definition: mythmmalcontext.cpp:197
mythcodeccontext.h
MythCodecContext
Definition: mythcodeccontext.h:52
MythVideoFrame
Definition: mythframe.h:88
MythMMALContext
Definition: mythmmalcontext.h:10
MythMMALContext::~MythMMALContext
~MythMMALContext() override
Definition: mythmmalcontext.cpp:18
DecoderBase
Definition: decoderbase.h:120
MythMMALContext::GetDecoderList
static void GetDecoderList(QStringList &Decoders)
Definition: mythmmalcontext.cpp:267
MythMMALContext::SetDecoderOptions
void SetDecoderOptions(AVCodecContext *Context, const AVCodec *Codec) override
Definition: mythmmalcontext.cpp:151