Ticket #121 (closed enhancement: fixed)

Opened 5 years ago

Last modified 4 years ago

Expose IsoStream

Reported by: vreixo Owned by: vreixo
Priority: major Milestone: libisofs-0.6.4
Component: libisofs Version: libisofs-0.6.3
Keywords: Cc:

Description

IsoStream is the object that represents the content of a file. We should expose it to:

  • allow apps access IsoFile contents
  • let apps define its own IsoStream implementations.

We also need an API:

	int iso_tree_add_new_file(IsoDir *parent, const char *name, IsoStream *stream, IsoFile **file);

equivalent to other iso_tree_add_new_XX() functions.

Change History

Changed 5 years ago by pygi

  • milestone set to libisofs-0.6.4

Changed 5 years ago by scdbackup

xorriso for now is interested in reading content via IsoNode. If IsoStream? is an intermediate step for this, then it is ok for me. I would prefer an API where i can "open" a node, "lseek", "read", and close it. Would IsoStream? do the job of a filedescriptor ?

Another wish of xorriso is to map a byte interval of a file into an ISO file object. This would allow to split oversized files without needing temporary storage on hard disk. Would IsoStream? allow to implement such a special node type ?

Changed 5 years ago by vreixo

  • status changed from new to assigned

I think lseek should not be implemented in IsoStream, as this represent generic content, i.e. "stream of bytes", whether a lseek operation makes no sense, actually. For example, a pipe can be a source for an IsoStream?. Moreover, users could implement their own IsoStreams?, for example to output application-generated data.

Of course, we can implement lseek and just return error in that cases. But I think a better alternative would be just add a function to get the underlying IsoFileSource (where in some cases -regular files- lseek makes sense), if the IsoStream relies in an IsoFileSource, of course.

We would need a "type" field for IsoStream, in the same way we do in IsoFilesystem.

Changed 5 years ago by vreixo

Preliminary support for Streams added to revision 362 of my branch. API is still not stable.

Changed 4 years ago by scdbackup

  • status changed from assigned to closed
  • resolution set to fixed

This was released with libisofs-0.6.4 in April 2008

Note: See TracTickets for help on using tickets.