Default structure for translators, with the basic fields and buffers, all allocated as part of the same chunk of memory. The buffer is preceded by AST_FRIENDLY_OFFSET bytes in front of the user portion. 'buf' points right after this space. More...
#include <translate.h>

Data Fields | |
| int | datalen |
| actual space used in outbuf | |
| struct ast_frame | f |
| struct ast_trans_pvt * | next |
| struct timeval | nextin |
| struct timeval | nextout |
| union { | |
| char * c | |
| int16_t * i16 | |
| unsigned char * uc | |
| uint8_t * ui8 | |
| } | outbuf |
| plc_state_t * | plc |
| void * | pvt |
| int | samples |
| struct ast_translator * | t |
Default structure for translators, with the basic fields and buffers, all allocated as part of the same chunk of memory. The buffer is preceded by AST_FRIENDLY_OFFSET bytes in front of the user portion. 'buf' points right after this space.
*_framein() routines operate in two ways: 1. some convert on the fly and place the data directly in outbuf; in this case 'samples' and 'datalen' contain the number of samples and number of bytes available in the buffer. In this case we can use a generic *_frameout() routine that simply takes whatever is there and places it into the output frame. 2. others simply store the (unconverted) samples into a working buffer, and leave the conversion task to *_frameout(). In this case, the intermediate buffer must be in the private descriptor, 'datalen' is left to 0, while 'samples' is still updated with the number of samples received.
| char* c |
the useful portion of the buffer
Definition at line 143 of file translate.h.
Referenced by lintoadpcm_frameout(), lintoalaw_framein(), dahdi_encoder_frameout(), dahdi_decoder_frameout(), lintog726aal2_framein(), lintog726_framein(), lintogsm_frameout(), lintospeex_frameout(), lintoulaw_framein(), newpvt(), and ast_trans_frameout().
| int datalen |
actual space used in outbuf
Definition at line 140 of file translate.h.
Referenced by alawtoulaw_framein(), ulawtoalaw_framein(), adpcmtolin_framein(), alawtolin_framein(), lintoalaw_framein(), ulawtolin(), dahdi_encoder_framein(), dahdi_encoder_frameout(), dahdi_decoder_framein(), dahdi_decoder_frameout(), g722tolin_framein(), lintog722_framein(), g726aal2tolin_framein(), lintog726aal2_framein(), g726tolin_framein(), lintog726_framein(), gsmtolin_framein(), ilbctolin_framein(), lpc10tolin_framein(), resample_frame(), speextolin_framein(), ulawtolin_framein(), lintoulaw_framein(), and ast_trans_frameout().
used in frameout
Definition at line 137 of file translate.h.
Referenced by dahdi_encoder_frameout(), dahdi_decoder_frameout(), lintospeex_frameout(), framein(), and ast_trans_frameout().
| int16_t* i16 |
Definition at line 145 of file translate.h.
Referenced by adpcmtolin_framein(), alawtolin_framein(), ulawtolin(), g722tolin_framein(), g726aal2tolin_framein(), g726tolin_framein(), gsmtolin_framein(), ilbctolin_framein(), lpc10tolin_framein(), resample_frame(), speextolin_framein(), and ulawtolin_framein().
| struct ast_trans_pvt* next |
next in translator chain
Definition at line 149 of file translate.h.
Referenced by ast_translator_free_path(), ast_translator_build_path(), ast_translate(), and ast_translate_path_to_str().
| struct timeval nextin |
Definition at line 150 of file translate.h.
Referenced by ast_translator_build_path(), and ast_translate().
| struct timeval nextout |
Definition at line 151 of file translate.h.
Referenced by ast_translator_build_path(), and ast_translate().
| union { ... } outbuf |
Referenced by alawtoulaw_framein(), ulawtoalaw_framein(), adpcmtolin_framein(), lintoadpcm_frameout(), alawtolin_framein(), lintoalaw_framein(), ulawtolin(), dahdi_encoder_frameout(), dahdi_decoder_frameout(), g722tolin_framein(), lintog722_framein(), g726aal2tolin_framein(), lintog726aal2_framein(), g726tolin_framein(), lintog726_framein(), gsmtolin_framein(), lintogsm_frameout(), ilbctolin_framein(), lintoilbc_frameout(), lpc10tolin_framein(), lintolpc10_frameout(), resample_frame(), speextolin_framein(), lintospeex_frameout(), ulawtolin_framein(), lintoulaw_framein(), newpvt(), and ast_trans_frameout().
optional plc pointer
Definition at line 148 of file translate.h.
| void* pvt |
more private data, if any
Definition at line 141 of file translate.h.
Referenced by adpcmtolin_framein(), lintoadpcm_framein(), lintoadpcm_frameout(), ulawtolin(), lintoulaw(), dahdi_encoder_framein(), dahdi_encoder_frameout(), dahdi_decoder_framein(), dahdi_decoder_frameout(), dahdi_destroy(), dahdi_translate(), lintog722_new(), lin16tog722_new(), g722tolin_new(), g722tolin16_new(), g722tolin_framein(), lintog722_framein(), lintog726_new(), g726aal2tolin_framein(), lintog726aal2_framein(), g726tolin_framein(), lintog726_framein(), gsm_new(), gsmtolin_framein(), lintogsm_framein(), lintogsm_frameout(), gsm_destroy_stuff(), lintoilbc_new(), ilbctolin_new(), ilbctolin_framein(), lintoilbc_framein(), lintoilbc_frameout(), lpc10_enc_new(), lpc10_dec_new(), lpc10tolin_framein(), lintolpc10_framein(), lintolpc10_frameout(), lpc10_destroy(), slin16_to_slin8_new(), slin8_to_slin16_new(), slin16_to_slin8_destroy(), slin8_to_slin16_destroy(), slin16_to_slin8_framein(), slin8_to_slin16_framein(), speex_encoder_construct(), speex_decoder_construct(), speextolin_framein(), lintospeex_framein(), lintospeex_frameout(), speextolin_destroy(), lintospeex_destroy(), newpvt(), and calc_cost().
| int samples |
samples available in outbuf
Definition at line 138 of file translate.h.
Referenced by alawtoulaw_framein(), ulawtoalaw_framein(), adpcmtolin_framein(), lintoadpcm_framein(), lintoadpcm_frameout(), alawtolin_framein(), lintoalaw_framein(), dahdi_encoder_framein(), dahdi_encoder_frameout(), dahdi_decoder_framein(), dahdi_decoder_frameout(), g722tolin_framein(), lintog722_framein(), g726aal2tolin_framein(), lintog726aal2_framein(), g726tolin_framein(), lintog726_framein(), gsmtolin_framein(), lintogsm_framein(), lintogsm_frameout(), ilbctolin_framein(), lintoilbc_framein(), lintoilbc_frameout(), lpc10tolin_framein(), lintolpc10_framein(), lintolpc10_frameout(), resample_frame(), speextolin_framein(), lintospeex_framein(), lintospeex_frameout(), ulawtolin_framein(), lintoulaw_framein(), framein(), and ast_trans_frameout().
| struct ast_translator* t |
Definition at line 136 of file translate.h.
Referenced by dahdi_encoder_frameout(), dahdi_decoder_frameout(), dahdi_new(), lintospeex_frameout(), newpvt(), destroy(), framein(), ast_trans_frameout(), ast_translator_build_path(), and ast_translate_path_to_str().
| unsigned char* uc |
the useful portion of the buffer
Definition at line 144 of file translate.h.
Referenced by alawtoulaw_framein(), ulawtoalaw_framein(), lintoilbc_frameout(), and lintolpc10_frameout().
| uint8_t* ui8 |
Definition at line 146 of file translate.h.
Referenced by lintog722_framein().