21#ifndef _STREAM_PARSER_HH
22#define _STREAM_PARSER_HH
24#ifndef _FRAMED_SOURCE_HH
34 unsigned char* ptr,
unsigned size,
35 struct timeval presentationTime);
38 void* onInputCloseClientData,
40 void* clientContinueClientData);
57 return (ptr[0]<<24)|(ptr[1]<<16)|(ptr[2]<<8)|ptr[3];
64 u_int16_t result = (ptr[0]<<8)|ptr[1];
75 return (ptr[0]<<8)|ptr[1];
89 void getBytes(u_int8_t* to,
unsigned numBytes) {
130 unsigned numTruncatedBytes,
131 struct timeval presentationTime,
132 unsigned durationInMicroseconds);
void() onCloseFunc(void *clientData)
FramedSource::onCloseFunc * fClientOnInputCloseFunc
unsigned fTotNumValidBytes
unsigned fSavedParserIndex
void testBytes(u_int8_t *to, unsigned numBytes)
virtual void flushInput()
unsigned char fCurBankNum
void afterGettingBytes1(unsigned numBytesRead, struct timeval presentationTime)
static void onInputClosure(void *clientData)
unsigned getBits(unsigned numBits)
StreamParser(FramedSource *inputSource, FramedSource::onCloseFunc *onInputCloseFunc, void *onInputCloseClientData, clientContinueFunc *clientContinueFunc, void *clientContinueClientData)
void getBytes(u_int8_t *to, unsigned numBytes)
unsigned & totNumValidBytes()
void * fClientOnInputCloseClientData
void * fClientContinueClientData
clientContinueFunc * fClientContinueFunc
unsigned bankSize() const
void ensureValidBytes(unsigned numBytesNeeded)
unsigned char fSavedRemainingUnparsedBits
void skipBytes(unsigned numBytes)
unsigned char fRemainingUnparsedBits
void skipBits(unsigned numBits)
struct timeval fLastSeenPresentationTime
FramedSource * fInputSource
virtual void restoreSavedParserState()
void() clientContinueFunc(void *clientData, unsigned char *ptr, unsigned size, struct timeval presentationTime)
Boolean haveSeenEOF() const
unsigned char * curBank()
void ensureValidBytes1(unsigned numBytesNeeded)
static void afterGettingBytes(void *clientData, unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
unsigned char * lastParsed()
unsigned curOffset() const
unsigned char * nextToParse()