1 #include "CamSensor.h" 2 #include "CamDebug.h" 3 4 5 CamSensor::CamSensor(CamDevice *_camera) 6 : fInitStatus(B_NO_INIT), 7 fIsBigEndian(false), 8 fTransferEnabled(false), 9 fVideoFrame(), 10 fLastParameterChanges(0), 11 fCamDevice(_camera) 12 { 13 14 } 15 16 17 CamSensor::~CamSensor() 18 { 19 20 } 21 22 23 status_t 24 CamSensor::Probe() 25 { 26 // default is to match by USB IDs 27 return B_OK; 28 } 29 30 31 status_t 32 CamSensor::InitCheck() 33 { 34 return fInitStatus; 35 } 36 37 38 status_t 39 CamSensor::Setup() 40 { 41 return fInitStatus; 42 } 43 44 45 const char * 46 CamSensor::Name() 47 { 48 return "<unknown>"; 49 } 50 51 52 status_t 53 CamSensor::StartTransfer() 54 { 55 fTransferEnabled = true; 56 return B_OK; 57 } 58 59 60 status_t 61 CamSensor::StopTransfer() 62 { 63 fTransferEnabled = false; 64 return B_OK; 65 } 66 67 68 status_t 69 CamSensor::SetVideoFrame(BRect rect) 70 { 71 return ENOSYS; 72 } 73 74 75 status_t 76 CamSensor::SetVideoParams(float brightness, float contrast, float hue, float red, float green, float blue) 77 { 78 return ENOSYS; 79 } 80 81 82 void 83 CamSensor::AddParameters(BParameterGroup *group, int32 &index) 84 { 85 fFirstParameterID = index; 86 } 87 88 status_t 89 CamSensor::GetParameterValue(int32 id, bigtime_t *last_change, void *value, size_t *size) 90 { 91 return B_BAD_VALUE; 92 } 93 94 status_t 95 CamSensor::SetParameterValue(int32 id, bigtime_t when, const void *value, size_t size) 96 { 97 return B_BAD_VALUE; 98 } 99 100 101 CamDevice * 102 CamSensor::Device() 103 { 104 return fCamDevice; 105 } 106