From: Mathew S. <mat...@eu...> - 2004-02-05 17:09:31
|
Matt Beard wrote: > At 09:50 05/02/2004, Mathew Spencer wrote: > >> There is one very good reason for this (in the GStreamer example) as >> far as I can see. I want to abstract the MXF file IO to allow for >> the GStreamer pipeline to control it (In this case, the file io is >> controlled by a GstBytestream structure), but the dictionary and >> types file loading still needs to be done by the generic access >> methods. I have already written the code that allows this to be >> achieved and will supply a patch (hopefully today, I'll see how my >> time goes). > > > At the moment the sax parser will still read from a file as it is > within klvlib, soon this will not be the case. There are a number of > ways to get around this - such as the client code switching its > handlers from file mode to stream mode after loading the dictionaries. > >> One other point, the MXFLIB_NO_FILE_IO system requires the library to >> be recompiled for each purpose, with this method you simply need to >> supply the library with an alternate set of access methods at run time. > > > It seems to be a very bad idea to add an extra layer between the file > i/o and the library as this will kill many optimizations. Consider > the case of checking for EOF - normally this will optimize into a read > of a single value from a memory structure. If non-file handling were > to be required in a significant proportion of applications it may be > worth building this layer in, but at the moment it would simply reduce > the efficiency for everyone. A simple answer might be to "optionally" > add this layer - so you either have file only (with full > optimizations) or switchable (with a little extra overhead). Agreed. I have attached a tarball with the modifications I made to mxffile and system.h to enable runtime selection of io methods. Its not very elegant at the moment, but it works and could form a starting point for getting this functionality into mxflib. For what its worth, I now have a gstreamer plugin that will play some formats of MXF file (namely XDCam formats at the moment, others to come soon). By the way Matt, have you had a chance to look at the Autotools version of mxflib that I sent you? > Matt Regards, Mat ************************************************************************* The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. If you are not the addressee any disclosure, reproduction, distribution or other dissemination or use of this communication is strictly prohibited ************************************************************************* |