[asterisk-commits] rizzo: trunk r94904 - in /trunk/channels: console_gui.c console_video.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Dec 27 11:26:17 CST 2007


Author: rizzo
Date: Thu Dec 27 11:26:16 2007
New Revision: 94904

URL: http://svn.digium.com/view/asterisk?view=rev&rev=94904
Log:
more localization of gui stuff


Modified:
    trunk/channels/console_gui.c
    trunk/channels/console_video.c

Modified: trunk/channels/console_gui.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/console_gui.c?view=diff&rev=94904&r1=94903&r2=94904
==============================================================================
--- trunk/channels/console_gui.c (original)
+++ trunk/channels/console_gui.c Thu Dec 27 11:26:16 2007
@@ -744,7 +744,6 @@
 	int depth, maxw, maxh;
 	const SDL_VideoInfo *info;
 	int kp_w = 0, kp_h = 0;	/* keypad width and height */
-	int sdl_ok = 0;
 	struct gui_info *gui = env->gui;
 
 	/*
@@ -775,9 +774,6 @@
 		env->gui = gui = gui_init();
 	if (!gui)
 		goto no_sdl;
-	/* initialize grab coordinates */
-	env->out.loc_src.x = 0;
-	env->out.loc_src.y = 0;
 
 	keypad_setup(gui, env->keypad_file);
 #if 0
@@ -811,7 +807,7 @@
 	/* display the skin, but do not free it as we need it later to
 	 * restore text areas and maybe sliders too.
 	 */
-	if (gui && gui->keypad) {
+	if (gui->keypad) {
 		struct SDL_Rect *dest = &gui->win[WIN_KEYPAD].rect;
 		dest->x = 2*BORDER + env->in.rem_dpy.w;
 		dest->y = BORDER;
@@ -820,13 +816,11 @@
 		SDL_BlitSurface(gui->keypad, NULL, gui->screen, dest);
 		SDL_UpdateRects(gui->screen, 1, dest);
 	}
-	env->in.dec_in_cur = &env->in.dec_in[0];
-	env->in.dec_in_dpy = NULL;	/* nothing to display */
-	sdl_ok = 1;
+	return;
 
 no_sdl:
-	if (!sdl_ok)	/* free resources in case of errors */
-		env->gui = cleanup_sdl(gui);
+	/* free resources in case of errors */
+	env->gui = cleanup_sdl(gui);
 }
 
 /*

Modified: trunk/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/console_video.c?view=diff&rev=94904&r1=94903&r2=94904
==============================================================================
--- trunk/channels/console_video.c (original)
+++ trunk/channels/console_video.c Thu Dec 27 11:26:16 2007
@@ -1079,9 +1079,17 @@
 		}
 	}
 	sdl_setup(env);
-	ast_mutex_init(&env->in.dec_in_lock);
 	if (!ast_strlen_zero(save_display))
 		setenv("DISPLAY", save_display, 1);
+
+        /* initialize grab coordinates */
+        env->out.loc_src.x = 0;
+        env->out.loc_src.y = 0;
+
+	/* reset the pointers to the current decoded image */
+	env->in.dec_in_cur = &env->in.dec_in[0];
+	env->in.dec_in_dpy = NULL;	/* nothing to display */
+	ast_mutex_init(&env->in.dec_in_lock);	/* used to sync decoder and renderer */
 
 	if (video_open(&env->out)) {
 		ast_log(LOG_WARNING, "cannot open local video source\n");




More information about the asterisk-commits mailing list