Go to the documentation of this file.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 #define SRC_WIN_W 80
00047 #define SRC_WIN_H 60
00048
00049
00050
00051 #define MAX_VIDEO_SOURCES 9
00052
00053
00054
00055
00056
00057
00058
00059 struct fbuf_t {
00060 uint8_t *data;
00061
00062 int size;
00063 int used;
00064 int ebit;
00065 int x;
00066 int y;
00067 int w;
00068 int h;
00069 int pix_fmt;
00070
00071 int win_x;
00072 int win_y;
00073 int win_w;
00074 int win_h;
00075 };
00076
00077 void fbuf_free(struct fbuf_t *);
00078
00079
00080 struct grab_desc {
00081 const char *name;
00082 void *(*open)(const char *name, struct fbuf_t *geom, int fps);
00083 struct fbuf_t *(*read)(void *d);
00084 void (*move)(void *d, int dx, int dy);
00085 void *(*close)(void *d);
00086 };
00087
00088 extern struct grab_desc *console_grabbers[];
00089
00090 struct video_desc;
00091 struct video_desc *get_video_desc(struct ast_channel *c);
00092
00093
00094 int console_write_video(struct ast_channel *chan, struct ast_frame *f);
00095 extern int console_video_formats;
00096 int console_video_cli(struct video_desc *env, const char *var, int fd);
00097 int console_video_config(struct video_desc **penv, const char *var, const char *val);
00098 void console_video_uninit(struct video_desc *env);
00099 void console_video_start(struct video_desc *env, struct ast_channel *owner);
00100 int get_gui_startup(struct video_desc* env);
00101
00102
00103
00104
00105 enum kb_output {
00106 KO_NONE,
00107 KO_INPUT,
00108 KO_DIALED,
00109 KO_MESSAGE,
00110 };
00111
00112 enum drag_window {
00113 DRAG_NONE,
00114 DRAG_LOCAL,
00115 DRAG_REMOTE,
00116 DRAG_DIALED,
00117 DRAG_INPUT,
00118 DRAG_MESSAGE,
00119 DRAG_PIP,
00120 };
00121
00122
00123 struct drag_info {
00124 int x_start;
00125 int y_start;
00126 enum drag_window drag_window;
00127 };
00128
00129 struct board;
00130
00131 void move_message_board(struct board *b, int dy);
00132 int print_message(struct board *b, const char *s);
00133
00134
00135 const char *read_message(const struct board *b);
00136
00137
00138 int reset_board(struct board *b);
00139
00140
00141 void delete_board(struct board *b);
00142 #endif
00143