Logo Search packages:      
Sourcecode: camstream version File versions  Download package

void CVideoDevice::Close (  ) 

Closes the device provisionally.

This function decrements the usage counter of the VideoDevice. If the counter reaches 0, the device is really closed. See also Open().

Definition at line 610 of file VideoDevice.cc.

References CleanUp(), and Closed().

{
   if (Opened) {
     if (Opened == 1) {
#ifdef TRACE_VIDEODEV_OPEN
       printf("CVideoDevice::Close(): last close.\n");
#endif       
       delete pImageTimer;
       pImageTimer = NULL;
       delete pImageSocket;
       pImageSocket = NULL;
       CleanUp();
       close(CamFD);
       CamFD = -1;
       emit Closed();
     }
     Opened--;
   }
}


Generated by  Doxygen 1.6.0   Back to index