#include <AgoraExtensions.h>
Inherits agora::RefCountInterface.
◆ initVideoDecoder()
Initializes the video decoder with the specified codec settings.
- Parameters
-
| codec_settings | The 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()
Decodes a frame of encoded video data.
- Parameters
-
| data | The encoded video data to be decoded. |
- Returns
- 0: Decoding succeeded.
- < 0: Decoding failed, possibly due to unsupported data format or internal errors.
◆ registerDecoderCallback()
Registers a callback function to handle decoded video frames.
- Parameters
-
| callback | A pointer to the decoder callback interface. |
- Returns
- 0: Registration succeeded.
- < 0: Registration failed, possibly due to an invalid callback pointer.
◆ releaseVideoDecoder()
| virtual int32_t agora::rtc::IExtensionVideoDecoder::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()
Queries the supported codec data formats.
- Parameters
-
| data_format | A pointer to an array where supported pixel formats will be filled. |
| size | An input/output parameter; initially holds the size of the array, and will be updated with the actual number of formats filled. |
◆ setAdvancedCodecProperty()
| virtual int agora::rtc::IExtensionVideoDecoder::setAdvancedCodecProperty |
( |
const char * | key, |
|
|
const char * | json_value ) |
|
pure virtual |
Sets a advanced codec property in the IExtensionVideoDecoder class.
- Parameters
-
| key | The pointer to the property name. |
| buf | The pointer to the buffer of this private property. |
| buf_size | The 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 agora::rtc::IExtensionVideoDecoder::getAdvancedCodecProperty |
( |
const char * | key, |
|
|
char * | json_value, |
|
|
int & | length ) const |
|
pure virtual |
Gets a advanced codec property in the IExtensionVideoDecoder class.
- Parameters
-
| name | The pointer to the property name. |
| buf | The pointer to the buffer of this advanced codec property. |
| buf_size | The 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.