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, VideoFrame *Frame, AVFrame *AvFrame) override;
22  int HwDecoderInit (AVCodecContext *Context) override;
23  void SetDecoderOptions (AVCodecContext *Context, AVCodec *Codec) override;
24  static bool GetBuffer (AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int);
25  bool GetBuffer2 (AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int);
26  static enum AVPixelFormat GetFormat (AVCodecContext*, const AVPixelFormat *PixFmt);
27  static void GetDecoderList (QStringList &Decoders);
28  static bool HaveMMAL (void);
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:23
MythMMALContext::SetDecoderOptions
void SetDecoderOptions(AVCodecContext *Context, AVCodec *Codec) override
Definition: mythmmalcontext.cpp:161
MythMMALContext::RetrieveFrame
bool RetrieveFrame(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame) override
Definition: mythmmalcontext.cpp:135
MythMMALInterop
Definition: mythmmalinterop.h:14
MythCodecContext::CodecProfile
CodecProfile
Definition: mythcodeccontext.h:54
MythMMALContext::GetBuffer
static bool GetBuffer(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int)
Definition: mythmmalcontext.cpp:173
Frame
Definition: zmdefines.h:94
Context
QHash< QString, Action * > Context
Definition: action.h:77
VideoFrame
Definition: mythframe.h:138
MythMMALContext::GetBuffer2
bool GetBuffer2(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int)
Definition: mythmmalcontext.cpp:213
MythCodecID
MythCodecID
Definition: mythcodecid.h:11
AVFrame
struct AVFrame AVFrame
Definition: BorderDetector.h:15
Decoder
Definition: decoder.h:66
MythMMALContext::GetFormat
static enum AVPixelFormat GetFormat(AVCodecContext *, const AVPixelFormat *PixFmt)
Definition: mythmmalcontext.cpp:249
MythMMALContext::InitVideoCodec
void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override
Definition: mythmmalcontext.cpp:118
MythMMALContext::HaveMMAL
static bool HaveMMAL(void)
Definition: mythmmalcontext.cpp:260
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::GetProfiles
static const MMALProfiles & GetProfiles(void)
Definition: mythmmalcontext.cpp:300
MythMMALContext::HwDecoderInit
int HwDecoderInit(AVCodecContext *Context) override
Definition: mythmmalcontext.cpp:145
MythMMALContext::MythMMALContext
MythMMALContext(DecoderBase *Parent, MythCodecID Codec)
Definition: mythmmalcontext.cpp:12
mythcodeccontext.h
MythCodecContext
Definition: mythcodeccontext.h:51
MythMMALContext::GetSupportedCodec
static MythCodecID GetSupportedCodec(AVCodecContext **Context, AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
Definition: mythmmalcontext.cpp:39
MythMMALContext
Definition: mythmmalcontext.h:11
MythMMALContext::~MythMMALContext
~MythMMALContext() override
Definition: mythmmalcontext.cpp:17
DecoderBase
Definition: decoderbase.h:120
MythMMALContext::GetDecoderList
static void GetDecoderList(QStringList &Decoders)
Definition: mythmmalcontext.cpp:283