[asterisk-commits] branch file/coremedia - r7417 in /team/file/coremedia: ./ codecs/ include/ast...

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Dec 9 19:20:36 CST 2005


Author: file
Date: Fri Dec  9 19:20:33 2005
New Revision: 7417

URL: http://svn.digium.com/view/asterisk?rev=7417&view=rev
Log:
Added ability for codecs to set more information about themselves for the SDP, as well fixed a segfault issue when dealing with reverse API compatibility of signed linear in applications

Modified:
    team/file/coremedia/codecs/codec_alaw.c
    team/file/coremedia/codecs/codec_gsm.c
    team/file/coremedia/codecs/codec_ulaw.c
    team/file/coremedia/coremedia.c
    team/file/coremedia/include/asterisk/coremedia.h

Modified: team/file/coremedia/codecs/codec_alaw.c
URL: http://svn.digium.com/view/asterisk/team/file/coremedia/codecs/codec_alaw.c?rev=7417&r1=7416&r2=7417&view=diff
==============================================================================
--- team/file/coremedia/codecs/codec_alaw.c (original)
+++ team/file/coremedia/codecs/codec_alaw.c Fri Dec  9 19:20:33 2005
@@ -313,6 +313,7 @@
     8,
     0,
     8000,
+    NULL,
     "alaw",
   };
 

Modified: team/file/coremedia/codecs/codec_gsm.c
URL: http://svn.digium.com/view/asterisk/team/file/coremedia/codecs/codec_gsm.c?rev=7417&r1=7416&r2=7417&view=diff
==============================================================================
--- team/file/coremedia/codecs/codec_gsm.c (original)
+++ team/file/coremedia/codecs/codec_gsm.c Fri Dec  9 19:20:33 2005
@@ -265,6 +265,7 @@
     3,
     0,
     8000,
+    NULL,
     "gsm",
   };
 

Modified: team/file/coremedia/codecs/codec_ulaw.c
URL: http://svn.digium.com/view/asterisk/team/file/coremedia/codecs/codec_ulaw.c?rev=7417&r1=7416&r2=7417&view=diff
==============================================================================
--- team/file/coremedia/codecs/codec_ulaw.c (original)
+++ team/file/coremedia/codecs/codec_ulaw.c Fri Dec  9 19:20:33 2005
@@ -324,6 +324,7 @@
     0,
     0,
     8000,
+    NULL,
     "ulaw",
   };
 

Modified: team/file/coremedia/coremedia.c
URL: http://svn.digium.com/view/asterisk/team/file/coremedia/coremedia.c?rev=7417&r1=7416&r2=7417&view=diff
==============================================================================
--- team/file/coremedia/coremedia.c (original)
+++ team/file/coremedia/coremedia.c Fri Dec  9 19:20:33 2005
@@ -52,31 +52,32 @@
 static int dynamic_payload = 96;
 
 static struct ast_coremedia_entry slinear_entry = { "slinear",
-	TYPE_AUDIO,
-	0,
-	8000,
-	AST_FORMAT_SLINEAR,
+						    TYPE_AUDIO,
+						    0,
+						    8000,
+						    AST_FORMAT_SLINEAR,
 };
 
 /* Integrated telephone-event */
 static struct ast_coremedia_entry telephone_event = { "telephone-event",
-	TYPE_DTMF,
-	0,
-	8000,
+						      TYPE_DTMF,
+						      0,
+						      8000,
 };
 
 static struct ast_coremedia_rtp rfc2833_rtp = { "telephone-event",
-	101,
-	0,
-	8000,
-	"telephone-event",
+						101,
+						0,
+						8000,
+						"0-15",
+						"telephone-event",
 };
 
 /* Integrated cisco-event */
 static struct ast_coremedia_entry cisco_event = { "cisco-event",
-	TYPE_DTMF,
-	0,
-	8000,
+						  TYPE_DTMF,
+						  0,
+						  8000,
 };
 
 /* Initialize the coremedia system */
@@ -364,13 +365,15 @@
 	if (decoder != NULL) {
 		new_path->decoder = decoder->decoder;
 		new_path->decoder_entry = decoder;
-		new_path->dec_state = new_path->decoder->newpvt();
+		if (new_path->decoder != NULL)
+			new_path->dec_state = new_path->decoder->newpvt();
 	}
 	/* Setup the encoder if present - if not we just return signed linear audio from above decoder */
 	if (encoder != NULL) {
 		new_path->encoder = encoder->encoder;
 		new_path->encoder_entry = encoder;
-		new_path->enc_state = new_path->encoder->newpvt();
+		if (new_path->encoder != NULL)
+			new_path->enc_state = new_path->encoder->newpvt();
 	}
 
 	/* Now setup the timing */

Modified: team/file/coremedia/include/asterisk/coremedia.h
URL: http://svn.digium.com/view/asterisk/team/file/coremedia/include/asterisk/coremedia.h?rev=7417&r1=7416&r2=7417&view=diff
==============================================================================
--- team/file/coremedia/include/asterisk/coremedia.h (original)
+++ team/file/coremedia/include/asterisk/coremedia.h Fri Dec  9 19:20:33 2005
@@ -54,6 +54,8 @@
 		int bitrate;
 		/*! Sample Rate */
 		int sample_rate;
+		/*! Additional SDP information */
+		char *fmtp;
 		/*! Name of coremedia entry */
 		char *entry_name;
 		/*! Registered coremedia entry */



More information about the asterisk-commits mailing list