Main Page   Modules   Data Structures   Data Fields   Related Pages  

rte_codec_class Struct Reference
[Backend Interface]


Data Fields

rte_codec_class * next
rte_codec_info_public
rte_codec *(* _new )(rte_codec_class *, char **errstr)
void(* _delete )(rte_codec *)
rte_option_info *(* option_enum )(rte_codec *, unsigned int)
rte_bool(* option_get )(rte_codec *, const char *, rte_option_value *)
rte_bool(* option_set )(rte_codec *, const char *, va_list)
char *(* option_print )(rte_codec *, const char *, va_list)
rte_bool(* parameters_set )(rte_codec *, rte_stream_parameters *)
rte_bool(* set_input )(rte_codec *, rte_io_method, rte_buffer_callback read_cb, rte_buffer_callback unref_cb, int *queue_length)
rte_bool(* push_buffer )(rte_codec *codec, rte_buffer *buffer, rte_bool blocking)

Detailed Description

Methods of a codec. No fields may change while a codec->_class is referencing this structure. Part of the backend interface.


Field Documentation

rte_codec_class* rte_codec_class::next
 

Backend/context/codec use, list of codec classes.

rte_codec_info* rte_codec_class::_public
 

Codecs can use this to store rte_codec_info, the field is not directly accessed by the frontend.

rte_codec*(* rte_codec_class::_new)(rte_codec_class *, char **errstr)
 

Allocate new codec instance. Returns all fields zero except rte_codec->_class, ->state (RTE_STATE_NEW) and ->mutex (initialized). Options are reset by frontend when _new() succeeded.

When the allocation fails, return NULL and set errstr to a description of the problem for the user. Subsequently (after the rte_codec has been attached to a rte_context) the codec shall call rte_error_printf() et al to pass error strings.

void(* rte_codec_class::_delete)(rte_codec *)
 

Delete codec instance

rte_option_info*(* rte_codec_class::option_enum)(rte_codec *, unsigned int)
 

Same as frontend version, optional.

rte_bool(* rte_codec_class::option_get)(rte_codec *, const char *, rte_option_value *)
 

Same as frontend version, optional when option_enum is.

rte_bool(* rte_codec_class::option_set)(rte_codec *, const char *, va_list)
 

Same as frontend version, optional when option_enum is.

char*(* rte_codec_class::option_print)(rte_codec *, const char *, va_list)
 

Same as frontend version, optional when option_enum is.

rte_bool(* rte_codec_class::parameters_set)(rte_codec *, rte_stream_parameters *)
 

Same as frontend versions. parameters_set is mandatory, parameters_get is optional. A higher layer will access this data directly in absence of a get function, it is only valid at rte_state RTE_STATUS_PARAM or higher.

rte_bool(* rte_codec_class::set_input)(rte_codec *, rte_io_method, rte_buffer_callback read_cb, rte_buffer_callback unref_cb, int *queue_length)
 

Select input method and put codec into RTE_STATUS_READY, mandatory function. Only certain parameter combinations are valid, depending on rte_io_method:
RTE_CALLBACK_MASTERread_cb, optional (NULL) unref_cb
RTE_CALLBACK_SLAVEread_cb
RTE_PUSH_MASTERoptional (NULL) unref_cb
RTE_PUSH_SLAVEnothing
RTE_FIFOnot defined yet
A codec need not support all input methods. queue_length (input and output), the pointer always valid, applies as defined for the rte_set_input_callback_master() et al functions. Return FALSE on error.

rte_bool(* rte_codec_class::push_buffer)(rte_codec *codec, rte_buffer *buffer, rte_bool blocking)
 

Same as the frontend version, optional if the push i/o method is not supported by the codec.


Generated on Mon Mar 31 01:42:28 2003 for RTE Library by doxygen1.2.18