Agora RTC Objective-C API Reference  Refactor
Public Member Functions
IExtensionVideoDecoder Class Referenceabstract

Inherits RefCountInterface.

Public Member Functions

virtual int initVideoDecoder (const ExtensionVideoCodecSettings &codec_settings)=0
 
virtual int decode (const ExtensionEncodedImage &data)=0
 
virtual int32_t registerDecoderCallback (IExtensionDecoderCallback *callback)=0
 
virtual int32_t releaseVideoDecoder ()=0
 
virtual void querySupportCodecDataFormat (media::base::VIDEO_PIXEL_FORMAT *data_format, int &size)=0
 
virtual int setAdvancedCodecProperty (const char *key, const char *json_value)=0
 
virtual int getAdvancedCodecProperty (const char *key, char *json_value, int &length) const =0
 

Member Function Documentation

◆ initVideoDecoder()

virtual int initVideoDecoder ( const ExtensionVideoCodecSettings codec_settings)
pure virtual

Initializes the video decoder with the specified codec settings.

Parameters
codec_settingsThe video codec settings that specify how the video should be decoded.
Returns
  • 0: Initialization succeeded.
  • < 0: Initialization failed, possibly due to invalid settings or internal errors.

◆ decode()

virtual int decode ( const ExtensionEncodedImage data)
pure virtual

Decodes a frame of encoded video data.

Parameters
dataThe encoded video data to be decoded.
Returns
  • 0: Decoding succeeded.
  • < 0: Decoding failed, possibly due to unsupported data format or internal errors.

◆ registerDecoderCallback()

virtual int32_t registerDecoderCallback ( IExtensionDecoderCallback callback)
pure virtual

Registers a callback function to handle decoded video frames.

Parameters
callbackA pointer to the decoder callback interface.
Returns
  • 0: Registration succeeded.
  • < 0: Registration failed, possibly due to an invalid callback pointer.

◆ releaseVideoDecoder()

virtual int32_t releaseVideoDecoder ( )
pure virtual

Releases the resources used by the video decoder.

Returns
  • 0: Release succeeded.
  • < 0: Release failed, possibly due to the decoder not being initialized or internal errors.

◆ querySupportCodecDataFormat()

virtual void querySupportCodecDataFormat ( media::base::VIDEO_PIXEL_FORMAT data_format,
int &  size 
)
pure virtual

Queries the supported codec data formats.

Parameters
data_formatA pointer to an array where supported pixel formats will be filled.
sizeAn input/output parameter; initially holds the size of the array, and will be updated with the actual number of formats filled.

◆ setAdvancedCodecProperty()

virtual int setAdvancedCodecProperty ( const char *  key,
const char *  json_value 
)
pure virtual

Sets a advanced codec property in the IExtensionVideoDecoder class.

Parameters
keyThe pointer to the property name.
bufThe pointer to the buffer of this private property.
buf_sizeThe buffer size of this private property.
Returns
  • The actual size of the private property, if the method call succeeds.
  • -1, if the method call fails.

◆ getAdvancedCodecProperty()

virtual int getAdvancedCodecProperty ( const char *  key,
char *  json_value,
int &  length 
) const
pure virtual

Gets a advanced codec property in the IExtensionVideoDecoder class.

Parameters
nameThe pointer to the property name.
bufThe pointer to the buffer of this advanced codec property.
buf_sizeThe buffer size of this advanced codec property.
Returns
  • The actual size of the advanced codec property, if the method call succeeds.
  • -1, if the method call fails.

◆ AddRef()

virtual void AddRef ( ) const
pure virtualinherited

◆ Release()

virtual RefCountReleaseStatus Release ( ) const
pure virtualinherited

◆ HasOneRef()

virtual bool HasOneRef ( ) const
pure virtualinherited