Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
VDPAU::CDecoder Class Reference

#include <VDPAU.h>

Inheritance diagram for VDPAU::CDecoder:
IHardwareDecoder IDispResource IDVDResourceCounted< IHardwareDecoder >

Classes

struct  Desc
 

Public Member Functions

 CDecoder (CProcessInfo &processInfo)
 
 ~CDecoder () override
 
bool Open (AVCodecContext *avctx, AVCodecContext *mainctx, const enum AVPixelFormat) override
 
CDVDVideoCodec::VCReturn Decode (AVCodecContext *avctx, AVFrame *frame) override
 
bool GetPicture (AVCodecContext *avctx, VideoPicture *picture) override
 
void Reset () override
 
virtual void Close ()
 
long Release () override
 
bool CanSkipDeint () override
 
unsigned GetAllowedReferences () override
 
CDVDVideoCodec::VCReturn Check (AVCodecContext *avctx) override
 
const std::string Name () override
 
void SetCodecControl (int flags) override
 
bool Supports (VdpVideoMixerFeature feature)
 
void OnLostDisplay () override
 
void OnResetDisplay () override
 
- Public Member Functions inherited from IHardwareDecoder
 IHardwareDecoder ()=default
 
 ~IHardwareDecoder () override=default
 
- Public Member Functions inherited from IDVDResourceCounted< IHardwareDecoder >
 IDVDResourceCounted ()
 
 IDVDResourceCounted (const IDVDResourceCounted &)=delete
 
virtual ~IDVDResourceCounted ()=default
 
IDVDResourceCountedoperator= (const IDVDResourceCounted &)=delete
 
virtual IHardwareDecoderAcquire ()
 
- Public Member Functions inherited from IDispResource
virtual ~IDispResource ()=default
 
virtual void OnAppFocusChange (bool focus)
 

Static Public Member Functions

static bool IsVDPAUFormat (AVPixelFormat fmt)
 
static void FFReleaseBuffer (void *opaque, uint8_t *data)
 
static int FFGetBuffer (AVCodecContext *avctx, AVFrame *pic, int flags)
 
static int Render (struct AVCodecContext *s, struct AVFrame *src, const VdpPictureInfo *info, uint32_t buffers_used, const VdpBitstreamBuffer *buffers)
 
static IHardwareDecoderCreate (CDVDStreamInfo &hint, CProcessInfo &processInfo, AVPixelFormat fmt)
 
static void Register ()
 

Protected Types

enum  EDisplayState { VDPAU_OPEN , VDPAU_RESET , VDPAU_LOST , VDPAU_ERROR }
 

Protected Member Functions

void SetWidthHeight (int width, int height)
 
bool ConfigVDPAU (AVCodecContext *avctx, int ref_frames)
 
bool CheckStatus (VdpStatus vdp_st, int line)
 
void FiniVDPAUOutput ()
 
void ReturnRenderPicture (CVdpauRenderPicture *renderPic)
 
long ReleasePicReference ()
 

Static Protected Member Functions

static void ReadFormatOf (AVCodecID codec, VdpDecoderProfile &decoder_profile, VdpChromaType &chroma_type)
 

Protected Attributes

enum VDPAU::CDecoder::EDisplayState m_DisplayState
 
CCriticalSection m_DecoderSection
 
CEvent m_DisplayEvent
 
int m_ErrorCount
 
bool m_vdpauConfigured
 
CVdpauConfig m_vdpauConfig
 
CVideoSurfaces m_videoSurfaces
 
AVVDPAUContext m_hwContext
 
COutput m_vdpauOutput
 
CVdpauBufferStats m_bufferStats
 
CEvent m_inMsgEvent
 
CVdpauRenderPicturem_presentPicture = nullptr
 
int m_codecControl
 
CProcessInfom_processInfo
 

Static Protected Attributes

static bool m_capGeneral = false
 

Friends

class CVdpauBufferPool
 

Additional Inherited Members

- Public Attributes inherited from IDVDResourceCounted< IHardwareDecoder >
std::atomic< long > m_refs
 

Detailed Description

VDPAU main class

Member Enumeration Documentation

◆ EDisplayState

Enumerator
VDPAU_OPEN 
VDPAU_RESET 
VDPAU_LOST 
VDPAU_ERROR 

Constructor & Destructor Documentation

◆ CDecoder()

CDecoder::CDecoder ( CProcessInfo & processInfo)
explicit

◆ ~CDecoder()

CDecoder::~CDecoder ( )
override

Member Function Documentation

◆ CanSkipDeint()

bool CDecoder::CanSkipDeint ( )
overridevirtual

Reimplemented from IHardwareDecoder.

◆ Check()

CDVDVideoCodec::VCReturn CDecoder::Check ( AVCodecContext * avctx)
overridevirtual

Implements IHardwareDecoder.

◆ CheckStatus()

bool CDecoder::CheckStatus ( VdpStatus vdp_st,
int line )
protected

◆ Close()

void CDecoder::Close ( )
virtual

◆ ConfigVDPAU()

bool CDecoder::ConfigVDPAU ( AVCodecContext * avctx,
int ref_frames )
protected

◆ Create()

IHardwareDecoder * CDecoder::Create ( CDVDStreamInfo & hint,
CProcessInfo & processInfo,
AVPixelFormat fmt )
static

◆ Decode()

CDVDVideoCodec::VCReturn CDecoder::Decode ( AVCodecContext * avctx,
AVFrame * frame )
overridevirtual

Implements IHardwareDecoder.

◆ FFGetBuffer()

int CDecoder::FFGetBuffer ( AVCodecContext * avctx,
AVFrame * pic,
int flags )
static

◆ FFReleaseBuffer()

void CDecoder::FFReleaseBuffer ( void * opaque,
uint8_t * data )
static

◆ FiniVDPAUOutput()

void CDecoder::FiniVDPAUOutput ( )
protected

◆ GetAllowedReferences()

unsigned VDPAU::CDecoder::GetAllowedReferences ( )
inlineoverridevirtual

Reimplemented from IHardwareDecoder.

◆ GetPicture()

bool CDecoder::GetPicture ( AVCodecContext * avctx,
VideoPicture * picture )
overridevirtual

Implements IHardwareDecoder.

◆ IsVDPAUFormat()

bool CDecoder::IsVDPAUFormat ( AVPixelFormat fmt)
static

◆ Name()

const std::string VDPAU::CDecoder::Name ( )
inlineoverridevirtual

Implements IHardwareDecoder.

◆ OnLostDisplay()

void CDecoder::OnLostDisplay ( )
overridevirtual

Reimplemented from IDispResource.

◆ OnResetDisplay()

void CDecoder::OnResetDisplay ( )
overridevirtual

Reimplemented from IDispResource.

◆ Open()

bool CDecoder::Open ( AVCodecContext * avctx,
AVCodecContext * mainctx,
const enum AVPixelFormat fmt )
overridevirtual

Implements IHardwareDecoder.

◆ ReadFormatOf()

void CDecoder::ReadFormatOf ( AVCodecID codec,
VdpDecoderProfile & decoder_profile,
VdpChromaType & chroma_type )
staticprotected

◆ Register()

void CDecoder::Register ( )
static

◆ Release()

long CDecoder::Release ( )
overridevirtual

◆ ReleasePicReference()

long CDecoder::ReleasePicReference ( )
protected

◆ Render()

int CDecoder::Render ( struct AVCodecContext * s,
struct AVFrame * src,
const VdpPictureInfo * info,
uint32_t buffers_used,
const VdpBitstreamBuffer * buffers )
static

◆ Reset()

void CDecoder::Reset ( )
overridevirtual

Reimplemented from IHardwareDecoder.

◆ ReturnRenderPicture()

void CDecoder::ReturnRenderPicture ( CVdpauRenderPicture * renderPic)
protected

◆ SetCodecControl()

void CDecoder::SetCodecControl ( int flags)
overridevirtual

Reimplemented from IHardwareDecoder.

◆ SetWidthHeight()

void CDecoder::SetWidthHeight ( int width,
int height )
protected

◆ Supports()

bool CDecoder::Supports ( VdpVideoMixerFeature feature)

Friends And Related Symbol Documentation

◆ CVdpauBufferPool

friend class CVdpauBufferPool
friend

Member Data Documentation

◆ m_bufferStats

CVdpauBufferStats VDPAU::CDecoder::m_bufferStats
protected

◆ m_capGeneral

bool CDecoder::m_capGeneral = false
staticprotected

◆ m_codecControl

int VDPAU::CDecoder::m_codecControl
protected

◆ m_DecoderSection

CCriticalSection VDPAU::CDecoder::m_DecoderSection
protected

◆ m_DisplayEvent

CEvent VDPAU::CDecoder::m_DisplayEvent
protected

◆ m_DisplayState

enum VDPAU::CDecoder::EDisplayState VDPAU::CDecoder::m_DisplayState
protected

◆ m_ErrorCount

int VDPAU::CDecoder::m_ErrorCount
protected

◆ m_hwContext

AVVDPAUContext VDPAU::CDecoder::m_hwContext
protected

◆ m_inMsgEvent

CEvent VDPAU::CDecoder::m_inMsgEvent
protected

◆ m_presentPicture

CVdpauRenderPicture* VDPAU::CDecoder::m_presentPicture = nullptr
protected

◆ m_processInfo

CProcessInfo& VDPAU::CDecoder::m_processInfo
protected

◆ m_vdpauConfig

CVdpauConfig VDPAU::CDecoder::m_vdpauConfig
protected

◆ m_vdpauConfigured

bool VDPAU::CDecoder::m_vdpauConfigured
protected

◆ m_vdpauOutput

COutput VDPAU::CDecoder::m_vdpauOutput
protected

◆ m_videoSurfaces

CVideoSurfaces VDPAU::CDecoder::m_videoSurfaces
protected

The documentation for this class was generated from the following files: