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
static bool CheckCodecSize(int Width, int Height, MythCodecContext::CodecProfile Profile)
static const MMALProfiles & GetProfiles(void)
QHash< QString, Action * > Context
Definition: action.h:77
void SetDecoderOptions(AVCodecContext *Context, AVCodec *Codec) override
MythCodecID
Definition: mythcodecid.h:10
static bool HaveMMAL(void)
static MythCodecID GetSupportedCodec(AVCodecContext **Context, AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
struct AVFrame AVFrame
~MythMMALContext() override
bool GetBuffer2(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int)
MythMMALInterop * m_interop
static enum AVPixelFormat GetFormat(AVCodecContext *, const AVPixelFormat *PixFmt)
QList< MythCodecContext::CodecProfile > MMALProfiles
void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override
unsigned int uint
Definition: compat.h:140
static void GetDecoderList(QStringList &Decoders)
int HwDecoderInit(AVCodecContext *Context) override
bool RetrieveFrame(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame) override
MythMMALContext(DecoderBase *Parent, MythCodecID Codec)
static bool GetBuffer(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int)