Move grabbers definitions to a separate file, vgrabbers.c, so it is easier

to add more entries. This required moving struct grab_desc to the common
header, and adding an entry in the Makefile.

On passing, cleanup some comments and file headers (some are still missing).



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@95313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2007-12-29 02:02:03 +00:00
parent f2702ec721
commit d6d39dfee9
5 changed files with 401 additions and 300 deletions

View File

@@ -28,10 +28,6 @@
"console {device}"
#else
#ifdef HAVE_X11
#include <X11/Xlib.h> /* this should be conditional */
#endif
#include <ffmpeg/avcodec.h>
#ifndef OLD_FFMPEG
#include <ffmpeg/swscale.h> /* requires a recent ffmpeg */
@@ -66,6 +62,19 @@ struct fbuf_t { /* frame buffers, dynamically allocated */
int pix_fmt;
};
void fbuf_free(struct fbuf_t *);
/* descriptor for a grabber */
struct grab_desc {
const char *name;
void *(*open)(const char *name, struct fbuf_t *geom, int fps);
struct fbuf_t *(*read)(void *d);
void (*move)(void *d, int dx, int dy);
void *(*close)(void *d);
};
extern struct grab_desc *console_grabbers[];
struct video_desc; /* opaque type for video support */
struct video_desc *get_video_desc(struct ast_channel *c);