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

#include <DVDVideoCodec.h>

Inheritance diagram for CDVDVideoCodec:
CAddonVideoCodec CDVDVideoCodecAndroidMediaCodec CDVDVideoCodecDRMPRIME CDVDVideoCodecFFmpeg CDVDVideoCodecStarfish

Public Types

enum  VCReturn {
  VC_NONE = 0 , VC_ERROR , VC_FATAL , VC_BUFFER ,
  VC_PICTURE , VC_FLUSHED , VC_NOBUFFER , VC_REOPEN ,
  VC_EOF
}
 

Public Member Functions

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

Protected Attributes

CProcessInfom_processInfo
 

Member Enumeration Documentation

◆ VCReturn

Enumerator
VC_NONE 
VC_ERROR 
VC_FATAL 
VC_BUFFER 
VC_PICTURE 
VC_FLUSHED 
VC_NOBUFFER 
VC_REOPEN 
VC_EOF 

Constructor & Destructor Documentation

◆ CDVDVideoCodec()

CDVDVideoCodec::CDVDVideoCodec ( CProcessInfo & processInfo)
inlineexplicit

◆ ~CDVDVideoCodec()

virtual CDVDVideoCodec::~CDVDVideoCodec ( )
virtualdefault

Member Function Documentation

◆ AddData()

virtual bool CDVDVideoCodec::AddData ( const DemuxPacket & packet)
pure virtual

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

Implemented in CAddonVideoCodec, CDVDVideoCodecAndroidMediaCodec, CDVDVideoCodecDRMPRIME, CDVDVideoCodecFFmpeg, and CDVDVideoCodecStarfish.

◆ GetAllowedReferences()

virtual unsigned CDVDVideoCodec::GetAllowedReferences ( )
inlinevirtual

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

Reimplemented in CDVDVideoCodecAndroidMediaCodec, CDVDVideoCodecDRMPRIME, and CDVDVideoCodecFFmpeg.

◆ GetCodecStats()

virtual bool CDVDVideoCodec::GetCodecStats ( double & pts,
int & droppedFrames,
int & skippedPics )
inlinevirtual

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 in CDVDVideoCodecFFmpeg.

◆ GetConvergeCount()

virtual unsigned CDVDVideoCodec::GetConvergeCount ( )
inlinevirtual

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

Reimplemented in CDVDVideoCodecFFmpeg.

◆ GetName()

virtual const char * CDVDVideoCodec::GetName ( )
pure virtual

◆ GetPicture()

virtual VCReturn CDVDVideoCodec::GetPicture ( VideoPicture * pVideoPicture)
pure virtual

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

Implemented in CAddonVideoCodec, CDVDVideoCodecAndroidMediaCodec, CDVDVideoCodecDRMPRIME, CDVDVideoCodecFFmpeg, and CDVDVideoCodecStarfish.

◆ Open()

virtual bool CDVDVideoCodec::Open ( CDVDStreamInfo & hints,
CDVDCodecOptions & options )
pure virtual

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

Implemented in CAddonVideoCodec, CDVDVideoCodecAndroidMediaCodec, CDVDVideoCodecDRMPRIME, CDVDVideoCodecFFmpeg, and CDVDVideoCodecStarfish.

◆ Reconfigure()

virtual bool CDVDVideoCodec::Reconfigure ( CDVDStreamInfo & hints)
inlinevirtual

Reconfigure the decoder, returns true on success Decoders not capable of running multiple instances may be capable of reconfiguring the running instance. If Reconfigure returns false, player will close / open the decoder

Reimplemented in CAddonVideoCodec, CDVDVideoCodecAndroidMediaCodec, and CDVDVideoCodecStarfish.

◆ Reopen()

virtual void CDVDVideoCodec::Reopen ( )
inlinevirtual

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

Reimplemented in CDVDVideoCodecFFmpeg.

◆ Reset()

virtual void CDVDVideoCodec::Reset ( )
pure virtual

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

Implemented in CAddonVideoCodec, CDVDVideoCodecAndroidMediaCodec, CDVDVideoCodecDRMPRIME, CDVDVideoCodecFFmpeg, and CDVDVideoCodecStarfish.

◆ SetCodecControl()

virtual void CDVDVideoCodec::SetCodecControl ( int flags)
inlinevirtual

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 in CAddonVideoCodec, CDVDVideoCodecAndroidMediaCodec, CDVDVideoCodecDRMPRIME, CDVDVideoCodecFFmpeg, and CDVDVideoCodecStarfish.

◆ SetSpeed()

virtual void CDVDVideoCodec::SetSpeed ( int iSpeed)
inlinevirtual

will be called by video player indicating the playback speed. see DVD_PLAYSPEED_NORMAL, DVD_PLAYSPEED_PAUSE and friends.

Reimplemented in CDVDVideoCodecStarfish.

Member Data Documentation

◆ m_processInfo

CProcessInfo& CDVDVideoCodec::m_processInfo
protected

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