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"
6 #include "mythmmalinterop.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  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, 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::SetDecoderOptions
void SetDecoderOptions(AVCodecContext *Context, AVCodec *Codec) override
Definition: mythmmalcontext.cpp:151
MythMMALContext::HaveMMAL
static bool HaveMMAL(bool Reinit=false)
Definition: mythmmalcontext.cpp:244
MythMMALInterop
Definition: mythmmalinterop.h:13
MythCodecContext::CodecProfile
CodecProfile
Definition: mythcodeccontext.h:56
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::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:140
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:288
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:53
MythVideoFrame
Definition: mythframe.h:88
MythMMALContext::GetSupportedCodec
static MythCodecID GetSupportedCodec(AVCodecContext **Context, AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
Definition: mythmmalcontext.cpp:40
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:271