Changeset 7787 for trunk/MagicSoft/Cosy/videodev/Camera.cc
- Timestamp:
- 07/11/06 20:45:10 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/videodev/Camera.cc
r4076 r7787 17 17 inline int Camera::Ioctl(int req, void *opt, const char *str) 18 18 { 19 if (fd<0) 20 { 21 cout << "Error! Called Ioctl with invalid filedescriptor." << endl; 22 return -1; 23 } 24 19 25 while (1) 20 26 { … … 181 187 // cout << "Camera::Camera - mutex is already locked by this thread" << endl; 182 188 pthread_create(&fThread, NULL, MapThread, this); 183 cout << " done." << endl;189 cout << "CameraInitialized..." << endl; 184 190 185 191 } … … 216 222 void Camera::ExitLoop() 217 223 { 218 // cout << "ExitLoop..." << endl;219 224 fStop = 1; 220 225 while (IsRunning()) 221 226 usleep(1); 222 // cout << "Loop exited." << endl;223 227 } 224 228 … … 261 265 while (1) 262 266 { 263 //cout << "Wait..." << flush; 264 fCond.Wait(); 265 //cout << "done." << endl; 267 fCond.Wait();; 266 268 if (fd==-1) 267 269 break; … … 319 321 } 320 322 321 cout << "Loop..." << endl;322 323 ExitLoop(); 323 324 … … 329 330 // 330 331 fCond.Broadcast(); 332 333 // I don't know what the reason for this line is, but it 334 // seems to solve some starnge crashes when switching 335 // between the two cameras and it ensures that cosy works 336 // with root 4.04/02g 337 fMutex->UnLock(); 331 338 } 332 339
Note:
See TracChangeset
for help on using the changeset viewer.