[asterisk-commits] kpfleming: branch oej/videocaps r148464 - in /team/oej/videocaps: channels/ m...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 13 05:23:57 CDT 2008


Author: kpfleming
Date: Mon Oct 13 05:23:57 2008
New Revision: 148464

URL: http://svn.digium.com/view/asterisk?view=rev&rev=148464
Log:
fix a few problems found by --enable-dev-mode

Modified:
    team/oej/videocaps/channels/chan_sip.c
    team/oej/videocaps/main/capability.c

Modified: team/oej/videocaps/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/channels/chan_sip.c?view=diff&rev=148464&r1=148463&r2=148464
==============================================================================
--- team/oej/videocaps/channels/chan_sip.c (original)
+++ team/oej/videocaps/channels/chan_sip.c Mon Oct 13 05:23:57 2008
@@ -1945,9 +1945,9 @@
 static int process_h2613_fmtp(const char *fmtstr, struct ast_h2613_video_cap *vidcap, unsigned int framerate);
 static int process_h264_fmtp(const char *fmtstr, struct ast_h264_video_cap *vidcap, int framerate);
 static int process_sdp(struct sip_pvt *p, struct sip_request *req, int t38action);
-static void ast_build_h2613_fmtp(struct ast_str **buf, int rtp_code, struct ast_h2613_video_cap *video_cap);
-static void ast_build_h264_fmtp(struct ast_str **buf, int rtp_code, struct ast_h264_video_cap *video_cap);
-static void ast_build_mp4v_fmtp(struct ast_str **buf, int rtp_code, struct ast_h264_video_cap *video_cap);
+static void ast_build_h2613_fmtp(struct ast_str **buf, int rtp_code, const struct ast_h2613_video_cap *video_cap);
+static void ast_build_h264_fmtp(struct ast_str **buf, int rtp_code, const struct ast_h264_video_cap *video_cap);
+static void ast_build_mp4v_fmtp(struct ast_str **buf, int rtp_code, const struct ast_h264_video_cap *video_cap);
 static void add_codec_to_sdp(const struct sip_pvt *p, int codec, int sample_rate,
 			     struct ast_str **m_buf, struct ast_str **a_buf,
 			     int debug, int *min_packet_size);
@@ -6767,7 +6767,7 @@
 	
 	parse = ast_strdupa(fmtstr);
 	/* Get the fmtp: and payload type out of the way */
-	for ((loop_str = strsep(&parse, sep)); loop_str; (loop_str = strsep(&parse, sep)) != NULL) {
+	for (loop_str = strsep(&parse, sep); loop_str; loop_str = strsep(&parse, sep)) {
 		if((equals = strchr(loop_str, '='))==NULL)
 			return -1;
 		found = 0;
@@ -6832,7 +6832,7 @@
 	parse = ast_strdupa(fmtstr);
 	
 	/* Get the fmtp: and payload type out of the way */
-	for ((loop_str = strsep(&parse, sep)); loop_str; (loop_str = strsep(&parse, sep)) != NULL) {
+	for (loop_str = strsep(&parse, sep); loop_str; loop_str = strsep(&parse, sep)) {
 		if (loop_str[0] == '\0') {
 			loop_str++;
 			continue;
@@ -7449,9 +7449,10 @@
 					}
 				} else if (!strncasecmp(mimeSubtype, "RED", 3)) { /* Text with Redudancy */
 					if (p->trtp) {
+						int res = ast_rtp_set_rtpmap_type(newtextrtp, codec, "text", mimeSubtype, 0);
+
 						if (debug) 
 							ast_verbose("Adding t140-red mimeSubtype to textrtp struct\n");
-						int res = ast_rtp_set_rtpmap_type(newtextrtp, codec, "text", mimeSubtype, 0);
 						if (res == -1) {
 							ast_debug(2, "***** FAILED setting T140 red mime type!!! \n");
 						} else {
@@ -8582,7 +8583,7 @@
 }
 
 /*! \brief Build fmtp headers for H261, H263, H263+ video */
-static void ast_build_h2613_fmtp(struct ast_str **buf, int rtp_code, struct ast_h2613_video_cap *video_cap)
+static void ast_build_h2613_fmtp(struct ast_str **buf, int rtp_code, const struct ast_h2613_video_cap *video_cap)
 {
         int i;
 	char tab[30]="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
@@ -8636,7 +8637,7 @@
 }
 
 /*! \brief Build fmtp headers for H264 video */
-static void ast_build_h264_fmtp(struct ast_str **buf, int rtp_code, struct ast_h264_video_cap *video_cap)
+static void ast_build_h264_fmtp(struct ast_str **buf, int rtp_code, const struct ast_h264_video_cap *video_cap)
 {
 	/* ast_build_string(a_buf, a_size, "a=fmtp:%d profile-level-id=42800C; packetization-mode=0; max-br=384; max-mbps=10000\r\n", rtp_code); */
 	
@@ -8655,7 +8656,7 @@
 }
 
 /*! \brief Build fmtp headers for MPEG4 video */
-static void ast_build_mp4v_fmtp(struct ast_str **buf, int rtp_code, struct ast_h264_video_cap *video_cap)
+static void ast_build_mp4v_fmtp(struct ast_str **buf, int rtp_code, const struct ast_h264_video_cap *video_cap)
 {
 	
 	int profile_level = 0;
@@ -8740,16 +8741,16 @@
 	if (codec == AST_FORMAT_H261) {
 		if (sipdebug_caps)
 			ast_verbose("Adding h261 fmtp\n");
-		ast_build_h2613_fmtp(a_buf, rtp_code, (struct ast_h2613_video_cap*)&p->jointcaps.h261);
+		ast_build_h2613_fmtp(a_buf, rtp_code, &p->jointcaps.h261);
 	} else if (codec == AST_FORMAT_H263) {
 		if (sipdebug_caps)
 			ast_verbose("Adding h263 fmtp\n");
-		ast_build_h2613_fmtp(a_buf, rtp_code, (struct ast_h2613_video_cap*)&p->jointcaps.h263);
+		ast_build_h2613_fmtp(a_buf, rtp_code, &p->jointcaps.h263);
 	} else if (codec == AST_FORMAT_H264) {
 		if (sipdebug_caps) {
 			ast_verbose("Adding h264 fmtp with rtpnum %d\n", p->jointcaps.h264.rtpnum);
 		}
-		ast_build_h264_fmtp(a_buf, rtp_code, (struct ast_h264_video_cap*)&p->jointcaps.h264);
+		ast_build_h264_fmtp(a_buf, rtp_code, &p->jointcaps.h264);
         } else if (codec == AST_FORMAT_MP4_VIDEO) {
 		if (sipdebug_caps)
                         ast_verbose("Adding MP4v fmtp with rtpnum %d\n",p->jointcaps.mp4v.rtpnum);

Modified: team/oej/videocaps/main/capability.c
URL: http://svn.digium.com/view/asterisk/team/oej/videocaps/main/capability.c?view=diff&rev=148464&r1=148463&r2=148464
==============================================================================
--- team/oej/videocaps/main/capability.c (original)
+++ team/oej/videocaps/main/capability.c Mon Oct 13 05:23:57 2008
@@ -476,7 +476,7 @@
 
 	parse = ast_strdupa(fmtstr);
 	/* Get the fmtp: and payload type out of the way */
-	for ((loop_str = strsep(&parse, sep)); loop_str; (loop_str = strsep(&parse, sep)) != NULL) {
+	for (loop_str = strsep(&parse, sep); loop_str; loop_str = strsep(&parse, sep)) {
 
 		/* H263+ related */
 	       if (loop_str[0] == '\0') {
@@ -566,7 +566,7 @@
 	parse = ast_strdupa(fmtstr);
 	
 	/* Get the fmtp: and payload type out of the way */
-	for ((loop_str = strsep(&parse, sep)); loop_str; (loop_str = strsep(&parse, sep)) != NULL) {
+	for (loop_str = strsep(&parse, sep); loop_str; loop_str = strsep(&parse, sep)) {
 		if (loop_str[0] == '\0') {
 			loop_str++;
 			continue;




More information about the asterisk-commits mailing list