This file contains the CCI decoder element pad implementation.
More...
#include <string.h>
#include "audio_cfg.h"
#include "ccidec.h"
#include "decoder.h"
#include "streamer.h"
#include "codec_interface_public_api.h"
#include "general_utils.h"
#include "audio_sink.h"
#include "cci_metadata.h"
#include "pipeline.h"
|
uint8_t | cci_decoder_type_conversion (DecoderType audio_type) |
| Convert Decoder type to CCI stream type.
|
|
int32_t | _get_file_data (int32_t stream_num, uint8_t *decoder_buffer, int32_t size_to_read, int32_t update_tail, void *context) |
| Get data from a file source.
|
|
static int32_t | _seek_file_data (int32_t stream_num, int32_t offset, int32_t position, void *context) |
| Callback used by CCI to seek within the file.
|
|
int32_t | _get_file_position (int32_t stream_num, void *user_data) |
| Callback to provide current position of the file to the CCI.
|
|
int32_t | ccidec_decode_frame (ElementDecoder *element) |
| Decode a frame using the CCI decoder function.
|
|
uint8_t | get_cci_metadata (ElementDecoder *element) |
| Get the cci metadata from the file header.
|
|
uint8_t | ccidec_sink_pad_activation_handler (StreamPad *pad, uint8_t active) |
| ccidec_sink_pad_activation_handler
|
|
uint8_t | ccidec_sink_pad_event_handler (StreamPad *pad, StreamEvent *event) |
| ccidec_sink_pad_event_handler
|
|
uint8_t | ccidec_src_pad_event_handler (StreamPad *pad, StreamEvent *event) |
| ccidec_src_pad_event_handler
|
|
uint8_t | ccidec_src_pad_query_handler (StreamPad *pad, StreamQuery *query) |
| ccidec_src_pad_query_handler
|
|
int32_t | ccidec_sink_pad_process_handler (StreamPad *pad) |
| Process handler for the CCI decoder.
|
|
◆ cci_decoder_type_conversion()
uint8_t cci_decoder_type_conversion |
( |
DecoderType | decoder_type | ) |
|
|
extern |
- Parameters
-
[in] | decoder_type | Decoder type. |
- Return values
-
◆ _get_file_data()
int32_t _get_file_data |
( |
int32_t | stream_num, |
|
|
uint8_t * | decoder_buffer, |
|
|
int32_t | size_to_read, |
|
|
int32_t | update_tail, |
|
|
void * | context ) |
- Parameters
-
stream_num | Stream number |
decoder_buffer | Buffer to be filled |
size_to_read | Size to be read |
update_tail | Update tail (currently unused) |
context | Pointer to the CCIDec context |
- Returns
- int32_t
◆ _seek_file_data()
static int32_t _seek_file_data |
( |
int32_t | stream_num, |
|
|
int32_t | offset, |
|
|
int32_t | position, |
|
|
void * | context ) |
|
static |
- Parameters
-
stream_num | Stream number |
offset | Offset |
position | Seek type |
context | CCIDecInfo context |
- Returns
- int32_t
◆ _get_file_position()
int32_t _get_file_position |
( |
int32_t | stream_num, |
|
|
void * | user_data ) |
- Parameters
-
stream_num | Stream number |
user_data | Pointer to CCIDecInfo structure |
- Returns
- int32_t
◆ ccidec_decode_frame()
int32_t ccidec_decode_frame |
( |
ElementDecoder * | element | ) |
|
- Parameters
-
- Returns
- int32_t
◆ get_cci_metadata()
uint8_t get_cci_metadata |
( |
ElementDecoder * | element | ) |
|
- Parameters
-
- Returns
- uint8_t
◆ ccidec_sink_pad_activation_handler()
uint8_t ccidec_sink_pad_activation_handler |
( |
StreamPad * | pad, |
|
|
uint8_t | active ) |
This function activates the sink pad and allocates memory for the cci decoder structure and initializes this structure. Activates or deactivates the sink pad for incoming data.
- Parameters
-
pad | pad handle |
active | boolean o activate/disactivate pad |
- Returns
- pad error return
◆ ccidec_sink_pad_event_handler()
uint8_t ccidec_sink_pad_event_handler |
( |
StreamPad * | pad, |
|
|
StreamEvent * | event ) |
This function handles the pipeline events for the cci decoder. These events are downstream events and all events will be pushed to the peer pad.
- Parameters
-
pad | pad handle |
event | event enumeration |
- Returns
- pad error return
◆ ccidec_src_pad_event_handler()
uint8_t ccidec_src_pad_event_handler |
( |
StreamPad * | pad, |
|
|
StreamEvent * | event ) |
This function handles the src events for the cci decoder. These events are upstream events and all events will be pushed to the peer pad.
- Parameters
-
pad | pad handle |
event | event enumeration |
- Returns
- pad error return
◆ ccidec_src_pad_query_handler()
uint8_t ccidec_src_pad_query_handler |
( |
StreamPad * | pad, |
|
|
StreamQuery * | query ) |
This function handles the src queries for the cci decoder.
- Parameters
-
pad | pad handle |
query | event enumeration |
- Returns
- pad error return
◆ ccidec_sink_pad_process_handler()
int32_t ccidec_sink_pad_process_handler |
( |
StreamPad * | pad | ) |
|
Used in pull mode, the filesrc process handler should be NULL so this function will be called instead. This function will call the CCI functions to initialize and decode the file. The CCI callback will be used to pull data from the filesrc when needed.
- Parameters
-
- Returns
- pad error return