what is replaykit2 memory limit and cpu limit?

I've been wondering what is the memory limit and cpu usage limit for replaykit2 extensions. Specifically, I'm using Replaykit2 upload extension to encode video and audio, and then upload them (h264\AAC) to the broadcast server.

I always encount problems like this:


EXC_RESOURCE -> LABroadcastUpload[396] exceeded mem limit: ActiveHard 50 MB (fatal)

or


Wakeups: 45001 wakeups over the last 162 seconds (277 wakeups per second average), exceeding limit of 150 wakeups per second over 300 seconds


because I have to do a lot work for video and video processing, it is hard for me to reduce memory using or thread thread-switching

It's there any methods to fix above problems?

Thank you!

Replies

The memory limit for a ReplayKit upload extension is pretty small, and there's nothing you can do to increase it.


>> I have to do a lot work for video and video processing


What APIs are you using for this, or is it all done "manually"? I would expect that Video Toolbox is the only framework that has a chance of succeeding in the extension environment. If you can't use that, then your only choice might be to do the encoding on the server.


You can also try dropping some frames, and see if that helps.

Is there any chance apple will increase this memory limit in future?

50 MB iOS 12.2