85#define edlobj2IEDLStream(src) edl_cast((IEDLStream *)NULL, src)
126 unsigned int *pLenRead,
int *pEof);
411 const IRAInputStreamPtr &sourceStream,
412 bool clonable =
true);
416 %apply
char *BYTE {
void *buffer}
419 %apply
unsigned char OUTPUT[] {
void *buffer}
422 %apply
char INOUT[] {
void *buffer};
448 virtual bool eof()
const = 0;
457 static const int32 kBufSize = 1024;
463 if ((n_read =
read((
void *)buf, (
int32)((count > kBufSize)? kBufSize : count))) <= 0)
499 %apply
char *BYTE {
void *buffer}
502 %apply
unsigned char OUTPUT[] {
void *buffer}
505 %apply
char INOUT[] {
void *buffer}
521 %apply
char *BYTE {
void *buffer}
524 %apply
unsigned char OUTPUT[] {
void *buffer}
527 %apply
char INOUT[] {
void *buffer}
561#define edlobj2IInputStream(src) edl_cast((IInputStream *)NULL, src)
631 %apply
char *BYTE {
const void *buffer}
634 %apply
unsigned char INPUT[] {
const void *buffer}
637 %apply
char INPUT[] {
const void *buffer}
649 %clear
const void *buffer;
663#define edlobj2IRAInputStream(src) edl_cast((IRAInputStream *)NULL, src)
675#define edlobj2IInputPushbackStream(src) edl_cast((IInputPushbackStream *)NULL, src)
688#define edlobj2IRAInputPushbackStream(src) edl_cast((IRAInputPushbackStream *)NULL, src)
690#define FILE_STREAM_GUID 0x89ad895, 0x48f1685b, 0x8dab9c1a, 0xe8e3b18b
691#define SHARED_STREAM_GUID 0xe88a727d, 0xe53140da, 0x9bbff26d, 0x79a42d81
692#define OUTPUTFILE_STREAM_GUID 0x50a914fc, 0xe81446b9, 0x8e420d48, 0x09454eff
693#define OUTPUTUSER_STREAM_GUID 0x789AEE52, 0xD0384136, 0x8B4584B0, 0x942E55CA
694#define INPUTUSER_STREAM_GUID 0xd55cc022, 0xa6844749, 0x9414d265, 0xeeab7cea
695#define INPUTRAUSER_STREAM_GUID 0x9895EBEB, 0xe2654b86, 0xa527a102, 0x3c3d36cd
696#define INPUT_MEMORY_STREAM_GUID 0x26CAC8F2, 0x726A432c, 0xB8399237, 0xEA12D95F
697#define FILE_STREAM_WITH_CALLBACK_GUID 0X7FB63540, 0XC0684D87, 0XB513F53A, 0X4925CF1C
699#define USERINPUT_RASTREAM_GUID 0x776b2562, 0x87e141b0, 0xa3d4c121, 0xdf3588ba
700#define USEROUTPUT_STREAM_GUID 0x1d0a1b45, 0xb2694fd2, 0xa1b28077, 0xee815f6a
781 %apply
char *BYTE {
const uint8 *mem}
784 %apply
unsigned char INPUT[] {
const uint8 *mem}
787 %apply
char INPUT[] {
const uint8 *mem}
792 %clear
const uint8 *mem;
880 static EDL_API int64 copy(
const IInputStreamPtr &inStream,
const IOutputStreamPtr &outStream);
884 %apply
char *BYTE {
const void *buffer}
887 %apply
unsigned char INPUT[] {
const void *buffer}
890 %apply
char INPUT[] {
const void *buffer}
895 %clear
const void *buffer;
949 %apply
char *BYTE {
const void *buffer}
952 %apply
unsigned char INPUT[] {
const void *buffer}
955 %apply
char INPUT[] {
const void *buffer}
968 %clear
const void *buffer;
984 %apply
char *BYTE {
const void *buffer}
987 %apply
unsigned char INPUT[] {
const void *buffer}
990 %apply
char INPUT[] {
const void *buffer}
1000 %clear
const void *buffer;
1012#define edlobj2IOutputStream(src) edl_cast((IOutputStream *)NULL, src)
1024#define edlobj2IRAOutputStream(src) edl_cast((IRAOutputStream *)NULL, src)
1031#define edlobj2IRAInputOutputStream(src) edl_cast((IRAInputOutputStream *)NULL, src)
1042 explicit EDLIFStream(
const char* filename, std::ios_base::openmode mode = std::ios_base::in) : std::ifstream()
1044 open(filename, mode);
1047 void open(
const char* filename, std::ios_base::openmode mode = std::ios_base::in)
1050 std::ifstream::open(wFilename.c_str(), mode);
1064 explicit EDLOFStream(
const char* filename, std::ios_base::openmode mode = std::ios_base::out) : std::ofstream()
1066 open(filename, mode);
1069 void open(
const char* filename, std::ios_base::openmode mode = std::ios_base::out)
1072 std::ofstream::open(wFilename.c_str(), mode);
EDL Object Interface.
Definition iedlobject.h:31
Definition edlvector.h:30
bool m_bAppend
Definition edlstream.h:717
EDLSysString m_sName
Definition edlstream.h:716
CFileStreamParams(const EDLSysString &sName, bool append=false)
Definition edlstream.h:714
void * m_pPriv
Definition edlstream.h:731
FileStreamReadFunc m_pReadFunc
Definition edlstream.h:730
CFileStreamWithCallbackParams(const EDLSysString &sName, FileStreamReadFunc pReadFunc, void *pPriv)
Definition edlstream.h:723
int64 m_length
Definition edlstream.h:769
void * m_pPriv
Definition edlstream.h:768
CRAUserStreamReadParams(UserRAReadFunc pReadFunc, int64 length, void *pPriv)
Definition edlstream.h:763
UserRAReadFunc m_pReadFunc
Definition edlstream.h:767
UserStreamReadFunc m_pReadFunc
Definition edlstream.h:756
void * m_pPriv
Definition edlstream.h:757
CUserStreamReadParams(UserStreamReadFunc pReadFunc, void *pPriv)
Definition edlstream.h:752
UserStreamWriteFunc m_pWriteFunc
Definition edlstream.h:745
CUserStreamWriteParams(UserStreamWriteFunc pWriteFunc, void *pPriv)
Definition edlstream.h:741
void * m_pPriv
Definition edlstream.h:746
EDLIFStream(const char *filename, std::ios_base::openmode mode=std::ios_base::in)
Definition edlstream.h:1042
EDLIFStream()
Definition edlstream.h:1041
EDLOFStream(const char *filename, std::ios_base::openmode mode=std::ios_base::out)
Definition edlstream.h:1064
EDLOFStream()
Definition edlstream.h:1063
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:222
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:38
virtual bool open()
Opens the stream.
Definition edlstream.h:50
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:811
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 void writeFormattedE(const char *fmt,...)
As writeFormatted(), 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 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.
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
virtual void completeWriteE(const char *str)
As completeWrite(), but throws an exception if the operation fails.
Definition edlstream.h:1007
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.
Definition edlstream.h:977
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.
Definition edlstream.h:914
virtual int32 writeFormatted(const char *fmt,...)
Perform a formatted write as per fprintf().
virtual void writeE(const char *str)
Perform a write, throwing an exception on failure.
Definition edlstream.h:924
Abstract base class (for input streams only) that provides a "push back" mechanism....
Definition edlstream.h:614
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:619
Random Access Output Stream.
Definition edlstream.h:1021
Abstract base class for "Random-Access" streams i.e. streams that can be arbitrarily re-positioned.
Definition edlstream.h:571
virtual void setPosE(int64 newPos)
Set stream position, but throw an exception on failure.
Definition edlstream.h:596
virtual ~IRAStream()
Virtual destructor.
Definition edlstream.h:576
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:709
int(* UserRAReadFunc)(void *pPriv, void *pBuff, int64 offset, int32 length)
Callback typedef for user defined random access input.
Definition edlstream.h:140
CEDLVector< IInputStreamPtr > CIInputStreamVect
Definition edlstream.h:89
int(* UserStreamWriteFunc)(void *pPriv, void *pBuff, unsigned int len)
Type definition of a callback function to receive streamed output.
Definition edlstream.h:112
int(* UserStreamReadFunc)(void *pPriv, void *pBuff, unsigned int len, unsigned int *pLenRead, int *pEof)
Callback typedef for streaming input.
Definition edlstream.h:125
CEDLVector< IRAInputStreamPtr > CIRAInputStreamVect
Definition edlstream.h:92
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:37
@ EDL_ERR_PANIC
Unstable state - abort the application.
Definition edlerrors.h:27
#define DECL_SMART_PTR(cls)
Definition smartptr.h:211