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
6 #include "mythdrmprimeinterop.h"
7 #else
8 #include "mythopenglinterop.h"
9 #endif
10 #include "mythcodeccontext.h"
11 
13 
15 {
16  public:
18  ~MythDRMPRIMEContext() override;
19 
20  static MythCodecID GetSupportedCodec (AVCodecContext **Context,
21  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, VideoFrame *Frame, AVFrame *AvFrame) override;
28  bool DecoderWillResetOnFlush (void) override;
29  static bool HavePrimeDecoders (AVCodecID Codec = AV_CODEC_ID_NONE);
30  static enum AVPixelFormat GetFormat (AVCodecContext *Context, const AVPixelFormat *PixFmt);
31  bool GetDRMBuffer (AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int /*unused*/);
32 
33  protected:
34  static MythCodecID GetPrimeCodec (AVCodecContext **Context,
35  AVCodec **Codec,
36  AVStream *Stream,
37  MythCodecID Successs, // Xlib conflict
38  MythCodecID Failure,
39  const QString &CodecName,
40  AVPixelFormat Format);
41  static QMutex s_drmPrimeLock;
42  static QStringList s_drmPrimeDecoders;
44 };
45 
46 #endif // MYTHDRMPRIMECONTEXT_H
MythDRMPRIMEContext::s_drmPrimeDecoders
static QStringList s_drmPrimeDecoders
Definition: mythdrmprimecontext.h:42
MythDRMPRIMEInterop
Definition: mythdrmprimeinterop.h:10
MythDRMPRIMEContext::InitVideoCodec
void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override
Definition: mythdrmprimecontext.cpp:126
mythopenglinterop.h
MythDRMPRIMEContext::s_drmPrimeLock
static QMutex s_drmPrimeLock
Definition: mythdrmprimecontext.h:41
Frame
Definition: zmdefines.h:93
Context
QHash< QString, Action * > Context
Definition: action.h:77
MythDate::Format
Format
Definition: mythdate.h:12
VideoFrame
Definition: mythframe.h:137
MythDRMPRIMEContext::HwDecoderInit
int HwDecoderInit(AVCodecContext *Context) override
Definition: mythdrmprimecontext.cpp:112
MythCodecID
MythCodecID
Definition: mythcodecid.h:10
AVFrame
struct AVFrame AVFrame
Definition: BorderDetector.h:15
Decoder
Definition: decoder.h:65
MythOpenGLInterop
Definition: mythopenglinterop.h:23
MythDRMPRIMEContext::GetSupportedCodec
static MythCodecID GetSupportedCodec(AVCodecContext **Context, AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
Definition: mythdrmprimecontext.cpp:68
MythDRMPRIMEContext::HavePrimeDecoders
static bool HavePrimeDecoders(AVCodecID Codec=AV_CODEC_ID_NONE)
Definition: mythdrmprimecontext.cpp:193
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:151
uint
unsigned int uint
Definition: compat.h:140
MythDRMPRIMEContext::DecoderWillResetOnFlush
bool DecoderWillResetOnFlush(void) override
Definition: mythdrmprimecontext.cpp:138
MythDRMPRIMEContext::m_interop
MythOpenGLInterop * m_interop
Definition: mythdrmprimecontext.h:43
MythDRMPRIMEContext::MythDRMPRIMEContext
MythDRMPRIMEContext(DecoderBase *Parent, MythCodecID CodecID)
Definition: mythdrmprimecontext.cpp:28
MythDRMPRIMEContext::GetPrimeCodec
static MythCodecID GetPrimeCodec(AVCodecContext **Context, AVCodec **Codec, AVStream *Stream, MythCodecID Successs, MythCodecID Failure, const QString &CodecName, AVPixelFormat Format)
Definition: mythdrmprimecontext.cpp:39
mythdrmprimeinterop.h
mythcodeccontext.h
MythDRMPRIMEContext::GetDRMBuffer
bool GetDRMBuffer(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame, int)
Definition: mythdrmprimecontext.cpp:162
MythCodecContext
Definition: mythcodeccontext.h:50
MythDRMPRIMEContext::RetrieveFrame
bool RetrieveFrame(AVCodecContext *Context, VideoFrame *Frame, AVFrame *AvFrame) override
Definition: mythdrmprimecontext.cpp:143
MythDRMPRIMEContext::~MythDRMPRIMEContext
~MythDRMPRIMEContext() override
Definition: mythdrmprimecontext.cpp:33
DecoderBase
Definition: decoderbase.h:119