[asterisk-commits] rizzo: branch rizzo/video_console r126419 - /team/rizzo/video_console/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jun 29 13:24:13 CDT 2008
Author: rizzo
Date: Sun Jun 29 13:24:12 2008
New Revision: 126419
URL: http://svn.digium.com/view/asterisk?view=rev&rev=126419
Log:
add a parameter to cleanup_sdl() so it does not need to play
with the entire descriptor.
Align labels in the video device status windows
some whitespace changes to reduce diffs with trunk
Modified:
team/rizzo/video_console/channels/console_gui.c
team/rizzo/video_console/channels/console_video.c
team/rizzo/video_console/channels/console_video.h
Modified: team/rizzo/video_console/channels/console_gui.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_console/channels/console_gui.c?view=diff&rev=126419&r1=126418&r2=126419
==============================================================================
--- team/rizzo/video_console/channels/console_gui.c (original)
+++ team/rizzo/video_console/channels/console_gui.c Sun Jun 29 13:24:12 2008
@@ -92,7 +92,7 @@
#ifndef HAVE_SDL /* stubs if we don't have any sdl */
static void show_frame(struct video_desc *env, int out) {}
static void sdl_setup(struct video_desc *env) {}
-static struct gui_info *cleanup_sdl(struct video_desc *env) { return NULL; }
+static struct gui_info *cleanup_sdl(struct gui_info* g, int n) { return NULL; }
static void eventhandler(struct video_desc *env, const char *caption) {}
static int keypad_cfg_read(struct gui_info *gui, const char *val) { return 0; }
@@ -176,12 +176,10 @@
/*! \brief free the resources in struct gui_info and the descriptor itself.
* Return NULL so we can assign the value back to the descriptor in case.
- * XXX fix the argument, should only use env->gui and the number of boards
- */
-static struct gui_info *cleanup_sdl(struct video_desc *env)
+ */
+static struct gui_info *cleanup_sdl(struct gui_info *gui, int device_num)
{
int i;
- struct gui_info *gui = env->gui;
if (gui == NULL)
return NULL;
@@ -214,7 +212,7 @@
delete_board(gui->bd_msg);
/* deallocates the space allocated for the thumbnail message boards */
- for (i = 0; i < env->out.device_num; i++) {
+ for (i = 0; i < device_num; i++) {
if (gui->thumb_bd_array[i].board) /* may be useless */
delete_board(gui->thumb_bd_array[i].board);
}
@@ -234,13 +232,13 @@
#define IS_ON 4
char* src_msgs[] = {
- " OFF",
- "1 OFF",
- " 2 OFF",
+ " OFF",
+ "1 OFF",
+ " 2 OFF",
"1+2 OFF",
- " ON",
- "1 ON",
- " 2 ON",
+ " ON",
+ "1 ON",
+ " 2 ON",
"1+2 ON",
};
/*
@@ -807,6 +805,7 @@
case KEY_OUT_OF_KEYPAD:
ast_log(LOG_WARNING, "nothing clicked, coordinates: %d, %d\n", button.x, button.y);
break;
+
case KEY_DIGIT_BACKGROUND:
break;
@@ -1457,7 +1456,7 @@
no_sdl:
/* free resources in case of errors */
- env->gui = cleanup_sdl(env);
+ env->gui = cleanup_sdl(gui, env->out.device_num);
}
/*
Modified: team/rizzo/video_console/channels/console_video.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_console/channels/console_video.c?view=diff&rev=126419&r1=126418&r2=126419
==============================================================================
--- team/rizzo/video_console/channels/console_video.c (original)
+++ team/rizzo/video_console/channels/console_video.c Sun Jun 29 13:24:12 2008
@@ -981,7 +981,7 @@
video_out_uninit(env);
if (env->gui)
- env->gui = cleanup_sdl(env); /* XXX argument */
+ env->gui = cleanup_sdl(env->gui, env->out.device_num);
ast_mutex_destroy(&env->dec_lock);
env->shutdown = 0;
return NULL;
Modified: team/rizzo/video_console/channels/console_video.h
URL: http://svn.digium.com/view/asterisk/team/rizzo/video_console/channels/console_video.h?view=diff&rev=126419&r1=126418&r2=126419
==============================================================================
--- team/rizzo/video_console/channels/console_video.h (original)
+++ team/rizzo/video_console/channels/console_video.h Sun Jun 29 13:24:12 2008
@@ -43,8 +43,8 @@
#endif /* HAVE_VIDEO_CONSOLE and others */
-#define SRC_WIN_W 80 /* width of the additional device windows */
-#define SRC_WIN_H 60 /* height of the additional device windows */
+#define SRC_WIN_W 80 /* width of video thumbnails */
+#define SRC_WIN_H 60 /* height of video thumbnails */
/* we only support a limited number of video sources in the GUI,
* because we need screen estate to switch between them.
*/
@@ -67,9 +67,10 @@
int w; /* size */
int h;
int pix_fmt;
- int win_x; /* these offsets are used in the picture in picture mode */
+ /* offsets and size of the copy in Picture-in-Picture mode */
+ int win_x;
int win_y;
- int win_w; /* size of the picture in picture window if present */
+ int win_w;
int win_h;
};
@@ -114,7 +115,7 @@
DRAG_DIALED, /* dialed number */
DRAG_INPUT, /* input window */
DRAG_MESSAGE, /* message window */
- DRAG_PIP, /* picture in picture */
+ DRAG_PIP, /* picture in picture */
};
/*! \brief support for drag actions */
More information about the asterisk-commits
mailing list