[haiku-development] Re: Streaming Fixes for the Plugin Manager

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Fri, 4 Mar 2016 14:09:36 +0100

Am 03/03/2016 um 16:00 schrieb Dario Casalinuovo:

This means we have to introduce a BStreamingIO into the support kit? Or
the additional methods should be put into BPositionIO itself?

I would introduce a specialized BPositionIO or BDataIO subclass for this. Not sure if this should end up in the support kit, or the media kit, though. You could also call it BMediaIO or BMediaStreamIO or BMediaDataIO, or whatever :-)

> 3.) Could be solved entirely in the add-on. But then each add-on
> would need to solve this.
> Also, buffering could be better handled in the BDataIO/BPositionIO
> class (especially for sniffing where more than one add-on is involved).
So, the final AIM is to adjust the add-on to be aware about the
different functionalities supplied by BDataIO, BPositionIO, BStreamingIO?

No, IMO the above mentioned class should always be used for the codec/container add-ons, no matter if the data is streamed or not.

For example, the add-on could set some constraints (ie. how it requires the data, or what features it requires -- like reading from the end of the file), and the data IO class would either try its best to accomplish that, or fail if the underlying stream doesn't allow for that operation.

I think it's beneficial to put most of the complexity outside of the add-ons, and into the BMediaDataIO class (or however it's going to be called).

Bye,
   Axel.


Other related posts: