Ignore:
Timestamp:
07/11/06 20:45:10 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/videodev/Camera.cc

    r4076 r7787  
    1717inline int Camera::Ioctl(int req, void *opt, const char *str)
    1818{
     19    if (fd<0)
     20    {
     21        cout << "Error! Called Ioctl with invalid filedescriptor." << endl;
     22        return -1;
     23    }
     24
    1925    while (1)
    2026    {
     
    181187//        cout << "Camera::Camera - mutex is already locked by this thread" << endl;
    182188    pthread_create(&fThread, NULL, MapThread, this);
    183     cout << "done." << endl;
     189    cout << "CameraInitialized..." << endl;
    184190
    185191}
     
    216222void Camera::ExitLoop()
    217223{
    218     //    cout << "ExitLoop..." << endl;
    219224    fStop = 1;
    220225    while (IsRunning())
    221226        usleep(1);
    222     //    cout << "Loop exited." << endl;
    223227}
    224228
     
    261265    while (1)
    262266    {
    263         //cout << "Wait..." << flush;
    264         fCond.Wait();
    265         //cout << "done." << endl;
     267        fCond.Wait();;
    266268        if (fd==-1)
    267269            break;
     
    319321    }
    320322
    321     cout << "Loop..." << endl;
    322323    ExitLoop();
    323324
     
    329330    //
    330331    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();
    331338}
    332339
Note: See TracChangeset for help on using the changeset viewer.