00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef CONSOLE_VIDEO_H
00024 #define CONSOLE_VIDEO_H
00025
00026 #if !defined(HAVE_VIDEO_CONSOLE) || !defined(HAVE_FFMPEG)
00027 #define CONSOLE_VIDEO_CMDS \
00028 "console {device}"
00029 #else
00030
00031 #include <ffmpeg/avcodec.h>
00032 #ifndef OLD_FFMPEG
00033 #include <ffmpeg/swscale.h>
00034 #endif
00035
00036 #define CONSOLE_VIDEO_CMDS \
00037 "console {videodevice|videocodec" \
00038 "|video_size|bitrate|fps|qmin" \
00039 "|sendvideo|keypad" \
00040 "|sdl_videodriver" \
00041 "|device|startgui|stopgui" \
00042 "}"
00043
00044 #endif
00045
00046
00047
00048
00049
00050
00051
00052 struct fbuf_t {
00053 uint8_t *data;
00054
00055 int size;
00056 int used;
00057 int ebit;
00058 int x;
00059 int y;
00060 int w;
00061 int h;
00062 int pix_fmt;
00063 };
00064
00065 void fbuf_free(struct fbuf_t *);
00066
00067
00068 struct grab_desc {
00069 const char *name;
00070 void *(*open)(const char *name, struct fbuf_t *geom, int fps);
00071 struct fbuf_t *(*read)(void *d);
00072 void (*move)(void *d, int dx, int dy);
00073 void *(*close)(void *d);
00074 };
00075
00076 extern struct grab_desc *console_grabbers[];
00077
00078 struct video_desc;
00079 struct video_desc *get_video_desc(struct ast_channel *c);
00080
00081
00082 int console_write_video(struct ast_channel *chan, struct ast_frame *f);
00083 extern int console_video_formats;
00084 int console_video_cli(struct video_desc *env, const char *var, int fd);
00085 int console_video_config(struct video_desc **penv, const char *var, const char *val);
00086 void console_video_uninit(struct video_desc *env);
00087 void console_video_start(struct video_desc *env, struct ast_channel *owner);
00088
00089
00090
00091
00092 enum kb_output {
00093 KO_NONE,
00094 KO_INPUT,
00095 KO_DIALED,
00096 KO_MESSAGE,
00097 };
00098
00099 enum drag_window {
00100 DRAG_NONE,
00101 DRAG_LOCAL,
00102 DRAG_REMOTE,
00103 DRAG_DIALED,
00104 DRAG_INPUT,
00105 DRAG_MESSAGE,
00106 };
00107
00108
00109 struct drag_info {
00110 int x_start;
00111 int y_start;
00112 enum drag_window drag_window;
00113 };
00114
00115 struct board;
00116
00117 void move_message_board(struct board *b, int dy);
00118 int print_message(struct board *b, const char *s);
00119
00120
00121 const char *read_message(const struct board *b);
00122
00123
00124 int reset_board(struct board *b);
00125
00126 #endif
00127