Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on captureStillImageAsynchronouslyFromConnection #8

Open
Rehmanbu opened this issue Feb 9, 2017 · 14 comments
Open

Error on captureStillImageAsynchronouslyFromConnection #8

Rehmanbu opened this issue Feb 9, 2017 · 14 comments

Comments

@Rehmanbu
Copy link

Rehmanbu commented Feb 9, 2017

[_stillImageOutput captureStillImageAsynchronouslyFromConnection:videoConnection completionHandler: ^(CMSampleBufferRef imageSampleBuffer, NSError *error)

Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSUnderlyingError=0x174056170 {Error Domain=NSOSStatusErrorDomain Code=-16800 "(null)"}, NSLocalizedFailureReason=An unknown error occurred (-16800), NSLocalizedDescription=The operation could not be completed}

@MapleNoise
Copy link

Same error since iOS 10...
captureStillImageAsynchronouslyFromConnection:videoConnection works randomly for me

@mukyasa
Copy link
Owner

mukyasa commented Feb 10, 2017 via email

@MapleNoise
Copy link

MapleNoise commented Mar 9, 2017

Correction :
On MMCameraPickerController.m -> capturePhoto() -> handler of captureStillImageAsynchronouslyFromConnection add :

if(!CMSampleBufferIsValid(imageSampleBuffer)){
             isCapturingImage = NO;
             [self capturePhoto];
             return;
}

EDIT 8NOV2017

         if(!CMSampleBufferIsValid(imageSampleBuffer))
         {
             isCapturingImage = NO;
             [self capturePhoto];
             return;
         }
         
         [_mySesh stopRunning];

And remove [_mySesh stopRunning]; on the -(IBAction)capturePhoto:(id)sender method

@AzimJavaidKhan
Copy link

@MapleNoise this is not fixing my issue still my camera works randomly!
if u have another suggestion regarding this issue please let me know...Thanx

@AzimJavaidKhan
Copy link

@mukyasa tell me something to fix it please it's urgent

@mukyasa
Copy link
Owner

mukyasa commented Nov 8, 2017

@AzimJavaidKhan It's Camera library issue you can change it with diff camera library and problem solved, It will take time from my end to update the camera library code. You dont have to touch OpenCV code

@AzimJavaidKhan
Copy link

ok thanx!
1 more favour please can u tell me diff libraries for camera?

@AzimJavaidKhan
Copy link

where to add this line?

@MapleNoise
Copy link

MapleNoise commented Nov 8, 2017

@AzimJavaidKhan if you add :

         if(!CMSampleBufferIsValid(imageSampleBuffer))
         {
             isCapturingImage = NO;
             [self capturePhoto];
             return;
         }
         
         [_mySesh stopRunning];

And remove [_mySesh stopRunning]; on the - (IBAction)capturePhoto:(id)sender method ?

@AzimJavaidKhan
Copy link

now the retake button also captures, the black screen and sends black screen for cropping!

@MapleNoise
Copy link

Oh... Sorry That's the only thing I changed to worked for me...

@AzimJavaidKhan
Copy link

[self.capturePhoto]....is it important to write this?

@AzimJavaidKhan
Copy link

@MapleNoise but after your answer i m now able to take 7/10 pictures thanks. But still missing 3 times don't know why? i haven't changed anything except what u suggested!

@AzimJavaidKhan
Copy link

@mukyasa if u have excess time can you please fix it. It's very important for me and i have short time period for this task!
please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants