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

#include <DVDVideoCodecWebCodecs.h>

Inheritance diagram for CDVDVideoCodecWebCodecs:
CDVDVideoCodec

Public Member Functions

 CDVDVideoCodecWebCodecs (CProcessInfo &processInfo)
 
 ~CDVDVideoCodecWebCodecs () override
 
bool Open (CDVDStreamInfo &hints, CDVDCodecOptions &options) override
 
bool AddData (const DemuxPacket &packet) override
 
void Reset () override
 
VCReturn GetPicture (VideoPicture *pVideoPicture) override
 
const char * GetName () override
 
unsigned GetConvergeCount () override
 
bool GetCodecStats (double &pts, int &droppedFrames, int &skippedPics) override
 
void SetCodecControl (int flags) override
 
void Reopen () 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 GetAllowedReferences ()
 

Static Public Member Functions

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

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
}
 
- Protected Attributes inherited from CDVDVideoCodec
CProcessInfo & m_processInfo
 

Constructor & Destructor Documentation

◆ CDVDVideoCodecWebCodecs()

CDVDVideoCodecWebCodecs::CDVDVideoCodecWebCodecs ( CProcessInfo & processInfo)
explicit

◆ ~CDVDVideoCodecWebCodecs()

CDVDVideoCodecWebCodecs::~CDVDVideoCodecWebCodecs ( )
override

Member Function Documentation

◆ AddData()

bool CDVDVideoCodecWebCodecs::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

Implements CDVDVideoCodec.

◆ Create()

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

◆ GetCodecStats()

bool CDVDVideoCodecWebCodecs::GetCodecStats ( double & pts,
int & droppedFrames,
int & skippedPics )
overridevirtual

For calculation of dropping requirements player asks for some information.

  • pts : right after decoder, used to detect gaps (dropped frames in decoder)
  • droppedFrames : indicates if decoder has dropped a frame -1 means that decoder has no info on this.
  • skippedPics : indicates if postproc has skipped a already decoded picture -1 means that decoder has no info on this.

If codec does not implement this method, pts of decoded frame at input video player is used. In case decoder does post-proc and de-interlacing there may be quite some frames queued up between exit decoder and entry player.

Reimplemented from CDVDVideoCodec.

◆ GetConvergeCount()

unsigned CDVDVideoCodecWebCodecs::GetConvergeCount ( )
overridevirtual

How many packets should player remember, so codec can recover should something cause it to flush outside of players control

Reimplemented from CDVDVideoCodec.

◆ GetName()

const char * CDVDVideoCodecWebCodecs::GetName ( )
inlineoverridevirtual

should return codecs name

Implements CDVDVideoCodec.

◆ GetPicture()

CDVDVideoCodec::VCReturn CDVDVideoCodecWebCodecs::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 CDVDVideoCodecWebCodecs::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

Implements CDVDVideoCodec.

◆ Register()

bool CDVDVideoCodecWebCodecs::Register ( )
static

◆ Reopen()

void CDVDVideoCodecWebCodecs::Reopen ( )
overridevirtual

Re-open the decoder. Decoder request to re-open

Reimplemented from CDVDVideoCodec.

◆ Reset()

void CDVDVideoCodecWebCodecs::Reset ( )
overridevirtual

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

Implements CDVDVideoCodec.

◆ SetCodecControl()

void CDVDVideoCodecWebCodecs::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.


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