MythTV  master
mythmediacodeccontext.h
Go to the documentation of this file.
1 #ifndef MYTHMEDIACODECCONTEXT_H
2 #define MYTHMEDIACODECCONTEXT_H
3 
4 // MythTV
5 #include "mythcodeccontext.h"
6 
7 // FFmpeg
8 extern "C" {
9 #include "libavutil/pixfmt.h"
10 #include "libavutil/hwcontext.h"
11 #include "libavcodec/avcodec.h"
12 }
13 
14 using MCProfiles = QList<QPair<MythCodecContext::CodecProfile,QSize>>;
15 
17 {
18  public:
19  // MythCodecContext
21  void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override;
22  int HwDecoderInit(AVCodecContext *Context) override;
23  bool RetrieveFrame(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame) override;
24 
25  static MythCodecID GetBestSupportedCodec(AVCodecContext **Context,
26  AVCodec **Codec,
27  const QString &Decoder,
28  AVStream *Stream,
29  uint StreamType);
30  static AVPixelFormat GetFormat (AVCodecContext*, const AVPixelFormat *PixFmt);
31  void PostProcessFrame (AVCodecContext*, VideoFrame*) override;
32  bool IsDeinterlacing (bool &DoubleRate, bool = false) override;
33  static void GetDecoderList (QStringList &Decoders);
34  static bool HaveMediaCodec (void);
35 
36  private:
37  static MCProfiles& GetProfiles (void);
38  static int InitialiseDecoder (AVCodecContext *Context);
39 };
40 
41 #endif // MYTHMEDIACODECCONTEXT_H
static AVPixelFormat GetFormat(AVCodecContext *, const AVPixelFormat *PixFmt)
int HwDecoderInit(AVCodecContext *Context) override
static int InitialiseDecoder(AVCodecContext *Context)
static MCProfiles & GetProfiles(void)
QHash< QString, Action * > Context
Definition: action.h:77
MythMediaCodecContext(DecoderBase *Parent, MythCodecID CodecID)
MythCodecID
Definition: mythcodecid.h:10
void PostProcessFrame(AVCodecContext *, VideoFrame *) override
Mark all MediaCodec decoded frames as progressive,.
struct AVFrame AVFrame
static MythCodecID GetBestSupportedCodec(AVCodecContext **Context, AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
static void GetDecoderList(QStringList &Decoders)
static bool HaveMediaCodec(void)
unsigned int uint
Definition: compat.h:140
bool RetrieveFrame(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame) override
bool IsDeinterlacing(bool &DoubleRate, bool=false) override
QList< QPair< MythCodecContext::CodecProfile, QSize > > MCProfiles
void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override