00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #ifndef AR_VIDEO_H
00042 #define AR_VIDEO_H
00043 #ifdef __cplusplus
00044 extern "C" {
00045 #endif
00046
00047
00048 #if __APPLE_CC__
00049 #include <Carbon/Carbon.h>
00050 #include <QuickTime/QuickTime.h>
00051 #include <pthread.h>
00052 #endif
00053
00054 typedef struct _AR2VideoParamT AR2VideoParamT;
00055 typedef char ARUint8;
00056
00057 #define DEFAULT_VIDEO_WIDTH 640
00058 #define DEFAULT_VIDEO_HEIGHT 480
00059 #define arMalloc(V,T,S) \
00060 { if( ((V) = (T *)malloc( sizeof(T) * (S) )) == 0 ) \
00061 {printf("malloc error!!\n"); exit(1);} }
00062
00063 int arVideoOpen( char *config );
00064 int arVideoClose( void );
00065 int arVideoDispOption( void );
00066
00067 int arVideoInqSize( int *x, int *y );
00068 ARUint8* arVideoGetImage( void );
00069 ARUint8* arVideoGetTSImage( timeval* timestamp );
00070 double arGetFrameRate( void );
00071
00072 int arVideoCapStart( void );
00073 int arVideoCapStop( void );
00074 int arVideoCapNext( void );
00075
00076 int ar2VideoDispOption ( void );
00077 AR2VideoParamT *ar2VideoOpen ( char *config );
00078 int ar2VideoClose ( AR2VideoParamT *vid );
00079 int ar2VideoCapStart ( AR2VideoParamT *vid );
00080 int ar2VideoCapNext ( AR2VideoParamT *vid );
00081 int ar2VideoCapStop ( AR2VideoParamT *vid );
00082 ARUint8 *ar2VideoGetImage ( AR2VideoParamT *vid );
00083 int ar2VideoInqSize ( AR2VideoParamT *vid, int *x,int *y );
00084
00085 #ifdef __cplusplus
00086 }
00087 #endif
00088 #endif