26#ifndef MYTHCODECONTEXT_H
27#define MYTHCODECONTEXT_H
30#include <QRecursiveMutex>
43#include "libavcodec/avcodec.h"
44#include "libavformat/avformat.h"
128 static void GetDecoders (
RenderOptions &Opts,
bool Reinit =
false);
129 static QStringList GetDecoderDescription(
void);
131 AVCodecContext **Context,
const AVCodec **Codec);
132 static int GetBuffer (
struct AVCodecContext *Context,
AVFrame *
Frame,
int Flags);
135 static int InitialiseDecoder (AVCodecContext *Context,
CreateHWDecoder Callback,
const QString &Debug);
136 static int InitialiseDecoder2 (AVCodecContext *Context,
CreateHWDecoder Callback,
const QString &Debug);
137 static void ReleaseBuffer (
void *Opaque, uint8_t *Data);
138 static void FramesContextFinished (AVHWFramesContext *Context);
139 static void DeviceContextFinished (AVHWDeviceContext *Context);
140 static void CreateDecoderCallback (
void *Wait,
void *Context,
void *Callback);
141 static MythPlayerUI* GetPlayerUI (AVCodecContext* Context);
143 static AVBufferRef* CreateDevice (AVHWDeviceType Type,
MythInteropGPU* Interop,
const QString&
Device = QString());
144 static bool IsUnsupportedProfile (AVCodecContext *Context);
145 static QString GetProfileDescription (
CodecProfile Profile, QSize Size,
147 static CodecProfile FFmpegToMythProfile(AVCodecID CodecID,
int Profile);
149 virtual void InitVideoCodec (AVCodecContext *Context,
150 bool SelectedStream,
bool &DirectRendering);
153 virtual int FilteredReceiveFrame (AVCodecContext *Context,
AVFrame *
Frame);
165 static void NewHardwareFramesContext(
void);
170 bool m_resetRequired {
false };
A device containing images (ie. USB stick, CD, storage group etc)
virtual void SetDeinterlacing(AVCodecContext *, MythVideoProfile *, bool)
virtual void PostProcessFrame(AVCodecContext *, MythVideoFrame *)
virtual int HwDecoderInit(AVCodecContext *)
virtual ~MythCodecContext()=default
@ MPEG4AdvancedScaleableTexture
@ H264ConstrainedBaseline
virtual bool IsDeinterlacing(bool &, bool=false)
static QAtomicInt s_hwFramesContextCount
virtual bool DecoderNeedsReset(AVCodecContext *)
virtual bool RetrieveFrame(AVCodecContext *, MythVideoFrame *, AVFrame *)
virtual void SetDecoderOptions(AVCodecContext *, const AVCodec *)
virtual bool DecoderWillResetOnAspect(void)
virtual bool DecoderWillResetOnFlush(void)
int(*)(AVCodecContext *Context) CreateHWDecoder