From a2b091b66486e3c20168f36cefb0a734d6b47aac Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Wed, 26 Dec 2007 20:01:16 +0000 Subject: more preparation for untangling of the various console_video stuff git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@94805 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/console_video.h | 62 +++++++++++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 14 deletions(-) (limited to 'channels/console_video.h') diff --git a/channels/console_video.h b/channels/console_video.h index edfff7f04..312bfe2e0 100644 --- a/channels/console_video.h +++ b/channels/console_video.h @@ -20,19 +20,44 @@ * $Revision$ */ -struct video_desc; /* opaque type for video support */ +#ifndef CONSOLE_VIDEO_H +#define CONSOLE_VIDEO_H -struct video_desc *get_video_desc(struct ast_channel *c); +#if !defined(HAVE_VIDEO_CONSOLE) || !defined(HAVE_FFMPEG) || !defined(HAVE_SDL) +#define CONSOLE_VIDEO_CMDS \ + "console {device}" +#else + +#ifdef HAVE_X11 +#include /* this should be conditional */ +#endif + +#include +#ifndef OLD_FFMPEG +#include /* requires a recent ffmpeg */ +#endif + +#include +#ifdef HAVE_SDL_IMAGE +#include /* for loading images */ +#endif +#ifdef HAVE_SDL_TTF +#include /* render text on sdl surfaces */ +#endif + +/* our representation of a displayed window. SDL can only do one main + * window so we map everything within that one + */ +enum { WIN_LOCAL, WIN_REMOTE, WIN_KEYPAD, WIN_MAX }; +/* our representation of a displayed window. SDL can only do one main + * window so we map everything within that one + */ +struct display_window { + SDL_Overlay *bmp; + SDL_Rect rect; /* location of the window */ +}; -/* linked by console_video.o */ -int console_write_video(struct ast_channel *chan, struct ast_frame *f); -extern int console_video_formats; -int console_video_cli(struct video_desc *env, const char *var, int fd); -int console_video_config(struct video_desc **penv, const char *var, const char *val); -void console_video_uninit(struct video_desc *env); -void console_video_start(struct video_desc *env, struct ast_channel *owner); -#ifdef HAVE_VIDEO_CONSOLE #define CONSOLE_VIDEO_CMDS \ "console {videodevice|videocodec|sendvideo" \ "|video_size|bitrate|fps|qmin" \ @@ -41,9 +66,18 @@ void console_video_start(struct video_desc *env, struct ast_channel *owner); "|device" \ "}" -#else -#define CONSOLE_VIDEO_CMDS \ - "console {device}" -#endif +#endif /* HAVE_VIDEO_CONSOLE and others */ + +struct video_desc; /* opaque type for video support */ +struct video_desc *get_video_desc(struct ast_channel *c); + +/* linked by console_video.o */ +int console_write_video(struct ast_channel *chan, struct ast_frame *f); +extern int console_video_formats; +int console_video_cli(struct video_desc *env, const char *var, int fd); +int console_video_config(struct video_desc **penv, const char *var, const char *val); +void console_video_uninit(struct video_desc *env); +void console_video_start(struct video_desc *env, struct ast_channel *owner); +#endif /* CONSOLE_VIDEO_H */ /* end of file */ -- cgit v1.2.3