22#ifndef _MULTI_FRAMED_RTP_SINK_HH
23#define _MULTI_FRAMED_RTP_SINK_HH
51 unsigned char* frameStart,
52 unsigned numBytesInFrame,
53 struct timeval framePresentationTime,
54 unsigned numRemainingBytes);
63 unsigned numBytesInFrame)
const;
83 unsigned wordPosition = 0);
85 unsigned bytePosition = 0);
87 unsigned wordPosition = 0);
89 unsigned bytePosition = 0);
108 unsigned numBytesRead,
unsigned numTruncatedBytes,
109 struct timeval presentationTime,
110 unsigned durationInMicroseconds);
112 struct timeval presentationTime,
113 unsigned durationInMicroseconds);
void setSpecialHeaderWord(unsigned word, unsigned wordPosition=0)
void sendPacketIfNecessary()
unsigned curFragmentationOffset() const
void buildAndSendPacket(Boolean isFirstPacket)
virtual ~MultiFramedRTPSink()
void setOnSendErrorFunc(onSendErrorFunc *onSendErrorFunc, void *onSendErrorFuncData)
Boolean isFirstFrameInPacket() const
void setSpecialHeaderBytes(unsigned char const *bytes, unsigned numBytes, unsigned bytePosition=0)
unsigned fCurFragmentationOffset
static void sendNext(void *firstArg)
virtual void stopPlaying()
unsigned fCurFrameSpecificHeaderPosition
Boolean isTooBigForAPacket(unsigned numBytes) const
void() onSendErrorFunc(void *clientData)
MultiFramedRTPSink(UsageEnvironment &env, Groupsock *rtpgs, unsigned char rtpPayloadType, unsigned rtpTimestampFrequency, char const *rtpPayloadFormatName, unsigned numChannels=1)
OutPacketBuffer * fOutBuf
void afterGettingFrame1(unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
onSendErrorFunc * fOnSendErrorFunc
unsigned fCurFrameSpecificHeaderSize
unsigned fSpecialHeaderPosition
virtual void doSpecialFrameHandling(unsigned fragmentationOffset, unsigned char *frameStart, unsigned numBytesInFrame, struct timeval framePresentationTime, unsigned numRemainingBytes)
virtual Boolean allowFragmentationAfterStart() const
virtual Boolean allowOtherFramesAfterLastFragment() const
static void afterGettingFrame(void *clientData, unsigned numBytesRead, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
void setPacketSizes(unsigned preferredPacketSize, unsigned maxPacketSize)
unsigned fTotalFrameSpecificHeaderSizes
static void ourHandleClosure(void *clientData)
unsigned fSpecialHeaderSize
unsigned numFramesUsedSoFar() const
void setFrameSpecificHeaderWord(unsigned word, unsigned wordPosition=0)
virtual Boolean frameCanAppearAfterPacketStart(unsigned char const *frameStart, unsigned numBytesInFrame) const
virtual unsigned computeOverflowForNewFrame(unsigned newFrameSize) const
struct timeval fNextSendTime
friend void sendNext(void *)
Boolean isFirstPacket() const
void setFrameSpecificHeaderBytes(unsigned char const *bytes, unsigned numBytes, unsigned bytePosition=0)
void setFramePadding(unsigned numPaddingBytes)
virtual unsigned frameSpecificHeaderSize() const
void setTimestamp(struct timeval framePresentationTime)
unsigned fOurMaxPacketSize
unsigned fNumFramesUsedSoFar
unsigned fTimestampPosition
unsigned ourMaxPacketSize() const
virtual unsigned specialHeaderSize() const
Boolean fPreviousFrameEndedFragmentation
virtual Boolean continuePlaying()
unsigned rtpTimestampFrequency() const
unsigned numChannels() const
unsigned char rtpPayloadType() const
char const * rtpPayloadFormatName() const