codec_g722.c - translate between signed linear and ITU G.722-64kbps  
More...
Go to the source code of this file.
codec_g722.c - translate between signed linear and ITU G.722-64kbps 
- Author
- Matthew Fredrickson cresl.nosp@m.in@d.nosp@m.igium.nosp@m..com 
- 
Russell Bryant russe.nosp@m.ll@d.nosp@m.igium.nosp@m..com
Definition in file codec_g722.c.
◆ BUF_SHIFT
◆ BUFFER_SAMPLES
      
        
          | #define BUFFER_SAMPLES   8096	/* size for the translation buffers */ | 
      
 
 
◆ __reg_module()
  
  | 
        
          | static void __reg_module | ( | void |  | ) |  |  | static | 
 
 
◆ __unreg_module()
  
  | 
        
          | static void __unreg_module | ( | void |  | ) |  |  | static | 
 
 
◆ AST_MODULE_SELF_SYM()
◆ g722tolin16_new()
◆ g722tolin_framein()
Definition at line 103 of file codec_g722.c.
  104{
  106    int out_samples;
  107    int in_samples;
  108 
  109    
  111 
  113        (uint8_t *) f->
data.
ptr, in_samples);
 
  114 
  116 
  117    pvt->
datalen += (out_samples * 
sizeof(int16_t));
 
  118 
  119    return 0;
  120}
int g722_decode(g722_decode_state_t *s, int16_t amp[], const uint8_t g722_data[], int len)
union ast_frame::@239 data
union ast_trans_pvt::@308 outbuf
int datalen
actual space used in outbuf
References ast_frame::data, ast_trans_pvt::datalen, g722_decoder_pvt::g722, g722_decode(), ast_trans_pvt::i16, ast_trans_pvt::outbuf, ast_frame::ptr, ast_trans_pvt::pvt, ast_frame::samples, and ast_trans_pvt::samples.
 
 
◆ g722tolin_new()
◆ lin16tog722_new()
◆ lintog722_framein()
Definition at line 122 of file codec_g722.c.
  123{
  125    int outlen;
  126 
  129 
  131 
  133 
  134    return 0;
  135}
int g722_encode(g722_encode_state_t *s, uint8_t g722_data[], const int16_t amp[], int len)
References ast_frame::data, ast_trans_pvt::datalen, g722_encoder_pvt::g722, g722_encode(), ast_trans_pvt::outbuf, ast_frame::ptr, ast_trans_pvt::pvt, ast_frame::samples, ast_trans_pvt::samples, and ast_trans_pvt::ui8.
 
 
◆ lintog722_new()
◆ load_module()
  
  | 
        
          | static int load_module | ( | void |  | ) |  |  | static | 
 
 
◆ unload_module()
  
  | 
        
          | static int unload_module | ( | void |  | ) |  |  | static | 
 
 
◆ __mod_info
◆ ast_module_info
◆ g722tolin
Definition at line 137 of file codec_g722.c.
  137                                         {
  138    .name = "g722tolin",
  139    .src_codec = {
  140        .name = "g722",
  142        .sample_rate = 16000,
  143    },
  144    .dst_codec = {
  145        .name = "slin",
  147        .sample_rate = 8000,
  148    },
  149    .format = "slin",
  156};
static int g722tolin_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
static int g722tolin_new(struct ast_trans_pvt *pvt)
init a new instance of g722_encoder_pvt.
static struct ast_frame * g722_sample(void)
Referenced by load_module(), and unload_module().
 
 
◆ g722tolin16
Definition at line 179 of file codec_g722.c.
  179                                           {
  180    .name = "g722tolin16",
  181    .src_codec = {
  182        .name = "g722",
  184        .sample_rate = 16000,
  185    },
  186    .dst_codec = {
  187        .name = "slin",
  189        .sample_rate = 16000,
  190    },
  191    .format = "slin16",
  198};
static int g722tolin16_new(struct ast_trans_pvt *pvt)
Referenced by load_module(), and unload_module().
 
 
◆ lin16tog722
Definition at line 200 of file codec_g722.c.
  200                                           {
  201    .name = "lin16tog722",
  202    .src_codec = {
  203        .name = "slin",
  205        .sample_rate = 16000,
  206    },
  207    .dst_codec = {
  208        .name = "g722",
  210        .sample_rate = 16000,
  211    },
  212    .format = "g722",
  219};
static int lintog722_framein(struct ast_trans_pvt *pvt, struct ast_frame *f)
static int lin16tog722_new(struct ast_trans_pvt *pvt)
static struct ast_frame * slin16_sample(void)
Referenced by load_module(), and unload_module().
 
 
◆ lintog722
Definition at line 158 of file codec_g722.c.
  158                                         {
  159    .name = "lintog722",
  160    .src_codec = {
  161        .name = "slin",
  163        .sample_rate = 8000,
  164    },
  165    .dst_codec = {
  166        .name = "g722",
  168        .sample_rate = 16000,
  169    },
  170    .format = "g722",
  177};
static int lintog722_new(struct ast_trans_pvt *pvt)
init a new instance of g722_encoder_pvt.
static struct ast_frame * slin8_sample(void)
Referenced by load_module(), and unload_module().