Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
DXVA::CDecoder Class Reference

#include <DXVA.h>

Inheritance diagram for DXVA::CDecoder:
IHardwareDecoder ID3DResource IDVDResourceCounted< IHardwareDecoder >

Public Member Functions

virtual ~CDecoder ()
 
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
 
CDVDVideoCodec::VCReturn Check (AVCodecContext *avctx) override
 
const std::string Name () override
 
unsigned GetAllowedReferences () override
 
void Reset () override
 
long Release () override
 
bool OpenDecoder ()
 
int GetBuffer (AVCodecContext *avctx, AVFrame *pic)
 
void ReleaseBuffer (uint8_t *data)
 
void Close ()
 
void CloseDXVADecoder ()
 
- Public Member Functions inherited from IHardwareDecoder
 IHardwareDecoder ()=default
 
 ~IHardwareDecoder () override=default
 
virtual bool CanSkipDeint ()
 
virtual void SetCodecControl (int flags)
 
- 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 ID3DResource
virtual ~ID3DResource ()
 

Static Public Member Functions

static IHardwareDecoderCreate (CDVDStreamInfo &hint, CProcessInfo &processInfo, AVPixelFormat fmt)
 
static bool Register ()
 
static bool Supports (enum AVPixelFormat fmt)
 
static int FFGetBuffer (AVCodecContext *avctx, AVFrame *pic, int flags)
 
static void FFReleaseBuffer (void *opaque, uint8_t *data)
 

Protected Types

enum  EDeviceState { DXVA_OPEN, DXVA_RESET, DXVA_LOST }
 

Protected Member Functions

 CDecoder (CProcessInfo &processInfo)
 
void OnCreateDevice () override
 
void OnDestroyDevice (bool fatal) override
 
- Protected Member Functions inherited from ID3DResource
void Register ()
 
void Unregister ()
 

Protected Attributes

enum DXVA::CDecoder::EDeviceState m_state
 
int m_refs
 
HANDLE m_device
 
Microsoft::WRL::ComPtr< ID3D11VideoDecoder > m_decoder
 
Microsoft::WRL::ComPtr< ID3D11VideoContext > m_vcontext
 
D3D11_VIDEO_DECODER_DESC m_format
 
CDXVAOutputBufferm_videoBuffer
 
struct AVD3D11VAContext * m_context
 
std::shared_ptr< CDXVABufferPoolm_bufferPool
 
CDXVAContextm_dxva_context
 
AVCodecContext * m_avctx
 
unsigned int m_shared
 
unsigned int m_surface_alignment
 
CCriticalSection m_section
 
CEvent m_event
 
CProcessInfom_processInfo
 
- Protected Attributes inherited from ID3DResource
bool m_bRegistered = false
 

Additional Inherited Members

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

Member Enumeration Documentation

§ EDeviceState

Enumerator
DXVA_OPEN 
DXVA_RESET 
DXVA_LOST 

Constructor & Destructor Documentation

§ ~CDecoder()

CDecoder::~CDecoder ( )
virtual

§ CDecoder()

CDecoder::CDecoder ( CProcessInfo processInfo)
explicitprotected

Member Function Documentation

§ Check()

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

Implements IHardwareDecoder.

§ Close()

void CDecoder::Close ( void  )

§ CloseDXVADecoder()

void CDecoder::CloseDXVADecoder ( )

§ 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

§ GetAllowedReferences()

unsigned CDecoder::GetAllowedReferences ( )
overridevirtual

Reimplemented from IHardwareDecoder.

§ GetBuffer()

int CDecoder::GetBuffer ( AVCodecContext *  avctx,
AVFrame *  pic 
)

§ GetPicture()

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

Implements IHardwareDecoder.

§ Name()

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

Implements IHardwareDecoder.

§ OnCreateDevice()

void DXVA::CDecoder::OnCreateDevice ( void  )
inlineoverrideprotectedvirtual

Implements ID3DResource.

§ OnDestroyDevice()

void DXVA::CDecoder::OnDestroyDevice ( bool  fatal)
inlineoverrideprotectedvirtual

Implements ID3DResource.

§ Open()

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

Implements IHardwareDecoder.

§ OpenDecoder()

bool CDecoder::OpenDecoder ( )

§ Register()

bool CDecoder::Register ( )
static

§ Release()

long CDecoder::Release ( )
overridevirtual

§ ReleaseBuffer()

void CDecoder::ReleaseBuffer ( uint8_t data)

§ Reset()

void CDecoder::Reset ( void  )
overridevirtual

Reimplemented from IHardwareDecoder.

§ Supports()

bool CDecoder::Supports ( enum AVPixelFormat  fmt)
static

Member Data Documentation

§ m_avctx

AVCodecContext* DXVA::CDecoder::m_avctx
protected

§ m_bufferPool

std::shared_ptr<CDXVABufferPool> DXVA::CDecoder::m_bufferPool
protected

§ m_context

struct AVD3D11VAContext* DXVA::CDecoder::m_context
protected

§ m_decoder

Microsoft::WRL::ComPtr<ID3D11VideoDecoder> DXVA::CDecoder::m_decoder
protected

§ m_device

HANDLE DXVA::CDecoder::m_device
protected

§ m_dxva_context

CDXVAContext* DXVA::CDecoder::m_dxva_context
protected

§ m_event

CEvent DXVA::CDecoder::m_event
protected

§ m_format

D3D11_VIDEO_DECODER_DESC DXVA::CDecoder::m_format
protected

§ m_processInfo

CProcessInfo& DXVA::CDecoder::m_processInfo
protected

§ m_refs

int DXVA::CDecoder::m_refs
protected

§ m_section

CCriticalSection DXVA::CDecoder::m_section
protected

§ m_shared

unsigned int DXVA::CDecoder::m_shared
protected

§ m_state

enum DXVA::CDecoder::EDeviceState DXVA::CDecoder::m_state
protected

§ m_surface_alignment

unsigned int DXVA::CDecoder::m_surface_alignment
protected

§ m_vcontext

Microsoft::WRL::ComPtr<ID3D11VideoContext> DXVA::CDecoder::m_vcontext
protected

§ m_videoBuffer

CDXVAOutputBuffer* DXVA::CDecoder::m_videoBuffer
protected

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