Kodi Documentation  18.0
Kodi is an open source media player and entertainment hub.
CDVDVideoCodecAndroidMediaCodec Class Reference

#include <DVDVideoCodecAndroidMediaCodec.h>

Inheritance diagram for CDVDVideoCodecAndroidMediaCodec:
CDVDVideoCodec

Public Member Functions

 CDVDVideoCodecAndroidMediaCodec (CProcessInfo &processInfo, bool surface_render=false)
 
virtual ~CDVDVideoCodecAndroidMediaCodec ()
 
virtual bool Open (CDVDStreamInfo &hints, CDVDCodecOptions &options) override
 
virtual bool AddData (const DemuxPacket &packet) override
 
virtual void Reset () override
 
virtual bool Reconfigure (CDVDStreamInfo &hints) override
 
virtual VCReturn GetPicture (VideoPicture *pVideoPicture) override
 
virtual const char * GetName () override
 
virtual void SetCodecControl (int flags) override
 
virtual unsigned GetAllowedReferences () override
 
virtual void surfaceChanged (CJNISurfaceHolder holder, int format, int width, int height) override
 
virtual void surfaceCreated (CJNISurfaceHolder holder) override
 
virtual void surfaceDestroyed (CJNISurfaceHolder holder) override
 
- Public Member Functions inherited from CDVDVideoCodec
 CDVDVideoCodec (CProcessInfo &processInfo)
 
virtual ~CDVDVideoCodec ()=default
 
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 CDVDVideoCodecCreate (CProcessInfo &processInfo)
 
static bool Register ()
 

Protected Member Functions

void Dispose ()
 
void FlushInternal (void)
 
bool ConfigureMediaCodec (void)
 
int GetOutputPicture (void)
 
void ConfigureOutputFormat (AMediaFormat *mediaformat)
 
void UpdateFpsDuration ()
 
void InitSurfaceTexture (void)
 
void ReleaseSurfaceTexture (void)
 

Static Protected Member Functions

static void CallbackInitSurfaceTexture (void *)
 

Protected Attributes

CDVDStreamInfo m_hints
 
std::string m_mime
 
std::string m_codecname
 
int m_colorFormat
 
std::string m_formatname
 
bool m_opened
 
int m_codecControlFlags
 
int m_state
 
int m_noPictureLoop
 
std::shared_ptr< CJNIXBMCVideoViewm_jnivideoview
 
CJNISurface * m_jnisurface
 
CJNISurface m_jnivideosurface
 
AMediaCrypto * m_crypto
 
unsigned int m_textureId
 
std::shared_ptr< CMediaCodecm_codec
 
ANativeWindowm_surface
 
std::shared_ptr< CJNISurfaceTexture > m_surfaceTexture
 
std::shared_ptr< CDVDMediaCodecOnFrameAvailablem_frameAvailable
 
amc_demux m_demux_pkt
 
std::shared_ptr< CMediaCodecVideoBufferPoolm_videoBufferPool
 
uint32_t m_OutputDuration
 
uint32_t m_fpsDuration
 
int64_t m_lastPTS
 
CBitstreamConverterm_bitstream
 
VideoPicture m_videobuffer
 
int m_indexInputBuffer
 
bool m_render_surface
 
mpeg2_sequencem_mpeg2_sequence
 
int m_src_offset [4]
 
int m_src_stride [4]
 
- Protected Attributes inherited from CDVDVideoCodec
CProcessInfom_processInfo
 

Static Protected Attributes

static std::atomic< bool > m_InstanceGuard
 

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

§ CDVDVideoCodecAndroidMediaCodec()

CDVDVideoCodecAndroidMediaCodec::CDVDVideoCodecAndroidMediaCodec ( CProcessInfo processInfo,
bool  surface_render = false 
)

§ ~CDVDVideoCodecAndroidMediaCodec()

CDVDVideoCodecAndroidMediaCodec::~CDVDVideoCodecAndroidMediaCodec ( )
virtual

Member Function Documentation

§ AddData()

bool CDVDVideoCodecAndroidMediaCodec::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.

§ CallbackInitSurfaceTexture()

void CDVDVideoCodecAndroidMediaCodec::CallbackInitSurfaceTexture ( void userdata)
staticprotected

§ ConfigureMediaCodec()

bool CDVDVideoCodecAndroidMediaCodec::ConfigureMediaCodec ( void  )
protected

§ ConfigureOutputFormat()

void CDVDVideoCodecAndroidMediaCodec::ConfigureOutputFormat ( AMediaFormat *  mediaformat)
protected

§ Create()

CDVDVideoCodec * CDVDVideoCodecAndroidMediaCodec::Create ( CProcessInfo processInfo)
static

§ Dispose()

void CDVDVideoCodecAndroidMediaCodec::Dispose ( )
protected

§ FlushInternal()

void CDVDVideoCodecAndroidMediaCodec::FlushInternal ( void  )
protected

§ GetAllowedReferences()

unsigned CDVDVideoCodecAndroidMediaCodec::GetAllowedReferences ( )
overridevirtual

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

Reimplemented from CDVDVideoCodec.

§ GetName()

virtual const char* CDVDVideoCodecAndroidMediaCodec::GetName ( )
inlineoverridevirtual

should return codecs name

Implements CDVDVideoCodec.

§ GetOutputPicture()

int CDVDVideoCodecAndroidMediaCodec::GetOutputPicture ( void  )
protected

§ GetPicture()

CDVDVideoCodec::VCReturn CDVDVideoCodecAndroidMediaCodec::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.

§ InitSurfaceTexture()

void CDVDVideoCodecAndroidMediaCodec::InitSurfaceTexture ( void  )
protected

§ Open()

bool CDVDVideoCodecAndroidMediaCodec::Open ( CDVDStreamInfo hints,
CDVDCodecOptions options 
)
overridevirtual

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

Implements CDVDVideoCodec.

§ Reconfigure()

bool CDVDVideoCodecAndroidMediaCodec::Reconfigure ( CDVDStreamInfo hints)
overridevirtual

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

Reimplemented from CDVDVideoCodec.

§ Register()

bool CDVDVideoCodecAndroidMediaCodec::Register ( )
static

§ ReleaseSurfaceTexture()

void CDVDVideoCodecAndroidMediaCodec::ReleaseSurfaceTexture ( void  )
protected

§ Reset()

void CDVDVideoCodecAndroidMediaCodec::Reset ( )
overridevirtual

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

Implements CDVDVideoCodec.

§ SetCodecControl()

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

§ surfaceChanged()

void CDVDVideoCodecAndroidMediaCodec::surfaceChanged ( CJNISurfaceHolder  holder,
int  format,
int  width,
int  height 
)
overridevirtual

§ surfaceCreated()

void CDVDVideoCodecAndroidMediaCodec::surfaceCreated ( CJNISurfaceHolder  holder)
overridevirtual

§ surfaceDestroyed()

void CDVDVideoCodecAndroidMediaCodec::surfaceDestroyed ( CJNISurfaceHolder  holder)
overridevirtual

§ UpdateFpsDuration()

void CDVDVideoCodecAndroidMediaCodec::UpdateFpsDuration ( )
protected

Member Data Documentation

§ m_bitstream

CBitstreamConverter* CDVDVideoCodecAndroidMediaCodec::m_bitstream
protected

§ m_codec

std::shared_ptr<CMediaCodec> CDVDVideoCodecAndroidMediaCodec::m_codec
protected

§ m_codecControlFlags

int CDVDVideoCodecAndroidMediaCodec::m_codecControlFlags
protected

§ m_codecname

std::string CDVDVideoCodecAndroidMediaCodec::m_codecname
protected

§ m_colorFormat

int CDVDVideoCodecAndroidMediaCodec::m_colorFormat
protected

§ m_crypto

AMediaCrypto* CDVDVideoCodecAndroidMediaCodec::m_crypto
protected

§ m_demux_pkt

amc_demux CDVDVideoCodecAndroidMediaCodec::m_demux_pkt
protected

§ m_formatname

std::string CDVDVideoCodecAndroidMediaCodec::m_formatname
protected

§ m_fpsDuration

uint32_t CDVDVideoCodecAndroidMediaCodec::m_fpsDuration
protected

§ m_frameAvailable

std::shared_ptr<CDVDMediaCodecOnFrameAvailable> CDVDVideoCodecAndroidMediaCodec::m_frameAvailable
protected

§ m_hints

CDVDStreamInfo CDVDVideoCodecAndroidMediaCodec::m_hints
protected

§ m_indexInputBuffer

int CDVDVideoCodecAndroidMediaCodec::m_indexInputBuffer
protected

§ m_InstanceGuard

std::atomic< bool > CDVDVideoCodecAndroidMediaCodec::m_InstanceGuard
staticprotected

§ m_jnisurface

CJNISurface* CDVDVideoCodecAndroidMediaCodec::m_jnisurface
protected

§ m_jnivideosurface

CJNISurface CDVDVideoCodecAndroidMediaCodec::m_jnivideosurface
protected

§ m_jnivideoview

std::shared_ptr<CJNIXBMCVideoView> CDVDVideoCodecAndroidMediaCodec::m_jnivideoview
protected

§ m_lastPTS

int64_t CDVDVideoCodecAndroidMediaCodec::m_lastPTS
protected

§ m_mime

std::string CDVDVideoCodecAndroidMediaCodec::m_mime
protected

§ m_mpeg2_sequence

mpeg2_sequence* CDVDVideoCodecAndroidMediaCodec::m_mpeg2_sequence
protected

§ m_noPictureLoop

int CDVDVideoCodecAndroidMediaCodec::m_noPictureLoop
protected

§ m_opened

bool CDVDVideoCodecAndroidMediaCodec::m_opened
protected

§ m_OutputDuration

uint32_t CDVDVideoCodecAndroidMediaCodec::m_OutputDuration
protected

§ m_render_surface

bool CDVDVideoCodecAndroidMediaCodec::m_render_surface
protected

§ m_src_offset

int CDVDVideoCodecAndroidMediaCodec::m_src_offset[4]
protected

§ m_src_stride

int CDVDVideoCodecAndroidMediaCodec::m_src_stride[4]
protected

§ m_state

int CDVDVideoCodecAndroidMediaCodec::m_state
protected

§ m_surface

ANativeWindow* CDVDVideoCodecAndroidMediaCodec::m_surface
protected

§ m_surfaceTexture

std::shared_ptr<CJNISurfaceTexture> CDVDVideoCodecAndroidMediaCodec::m_surfaceTexture
protected

§ m_textureId

unsigned int CDVDVideoCodecAndroidMediaCodec::m_textureId
protected

§ m_videobuffer

VideoPicture CDVDVideoCodecAndroidMediaCodec::m_videobuffer
protected

§ m_videoBufferPool

std::shared_ptr<CMediaCodecVideoBufferPool> CDVDVideoCodecAndroidMediaCodec::m_videoBufferPool
protected

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