ENCODER API
The ENCODER API provides the following interfaces:
| Function | Description |
|---|---|
| sp_init_encoder_module | Initialize the encoder module object |
| sp_release_encoder_module | Destroy the encoder module object |
| sp_start_encode | Create an image encoding channel |
| sp_stop_encode | Close an image encoding channel |
| sp_encoder_set_frame | Feed an image frame into the encoding channel |
| sp_encoder_get_stream | Retrieve the encoded bitstream from the encoding channel |
Note
The encoded image requires 16-bit alignment for RDK X5, while RDK X3 supports 8/16-bit alignment.
sp_init_encoder_module
[Function Prototype]
void *sp_init_encoder_module()
[Description]
Initializes the encoder module object. This function must be called to obtain a handle before using the encoder module.
[Parameters]
None
[Return Type]
Returns a pointer to an ENCODER object on success, or NULL on failure.
sp_release_encoder_module
[Function Prototype]
void sp_release_encoder_module(void *obj)
[Description]
Destroys the encoder module object.
[Parameters]
obj: Pointer to the object obtained from the initialization function.
[Return Type]
None