ios – AVSampleBufferDisplayLayer freezes UI on init

[ad_1]

I’m seeing a difficulty in my app the place creating cases of AVSampleBufferDisplayLayer from AVFoundation is freezing the primary UI in some circumstances for greater than 5 seconds. Is there any workarounds for this? I’ve not been in a position to reproduce this myself although.

I see a number of others with this concern: AVSampleDisplayBuffer hangs randomly after system reboot, and https://developer.apple.com/boards/thread/102483 however with no decision.

By the best way, I’m creating all cases of AVSampleBufferDisplayLayer on the primary thread.

Right here is the stack hint that’s being logged:

0 libsystem_kernel.dylib:mach_msg_trap (in libsystem_kernel.dylib) + 8
1 MediaToolbox:FigVideoQueueRemoteClient_Create (in MediaToolbox) + 200
2 MediaToolbox:__FigVideoQueueCreateRemote_block_invoke (in MediaToolbox) + 100
3 CoreMedia:FigRPCCreateServerConnectionForObject (in CoreMedia) + 508
4 MediaToolbox:FigVideoQueueCreateRemote (in MediaToolbox) + 300
5 AVFCore:__49-[AVSampleBufferVideoRenderer _createVideoQueue:]_block_invoke (in AVFCore) + 48
6 libdispatch.dylib:_dispatch_client_callout (in libdispatch.dylib) + 20
7 libdispatch.dylib:_dispatch_lane_barrier_sync_invoke_and_complete (in libdispatch.dylib) + 56
8 AVFCore:-[AVSampleBufferVideoRenderer _createVideoQueue:] (in AVFCore) + 164
9 AVFCore:-[AVSampleBufferVideoRenderer init] (in AVFCore) + 528
10 AVFCore:-[AVSampleBufferDisplayLayer init] (in AVFCore) + 280
11 MyApplication:-[PlaybackView initWithFrame:] (in MyApplication) (PlaybackView.m:56)
12 MyApplication:__62-[CustomPlayer setupVideoDisplayLayerWithCompletion:]_block_invoke (in MyApplication) (CustomPlayer.m:730)
13 libdispatch.dylib:_dispatch_call_block_and_release (in libdispatch.dylib) + 32
14 libdispatch.dylib:_dispatch_client_callout (in libdispatch.dylib) + 20
15 libdispatch.dylib:_dispatch_main_queue_drain (in libdispatch.dylib) + 928
16 libdispatch.dylib:_dispatch_main_queue_callback_4CF (in libdispatch.dylib) + 44
17 CoreFoundation:__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ (in CoreFoundation) + 16
18 CoreFoundation:__CFRunLoopRun (in CoreFoundation) + 2532
19 CoreFoundation:CFRunLoopRunSpecific (in CoreFoundation) + 600
20 GraphicsServices:GSEventRunModal (in GraphicsServices) + 164
21 UIKitCore:-[UIApplication _run] (in UIKitCore) + 1100
22 UIKitCore:UIApplicationMain (in UIKitCore) + 364
23 MyApplication (in MyApplication) (primary.m:37)
24 ???:24  ???                                 0x000000010877dda4 0x0 + 0

[ad_2]

Leave a Reply