Osstatus Error - 12785
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up AVAssetWriter finishWriting failure when CTCallStateIncoming up vote 0 down vote favorite I use AVAssetWriter AVCaptureSession to recording video.it work well.I use UIApplicationDidEnterBackgroundNotification and CTCallCenter.callEventHandler to stop record when Application goes background or a call come in.UIApplicationDidEnterBackgroundNotification works well.But in CTCallCenter.callEventHandler,[AVAssetWriter finishWriting] return NO . here is AVAssetWriter.error: Error Domain=AVFoundationErrorDomain Code=-11800 "这项操作无法完成" UserInfo=0x6c0bc20 {NSLocalizedFailureReason=发生未知错误(-12785), NSUnderlyingError=0x6c0fc80 "The operation couldn’t be completed. (OSStatus error -12785.)", NSLocalizedDescription=这项操作无法完成} It seems AVAssetWriter failed immediately when a call coming.The recorded file not finished and can't be played.Can someone tell me how to do with it? CTCallCenter code: m_callCenter = [[CTCallCenter alloc] init]; m_callCenter.callEventHandler= ^(CTCall* call) { if (call.callState == CTCallStateDialing || call.callState == CTCallStateIncoming){ [self stopRecording]; //[self performSelectorOnMainThread:@selector(stopRecording) withObject:nil waitUntilDone:NO]; } }; stopRecording work fine in other case. recording avassetwriter share|improve this question asked Apr 28 '12 at 7:31 user1362527 13 add a comment| 1 Answer 1 active oldest votes up vote 2 down vote Phone calls cause AudioSession interruptions, so you might find out sooner if you use the AudioSession callback. Although I suspect your AVA
Sign in Pricing Blog Support Search GitHub This repository Watch 77 Star 1,549 Fork 303 piemonte/PBJVision Code Issues 46 Pull requests 3 Projects 0 Pulse Graphs New issue AVAssetWriter fail with invalidTimestamp #270 Open jiayuzhang opened this Issue Aug 5, 2015 · 0 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 1 participant jiayuzhang commented Aug 5, 2015 I'm testing http://stackoverflow.com/questions/10361551/avassetwriter-finishwriting-failure-when-ctcallstateincoming with iphone5, ios7.1, modify the example project (PBJViewController) with following setting vision.cameraMode = PBJCameraModeVideo; vision.cameraOrientation = PBJCameraOrientationPortrait; vision.focusMode = PBJFocusModeContinuousAutoFocus; vision.captureSessionPreset = AVCaptureSessionPresetHigh; vision.videoRenderingEnabled = NO; // AVVideoProfileLevelKey not set, doesn't that matter? Flip the camera several times, and record vid on both front and back camera for several seconds, when click Done https://github.com/piemonte/PBJVision/issues/270 button, AVAssetWriter failed with following error (Note, sometimes, it won't throw error and fail silently, the best way is to check AVAssetWriter's status and error directly) encounted an error in video capture (Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo=0x15626180 {NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x15605830 "The operation couldn’t be completed. (OSStatus error -12633.)", NSLocalizedFailureReason=An unknown error occurred (-12633)}) I learned from SO that Error -12633 is a InvalidTimestamp Unknown referenced this issue Jan 2, 2016 Closed Unknown error occurred (-12785) when capturing video #272 Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Contact GitHub API Training Shop Blog About © 2016 GitHub, Inc. Terms Privacy Security Status Help You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
von GoogleAnmeldenAusgeblendete FelderNach Gruppen oder Nachrichten suchen
21 User: taber I've tried using these methods in an attempt to detect that the Ring/Silent switch is active or not: How to programmatically sense the iPhone mute switch? AVAudioSession category not working as documentation dictates But on my iPhone 4, the "state" value is always..... -(BOOL)deviceIsSilenced{ CFStringRefstate; UInt32propertySize=sizeof(CFStringRef); OSStatusaudioStatus=AudioSessionGetProperty(kAudioSessionProperty_AudioRoute,&propertySize,&state); if(audioStatus==kAudioSessionNoError){ NSLog(@"audioroute:%@",state)//"Speaker"regardlessofsilentswitchsetting,but"Headphone"whenmyheadphonesarepluggedin return(CFStringGetLength(state)<=0); } returnNO; } -(BOOL)application:(UIApplication*)applicationdidFinishLaunchingWithOptions:(NSDictionary*)launchOptions{ AVAudioSession*audioSession=[AVAudioSessionsharedInstance]; audioSession.delegate=self; [audioSessionsetCategory:AVAudioSessionCategoryAmbienterror:nil]; [audioSessionsetActive:YESerror:nil]; NSLog(@"muted?%i",[selfdeviceIsSilenced]); ... } AVAudioRecorder averagePowerForChannel always returns -120.0 Score: 10 User: Richard_Caetano I had the same issue. I found setting the category to AVAudioSessionCategoryPlayAndRecord fixes it:
NSError *error; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:&error]; if (error) { NSLog(@"Error setting category: %@", [error description]); }
NSError*error; [[AVAudioSessionsharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecorderror:&error]; if(error){ NSLog(@"Errorsettingcategory:%@",[errordescription]); } AVAssetReader reads audio, then fails Score: 3 User: Jesse_Hammons I was getting this same error, I posted this answer on the other thread as well - (void)setupAudio { [[AVAudioSession sharedInstance] setDelegate:self]; [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; NSError *activationError = nil; [[AVAudioSession sharedInstance] setActive: YES error:&activationError]; NSLog(@"setupAudio ACTIVATION ERROR IS %@", activ