CaptureInSdRam does not work.

Post Reply
AndreasFurster
Posts: 6
Joined: Tue Feb 28, 2017 7:13 pm

CaptureInSdRam does not work.

Post by AndreasFurster » Thu Mar 02, 2017 1:38 pm

We're trying to capture photos in the sd card. We use the following code:

Code: Select all

device.CaptureInSdRam = true;
Thread(CapturePicture).Start(device);

Code: Select all

 
        private void CapturePicture(object device)
        {
            bool doRetry;

            do
            {
                doRetry = false;
                try
                {
                    ((ICameraDevice)device).CapturePhoto();
                }
                catch (DeviceException exception)
                {
                    if (exception.ErrorCode == ErrorCodes.MTP_Device_Busy || exception.ErrorCode == ErrorCodes.ERROR_BUSY)
                    {
                        Thread.Sleep(500);
                        doRetry = true;
                    }
                    else
                    {
                        throw;
                    }
                }
            } while (doRetry);
        }
The PhotoCaptured event is fired, but I don't handle it. Is this required?
What should I do in that handler to transfer the file to the sd card?

CaptureInSdRam does not work.

Advertisment
 

Post Reply