84#define edlobj2IEDLStream(src) edl_cast((IEDLStream *)nullptr, src)
125 unsigned int *pLenRead,
int *pEof);
410 const IRAInputStreamPtr &sourceStream,
411 bool clonable =
true);
415 %apply
char *BYTE {
void *buffer}
418 %apply
unsigned char OUTPUT[] {
void *buffer}
421 %apply
char INOUT[] {
void *buffer};
447 virtual bool eof()
const = 0;
456 static const int32 kBufSize = 1024;
462 if ((n_read =
read((
void *)buf, (
int32)((count > kBufSize)? kBufSize : count))) <= 0)
498 %apply
char *BYTE {
void *buffer}
501 %apply
unsigned char OUTPUT[] {
void *buffer}
504 %apply
char INOUT[] {
void *buffer}
520 %apply
char *BYTE {
void *buffer}
523 %apply
unsigned char OUTPUT[] {
void *buffer}
526 %apply
char INOUT[] {
void *buffer}
560#define edlobj2IInputStream(src) edl_cast((IInputStream *)nullptr, src)
630 %apply
char *BYTE {
const void *buffer}
633 %apply
unsigned char INPUT[] {
const void *buffer}
636 %apply
char INPUT[] {
const void *buffer}
648 %clear
const void *buffer;
662#define edlobj2IRAInputStream(src) edl_cast((IRAInputStream *)nullptr, src)
674#define edlobj2IInputPushbackStream(src) edl_cast((IInputPushbackStream *)nullptr, src)
687#define edlobj2IRAInputPushbackStream(src) edl_cast((IRAInputPushbackStream *)nullptr, src)
689#define FILE_STREAM_GUID 0x89ad895, 0x48f1685b, 0x8dab9c1a, 0xe8e3b18b
690#define SHARED_STREAM_GUID 0xe88a727d, 0xe53140da, 0x9bbff26d, 0x79a42d81
691#define OUTPUTFILE_STREAM_GUID 0x50a914fc, 0xe81446b9, 0x8e420d48, 0x09454eff
692#define OUTPUTUSER_STREAM_GUID 0x789AEE52, 0xD0384136, 0x8B4584B0, 0x942E55CA
693#define INPUTUSER_STREAM_GUID 0xd55cc022, 0xa6844749, 0x9414d265, 0xeeab7cea
694#define INPUTRAUSER_STREAM_GUID 0x9895EBEB, 0xe2654b86, 0xa527a102, 0x3c3d36cd
695#define INPUT_MEMORY_STREAM_GUID 0x26CAC8F2, 0x726A432c, 0xB8399237, 0xEA12D95F
696#define FILE_STREAM_WITH_CALLBACK_GUID 0X7FB63540, 0XC0684D87, 0XB513F53A, 0X4925CF1C
698#define USERINPUT_RASTREAM_GUID 0x776b2562, 0x87e141b0, 0xa3d4c121, 0xdf3588ba
699#define USEROUTPUT_STREAM_GUID 0x1d0a1b45, 0xb2694fd2, 0xa1b28077, 0xee815f6a
780 %apply
char *BYTE {
const uint8 *mem}
783 %apply
unsigned char INPUT[] {
const uint8 *mem}
786 %apply
char INPUT[] {
const uint8 *mem}
791 %clear
const uint8 *mem;
879 static EDL_API int64 copy(
const IInputStreamPtr &inStream,
const IOutputStreamPtr &outStream);
883 %apply
char *BYTE {
const void *buffer}
886 %apply
unsigned char INPUT[] {
const void *buffer}
889 %apply
char INPUT[] {
const void *buffer}
901 %clear
const void *buffer;
906 %apply
char *BYTE {
const void *buffer }
909 %apply
unsigned char INPUT[] {
const void *buffer }
912 %apply
char INPUT[] {
const void *buffer }
924 %clear
const void *buffer;
977 %apply
char *BYTE {
const void *buffer}
980 %apply
unsigned char INPUT[] {
const void *buffer}
983 %apply
char INPUT[] {
const void *buffer}
996 %clear
const void *buffer;
1009 %apply
char *BYTE {
const void *buffer}
1012 %apply
unsigned char INPUT[] {
const void *buffer}
1015 %apply
char INPUT[] {
const void *buffer}
1025 %clear
const void *buffer;
1039#define edlobj2IOutputStream(src) edl_cast((IOutputStream *)nullptr, src)
1051#define edlobj2IRAOutputStream(src) edl_cast((IRAOutputStream *)nullptr, src)
1058#define edlobj2IRAInputOutputStream(src) edl_cast((IRAInputOutputStream *)nullptr, src)
1069 explicit EDLIFStream(
const char* filename, std::ios_base::openmode mode = std::ios_base::in) : std::ifstream()
1071 open(filename, mode);
1074 void open(
const char* filename, std::ios_base::openmode mode = std::ios_base::in)
1077 std::ifstream::open(wFilename.c_str(), mode);
1091 explicit EDLOFStream(
const char* filename, std::ios_base::openmode mode = std::ios_base::out) : std::ofstream()
1093 open(filename, mode);
1096 void open(
const char* filename, std::ios_base::openmode mode = std::ios_base::out)
1099 std::ofstream::open(wFilename.c_str(), mode);
EDL Object Interface.
Definition iedlobject.h:31
Definition edlvector.h:30
bool m_bAppend
Definition edlstream.h:716
EDLSysString m_sName
Definition edlstream.h:715
CFileStreamParams(const EDLSysString &sName, bool append=false)
Definition edlstream.h:713
void * m_pPriv
Definition edlstream.h:730
FileStreamReadFunc m_pReadFunc
Definition edlstream.h:729
CFileStreamWithCallbackParams(const EDLSysString &sName, FileStreamReadFunc pReadFunc, void *pPriv)
Definition edlstream.h:722
int64 m_length
Definition edlstream.h:768
void * m_pPriv
Definition edlstream.h:767
CRAUserStreamReadParams(UserRAReadFunc pReadFunc, int64 length, void *pPriv)
Definition edlstream.h:762
UserRAReadFunc m_pReadFunc
Definition edlstream.h:766
UserStreamReadFunc m_pReadFunc
Definition edlstream.h:755
void * m_pPriv
Definition edlstream.h:756
CUserStreamReadParams(UserStreamReadFunc pReadFunc, void *pPriv)
Definition edlstream.h:751
UserStreamWriteFunc m_pWriteFunc
Definition edlstream.h:744
CUserStreamWriteParams(UserStreamWriteFunc pWriteFunc, void *pPriv)
Definition edlstream.h:740
void * m_pPriv
Definition edlstream.h:745
EDLIFStream(const char *filename, std::ios_base::openmode mode=std::ios_base::in)
Definition edlstream.h:1069
EDLIFStream()
Definition edlstream.h:1068
EDLOFStream(const char *filename, std::ios_base::openmode mode=std::ios_base::out)
Definition edlstream.h:1091
EDLOFStream()
Definition edlstream.h:1090
Abstract interface for objects that can be hashed.
Definition idomhashable.h:28
EDL Factory Interface allows one part of the EDL infrastructure to register class creation methods id...
Definition iedlfactory.h:31
An abstract class for EDL exceptions.
Definition edlerrors.h:228
virtual uint32 getErrorCode() const =0
IEDLObject is an abstract base class that is used by all classes that are intended to be created via ...
Definition iedlobject.h:53
virtual bool clone(IEDLObjectPtr &ptrObject, IEDLClassFactory *pFactory)
Create a copy of EDLObject.
Definition iedlobject.h:82
Generic stream. Abstract base class for EDL stream subsystem.
Definition edlstream.h:37
virtual bool open()
Opens the stream.
Definition edlstream.h:49
virtual int64 getPos()=0
Get current stream position.
virtual bool isValid() const =0
Determine stream validity.
virtual void openE()=0
As per open(), but will throw an exception on failure (IEDLError) that for some stream types may cont...
virtual void close()=0
Closes the stream.
Generic output stream. Abstract base class for output streams.
Definition edlstream.h:810
static EDL_API IOutputStreamPtr createToFlateCompressed(IEDLClassFactory *pFactory, const IOutputStreamPtr &stream, uint32 compressionLevel, bool raw=true)
Creation routine for an output stream for compressing a flate stream. Throws an IEDLError exception o...
virtual int32 writeE(const void *buffer, int32 count)
Perform a write, throwing an exception on failure.
virtual void flushE()
As flush(), but throws an exception if the operation fails.
static EDL_API IOutputStreamPtr createToLz4Compressed(IEDLClassFactory *pFactory, const IOutputStreamPtr &stream, bool openSourceStream=true)
Creation routine for an output stream for compressing an lz4 stream. Throws an IEDLError exception on...
static EDL_API IOutputStreamPtr createFromUserWriteFunc(IEDLClassFactory *pFactory, UserStreamWriteFunc writeFunc, void *priv)
Creation function for an IOutputStream from a user function that provides data. Throws an IEDLError e...
virtual int32 writeFormattedE(const char *fmt,...)
As writeFormatted(), but throws an exception if the operation fails.
virtual bool completeWrite(const void *buffer, int32 count)
Perform a complete write.
virtual void completeWriteE(const void *buffer, int32 count)
As completeWrite(), but throws an exception if the operation fails.
static EDL_API IRAOutputStreamPtr createToFile(IEDLClassFactory *pFactory, const EDLString &path, bool append=false)
Creation function for an IOutputStream for a file on disk. Throws an IEDLError exception on failure.
virtual bool flush()=0
Flush the given stream.
static EDL_API int64 writeStream(const IInputStreamPtr &inStream, const IOutputStreamPtr &outStream)
Write the contents of the given stream to an output stream. Opens and closes the input,...
virtual int32 write(const void *buffer, int32 count)=0
Perform a write.
virtual void completeWriteE(const char *str)
As completeWrite(), but throws an exception if the operation fails.
static EDL_API int64 copy(const IInputStreamPtr &inStream, const IOutputStreamPtr &outStream)
Copy a source stream to a destination stream. Opens and closes both the input and output streams....
virtual bool completeWrite(const char *str)
Perform a complete write.
virtual int32 writeE(const char *str)
Perform a write, throwing an exception on failure.
static EDL_API IRAOutputStreamPtr createToFile(IEDLClassFactory *pFactory, const EDLSysString &path, bool append=false)
Creation function for an IOutputStream for a file on disk. Throws an IEDLError exception on failure.
virtual int32 write(const char *str)
Perform a write.
virtual int32 writeFormatted(const char *fmt,...)
Perform a formatted write as per fprintf().
Abstract base class (for input streams only) that provides a "push back" mechanism....
Definition edlstream.h:613
virtual bool pushBack(uint8 byte)=0
Push back a byte.
virtual bool pushBack(const void *buffer, int32 count)=0
Push back from a buffer.
virtual ~IPushbackStream()
Virtual destructor.
Definition edlstream.h:618
Random Access Output Stream.
Definition edlstream.h:1048
Abstract base class for "Random-Access" streams i.e. streams that can be arbitrarily re-positioned.
Definition edlstream.h:570
virtual void setPosE(int64 newPos)
Set stream position, but throw an exception on failure.
Definition edlstream.h:595
virtual ~IRAStream()
Virtual destructor.
Definition edlstream.h:575
virtual bool setPos(int64 newPos)=0
Set stream position.
virtual int64 length()=0
Get length of the stream.
EDL session class.
Definition isession.h:21
EDL_API void throwEDLError(uint32 errorcode)
Utility - Throw an IEDLError exception with the given error code.
#define _BEGIN_EDL_NAMESPACE
Definition edlnamespaces.h:75
#define _END_EDL_NAMESPACE
Definition edlnamespaces.h:76
void(* FileStreamReadFunc)(void *pPriv, int64 pos, int32 len)
Callback typedef for CFileStreamWithCallback that is used to notify a client of reads from stream.
Definition edlstream.h:708
int(* UserRAReadFunc)(void *pPriv, void *pBuff, int64 offset, int32 length)
Callback typedef for user defined random access input.
Definition edlstream.h:139
CEDLVector< IInputStreamPtr > CIInputStreamVect
Definition edlstream.h:88
int(* UserStreamWriteFunc)(void *pPriv, void *pBuff, unsigned int len)
Type definition of a callback function to receive streamed output.
Definition edlstream.h:111
int(* UserStreamReadFunc)(void *pPriv, void *pBuff, unsigned int len, unsigned int *pLenRead, int *pEof)
Callback typedef for streaming input.
Definition edlstream.h:124
CEDLVector< IRAInputStreamPtr > CIRAInputStreamVect
Definition edlstream.h:91
std::string EDLSysString
Definition edlstring.h:158
std::wstring EDLString
Definition edlstring.h:165
EDL_API EDLString EDLSysStringToEDLString(const EDLSysString &edlSysString)
EDLSysStringToEDLString converts an EDLSysString (UTF8) to an EDLString (UTF16 or UTF32 depending on ...
EDL "standard" types including known bit-length signed and unsigned integer type[def]s and definition...
unsigned int uint32
Definition edltypes.h:34
#define EDL_API
Definition edltypes.h:86
_BEGIN_HQN_NAMESPACE typedef signed char int8
Definition edltypes.h:27
unsigned long long uint64
Definition edltypes.h:35
signed int int32
Definition edltypes.h:29
signed long long int64
Definition edltypes.h:30
unsigned char uint8
Definition edltypes.h:32
Simple template vector class for general use.
@ EDL_ERR_IOERROR
General IO error.
Definition edlerrors.h:39
@ EDL_ERR_PANIC
Unstable state - abort the application.
Definition edlerrors.h:29
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211