|
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 void | InitVideoCodec (AVCodecContext *Context, bool SelectedStream, bool &DirectRendering) |
| virtual int | HwDecoderInit (AVCodecContext *) |
| virtual bool | RetrieveFrame (AVCodecContext *, MythVideoFrame *, AVFrame *) |
| virtual int | FilteredReceiveFrame (AVCodecContext *Context, AVFrame *Frame) |
| Retrieve and process/filter AVFrame. More... | |
| virtual void | SetDeinterlacing (AVCodecContext *, MythVideoProfile *, bool) |
| virtual void | PostProcessFrame (AVCodecContext *, MythVideoFrame *) |
| virtual bool | IsDeinterlacing (bool &, bool=false) |
| virtual void | SetDecoderOptions (AVCodecContext *, const AVCodec *) |
| virtual bool | DecoderWillResetOnFlush (void) |
| 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 25 of file mythnvdeccontext.h.
| MythNVDECContext::MythNVDECContext | ( | DecoderBase * | Parent, |
| MythCodecID | CodecID | ||
| ) |
Definition at line 27 of file mythnvdeccontext.cpp.
|
override |
Definition at line 32 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 350 of file mythnvdeccontext.cpp.
|
static |
Convert AVFrame data to MythFrame.
Definition at line 402 of file mythnvdeccontext.cpp.
Referenced by RetrieveFrame().
|
static |
Definition at line 558 of file mythnvdeccontext.cpp.
Referenced by MythCodecContext::GetDecoderDescription().
|
static |
Definition at line 366 of file mythnvdeccontext.cpp.
Referenced by InitVideoCodec().
|
staticprivate |
Definition at line 572 of file mythnvdeccontext.cpp.
Referenced by GetDecoderList(), GetSupportedCodec(), and HaveNVDEC().
|
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 42 of file mythnvdeccontext.cpp.
Referenced by MythCodecContext::FindDecoder().
Definition at line 521 of file mythnvdeccontext.cpp.
Referenced by MythCodecContext::GetDecoders(), and GetSupportedCodec().
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 210 of file mythnvdeccontext.cpp.
|
private |
Definition at line 643 of file mythnvdeccontext.cpp.
Referenced by GetFormat().
|
static |
Definition at line 143 of file mythnvdeccontext.cpp.
Referenced by HwDecoderInit().
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 198 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 355 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 336 of file mythnvdeccontext.cpp.
|
overridevirtual |
Reimplemented from MythCodecContext.
Definition at line 386 of file mythnvdeccontext.cpp.
|
overridevirtual |
Enable NVDEC/CUDA deinterlacing if necessary.
Reimplemented from MythCodecContext.
Definition at line 236 of file mythnvdeccontext.cpp.
|
private |
Definition at line 74 of file mythnvdeccontext.h.
Referenced by IsDeinterlacing(), PostProcessFrame(), and SetDeinterlacing().
Definition at line 75 of file mythnvdeccontext.h.
Referenced by IsDeinterlacing(), PostProcessFrame(), and SetDeinterlacing().
|
private |
Definition at line 71 of file mythnvdeccontext.h.
Referenced by InitFramesContext(), and ~MythNVDECContext().