git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@863 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale
2006-03-17 14:47:41 +00:00
parent a2c448e118
commit 8d056f524f
3 changed files with 204 additions and 105 deletions

View File

@@ -189,7 +189,7 @@ static switch_status switch_g729_decode(switch_codec *codec,
} else {
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "yo this frame is an odd size [%d]\n", encoded_data_len);
return SWITCH_STATUS_FALSE;
}
@@ -202,6 +202,22 @@ static switch_status switch_g729_decode(switch_codec *codec,
/* Registration */
static const switch_codec_implementation g729_10ms_8k_implementation = {
/*.samples_per_second */ 8000,
/*.bits_per_second */ 32000,
/*.microseconds_per_frame */ 10000,
/*.samples_per_frame */ 80,
/*.bytes_per_frame */ 160,
/*.encoded_bytes_per_frame */ 10,
/*.number_of_channels */ 1,
/*.pref_frames_per_packet */ 1,
/*.max_frames_per_packet */ 1,
/*.init */ switch_g729_init,
/*.encode */ switch_g729_encode,
/*.decode */ switch_g729_decode,
/*.destroy */ switch_g729_destroy,
};
static const switch_codec_implementation g729_8k_implementation = {
/*.samples_per_second */ 8000,
/*.bits_per_second */ 64000,
@@ -216,6 +232,7 @@ static const switch_codec_implementation g729_8k_implementation = {
/*.encode */ switch_g729_encode,
/*.decode */ switch_g729_decode,
/*.destroy */ switch_g729_destroy,
&g729_10ms_8k_implementation
};