I’m currently doing something which I admit is pretty hacky but I’d like to know how to improve it.
I have an iOS app, and I'm using a 3D engine (Babylon) to render a scene. One the elements of the scene is a sprite that gets it's texture from a video elsewhere in RN.
15 times a second I’m taking a shot of a webrtc video component and saving the result as a png tmp file.
In Babylon, I’m loading that in as texture by reading the tmp file 15 times and second.
This works ok, however, it feels really inefficient and a waste of hdd read and writes.
I've tried using base64 string data instead - but this is far slower, as it's coming over the bridge.
Is there a better solution that doesn't use tmp files, perhaps using RAW pixel data?
I’m currently doing something which I admit is pretty hacky but I’d like to know how to improve it.
I have an iOS app, and I'm using a 3D engine (Babylon) to render a scene. One the elements of the scene is a sprite that gets it's texture from a video elsewhere in RN.
15 times a second I’m taking a shot of a webrtc video component and saving the result as a png tmp file. In Babylon, I’m loading that in as texture by reading the tmp file 15 times and second.
This works ok, however, it feels really inefficient and a waste of hdd read and writes. I've tried using base64 string data instead - but this is far slower, as it's coming over the bridge.
Is there a better solution that doesn't use tmp files, perhaps using RAW pixel data?
Thanks!