Hi,
I have an app attempting to do some video playback and editing, but I'm having an issue where with some videos, some operations like AVQueuePlayer/AVPlayerItem.seek
will cause all players to move to .failed
and just show black.
The only indication the OS gives the app that this has happened is some logs relating to the haptic engine:
[hcln] AVHapticClient.mm:1309 -[AVHapticClient handleServerConnectionInterruption]: [xpc] Entered (due to connection interruption) for client ID 0x100031e
[hapi] CHHapticEngine.mm:614 -[CHHapticEngine finishInit:]_block_invoke: ERROR: Server connection broke with error 'The operation couldn’t be completed. (com.apple.CoreHaptics error -4811.)
In the device console, the most likely culprit seems to be this (reported by kernal):
EXC_RESOURCE -> mediaserverd[768] exceeded mem limit: ActiveSoft 2500 MB (non-fatal)
If my assumption is correct, is it possible to mitigate this issue before mediaserverd
and all the associated players get killed?
My understanding of this is that AV memory is separate to the app memory so responding to the usual didReceiveMemoryWarningNotification
isn't applicable in this case, and that notification doesn't seem to be being send before these failures.
Thanks