We're currently using a heavily customised version of a (very!!) old release of the IsoParser, and are trying to upgrade to the latest version. However, our use-case means that we need to rewrite MP4 metadata "on the fly" - preferrably while it's travelling across the network as an InputStream and has not been written to disk.
Our customised version reads all header boxes up to the mdat box into memory and then leaves the rest "on the wire". It then modifies the header and streams the mdat box afterwards; the original IsoFile class made this approach not too difficult. However, not only has the new IsoParser replaced InputStream with a DataSource, but this DataSourcemust now be seekable! A network stream is obviously not seekable.
I think we've come up with some kind of "file-backed cache" approach here, but it feels as if we're fighting a losing battle to bridge what we need the IsoParser to do and where the IsoParser is currently heading. Does the IsoParser need to use a seekable data source? Could there a way of using it that doesn't need the source to be seekable please?
Hi,
We're currently using a heavily customised version of a (very!!) old release of the IsoParser, and are trying to upgrade to the latest version. However, our use-case means that we need to rewrite MP4 metadata "on the fly" - preferrably while it's travelling across the network as an
InputStream
and has not been written to disk. Our customised version reads all header boxes up to themdat
box into memory and then leaves the rest "on the wire". It then modifies the header and streams themdat
box afterwards; the originalIsoFile
class made this approach not too difficult. However, not only has the new IsoParser replacedInputStream
with aDataSource
, but thisDataSource
must now be seekable! A network stream is obviously not seekable. I think we've come up with some kind of "file-backed cache" approach here, but it feels as if we're fighting a losing battle to bridge what we need the IsoParser to do and where the IsoParser is currently heading. Does the IsoParser need to use a seekable data source? Could there a way of using it that doesn't need the source to be seekable please?Cheers, Chris