Random Access Input Stream. More...
#include <edlstream.h>
Additional Inherited Members | |
Public Member Functions inherited from IInputStream | |
virtual int32 | read (void *buffer, int32 count)=0 |
Read specified number of bytes from a stream into buffer. | |
virtual int8 | read ()=0 |
Read single byte from a stream. | |
virtual bool | eof () const =0 |
Determine if the stream has exhausted. | |
virtual int64 | skip (int64 count) |
Skip a specified number of bytes. | |
virtual bool | getSourceFilePath (EDLSysString &sourcePath)=0 |
If available, find the file path of the file that this stream references, or for streams that take their input from other streams, the ultimate source stream. If at all possible, the source path will be canonicalised, but this is not guaranteed. If a canonical name is absolutely required, check getCanonicalSourceFilePath(). | |
virtual bool | getCanonicalSourceFilePath (EDLSysString &sourceCanonicalPath)=0 |
If available, find the canonical file path of the file that this stream references, or for streams that take their input from other streams, the ultimate source stream. For canonical names to be discovered on all platforms, the underlying file must exist. If the canonical file path cannot be determined, false will be returned. In which case, you may wish to try getSourceFilePath() above. | |
virtual bool | completeRead (void *buffer, int32 count) |
Perform a complete read. | |
virtual void | completeReadE (void *buffer, int32 count) |
As completeRead(), but throws an exception if the operation fails. | |
virtual bool | hash (uint64 &hash) |
Obtain a 64-bit hash of the stream. Please note that this requires reading the stream and is therefore not thread safe. If thread safety is desired, make a clone of the stream first. | |
Public Member Functions inherited from IEDLStream | |
virtual bool | isValid () const =0 |
Determine stream validity. | |
virtual bool | open () |
Opens the stream. | |
virtual void | openE ()=0 |
As per open(), but will throw an exception on failure (IEDLError) that for some stream types may contain additional failure information. | |
virtual void | close ()=0 |
Closes the stream. | |
virtual int64 | getPos ()=0 |
Get current stream position. | |
Public Member Functions inherited from IEDLObject | |
virtual const CClassID & | getClassID () const =0 |
Returns class ID of IEDLObject. | |
virtual bool | init (CClassParams *pData) |
The init() method is called to perform any post-construction initialization of an IEDLObject that has been created by the EDL class factory, before it is actually returned by the factory. | |
virtual bool | clone (IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory) |
Create a copy of EDLObject. | |
Public Member Functions inherited from IRCObject | |
virtual void | addRef () const =0 |
Increases the reference count of the actual object pointed to. This would take place during an assignment or copying. | |
virtual bool | decRef () const =0 |
Decreases the reference count of the actual object pointed to. When the reference count falls to Zero, it deletes the actual object pointed to. | |
virtual int32 | getRefCount () const =0 |
Retrieve the current reference count of the actual object pointed to. | |
Public Member Functions inherited from IDOMHashable | |
virtual | ~IDOMHashable () |
Virtual destructor. | |
virtual uint64 | hashE () |
As hash(), but throws an exception if the operation fails. | |
Public Member Functions inherited from IRAStream | |
virtual | ~IRAStream () |
Virtual destructor. | |
virtual int64 | length ()=0 |
Get length of the stream. | |
virtual bool | setPos (int64 newPos)=0 |
Set stream position. | |
virtual void | setPosE (int64 newPos) |
Set stream position, but throw an exception on failure. | |
Static Public Member Functions inherited from IInputStream | |
static EDL_API IRAInputStreamPtr | createFromFile (IEDLClassFactory *pFactory, const EDLSysString &path) |
Creation function for an IInputStream for a file on disk. Throws an IEDLError exception on failure. | |
static EDL_API IRAInputStreamPtr | createFromFile (IEDLClassFactory *pFactory, const EDLString &path) |
Creation function for an IInputStream for a file on disk. Throws an IEDLError exception on failure. | |
static EDL_API IRAInputStreamPtr | createFromFileShared (IEDLClassFactory *pFactory, const EDLSysString &path) |
Creation function for an IInputStream for a file on disk. Similar to createFromFile, but if this file is cloned, only one file handle will be open at a time. This is slower, but is useful if many users are likely to want to have this file open at the same file. On some systems, having too many files open may result in errors. Performance should be acceptable providing there is not a great deal of contention and simultaneous access. | |
static EDL_API IRAInputStreamPtr | createFromFileShared (IEDLClassFactory *pFactory, const EDLString &path) |
Creation function for an IInputStream for a file on disk. Similar to createFromFile, but if this stream is cloned, only one file handle will be open at a time. This is slower, but is useful if many users are likely to want to have this file open at the same file. On some systems, having too many files open may result in errors. Performance should be acceptable providing there is not a great deal of contention and simultaneous access. | |
static EDL_API IRAInputStreamPtr | createSharedFromStream (IEDLClassFactory *pFactory, const IRAInputStreamPtr &stream) |
Creation function for a shared stream overlaying an existing stream. If this stream is cloned, the underlying file will not be cloned. This is useful if many users are likely to want to have this file open at the same time. On some systems, having too many files open may result in errors. Performance should be acceptable providing there is not a great deal of contention and simultaneous access. Only possible for random access streams. If the stream is already shared, the stream will be returned as is. | |
static EDL_API IRAInputStreamPtr | createFromMemory (IEDLClassFactory *pFactory, const void *mem, uint32 length, bool copy=false, bool free=true) |
Creation function for an IInputStream for data in memory. Throws an IEDLError exception on failure. | |
static EDL_API IInputStreamPtr | createFromUserReadFunc (IEDLClassFactory *pFactory, UserStreamReadFunc readFunc, void *priv) |
Creation function for an IInputStream from a user function that provides data. Throws an IEDLError exception on failure. | |
static EDL_API IRAInputStreamPtr | createFromRAUserFunc (IEDLClassFactory *pFactory, int64 length, UserRAReadFunc readFunc, void *priv) |
Creation function for an IRAInputStream from a user function that provides random access. Throws an IEDLError exception on failure. | |
static EDL_API IRAInputStreamPtr | createRandomAccessFromNonRandomAccess (IEDLClassFactory *pFactory, const IInputStreamPtr &stream) |
Creation function to make a random access stream from a stream that is not random access. Currently, the temporary store will be used to store a copy of the source data, but a concrete implementation method should not be assumed. If the source stream is random access, it will be returned as is. Throws an IEDLError exception on failure. | |
static EDL_API IRAInputStreamPtr | createFromNewFileWithContents (IEDLClassFactory *pFactory, const EDLSysString &path, const IInputStreamPtr &stream) |
Creation function for an IInputStream for a file on disk created with the contents of an existing stream. Throws an IEDLError exception on failure. | |
static EDL_API IRAInputStreamPtr | createFromNewFileWithContents (IEDLClassFactory *pFactory, const EDLString &path, const IInputStreamPtr &stream) |
Creation function for an IInputStream for a file on disk created with the contents of an existing stream. Throws an IEDLError exception on failure. | |
static EDL_API IInputStreamPtr | createSubFile (IEDLClassFactory *pFactory, const IInputStreamPtr &stream, int64 offset, int64 length) |
Creation routine for a stream representing a portion of a file on disk. If the source file is random access, then the created file shall be also. Throws an IEDLError exception on failure. | |
static EDL_API IInputStreamPtr | createFromFlateCompressed (IEDLClassFactory *pFactory, const IInputStreamPtr &stream, bool raw=true, bool ignoreChecksums=false) |
Creation routine for a input stream for decompressing a flate stream. Throws an IEDLError exception on failure. | |
static EDL_API IInputStreamPtr | createFromLz4Compressed (IEDLClassFactory *pFactory, const IInputStreamPtr &stream) |
Creation routine for a input stream for decompressing an lz4 block compressed stream. Throws an IEDLError exception on failure. Note: This is not intended for interoperability with other LZ4 formats, but is useful for things like temporary storage. | |
static EDL_API IInputStreamPtr | createFromPredictorCompressed (IEDLClassFactory *pFactory, const IInputStreamPtr &stream, uint8 predictor, uint8 colors, uint8 bitsPerComponent, uint32 columns) |
Creation routine for a input stream for applying a predictor algorithm to a compressed stream. Throws an IEDLError exception on failure. | |
static EDL_API IInputStreamPtr | createCompositeStream (IEDLClassFactory *pFactory, const CIInputStreamVect &streams) |
Creation routine for creating a composite input stream representing the concatenation of a series of streams. | |
static EDL_API IInputPushbackStreamPtr | createPushbackStream (IEDLClassFactory *pFactory, const IInputStreamPtr &sourceStream, bool clone=true) |
Creation routine for creating a push-back stream using a non-pushback stream as a data source. If the source stream is random access, the resulting stream will also be random access. | |
static EDL_API IInputStreamPtr | createUelStream (IEDLClassFactory *pFactory, const IInputStreamPtr &sourceStream) |
Creation routine for a stream that emulates an end-of-file condition should a Universal End of Language (UEL) sequence be encountered in an underlying data source. The resulting stream is not random access. The underlying stream is neither opened nor closed. This stream type is useful for restricting parsing of substreams inside a print stream. Streams of this type are not clonable. Please also note, that this stream must read ahead of read requests in order to search for UEL sequences. However it will never read beyond the UEL sequence. | |
static EDL_API IInputStreamPtr | createTbcpStream (IEDLClassFactory *pFactory, const IInputStreamPtr &sourceStream, bool openSource=false) |
Creation routine for a stream that reads data from an underlying stream encoded using Adobe's Tagged Binary Communication Protocol (TBCP). The resulting stream is not random access. Streams of this type are not clonable. | |
Protected Member Functions inherited from IRCObject | |
virtual | ~IRCObject () |
Virtual destructor. | |
Random Access Input Stream.