opentok-ios-sdk-samples icon indicating copy to clipboard operation
opentok-ios-sdk-samples copied to clipboard

VIDCS-1860, VIDCS-1876, VIDCS-1948, VIDCS-1943: AVCapture is only referenced from one queue

Open goncalocostamendes opened this issue 11 months ago • 0 comments

What is this PR doing? AVCapture is no longer being referenced from multiple queues. There is a static queue for the capture now. Safely dispatch async in dealloc avoiding segmentation fault. Move several sync calls to async.

Issue easily reproducible on 2.27.1 with following TestApp changes. In this PR issue should not be reproducible.

// Change to NO to subscribe to streams other than your own.
@@ -56,8 +53,15 @@ - (void)viewDidLoad
                                       sessionId:kSessionId
                                        delegate:self];
    [self doConnect];
    UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)];
    [self.view addGestureRecognizer:tapGesture];
}
- (void)handleTap:(UITapGestureRecognizer *)sender {
    [_session unpublish:_publisher error:nil];
    _publisher = nil;
    [self doPublish];

}

- (BOOL)prefersStatusBarHidden
{
    return YES;
@@ -83,7 +87,7 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:
 */

In order to test the changes of setting AVcapture session from sync to async, we need test as well:

changing frame rate; changing camera resolution; changing camera (back to front and vice-versa)

What are the relevant tickets? VIDCS-1860 VIDCS-1876 VIDCS-1948 VIDCS-1943

goncalocostamendes avatar Mar 01 '24 16:03 goncalocostamendes