[asterisk-commits] phsultan: branch phsultan/rtmp-support r234093 - /team/phsultan/rtmp-support/...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 10 03:48:33 CST 2009


Author: phsultan
Date: Thu Dec 10 03:48:27 2009
New Revision: 234093

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=234093
Log:
Compatibility fix, issue #15484.

The RTMP branch needed to be updated since we expanded the codec bit range from 32 to 64.

Modified:
    team/phsultan/rtmp-support/channels/chan_rtmp.c

Modified: team/phsultan/rtmp-support/channels/chan_rtmp.c
URL: http://svnview.digium.com/svn/asterisk/team/phsultan/rtmp-support/channels/chan_rtmp.c?view=diff&rev=234093&r1=234092&r2=234093
==============================================================================
--- team/phsultan/rtmp-support/channels/chan_rtmp.c (original)
+++ team/phsultan/rtmp-support/channels/chan_rtmp.c Thu Dec 10 03:48:27 2009
@@ -230,7 +230,7 @@
 unsigned int outgoing_chunksize = RTMP_CHUNK_SIZE;
 unsigned int incoming_chunksize = RTMP_CHUNK_SIZE;
 
-static struct ast_channel *rtmp_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause);
+static struct ast_channel *rtmp_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause);
 static int rtmp_call(struct ast_channel *ast, char *dest, int timeout);
 static void rtmp_destroy_fn(void *p);
 static void rtmp_destroy(struct rtmp_pvt *p);
@@ -533,7 +533,7 @@
 	}
 
 	f.frametype = AST_FRAME_NULL;
-	f.subclass = 0;
+	f.subclass.codec = 0;
 	f.samples = 0;
 	f.datalen = 0;
 	f.data.ptr = NULL;
@@ -550,7 +550,7 @@
 	}
 
 	f.frametype = AST_FRAME_VOICE;
-	f.subclass = AST_FORMAT_SLINEAR;
+	f.subclass.codec = AST_FORMAT_SLINEAR;
 	f.samples = res / 2;
 	f.datalen = res;
 	f.data.ptr = buf;
@@ -572,8 +572,8 @@
 	}
 
 	if (frame->frametype == AST_FRAME_VOICE) {
-		if (!(frame->subclass & (AST_FORMAT_SLINEAR))) {
-			ast_log(LOG_WARNING, "Cannot handle frames in %d format\n", frame->subclass);
+		if (!(frame->subclass.codec & (AST_FORMAT_SLINEAR))) {
+			ast_log(LOG_WARNING, "Cannot handle frames in format %s\n", ast_getformatname(frame->subclass.codec));
 			return 0;
 		}
 	}
@@ -655,9 +655,9 @@
 }
 
 
-static struct ast_channel *rtmp_request(const char *type, int format, const struct ast_channel *requestor, void *data, int *cause)
+static struct ast_channel *rtmp_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause)
 {
-	int oldformat;
+	format_t oldformat;
 	struct rtmp_pvt *p;
 	struct ast_channel *tmp = NULL;
 	char *parse;
@@ -671,7 +671,7 @@
 	oldformat = format;
 	format &= (AST_FORMAT_SLINEAR);
 	if (!format) {
-		ast_log(LOG_WARNING, "Asked to get a channel of unsupported format '%d'\n", oldformat);
+		ast_log(LOG_WARNING, "Asked to get a channel of unsupported format %s\n", ast_getformatname(oldformat));
 		return NULL;
 	}
 




More information about the asterisk-commits mailing list