MythTV master
mythdrmprimecontext.h
Go to the documentation of this file.
1#ifndef MYTHDRMPRIMECONTEXT_H
2#define MYTHDRMPRIMECONTEXT_H
3
4#include "libmythbase/mythconfig.h"
5
6// MythTV
7#if CONFIG_EGL
9#else
11#endif
13
15
17{
18 public:
20 ~MythDRMPRIMEContext() override;
21
22 static MythCodecID GetSupportedCodec (AVCodecContext **Context,
23 const AVCodec **Codec,
24 const QString &Decoder,
25 AVStream *Stream,
26 uint StreamType);
27 int HwDecoderInit (AVCodecContext *Context) override;
28 void InitVideoCodec (AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override;
29 bool RetrieveFrame (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override;
30 bool DecoderWillResetOnFlush (void) override;
31 static bool HavePrimeDecoders (bool Reinit = false, AVCodecID Codec = AV_CODEC_ID_NONE);
32 static enum AVPixelFormat GetFormat (AVCodecContext *Context, const AVPixelFormat *PixFmt);
33 bool GetDRMBuffer (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int /*unused*/);
34
35 protected:
36 static MythCodecID GetPrimeCodec (AVCodecContext **Context,
37 const AVCodec **Codec,
38 AVStream *Stream,
39 MythCodecID Successs, // Xlib conflict
40 MythCodecID Failure,
41 const QString &CodecName,
42 AVPixelFormat Format);
43 static QRecursiveMutex s_drmPrimeLock;
44 static QStringList s_drmPrimeDecoders;
46};
47
48#endif // MYTHDRMPRIMECONTEXT_H
AVFrame AVFrame
A generic context handler for codecs that return AV_PIX_FMT_DRM_PRIME frames.
void InitVideoCodec(AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override
static QStringList s_drmPrimeDecoders
static enum AVPixelFormat GetFormat(AVCodecContext *Context, const AVPixelFormat *PixFmt)
bool DecoderWillResetOnFlush(void) override
static MythCodecID GetSupportedCodec(AVCodecContext **Context, const AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType)
bool GetDRMBuffer(AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int)
static bool HavePrimeDecoders(bool Reinit=false, AVCodecID Codec=AV_CODEC_ID_NONE)
MythDRMPRIMEContext(DecoderBase *Parent, MythCodecID CodecID)
static MythCodecID GetPrimeCodec(AVCodecContext **Context, const AVCodec **Codec, AVStream *Stream, MythCodecID Successs, MythCodecID Failure, const QString &CodecName, AVPixelFormat Format)
MythOpenGLInterop * m_interop
int HwDecoderInit(AVCodecContext *Context) override
static QRecursiveMutex s_drmPrimeLock
bool RetrieveFrame(AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override
unsigned int uint
Definition: freesurround.h:24
MythCodecID
Definition: mythcodecid.h:14