MythTV
master
|
#include <libmythtv/decoders/mythnvdeccontext.h>
Classes | |
class | MythNVDECCaps |
Public Member Functions | |
MythNVDECContext (DecoderBase *Parent, MythCodecID CodecID) | |
~MythNVDECContext () override | |
void | InitVideoCodec (AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) override |
int | HwDecoderInit (AVCodecContext *Context) override |
bool | RetrieveFrame (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame) override |
void | SetDeinterlacing (AVCodecContext *Context, MythVideoProfile *Profile, bool DoubleRate) override |
Enable NVDEC/CUDA deinterlacing if necessary. More... | |
void | PostProcessFrame (AVCodecContext *Context, MythVideoFrame *Frame) override |
bool | IsDeinterlacing (bool &DoubleRate, bool StreamChange=false) override |
bool | DecoderWillResetOnFlush (void) override |
Public Member Functions inherited from MythCodecContext | |
MythCodecContext (DecoderBase *Parent, MythCodecID CodecID) | |
virtual | ~MythCodecContext ()=default |
virtual int | FilteredReceiveFrame (AVCodecContext *Context, AVFrame *Frame) |
Retrieve and process/filter AVFrame. More... | |
virtual void | SetDecoderOptions (AVCodecContext *, const AVCodec *) |
virtual bool | DecoderWillResetOnAspect (void) |
virtual bool | DecoderNeedsReset (AVCodecContext *) |
Static Public Member Functions | |
static MythCodecID | GetSupportedCodec (AVCodecContext **CodecContext, const AVCodec **Codec, const QString &Decoder, AVStream *Stream, uint StreamType) |
Determine whether NVDEC decoding is supported for this codec. More... | |
static enum AVPixelFormat | GetFormat (AVCodecContext *Context, const AVPixelFormat *PixFmt) |
static bool | GetBuffer (AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int Flags) |
Convert AVFrame data to MythFrame. More... | |
static int | InitialiseDecoder (AVCodecContext *Context) |
static bool | HaveNVDEC (bool Reinit=false) |
static void | GetDecoderList (QStringList &Decoders) |
Static Public Member Functions inherited from MythCodecContext | |
static MythCodecContext * | CreateContext (DecoderBase *Parent, MythCodecID Codec) |
static void | GetDecoders (RenderOptions &Opts, bool Reinit=false) |
static QStringList | GetDecoderDescription (void) |
static MythCodecID | FindDecoder (const QString &Decoder, AVStream *Stream, AVCodecContext **Context, const AVCodec **Codec) |
static int | GetBuffer (struct AVCodecContext *Context, AVFrame *Frame, int Flags) |
A generic hardware buffer initialisation method when using AVHWFramesContext. More... | |
static bool | GetBuffer2 (struct AVCodecContext *Context, MythVideoFrame *Frame, AVFrame *AvFrame, int Flags) |
A generic hardware buffer initialisation method when AVHWFramesContext is NOT used. More... | |
static int | InitialiseDecoder (AVCodecContext *Context, CreateHWDecoder Callback, const QString &Debug) |
Initialise a hardware decoder that is expected to use AVHWFramesContext. More... | |
static int | InitialiseDecoder2 (AVCodecContext *Context, CreateHWDecoder Callback, const QString &Debug) |
Initialise a hardware decoder that is NOT expected to use AVHWFramesContext. More... | |
static void | ReleaseBuffer (void *Opaque, uint8_t *Data) |
static void | FramesContextFinished (AVHWFramesContext *Context) |
static void | DeviceContextFinished (AVHWDeviceContext *Context) |
static void | CreateDecoderCallback (void *Wait, void *Context, void *Callback) |
static MythPlayerUI * | GetPlayerUI (AVCodecContext *Context) |
static bool | FrameTypeIsSupported (AVCodecContext *Context, VideoFrameType Format) |
static AVBufferRef * | CreateDevice (AVHWDeviceType Type, MythInteropGPU *Interop, const QString &Device=QString()) |
static bool | IsUnsupportedProfile (AVCodecContext *Context) |
Most hardware decoders do not support these codecs/profiles. More... | |
static QString | GetProfileDescription (CodecProfile Profile, QSize Size, VideoFrameType Format=FMT_NONE, uint ColorDepth=0) |
static CodecProfile | FFmpegToMythProfile (AVCodecID CodecID, int Profile) |
Private Member Functions | |
void | InitFramesContext (AVCodecContext *Context) |
Static Private Member Functions | |
static const std::vector< MythNVDECCaps > & | GetProfiles (void) |
Private Attributes | |
AVBufferRef * | m_framesContext { nullptr } |
MythDeintType | m_deinterlacer { DEINT_NONE } |
bool | m_deinterlacer2x { false } |
Definition at line 24 of file mythnvdeccontext.h.
MythNVDECContext::MythNVDECContext | ( | DecoderBase * | Parent, |
MythCodecID | CodecID | ||
) |
Definition at line 18 of file mythnvdeccontext.cpp.
|
override |
Definition at line 23 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 189 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 201 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 377 of file mythnvdeccontext.cpp.
|
overridevirtual |
Enable NVDEC/CUDA deinterlacing if necessary.
Reimplemented from MythCodecContext.
Definition at line 227 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 327 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 346 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 341 of file mythnvdeccontext.cpp.
|
static |
Determine whether NVDEC decoding is supported for this codec.
The objective here is, as for other decoders, to fail fast so that we can fallback to another decoder as soon as possible if necessary.
Definition at line 33 of file mythnvdeccontext.cpp.
Referenced by MythCodecContext::FindDecoder().
|
static |
Definition at line 357 of file mythnvdeccontext.cpp.
Referenced by InitVideoCodec().
|
static |
Convert AVFrame data to MythFrame.
Definition at line 393 of file mythnvdeccontext.cpp.
Referenced by RetrieveFrame().
|
static |
Definition at line 134 of file mythnvdeccontext.cpp.
Referenced by HwDecoderInit().
Definition at line 513 of file mythnvdeccontext.cpp.
Referenced by MythCodecContext::GetDecoders(), and GetSupportedCodec().
|
static |
Definition at line 550 of file mythnvdeccontext.cpp.
Referenced by MythCodecContext::GetDecoderDescription().
|
private |
Definition at line 635 of file mythnvdeccontext.cpp.
Referenced by GetFormat().
|
staticprivate |
Definition at line 564 of file mythnvdeccontext.cpp.
Referenced by GetDecoderList(), GetSupportedCodec(), and HaveNVDEC().
|
private |
Definition at line 70 of file mythnvdeccontext.h.
Referenced by InitFramesContext(), and ~MythNVDECContext().
|
private |
Definition at line 73 of file mythnvdeccontext.h.
Referenced by IsDeinterlacing(), PostProcessFrame(), and SetDeinterlacing().
Definition at line 74 of file mythnvdeccontext.h.
Referenced by IsDeinterlacing(), PostProcessFrame(), and SetDeinterlacing().