This file includes defines, enums and typedefs for decoder elements.
More...
|
#define | DECODER_INTERLEAVED false |
| Decoder interleaved.
|
|
#define | DECODER_NONINTERLEAVED true |
| Decoder noninterleaved.
|
|
#define | DECODER_SIGNED true |
| Decoder signed.
|
|
#define | DECODER_UNSIGNED false |
| Decoder unsigned.
|
|
|
enum | DecoderOutputWordLength {
DECODER_OUTPUT_WORD_LENGTH_8 = 8
,
DECODER_OUTPUT_WORD_LENGTH_16 = 16
,
DECODER_OUTPUT_WORD_LENGTH_24 = 24
,
DECODER_OUTPUT_WORD_LENGTH_32 = 32
,
LAST_DECODER_OUTPUT_WORD_LENGTH
} |
|
|
int32_t | decoder_init_element (StreamElement *element) |
| This function initializes the decoder element, and loads the pad source and sink functions.
|
|
int32_t | decoder_change_state (StreamElement *element, PipelineState new_dec_state) |
| This function changes the decoder state by calling STATE_TRANSITION pipeline macro. If the new state is NULL_TO_READY, it verifies the decoder type is known and handler is setup.
|
|
uint32_t | decoder_get_duration (ElementDecoder *element, StreamDataFormat data) |
| Returns the duration of a source PadQueryFunc is called to return the element duration in the format defined by the StreamDataFormat parameter.
|
|
void | decoder_set_duration (ElementDecoder *element, uint32_t stream_size, uint32_t bit_rate) |
| Calculate and set the duration of a source This function calculates the duration in bytes using the stream size and stream bitrate, and sets it in bytes in the ElementDecoder variable.
|
|
int32_t | decoder_set_property (StreamElement *element, uint16_t prop_id, uint32_t prop_value) |
| Set a property of a decoder element.
|
|
int32_t | decoder_get_property (StreamElement *element, uint16_t prop_id, uint32_t *prop_value) |
| Get a property of a decoder element.
|
|
int32_t | decoder_set_type (ElementHandle element, DecoderType dec_type) |
| Set the decoder type for the input element. This function maps the generic decoder element pad handlers to the specific decoder implementation using DecoderHandlersType.
|
|
int32_t | decoder_activate_parse_tag (ElementHandle element, uint8_t activate) |
| Enable/Disable the tag parsing Sets the parse_tag variable to the value passed in via activate variable.
|
|
bool | decoder_is_source_seekable (ElementDecoder *decoder, StreamDataFormat format) |
| Is current source seekable.
|
|
void | vUpdateAverageBitrate (ElementDecoder *element) |
| Update a running average of bit rate.
|
|
◆ DECODER_INTERLEAVED
#define DECODER_INTERLEAVED false |
Buffer sizes for supported decoders
◆ DecoderOutputWordLength
The decoder output word length
◆ decoder_init_element()
int32_t decoder_init_element |
( |
StreamElement * | element | ) |
|
◆ decoder_change_state()
int32_t decoder_change_state |
( |
StreamElement * | element, |
|
|
PipelineState | new_dec_state ) |
- Parameters
-
element | StreamElement will be used to create ElementDecoder |
new_dec_state | new decoder state to change to |
- Return values
-
STREAM_ERR_INVALID_ARGS | invalid parameters |
STREAM_ERR_GENERAL | if moved to ready state and decoders not setup |
STREAM_OK | successful |
◆ decoder_get_duration()
uint32_t decoder_get_duration |
( |
ElementDecoder * | element, |
|
|
StreamDataFormat | data ) |
- Parameters
-
element | ElementDecoder pointer will be used to create StreamPad sink |
data | StreamDataFormat defines the format of the data to return. |
- Returns
- duration or 0 if failed
◆ decoder_set_duration()
void decoder_set_duration |
( |
ElementDecoder * | element, |
|
|
uint32_t | stream_size, |
|
|
uint32_t | bit_rate ) |
- Parameters
-
element | ElementDecoder pointer will hold the calculated duration value |
stream_size | Size of the stream |
bit_rate | Bit rate of the stream |
- Returns
- None
◆ decoder_set_property()
int32_t decoder_set_property |
( |
StreamElement * | element, |
|
|
uint16_t | prop_id, |
|
|
uint32_t | prop_value ) |
This is a new interface to replace the original decoder_set_type().
- Parameters
-
element | StreamElement pointer |
prop_id | id number of a element's property |
prop_value | the property value to be set |
- Returns
- StreamReturnType
- Return values
-
STREAM_OK | if successful |
STREAM_ERR_INVALID_ARGS | means invalid arguments |
◆ decoder_get_property()
int32_t decoder_get_property |
( |
StreamElement * | element, |
|
|
uint16_t | prop_id, |
|
|
uint32_t * | prop_value ) |
- Parameters
-
element | StreamElement pointer that will be used as ElementHandle |
prop_id | id number of a element's property |
prop_value | the property value to be saved in |
- Return values
-
STREAM_OK | if successful |
STREAM_ERR_INVALID_ARGS | means invalid arguments |
◆ decoder_set_type()
- Parameters
-
element | ElementHandle that will be used as ElementDecoder to set the handlers to the input decoder type |
dec_type | DecoderType value that will be used to map the appropriate handler functions. |
- Return values
-
STREAM_OK | if successful |
STREAM_ERR_INVALID_ARGS | means invalid arguments |
STREAM_ERR_GENERAL | is returned if dec_type is not handled |
◆ decoder_activate_parse_tag()
int32_t decoder_activate_parse_tag |
( |
ElementHandle | element, |
|
|
uint8_t | activate ) |
- Parameters
-
element | ElementHandle that will be used as ElementDecoder |
activate | value used to set parse_tag in decoder element. |
- Return values
-
STREAM_OK | if successful |
STREAM_ERR_INVALID_ARGS | means invalid arguments |
◆ decoder_is_source_seekable()
bool decoder_is_source_seekable |
( |
ElementDecoder * | decoder, |
|
|
StreamDataFormat | format ) |
This function sends a query to sink pad of the decoder element to check if check if seek is possible in the specified format.
- Parameters
-
decoder | ElementDecoder pointer will be use to create a sink StreamPad |
format | format type used to create the query. |
- Returns
- bool
- Return values
-
true | source is seekable |
false | souce is not seekable |
◆ vUpdateAverageBitrate()
void vUpdateAverageBitrate |
( |
ElementDecoder * | element | ) |
|
- Parameters
-
element | ElementDecoder pointer that will contain the calculated average bit rate. |
- Returns
- None