86#define edlobj2IEDLStream(src) edl_cast((IEDLStream *)nullptr, src)
127 unsigned int *pLenRead,
int *pEof);
412 const IRAInputStreamPtr &sourceStream,
413 bool clonable =
true);
427 const IInputStreamPtr &sourceStream,
428 uint32 bufferSize = 4096);
432 %apply
char *BYTE {
void *buffer}
435 %apply
unsigned char OUTPUT[] {
void *buffer}
438 %apply
char INOUT[] {
void *buffer};
464 virtual bool eof()
const = 0;
473 static const int32 kBufSize = 1024;
479 if ((n_read =
read((
void *)buf, (
int32)((count > kBufSize)? kBufSize : count))) <= 0)
515 %apply
char *BYTE {
void *buffer}
518 %apply
unsigned char OUTPUT[] {
void *buffer}
521 %apply
char INOUT[] {
void *buffer}
537 %apply
char *BYTE {
void *buffer}
540 %apply
unsigned char OUTPUT[] {
void *buffer}
543 %apply
char INOUT[] {
void *buffer}
557 %apply
unsigned long long &OUTPUT {
uint64 &
hash };
572#define edlobj2IInputStream(src) edl_cast((IInputStream *)nullptr, src)
642 %apply
char *BYTE {
const void *buffer}
645 %apply
unsigned char INPUT[] {
const void *buffer}
648 %apply
char INPUT[] {
const void *buffer}
660 %clear
const void *buffer;
674#define edlobj2IRAInputStream(src) edl_cast((IRAInputStream *)nullptr, src)
686#define edlobj2IInputPushbackStream(src) edl_cast((IInputPushbackStream *)nullptr, src)
699#define edlobj2IRAInputPushbackStream(src) edl_cast((IRAInputPushbackStream *)nullptr, src)
701#define FILE_STREAM_GUID 0x89ad895, 0x48f1685b, 0x8dab9c1a, 0xe8e3b18b
702#define SHARED_STREAM_GUID 0xe88a727d, 0xe53140da, 0x9bbff26d, 0x79a42d81
703#define OUTPUTFILE_STREAM_GUID 0x50a914fc, 0xe81446b9, 0x8e420d48, 0x09454eff
704#define OUTPUTUSER_STREAM_GUID 0x789AEE52, 0xD0384136, 0x8B4584B0, 0x942E55CA
705#define INPUTUSER_STREAM_GUID 0xd55cc022, 0xa6844749, 0x9414d265, 0xeeab7cea
706#define INPUTRAUSER_STREAM_GUID 0x9895EBEB, 0xe2654b86, 0xa527a102, 0x3c3d36cd
707#define INPUT_MEMORY_STREAM_GUID 0x26CAC8F2, 0x726A432c, 0xB8399237, 0xEA12D95F
708#define FILE_STREAM_WITH_CALLBACK_GUID 0X7FB63540, 0XC0684D87, 0XB513F53A, 0X4925CF1C
710#define USERINPUT_RASTREAM_GUID 0x776b2562, 0x87e141b0, 0xa3d4c121, 0xdf3588ba
711#define USEROUTPUT_STREAM_GUID 0x1d0a1b45, 0xb2694fd2, 0xa1b28077, 0xee815f6a
792 %apply
char *BYTE {
const uint8 *mem}
795 %apply
unsigned char INPUT[] {
const uint8 *mem}
798 %apply
char INPUT[] {
const uint8 *mem}
803 %clear
const uint8 *mem;
891 static EDL_API int64 copy(
const IInputStreamPtr &inStream,
const IOutputStreamPtr &outStream);
895 %apply
char *BYTE {
const void *buffer}
898 %apply
unsigned char INPUT[] {
const void *buffer}
901 %apply
char INPUT[] {
const void *buffer}
913 %clear
const void *buffer;
918 %apply
char *BYTE {
const void *buffer }
921 %apply
unsigned char INPUT[] {
const void *buffer }
924 %apply
char INPUT[] {
const void *buffer }
936 %clear
const void *buffer;
989 %apply
char *BYTE {
const void *buffer}
992 %apply
unsigned char INPUT[] {
const void *buffer}
995 %apply
char INPUT[] {
const void *buffer}
1008 %clear
const void *buffer;
1021 %apply
char *BYTE {
const void *buffer}
1024 %apply
unsigned char INPUT[] {
const void *buffer}
1027 %apply
char INPUT[] {
const void *buffer}
1037 %clear
const void *buffer;
1051#define edlobj2IOutputStream(src) edl_cast((IOutputStream *)nullptr, src)
1063#define edlobj2IRAOutputStream(src) edl_cast((IRAOutputStream *)nullptr, src)
1070#define edlobj2IRAInputOutputStream(src) edl_cast((IRAInputOutputStream *)nullptr, src)
1081 explicit EDLIFStream(
const char* filename, std::ios_base::openmode mode = std::ios_base::in) : std::ifstream()
1083 open(filename, mode);
1086 void open(
const char* filename, std::ios_base::openmode mode = std::ios_base::in)
1089 std::ifstream::open(wFilename.c_str(), mode);
1103 explicit EDLOFStream(
const char* filename, std::ios_base::openmode mode = std::ios_base::out) : std::ofstream()
1105 open(filename, mode);
1108 void open(
const char* filename, std::ios_base::openmode mode = std::ios_base::out)
1111 std::ofstream::open(wFilename.c_str(), mode);
EDL Object Interface.
Definition iedlobject.h:31
Definition edlvector.h:30
bool m_bAppend
Definition edlstream.h:728
EDLSysString m_sName
Definition edlstream.h:727
CFileStreamParams(const EDLSysString &sName, bool append=false)
Definition edlstream.h:725
void * m_pPriv
Definition edlstream.h:742
FileStreamReadFunc m_pReadFunc
Definition edlstream.h:741
CFileStreamWithCallbackParams(const EDLSysString &sName, FileStreamReadFunc pReadFunc, void *pPriv)
Definition edlstream.h:734
int64 m_length
Definition edlstream.h:780
void * m_pPriv
Definition edlstream.h:779
CRAUserStreamReadParams(UserRAReadFunc pReadFunc, int64 length, void *pPriv)
Definition edlstream.h:774
UserRAReadFunc m_pReadFunc
Definition edlstream.h:778
UserStreamReadFunc m_pReadFunc
Definition edlstream.h:767
void * m_pPriv
Definition edlstream.h:768
CUserStreamReadParams(UserStreamReadFunc pReadFunc, void *pPriv)
Definition edlstream.h:763
UserStreamWriteFunc m_pWriteFunc
Definition edlstream.h:756
CUserStreamWriteParams(UserStreamWriteFunc pWriteFunc, void *pPriv)
Definition edlstream.h:752
void * m_pPriv
Definition edlstream.h:757
EDLIFStream(const char *filename, std::ios_base::openmode mode=std::ios_base::in)
Definition edlstream.h:1081
EDLIFStream()
Definition edlstream.h:1080
EDLOFStream(const char *filename, std::ios_base::openmode mode=std::ios_base::out)
Definition edlstream.h:1103
EDLOFStream()
Definition edlstream.h:1102
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:39
virtual bool open()
Opens the stream.
Definition edlstream.h:51
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:822
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:625
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:630
Random Access Output Stream.
Definition edlstream.h:1060
Abstract base class for "Random-Access" streams i.e. streams that can be arbitrarily re-positioned.
Definition edlstream.h:582
virtual void setPosE(int64 newPos)
Set stream position, but throw an exception on failure.
Definition edlstream.h:607
virtual ~IRAStream()
Virtual destructor.
Definition edlstream.h:587
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:720
int(* UserRAReadFunc)(void *pPriv, void *pBuff, int64 offset, int32 length)
Callback typedef for user defined random access input.
Definition edlstream.h:141
CEDLVector< IInputStreamPtr > CIInputStreamVect
Definition edlstream.h:90
int(* UserStreamWriteFunc)(void *pPriv, void *pBuff, unsigned int len)
Type definition of a callback function to receive streamed output.
Definition edlstream.h:113
int(* UserStreamReadFunc)(void *pPriv, void *pBuff, unsigned int len, unsigned int *pLenRead, int *pEof)
Callback typedef for streaming input.
Definition edlstream.h:126
CEDLVector< IRAInputStreamPtr > CIRAInputStreamVect
Definition edlstream.h:93
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