FreeSWITCH API Documentation  1.7.0
Functions | Variables
switch_bitpack.h File Reference

BITPACKING code for RFC3551 and AAL2 packing. More...

#include <switch.h>
+ Include dependency graph for switch_bitpack.h:

Go to the source code of this file.

Functions

 DoxyDefine (void switch_bitpack_init(switch_bitpack_t *pack, int32_t bitlen, switch_byte_t *buf, uint32_t buflen, switch_bitpack_mode_t mode)) static inline int8_t switch_bitpack_init(switch_bitpack_t *pack
 Initialize a bitpack object. More...
 
 memset (buf, 0, buflen)
 
static void pack_check_over (switch_bitpack_t *pack)
 
 DoxyDefine (int8_t switch_bitpack_done(switch_bitpack_t *pack)) static inline int8_t switch_bitpack_done(switch_bitpack_t *pack)
 finalize a bitpack object More...
 
 DoxyDefine (int8_t switch_bitpack_out(switch_bitpack_t *unpack, switch_byte_t in)) static inline int8_t switch_bitpack_out(switch_bitpack_t *unpack
 pull data out of a bitpack object into it's buffer More...
 
 if ((uint32_t)(unpack->cur-unpack->buf) > unpack->buflen)
 
 pack_check_over (unpack)
 
 while (unpack->bits_cur<=SWITCH_BITS_PER_BYTE)
 
 DoxyDefine (int8_t switch_bitpack_in(switch_bitpack_t *pack, switch_byte_t in)) static inline int8_t switch_bitpack_in(switch_bitpack_t *pack
 pack data into a bitpack object's buffer More...
 
 if ((uint32_t)(pack->cur-pack->buf) > pack->buflen)
 
 if (next > SWITCH_BITS_PER_BYTE)
 

Variables

static const uint8_t SWITCH_BITPACKED_MASKS [] = { 0, 1, 3, 7, 15, 31, 63, 127, 255 }
 
static const uint8_t SWITCH_REVERSE_BITPACKED_MASKS [] = { 255, 254, 252, 248, 240, 224, 192, 128 }
 
switch_byte_t bitlen
 
switch_byte_t switch_byte_tbuf = buf
 
switch_byte_t switch_byte_t
uint32_t 
buflen = buflen
 
switch_byte_t switch_byte_t
uint32_t switch_bitpack_mode_t 
mode
 
pack frame_bits = bitlen
 
pack cur = pack->buf
 
 return
 
switch_byte_t in
 
unpack bits_cur = 0
 
unpack this_byte = this_byte = in
 
pack bits_tot = pack->frame_bits
 
 else
 

Detailed Description

BITPACKING code for RFC3551 and AAL2 packing.

Definition in file switch_bitpack.h.