MythTV  master
mythdrmprimecontext.h
Go to the documentation of this file.
1 #ifndef MYTHDRMPRIMECONTEXT_H
2 #define MYTHDRMPRIMECONTEXT_H
3 
4 // MythTV
5 #ifdef USING_EGL
7 #else
9 #endif
11 
13 
15 {
16  public:
18  ~MythDRMPRIMEContext() override;
19 
20  static MythCodecID GetSupportedCodec (AVCodecContext **Context,
21  const AVCodec **Codec,
22  const QString &Decoder,
23  AVStream *Stream,
24  uint StreamType);
25  int HwDecoderInit (AVCodecContext *Context) override;
26  void InitVideoCodec (AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override;
27  bool RetrieveFrame (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override;
28  bool DecoderWillResetOnFlush (void) override;
29  static bool HavePrimeDecoders (bool Reinit = false, AVCodecID Codec = AV_CODEC_ID_NONE);
30  static enum AVPixelFormat GetFormat (AVCodecContext *Context, const AVPixelFormat *PixFmt);
31  bool GetDRMBuffer (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int /*unused*/);
32 
33  protected:
34  static MythCodecID GetPrimeCodec (AVCodecContext **Context,
35  const AVCodec **Codec,
36  AVStream *Stream,
37  MythCodecID Successs, // Xlib conflict
38  MythCodecID Failure,
39  const QString &CodecName,
40  AVPixelFormat Format);
41  static QRecursiveMutex s_drmPrimeLock;
42  static QStringList s_drmPrimeDecoders;
44 };
45 
46 #endif // MYTHDRMPRIMECONTEXT_H
MythDRMPRIMEContext::HavePrimeDecoders
static bool HavePrimeDecoders(bool Reinit=false, AVCodecID Codec=AV_CODEC_ID_NONE)
Definition: mythdrmprimecontext.cpp:188
MythDRMPRIMEContext::s_drmPrimeDecoders
static QStringList s_drmPrimeDecoders
Definition: mythdrmprimecontext.h:42
MythDRMPRIMEInterop
Definition: mythdrmprimeinterop.h:14
MythDRMPRIMEContext::InitVideoCodec
void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override
Definition: mythdrmprimecontext.cpp:121
mythopenglinterop.h
Frame
Definition: zmdefines.h:93
MythDate::Format
Format
Definition: mythdate.h:15
MythDRMPRIMEContext::GetSupportedCodec
static MythCodecID GetSupportedCodec(AVCodecContext **Context, const AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
Definition: mythdrmprimecontext.cpp:70
MythDRMPRIMEContext::GetPrimeCodec
static MythCodecID GetPrimeCodec(AVCodecContext **Context, const AVCodec **Codec, AVStream *Stream, MythCodecID Successs, MythCodecID Failure, const QString &CodecName, AVPixelFormat Format)
Definition: mythdrmprimecontext.cpp:41
MythDRMPRIMEContext::HwDecoderInit
int HwDecoderInit(AVCodecContext *Context) override
Definition: mythdrmprimecontext.cpp:106
MythCodecID
MythCodecID
Definition: mythcodecid.h:10
AVFrame
struct AVFrame AVFrame
Definition: BorderDetector.h:15
Decoder
Definition: decoder.h:70
MythOpenGLInterop
Definition: mythopenglinterop.h:17
MythDRMPRIMEContext::RetrieveFrame
bool RetrieveFrame(AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override
Definition: mythdrmprimecontext.cpp:138
MythDRMPRIMEContext
A generic context handler for codecs that return AV_PIX_FMT_DRM_PRIME frames.
Definition: mythdrmprimecontext.h:14
MythDRMPRIMEContext::GetFormat
static enum AVPixelFormat GetFormat(AVCodecContext *Context, const AVPixelFormat *PixFmt)
Definition: mythdrmprimecontext.cpp:146
uint
unsigned int uint
Definition: compat.h:81
MythDRMPRIMEContext::DecoderWillResetOnFlush
bool DecoderWillResetOnFlush(void) override
Definition: mythdrmprimecontext.cpp:133
MythDRMPRIMEContext::m_interop
MythOpenGLInterop * m_interop
Definition: mythdrmprimecontext.h:43
MythDRMPRIMEContext::MythDRMPRIMEContext
MythDRMPRIMEContext(DecoderBase *Parent, MythCodecID CodecID)
Definition: mythdrmprimecontext.cpp:30
MythDRMPRIMEContext::GetDRMBuffer
bool GetDRMBuffer(AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int)
Definition: mythdrmprimecontext.cpp:157
mythdrmprimeinterop.h
mythcodeccontext.h
MythCodecContext
Definition: mythcodeccontext.h:52
MythVideoFrame
Definition: mythframe.h:88
MythDRMPRIMEContext::~MythDRMPRIMEContext
~MythDRMPRIMEContext() override
Definition: mythdrmprimecontext.cpp:35
MythDRMPRIMEContext::s_drmPrimeLock
static QRecursiveMutex s_drmPrimeLock
Definition: mythdrmprimecontext.h:41
DecoderBase
Definition: decoderbase.h:120