Hello, I am seeing an issue in my app where creating instances of AVSampleBufferDisplayLayer
from AVFoundation
is freezing the main UI in some circumstances for more than 5 seconds. Is there any workarounds for this? I have not been able to reproduce this myself though.
I am creating all instances of this class on the main thread.
Here is the stack trace that is 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 LinkedIn:main (in LinkedIn) (main.m:37)
24 ???:24 ??? 0x000000010877dda4 0x0 + 0