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

#include <DVDVideoCodecDRMPRIME.h>

Inheritance diagram for CDVDVideoCodecDRMPRIME:
CDVDVideoCodec

Public Member Functions

 CDVDVideoCodecDRMPRIME (CProcessInfo &processInfo)
 
 ~CDVDVideoCodecDRMPRIME () override
 
bool Open (CDVDStreamInfo &hints, CDVDCodecOptions &options) override
 
bool AddData (const DemuxPacket &packet) override
 
void Reset () override
 
CDVDVideoCodec::VCReturn GetPicture (VideoPicture *pVideoPicture) override
 
const char * GetName () override
 
unsigned GetAllowedReferences () override
 
void SetCodecControl (int flags) override
 
- Public Member Functions inherited from CDVDVideoCodec
 CDVDVideoCodec (CProcessInfo &processInfo)
 
virtual ~CDVDVideoCodec ()=default
 
virtual bool Reconfigure (CDVDStreamInfo &hints)
 
virtual void SetSpeed (int iSpeed)
 
virtual unsigned GetConvergeCount ()
 
virtual bool GetCodecStats (double &pts, int &droppedFrames, int &skippedPics)
 
virtual void Reopen ()
 

Static Public Member Functions

static std::unique_ptr< CDVDVideoCodecCreate (CProcessInfo &processInfo)
 
static void Register ()
 

Protected Member Functions

void Drain ()
 
void SetPictureParams (VideoPicture *pVideoPicture)
 
void UpdateProcessInfo (struct AVCodecContext *avctx, const enum AVPixelFormat fmt)
 

Static Protected Member Functions

static enum AVPixelFormat GetFormat (struct AVCodecContext *avctx, const enum AVPixelFormat *fmt)
 
static int GetBuffer (struct AVCodecContext *avctx, AVFrame *frame, int flags)
 

Protected Attributes

std::string m_name
 
int m_codecControlFlags = 0
 
CDVDStreamInfo m_hints
 
double m_DAR = 1.0
 
AVCodecContext * m_pCodecContext = nullptr
 
AVFrame * m_pFrame = nullptr
 
std::shared_ptr< IVideoBufferPoolm_videoBufferPool
 
- Protected Attributes inherited from CDVDVideoCodec
CProcessInfom_processInfo
 

Additional Inherited Members

- Public Types inherited from CDVDVideoCodec
enum  VCReturn {
  VC_NONE = 0 , VC_ERROR , VC_FATAL , VC_BUFFER ,
  VC_PICTURE , VC_FLUSHED , VC_NOBUFFER , VC_REOPEN ,
  VC_EOF
}
 

Constructor & Destructor Documentation

◆ CDVDVideoCodecDRMPRIME()

CDVDVideoCodecDRMPRIME::CDVDVideoCodecDRMPRIME ( CProcessInfo & processInfo)
explicit

◆ ~CDVDVideoCodecDRMPRIME()

CDVDVideoCodecDRMPRIME::~CDVDVideoCodecDRMPRIME ( )
override

Member Function Documentation

◆ AddData()

bool CDVDVideoCodecDRMPRIME::AddData ( const DemuxPacket & packet)
overridevirtual

add data, decoder has to consume the entire packet returns true if the packet was consumed or if resubmitting it is useless

Todo
: properly handle avpkt side_data. this works around our improper use of the side_data

Implements CDVDVideoCodec.

◆ Create()

std::unique_ptr< CDVDVideoCodec > CDVDVideoCodecDRMPRIME::Create ( CProcessInfo & processInfo)
static

◆ Drain()

void CDVDVideoCodecDRMPRIME::Drain ( )
protected

◆ GetAllowedReferences()

unsigned CDVDVideoCodecDRMPRIME::GetAllowedReferences ( )
inlineoverridevirtual

Number of references to old pictures that are allowed to be retained when calling decode on the next demux packet

Reimplemented from CDVDVideoCodec.

◆ GetBuffer()

int CDVDVideoCodecDRMPRIME::GetBuffer ( struct AVCodecContext * avctx,
AVFrame * frame,
int flags )
staticprotected

◆ GetFormat()

enum AVPixelFormat CDVDVideoCodecDRMPRIME::GetFormat ( struct AVCodecContext * avctx,
const enum AVPixelFormat * fmt )
staticprotected

◆ GetName()

const char * CDVDVideoCodecDRMPRIME::GetName ( )
inlineoverridevirtual

should return codecs name

Implements CDVDVideoCodec.

◆ GetPicture()

CDVDVideoCodec::VCReturn CDVDVideoCodecDRMPRIME::GetPicture ( VideoPicture * pVideoPicture)
overridevirtual

GetPicture controls decoding. Player calls it on every cycle it can signal a picture, request a buffer, or return none, if nothing applies the data is valid until the next GetPicture return VC_PICTURE

Implements CDVDVideoCodec.

◆ Open()

bool CDVDVideoCodecDRMPRIME::Open ( CDVDStreamInfo & hints,
CDVDCodecOptions & options )
overridevirtual

Open the decoder, returns true on success Decoders not capable of running multiple instances should return false in case there is already a instance open

Todo
: fix with proper device when dma-hints wayland protocol works

Implements CDVDVideoCodec.

◆ Register()

void CDVDVideoCodecDRMPRIME::Register ( )
static

◆ Reset()

void CDVDVideoCodecDRMPRIME::Reset ( )
overridevirtual

Reset the decoder. Should be the same as calling Dispose and Open after each other

Implements CDVDVideoCodec.

◆ SetCodecControl()

void CDVDVideoCodecDRMPRIME::SetCodecControl ( int flags)
overridevirtual

Codec can be informed by player with the following flags:

DVD_CODEC_CTRL_NO_POSTPROC : if speed is not normal the codec can switch off postprocessing and de-interlacing

DVD_CODEC_CTRL_HURRY : codecs may do postprocessing and de-interlacing. If video buffers in RenderManager are about to run dry, this is signaled to codec. Codec can wait for post-proc to be finished instead of returning empty and getting another packet.

DVD_CODEC_CTRL_DRAIN : instruct decoder to deliver last pictures without requesting new packets

DVD_CODEC_CTRL_DROP : this packet is going to be dropped. decoder is free to use it for decoding

Reimplemented from CDVDVideoCodec.

◆ SetPictureParams()

void CDVDVideoCodecDRMPRIME::SetPictureParams ( VideoPicture * pVideoPicture)
protected

◆ UpdateProcessInfo()

void CDVDVideoCodecDRMPRIME::UpdateProcessInfo ( struct AVCodecContext * avctx,
const enum AVPixelFormat fmt )
protected

Member Data Documentation

◆ m_codecControlFlags

int CDVDVideoCodecDRMPRIME::m_codecControlFlags = 0
protected

◆ m_DAR

double CDVDVideoCodecDRMPRIME::m_DAR = 1.0
protected

◆ m_hints

CDVDStreamInfo CDVDVideoCodecDRMPRIME::m_hints
protected

◆ m_name

std::string CDVDVideoCodecDRMPRIME::m_name
protected

◆ m_pCodecContext

AVCodecContext* CDVDVideoCodecDRMPRIME::m_pCodecContext = nullptr
protected

◆ m_pFrame

AVFrame* CDVDVideoCodecDRMPRIME::m_pFrame = nullptr
protected

◆ m_videoBufferPool

std::shared_ptr<IVideoBufferPool> CDVDVideoCodecDRMPRIME::m_videoBufferPool
protected

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