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
8extern "C" {
9#include "libavutil/pixfmt.h"
10#include "libavutil/hwcontext.h"
11#include "libavcodec/avcodec.h"
12}
13
14using 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, MythVideoFrame *Frame, AVFrame *AvFrame) override;
24
25 static MythCodecID GetBestSupportedCodec(AVCodecContext **Context,
26 const AVCodec **Codec,
27 const QString &Decoder,
28 AVStream *Stream,
29 uint StreamType);
30 static AVPixelFormat GetFormat (AVCodecContext*, const AVPixelFormat *PixFmt);
31 void PostProcessFrame (AVCodecContext*, MythVideoFrame*) override;
32 bool IsDeinterlacing (bool &DoubleRate, bool = false) override;
33 static void GetDecoderList (QStringList &Decoders);
34 static bool HaveMediaCodec (bool Reinit = false);
35
36 private:
37 static MCProfiles& GetProfiles (void);
38 static int InitialiseDecoder (AVCodecContext *Context);
39};
40
41#endif // MYTHMEDIACODECCONTEXT_H
AVFrame AVFrame
int HwDecoderInit(AVCodecContext *Context) override
static MythCodecID GetBestSupportedCodec(AVCodecContext **Context, const AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
bool RetrieveFrame(AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override
MythMediaCodecContext(DecoderBase *Parent, MythCodecID CodecID)
static bool HaveMediaCodec(bool Reinit=false)
bool IsDeinterlacing(bool &DoubleRate, bool=false) override
static AVPixelFormat GetFormat(AVCodecContext *, const AVPixelFormat *PixFmt)
void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override
static void GetDecoderList(QStringList &Decoders)
void PostProcessFrame(AVCodecContext *, MythVideoFrame *) override
Mark all MediaCodec decoded frames as progressive,.
static int InitialiseDecoder(AVCodecContext *Context)
static MCProfiles & GetProfiles(void)
unsigned int uint
Definition: freesurround.h:24
MythCodecID
Definition: mythcodecid.h:14
QList< QPair< MythCodecContext::CodecProfile, QSize > > MCProfiles