Fri Jun 19 12:11:00 2009

Asterisk developer's documentation


ast_trans_pvt Struct Reference

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
unsigned int destroy:1
ast_frame f
ast_trans_pvtnext
timeval nextin
timeval nextout
union {
   char *   c
   int16_t *   i16
   unsigned char *   uc
   uint8_t *   ui8
outbuf
plc_state_tplc
void * pvt
int samples
ast_translatort


Detailed Description

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.

Definition at line 137 of file translate.h.


Field Documentation

char* c

the useful portion of the buffer

Definition at line 145 of file translate.h.

Referenced by ast_trans_frameout(), dahdi_decoder_frameout(), dahdi_encoder_frameout(), lintoadpcm_frameout(), lintoalaw_framein(), lintog726_framein(), lintog726aal2_framein(), lintogsm_frameout(), and lintoulaw_framein().

int datalen

actual space used in outbuf

Definition at line 142 of file translate.h.

Referenced by adpcmtolin_framein(), alawtolin_framein(), alawtoulaw_framein(), ast_trans_frameout(), dahdi_decoder_framein(), dahdi_decoder_frameout(), dahdi_encoder_framein(), dahdi_encoder_frameout(), framein(), g722tolin_framein(), g726aal2tolin_framein(), g726tog726aal2_framein(), g726tolin_framein(), gsmtolin_framein(), ilbctolin_framein(), lintoalaw_framein(), lintog722_framein(), lintog726_framein(), lintog726aal2_framein(), lintoulaw_framein(), lpc10tolin_framein(), resample_frame(), speextolin_framein(), ulawtoalaw_framein(), ulawtolin(), and ulawtolin_framein().

unsigned int destroy

Definition at line 154 of file translate.h.

Referenced by destroy().

struct ast_frame f

used in frameout

Definition at line 139 of file translate.h.

Referenced by ast_trans_frameout(), dahdi_decoder_frameout(), dahdi_encoder_frameout(), destroy(), framein(), and lintospeex_frameout().

int16_t* i16

Definition at line 147 of file translate.h.

Referenced by adpcmtolin_framein(), alawtolin_framein(), framein(), g722tolin_framein(), g726aal2tolin_framein(), g726tolin_framein(), gsmtolin_framein(), ilbctolin_framein(), lpc10tolin_framein(), resample_frame(), speextolin_framein(), ulawtolin(), and ulawtolin_framein().

struct ast_trans_pvt* next

next in translator chain

Definition at line 151 of file translate.h.

Referenced by ast_translate(), ast_translator_build_path(), and ast_translator_free_path().

struct timeval nextin

Definition at line 152 of file translate.h.

Referenced by ast_translate(), and ast_translator_build_path().

struct timeval nextout

Definition at line 153 of file translate.h.

Referenced by ast_translate(), and ast_translator_build_path().

union { ... } outbuf

Referenced by adpcmtolin_framein(), alawtolin_framein(), alawtoulaw_framein(), ast_trans_frameout(), dahdi_decoder_frameout(), dahdi_encoder_frameout(), framein(), g722tolin_framein(), g726aal2tolin_framein(), g726tog726aal2_framein(), g726tolin_framein(), gsmtolin_framein(), ilbctolin_framein(), lintoadpcm_frameout(), lintoalaw_framein(), lintog722_framein(), lintog726_framein(), lintog726aal2_framein(), lintogsm_frameout(), lintoilbc_frameout(), lintolpc10_frameout(), lintoulaw_framein(), lpc10tolin_framein(), resample_frame(), speextolin_framein(), ulawtoalaw_framein(), ulawtolin(), and ulawtolin_framein().

plc_state_t* plc

optional plc pointer

Definition at line 150 of file translate.h.

Referenced by framein().

void* pvt

more private data, if any

Definition at line 143 of file translate.h.

Referenced by adpcmtolin_framein(), ast_translate_frame_freed(), calc_cost(), dahdi_decoder_framein(), dahdi_decoder_frameout(), dahdi_destroy(), dahdi_encoder_framein(), dahdi_encoder_frameout(), dahdi_translate(), g722tolin16_new(), g722tolin_framein(), g722tolin_new(), g726aal2tolin_framein(), g726tolin_framein(), gsm_destroy_stuff(), gsm_new(), gsmtolin_framein(), ilbctolin_framein(), ilbctolin_new(), lin16tog722_new(), lintoadpcm_framein(), lintoadpcm_frameout(), lintog722_framein(), lintog722_new(), lintog726_framein(), lintog726_new(), lintog726aal2_framein(), lintogsm_framein(), lintogsm_frameout(), lintoilbc_framein(), lintoilbc_frameout(), lintoilbc_new(), lintolpc10_framein(), lintolpc10_frameout(), lintospeex_destroy(), lintospeex_framein(), lintospeex_frameout(), lintospeex_new(), lintoulaw(), lpc10_dec_new(), lpc10_destroy(), lpc10_enc_new(), lpc10tolin_framein(), newpvt(), slin16_to_slin8_destroy(), slin16_to_slin8_framein(), slin16_to_slin8_new(), slin8_to_slin16_destroy(), slin8_to_slin16_framein(), slin8_to_slin16_new(), speextolin_destroy(), speextolin_framein(), speextolin_new(), and ulawtolin().

int samples

samples available in outbuf

Definition at line 140 of file translate.h.

Referenced by adpcmtolin_framein(), alawtolin_framein(), alawtoulaw_framein(), ast_trans_frameout(), dahdi_decoder_framein(), dahdi_decoder_frameout(), dahdi_encoder_framein(), dahdi_encoder_frameout(), framein(), g722tolin_framein(), g726aal2tolin_framein(), g726tog726aal2_framein(), g726tolin_framein(), gsmtolin_framein(), ilbctolin_framein(), lintoadpcm_framein(), lintoadpcm_frameout(), lintoalaw_framein(), lintog722_framein(), lintog726_framein(), lintog726aal2_framein(), lintogsm_framein(), lintogsm_frameout(), lintoilbc_framein(), lintoilbc_frameout(), lintolpc10_framein(), lintolpc10_frameout(), lintospeex_framein(), lintospeex_frameout(), lintoulaw_framein(), lpc10tolin_framein(), resample_frame(), speextolin_framein(), ulawtoalaw_framein(), and ulawtolin_framein().

struct ast_translator* t

Definition at line 138 of file translate.h.

Referenced by ast_trans_frameout(), ast_translator_build_path(), dahdi_decoder_frameout(), dahdi_encoder_frameout(), dahdi_new(), destroy(), framein(), and newpvt().

unsigned char* uc

the useful portion of the buffer

Definition at line 146 of file translate.h.

Referenced by alawtoulaw_framein(), g726tog726aal2_framein(), lintoilbc_frameout(), lintolpc10_frameout(), and ulawtoalaw_framein().

uint8_t* ui8

Definition at line 148 of file translate.h.

Referenced by lintog722_framein().


The documentation for this struct was generated from the following file:
Generated on Fri Jun 19 12:11:00 2009 for Asterisk - the Open Source PBX by  doxygen 1.4.7