egnor / pivid

Experimental video code for Linux / Raspberry Pi
MIT License
29 stars 4 forks source link

Prioritize media loading #10

Open egnor opened 2 years ago

egnor commented 2 years ago

Right now, all media loading is done in parallel, which isn't ideal and can result in unnecessary dropped frames (observed by @aubilenon).

In an ideal world:

But, speculative loads (pins) should probably be able to specify their relative priority (based on likelihood of being used)?

This is all a little tricky:

For reference, this is my understanding of thread usage in libav: http://ffmpeg.org/pipermail/libav-user/2022-February/012969.html (Note that nobody replied, so I have no idea how accurate this is.)

egnor commented 2 years ago

Strawperson proposal: