[Asterisk-video] Record 3GP files (only with AMRNB)
Borja SIXTO
borja.sixto at i6net.com
Mon Jun 9 10:47:15 CDT 2008
Hi Sergio,
Here a new path.
3GP is a strict format (not allow linear codecs).
We can lock the audio codec to AMRNB (for the .3gp files) in the mp4save
application with :
/* Lock module */
u = ast_module_user_add(chan);
int length = strlen(data);
if (!strcmp(&data[length - 4], ".3gp"))
{
if (ast_set_read_format(chan, AST_FORMAT_AMRNB))
ast_log(LOG_WARNING, "mp4_save: Unable to set read format to
AMRNB!\n");
}
else
{
if (ast_set_read_format(chan,
AST_FORMAT_ULAW|AST_FORMAT_ALAW|AST_FORMAT_AMRNB))
ast_log(LOG_WARNING, "mp4_save: Unable to set read format to
ULAW|ALAW|AMRNB!\n");
}
/* Send video update */
ast_indicate(chan, AST_CONTROL_VIDUPDATE);
The permisive format can be mp4 extension.
Regards,
Tech from i6net
More information about the asterisk-video
mailing list