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

#include <DXVA.h>

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

Public Member Functions

 ~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
 
CDVDVideoCodec::VCReturn Check (AVCodecContext *avctx) override
 
const std::string Name () override
 
unsigned GetAllowedReferences () override
 
void Reset () 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 ()
 
virtual long Release ()
 
- 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

friend CVideoBuffer
 
friend CVideoBufferShared
 
friend CVideoBufferCopy
 
enum DXVA::CDecoder::EDeviceState m_state = DXVA_OPEN
 
CEvent m_event
 
CCriticalSection m_section
 
CProcessInfom_processInfo
 
Microsoft::WRL::ComPtr< ID3D11VideoDecoder > m_pD3D11Decoder
 
Microsoft::WRL::ComPtr< ID3D11VideoContext > m_pD3D11Context
 
CVideoBufferPool::shared_ptr m_bufferPool
 
CContext::shared_ptr m_dxvaContext
 
CVideoBufferm_videoBuffer = nullptr
 
struct AVD3D11VAContext * m_avD3D11Context = nullptr
 
int m_refs = 0
 
unsigned int m_shared = 0
 
unsigned int m_surface_alignment = 0
 
HANDLE m_sharedHandle = INVALID_HANDLE_VALUE
 
D3D11_VIDEO_DECODER_DESC m_format = {}
 
bool m_DVDWorkaround = false
 
- 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 ( )
override

◆ CDecoder()

CDecoder::CDecoder ( CProcessInfo & processInfo)
explicitprotected

Member Function Documentation

◆ Check()

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

Implements IHardwareDecoder.

◆ Close()

void CDecoder::Close ( )

◆ 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

◆ ReleaseBuffer()

void CDecoder::ReleaseBuffer ( uint8_t * data)

◆ Reset()

void CDecoder::Reset ( )
overridevirtual

Reimplemented from IHardwareDecoder.

◆ Supports()

bool CDecoder::Supports ( enum AVPixelFormat fmt)
static

Member Data Documentation

◆ CVideoBuffer

friend DXVA::CDecoder::CVideoBuffer
protected

◆ CVideoBufferCopy

friend DXVA::CDecoder::CVideoBufferCopy
protected

◆ CVideoBufferShared

friend DXVA::CDecoder::CVideoBufferShared
protected

◆ m_avD3D11Context

struct AVD3D11VAContext* DXVA::CDecoder::m_avD3D11Context = nullptr
protected

◆ m_bufferPool

CVideoBufferPool::shared_ptr DXVA::CDecoder::m_bufferPool
protected

◆ m_DVDWorkaround

bool DXVA::CDecoder::m_DVDWorkaround = false
protected

◆ m_dxvaContext

CContext::shared_ptr DXVA::CDecoder::m_dxvaContext
protected

◆ m_event

CEvent DXVA::CDecoder::m_event
protected

◆ m_format

D3D11_VIDEO_DECODER_DESC DXVA::CDecoder::m_format = {}
protected

◆ m_pD3D11Context

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

◆ m_pD3D11Decoder

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

◆ m_processInfo

CProcessInfo& DXVA::CDecoder::m_processInfo
protected

◆ m_refs

int DXVA::CDecoder::m_refs = 0
protected

◆ m_section

CCriticalSection DXVA::CDecoder::m_section
protected

◆ m_shared

unsigned int DXVA::CDecoder::m_shared = 0
protected

◆ m_sharedHandle

HANDLE DXVA::CDecoder::m_sharedHandle = INVALID_HANDLE_VALUE
protected

◆ m_state

enum DXVA::CDecoder::EDeviceState DXVA::CDecoder::m_state = DXVA_OPEN
protected

◆ m_surface_alignment

unsigned int DXVA::CDecoder::m_surface_alignment = 0
protected

◆ m_videoBuffer

CVideoBuffer* DXVA::CDecoder::m_videoBuffer = nullptr
protected

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