00001 #ifndef __CAPTURECAMERA_H__
00002 #define __CAPTURECAMERA_H__
00003
00004
00005
00006
00007
00008
00009 #include <sys/mman.h>
00010 #include <sys/ioctl.h>
00011 #include <sys/time.h>
00012 #include <fcntl.h>
00013
00014 #include <stdlib.h>
00015 #include <unistd.h>
00016 #include <stdio.h>
00017 #include <errno.h>
00018
00019 #include "capture.h"
00020 #include "device.h"
00021 #include "devicetable.h"
00022 #include "drivertable.h"
00023
00024 class captureCamera : public capture
00025 {
00026
00027
00028
00029
00030 private:
00031 int camera_index;
00032 player_device_id_t camera_id;
00033 Driver *camera;
00034 bool camera_open;
00035 int width,height,depth,image_size;
00036
00037 unsigned char * YUV;
00038 player_camera_data_t data;
00039 double camera_time;
00040
00041 public:
00042 captureCamera(int camera_index);
00043 virtual ~captureCamera();
00044
00045 virtual bool initialize(int nwidth,int nheight);
00046 unsigned char *captureFrame();
00047 unsigned char *convertImageRgb2Yuv422(unsigned char *RGB,int NumPixels);
00048 virtual void close(){};
00049
00050 int Width(){return(width);}
00051 int Height(){return(height);}
00052 };
00053
00054 #endif