The stateless decoders check the number of available output buffers before submitting a picture to the backend. This is needed for VAAPI, but not for V4L2 stateless where we on the contrary need an input buffer to proceed.
This means that backends should validate that they have the resources required to perform their operation. This could probably be done as part of new_picture (which should be extended to all codecs), which could reserve the resources required to process a given pictures. Codecs like VP9 or AV1 that can process several frames per unit of input would call new_picture as many times as necessary, return if any call was failing, and then process the pictures sequentially.
Revealed by PR #83.
The stateless decoders check the number of available output buffers before submitting a picture to the backend. This is needed for VAAPI, but not for V4L2 stateless where we on the contrary need an input buffer to proceed.
This means that backends should validate that they have the resources required to perform their operation. This could probably be done as part of
new_picture
(which should be extended to all codecs), which could reserve the resources required to process a given pictures. Codecs like VP9 or AV1 that can process several frames per unit of input would callnew_picture
as many times as necessary, return if any call was failing, and then process the pictures sequentially.