[asterisk-commits] rizzo: branch rizzo/video_v2 r82374 - /team/rizzo/video_v2/channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 14 08:47:51 CDT 2007


Author: rizzo
Date: Fri Sep 14 08:47:50 2007
New Revision: 82374

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82374
Log:
add some debugging on the receive path

Modified:
    team/rizzo/video_v2/channels/console_video.c

Modified: team/rizzo/video_v2/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_v2/channels/console_video.c?view=diff&rev=82374&r1=82373&r2=82374
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Fri Sep 14 08:47:50 2007
@@ -711,6 +711,7 @@
 	struct timeval now = ast_tvnow();
 	int i;
 
+	ast_log(LOG_WARNING, "received video frame %d\n", f->seqno);
 	if(!env->initialized) {
 		ast_log(LOG_WARNING, "here env should be already initialized\n");
 		return -1;	/* error */
@@ -754,7 +755,9 @@
 			env->in.buf.used = 0;
 			env->in.lastrxframe = f->seqno;
 			env->in.discard = 0;
+			ast_log(LOG_WARNING, "out of discard mode, frame %d\n", f->seqno);
 		}
+		ast_log(LOG_WARNING, "discard mode, drop frame %d\n", f->seqno);
 		return 0;
 	}
 
@@ -764,6 +767,8 @@
 	* (seqno is a 16 bits number)
 	*/
 	if((env->in.lastrxframe+1)%0x10000 != f->seqno && env->in.lastrxframe != -1) {
+		ast_log(LOG_WARNING, "discarding frame out of order, %d %d\n",
+			env->in.lastrxframe, f->seqno);
 		env->in.discard = 1;
 		return 0;
 	}
@@ -988,8 +993,9 @@
 	show_frame(env, 1);
 
 	if (env->out.buf.data && owner) {  /* drive webcam */
-		owner->fds[1] = env->out.fd;
-		fprintf(stderr, "video_out_init\n");
+		if (env->out.fd >= 0)
+			ast_channel_set_fd(owner, 1, env->out.fd);
+		fprintf(stderr, "video_out_init fd %d\n", env->out.fd);
 		video_out_init(&env->out, CONSOLE_FORMAT_VIDEO);
 	}
 	ast_log(LOG_WARNING, "console_video_start owner %p", owner);




More information about the asterisk-commits mailing list