[asterisk-commits] rizzo: branch rizzo/video_console r126287 - /team/rizzo/video_console/channels/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Jun 29 07:21:38 CDT 2008
Author: rizzo
Date: Sun Jun 29 07:21:37 2008
New Revision: 126287
URL: http://svn.digium.com/view/asterisk?view=rev&rev=126287
Log:
small whitespace changes
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=126287&r1=126286&r2=126287
==============================================================================
--- team/rizzo/video_console/channels/console_gui.c (original)
+++ team/rizzo/video_console/channels/console_gui.c Sun Jun 29 07:21:37 2008
@@ -361,7 +361,6 @@
KEY_RESET = 253, /* the 'reset' keyword */
KEY_NONE = 254, /* invalid area */
KEY_DIGIT_BACKGROUND = 255, /* other areas within the keypad */
-
};
/*
@@ -810,6 +809,7 @@
break;
case KEY_DIGIT_BACKGROUND:
break;
+
default:
ast_log(LOG_WARNING, "function not yet defined %i\n", index);
}
@@ -1437,7 +1437,6 @@
/* update board rect */
SDL_UpdateRect(gui->screen, p->rect.x, p->rect.y, p->rect.w, p->rect.h);
}
-
/* display the skin, but do not free it as we need it later to
restore text areas and maybe sliders too */
@@ -1454,7 +1453,6 @@
init_board(gui, &gui->bd_dialed, gui->kp_dialed, dest->x, dest->y);
SDL_UpdateRects(gui->screen, 1, dest);
}
-
return;
no_sdl:
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=126287&r1=126286&r2=126287
==============================================================================
--- team/rizzo/video_console/channels/console_video.c (original)
+++ team/rizzo/video_console/channels/console_video.c Sun Jun 29 07:21:37 2008
@@ -274,19 +274,23 @@
b->pix_fmt = x.pix_fmt;
}
+#if 0
+/* helper function to print the amount of memory used by the process.
+ * Useful to track memory leaks, unfortunately this code is OS-specific
+ * so we keep it commented out.
+ */
static int
used_mem(const char *msg)
{
-#if 0
char in[128];
pid_t pid = getpid();
sprintf(in, "ps -o vsz= -o rss= %d", pid);
ast_log(LOG_WARNING, "used mem (vsize, rss) %s ", msg);
system(in);
+ return 0;
+}
#endif
- return 0;
-}
#include "vcodecs.c"
#include "console_gui.c"
@@ -364,7 +368,6 @@
return dev->grabber->read(dev->grabber_data);
}
-
/*! \brief handler run when dragging with the left button on
* the local source window - the effect is to move the offset
* of the captured area.
@@ -402,7 +405,6 @@
struct video_out_desc *v = &env->out;
int i; /* integer variable used as iterator */
- used_mem("start of video_out_uninit");
/* XXX this should be a codec callback */
if (v->enc_ctx) {
AVCodecContext *enc_ctx = (AVCodecContext *)v->enc_ctx;
@@ -430,7 +432,6 @@
v->devices[i].status_index = 0;
}
v->picture_in_picture = 0;
- used_mem("end of video_out_uninit");
return -1;
}
@@ -857,7 +858,6 @@
}
}
sdl_setup(env);
- used_mem("after sdl_setup");
if (!ast_strlen_zero(save_display))
setenv("DISPLAY", save_display, 1);
@@ -888,6 +888,7 @@
struct ast_channel *chan;
int fd;
char *caption = NULL, buf[160];
+
/* determine if video format changed */
if (count++ % 10 == 0) {
if (env->out.sendvideo && env->out.devices)
@@ -899,6 +900,7 @@
sprintf(buf, "hold");
caption = buf;
}
+
/* manage keypad events */
/* XXX here we should always check for events,
* otherwise the drag will not work */
@@ -907,8 +909,6 @@
/* sleep for a while */
ast_select(0, NULL, NULL, NULL, &t);
- if (count % 20 == 0)
- used_mem(__FUNCTION__);
if (env->in) {
struct video_dec_desc *v = env->in;
@@ -935,6 +935,7 @@
ast_mutex_unlock(&env->dec_lock);
}
}
+
if (env->shutdown)
break;
f = get_video_frames(env, &p); /* read and display */
@@ -1041,7 +1042,6 @@
void console_video_start(struct video_desc *env, struct ast_channel *owner)
{
ast_log(LOG_WARNING, "env %p chan %p\n", env, owner);
- used_mem("start of console_video_start");
if (env == NULL) /* video not initialized */
return;
env->owner = owner; /* work even if no owner is specified */
@@ -1075,7 +1075,6 @@
pthread_detach(env->vthread);
if (env->owner == NULL)
env->stayopen = 1; /* manually opened so don't close on hangup */
- used_mem("end of console_video_start");
}
/*
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=126287&r1=126286&r2=126287
==============================================================================
--- team/rizzo/video_console/channels/console_video.h (original)
+++ team/rizzo/video_console/channels/console_video.h Sun Jun 29 07:21:37 2008
@@ -137,6 +137,5 @@
/*! \brief deallocates memory space for a board */
void delete_board(struct board *b);
-
#endif /* CONSOLE_VIDEO_H */
/* end of file */
More information about the asterisk-commits
mailing list