video.h

00001 /*
00002  * iaxclient: a cross-platform IAX softphone library
00003  *
00004  * Copyrights:
00005  * Copyright (C) 2007, Wimba, Inc.
00006  *
00007  * Contributors:
00008  * Peter Grayson <jpgrayson@gmail.com>
00009  *
00010  * This program is free software, distributed under the terms of
00011  * the GNU Lesser (Library) General Public License.
00012  */
00013 
00014 #ifndef __VIDEO_H__
00015 #define __VIDEO_H__
00016 
00017 #ifdef HAVE_CONFIG_H
00018 #include "config.h"
00019 #endif
00020 
00021 struct iaxc_call;
00022 struct iaxc_video_codec;
00023 struct iaxc_video_stats;
00024 
00025 struct iaxc_video_driver {
00026         /* data */
00027         char *name;     /* driver name */
00028         void *priv;     /* pointer to private data */
00029 
00030         /* methods */
00031         int (*initialize)(struct iaxc_video_driver *d, int w, int h, int framerate);
00032         int (*destroy)(struct iaxc_video_driver *d);  /* free resources */
00033         int (*select_device)(struct iaxc_video_driver *d, int input);
00034         int (*selected_device)(struct iaxc_video_driver *d, int *input);
00035         int (*start)(struct iaxc_video_driver *d);
00036         int (*stop)(struct iaxc_video_driver *d);
00037         int (*input)(struct iaxc_video_driver *d, char **data);
00038         int (*is_camera_working)(struct iaxc_video_driver *d);
00039 
00040         /* HACK ALERT!!!
00041          * If the requested size of the video is not 320x240, then we
00042          * resize the image in software rather than relying on the camera
00043          * to provide an adequate frame.
00044          */
00045         int needs_resize;
00046         int req_width;
00047         int req_height;
00048         int camera_working; /* true if the camera is working */
00049 };
00050 
00051 int video_initialize(void);
00052 
00053 int video_destroy(void);
00054 
00055 int video_send_video(struct iaxc_call *, int);
00056 
00057 int video_recv_video(struct iaxc_call * call, int sel_call,
00058                 void * encoded_video, int encoded_video_len,
00059                 unsigned int ts, int format);
00060 
00061 int video_send_stats(struct iaxc_call *);
00062 
00063 #endif

Generated on Mon Sep 24 15:43:29 2007 for IAXClient by  doxygen 1.5.3