Wed Oct 28 11:53:51 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>

Collaboration diagram for ast_trans_pvt:

Collaboration graph
[legend]

Data Fields

int datalen
 actual space used in outbuf
struct ast_frame f
struct ast_trans_pvtnext
struct timeval nextin
struct timeval nextout
union {
   char *   c
   int16_t *   i16
   unsigned char *   uc
   uint8_t *   ui8
outbuf
plc_state_tplc
void * pvt
int samples
struct 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

int datalen

struct ast_frame f [read]

used in frameout

Definition at line 139 of file translate.h.

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

int16_t* i16

struct ast_trans_pvt* next [read]

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 [read]

Definition at line 152 of file translate.h.

Referenced by ast_translate(), and ast_translator_build_path().

struct timeval nextout [read]

Definition at line 153 of file translate.h.

Referenced by ast_translate(), and ast_translator_build_path().

union { ... } outbuf

optional plc pointer

Definition at line 150 of file translate.h.

Referenced by framein(), and newpvt().

void* pvt

int samples

struct ast_translator* t [read]

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 Wed Oct 28 11:53:52 2009 for Asterisk - the Open Source PBX by  doxygen 1.5.6