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

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Sep 14 05:53:20 CDT 2007


Author: rizzo
Date: Fri Sep 14 05:53:20 2007
New Revision: 82370

URL: http://svn.digium.com/view/asterisk?view=rev&rev=82370
Log:
snapshot current code

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

Modified: team/rizzo/video_v2/channels/chan_oss.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_v2/channels/chan_oss.c?view=diff&rev=82370&r1=82369&r2=82370
==============================================================================
--- team/rizzo/video_v2/channels/chan_oss.c (original)
+++ team/rizzo/video_v2/channels/chan_oss.c Fri Sep 14 05:53:20 2007
@@ -1069,6 +1069,7 @@
 			/* XXX what about the channel itself ? */
 		}
 	}
+	fprintf(stderr, "buf.data: %p\n", get_video_desc(c)->out.buf.data);
 	console_video_start(get_video_desc(c), o->owner); /* XXX cleanup */
 
 	return 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=82370&r1=82369&r2=82370
==============================================================================
--- team/rizzo/video_v2/channels/console_video.c (original)
+++ team/rizzo/video_v2/channels/console_video.c Fri Sep 14 05:53:20 2007
@@ -176,6 +176,10 @@
 	v->w = env->w;
 	v->h = env->h;
 	v->fps = env->fps;
+	if (v->fps == 0) {
+		ast_log(LOG_WARNING, "fps unset, forcing to 5\n");
+		v->fps = env->fps = 5;
+	}
 
 	if (v->buf.data)	/* buffer allocated means device already open */
 		return v->fd;
@@ -476,7 +480,6 @@
 		return;
 
 	env->screen = NULL;
-	env->initialized = 0;
 	env->bmp[0] = env->bmp[1] = NULL;
 
 	// SDL specific
@@ -728,8 +731,7 @@
 	struct timeval now = ast_tvnow();
 	int i;
 
-	if(!env->initialized)
-		ffmpeg_init(env, f->subclass);
+	ffmpeg_init(env, f->subclass);
 	if(!env->initialized)
 		return -1;	/* error */
 
@@ -832,7 +834,7 @@
 	}
 #else
 	uint8_t *p, *ret = NULL;
-
+	fprintf(stderr, "begin %p end %p\n", begin, end);
 	if(begin == end) return NULL;
 	for(p = begin; p < end-2; ++p) {
 		if(p[0] == 0 && p[1] == 0) {
@@ -980,13 +982,13 @@
 	fprintf(stderr, "webcam_open\n");
 	webcam_open(env);
 	fprintf(stderr, "ffmpeg_init\n");
-	//ffmpeg_init(env, CONSOLE_FORMAT_VIDEO);
+	ffmpeg_init(env, CONSOLE_FORMAT_VIDEO);
 	if (env->out.buf.data && owner) {  /* drive webcam */
 		owner->fds[1] = env->out.fd;
 		fprintf(stderr, "video_out_init\n");
 		video_out_init(&env->out, CONSOLE_FORMAT_VIDEO);
 	}
-	ast_log(LOG_VERBOSE, "console_video_start owner %p", owner);
+	ast_log(LOG_WARNING, "console_video_start owner %p", owner);
 	env->out.ts = ast_tvnow(); 
 }
 #endif	/* video support */




More information about the asterisk-commits mailing list