SubsessionBuffer Class Reference


Public Member Functions

 SubsessionBuffer (unsigned bufferSize)
virtual ~SubsessionBuffer ()
void reset ()
void addBytes (unsigned numBytes)
unsigned char * dataStart ()
unsigned char * dataEnd ()
unsigned bytesInUse () const
unsigned bytesAvailable () const
void setPresentationTime (struct timeval const &presentationTime)
timeval const & presentationTime () const
 SubsessionBuffer (unsigned bufferSize)
virtual ~SubsessionBuffer ()
void reset ()
void addBytes (unsigned numBytes)
unsigned char * dataStart ()
unsigned char * dataEnd ()
unsigned bytesInUse () const
unsigned bytesAvailable () const
void setPresentationTime (struct timeval const &presentationTime)
timeval const & presentationTime () const

Private Attributes

unsigned fBufferSize
timeval fPresentationTime
unsigned char * fData
unsigned fBytesInUse
timeval fPresentationTime
unsigned char * fData

Detailed Description

Definition at line 31 of file AVIFileSink.cpp.


Constructor & Destructor Documentation

SubsessionBuffer::SubsessionBuffer ( unsigned  bufferSize  )  [inline]

Definition at line 33 of file AVIFileSink.cpp.

References fData, and reset().

00034     : fBufferSize(bufferSize) {
00035     reset();
00036     fData = new unsigned char[bufferSize];
00037   }

virtual SubsessionBuffer::~SubsessionBuffer (  )  [inline, virtual]

Definition at line 38 of file AVIFileSink.cpp.

References fData.

00038 { delete[] fData; }

SubsessionBuffer::SubsessionBuffer ( unsigned  bufferSize  )  [inline]

Definition at line 62 of file QuickTimeFileSink.cpp.

References fData, and reset().

00063     : fBufferSize(bufferSize) {
00064     reset();
00065     fData = new unsigned char[bufferSize];
00066   }

virtual SubsessionBuffer::~SubsessionBuffer (  )  [inline, virtual]

Definition at line 67 of file QuickTimeFileSink.cpp.

References fData.

00067 { delete[] fData; }


Member Function Documentation

void SubsessionBuffer::reset (  )  [inline]

Definition at line 39 of file AVIFileSink.cpp.

References fBytesInUse.

Referenced by SubsessionIOState::afterGettingFrame(), AVISubsessionIOState::afterGettingFrame(), and SubsessionBuffer().

00039 { fBytesInUse = 0; }

void SubsessionBuffer::addBytes ( unsigned  numBytes  )  [inline]

Definition at line 40 of file AVIFileSink.cpp.

References fBytesInUse.

Referenced by SubsessionIOState::afterGettingFrame(), and AVISubsessionIOState::afterGettingFrame().

00040 { fBytesInUse += numBytes; }

unsigned char* SubsessionBuffer::dataStart (  )  [inline]

Definition at line 42 of file AVIFileSink.cpp.

References fData.

Referenced by SubsessionIOState::syncOK(), SubsessionIOState::useFrame(), and AVISubsessionIOState::useFrame().

00042 { return &fData[0]; }

unsigned char* SubsessionBuffer::dataEnd (  )  [inline]

Definition at line 43 of file AVIFileSink.cpp.

References fBytesInUse, and fData.

Referenced by QuickTimeFileSink::continuePlaying(), and AVIFileSink::continuePlaying().

00043 { return &fData[fBytesInUse]; }

unsigned SubsessionBuffer::bytesInUse (  )  const [inline]

Definition at line 44 of file AVIFileSink.cpp.

References fBytesInUse.

Referenced by SubsessionIOState::afterGettingFrame(), AVISubsessionIOState::afterGettingFrame(), SubsessionIOState::useFrame(), and AVISubsessionIOState::useFrame().

00044 { return fBytesInUse; }

unsigned SubsessionBuffer::bytesAvailable (  )  const [inline]

Definition at line 45 of file AVIFileSink.cpp.

References fBufferSize, and fBytesInUse.

Referenced by QuickTimeFileSink::continuePlaying(), and AVIFileSink::continuePlaying().

00045 { return fBufferSize - fBytesInUse; }

void SubsessionBuffer::setPresentationTime ( struct timeval const &  presentationTime  )  [inline]

Definition at line 47 of file AVIFileSink.cpp.

References fPresentationTime.

Referenced by SubsessionIOState::afterGettingFrame(), and AVISubsessionIOState::afterGettingFrame().

00047                                                                    {
00048     fPresentationTime = presentationTime;
00049   }

struct timeval const& SubsessionBuffer::presentationTime (  )  const [inline, read]

Definition at line 50 of file AVIFileSink.cpp.

References fPresentationTime.

Referenced by SubsessionIOState::useFrame(), and AVISubsessionIOState::useFrame().

00050 {return fPresentationTime;}

void SubsessionBuffer::reset (  )  [inline]

Definition at line 68 of file QuickTimeFileSink.cpp.

References fBytesInUse.

00068 { fBytesInUse = 0; }

void SubsessionBuffer::addBytes ( unsigned  numBytes  )  [inline]

Definition at line 69 of file QuickTimeFileSink.cpp.

References fBytesInUse.

00069 { fBytesInUse += numBytes; }

unsigned char* SubsessionBuffer::dataStart (  )  [inline]

Definition at line 71 of file QuickTimeFileSink.cpp.

References fData.

00071 { return &fData[0]; }

unsigned char* SubsessionBuffer::dataEnd (  )  [inline]

Definition at line 72 of file QuickTimeFileSink.cpp.

References fBytesInUse, and fData.

00072 { return &fData[fBytesInUse]; }

unsigned SubsessionBuffer::bytesInUse (  )  const [inline]

Definition at line 73 of file QuickTimeFileSink.cpp.

References fBytesInUse.

00073 { return fBytesInUse; }

unsigned SubsessionBuffer::bytesAvailable (  )  const [inline]

Definition at line 74 of file QuickTimeFileSink.cpp.

References fBufferSize, and fBytesInUse.

00074 { return fBufferSize - fBytesInUse; }

void SubsessionBuffer::setPresentationTime ( struct timeval const &  presentationTime  )  [inline]

Definition at line 76 of file QuickTimeFileSink.cpp.

References fPresentationTime.

00076                                                                    {
00077     fPresentationTime = presentationTime;
00078   }

struct timeval const& SubsessionBuffer::presentationTime (  )  const [inline, read]

Definition at line 79 of file QuickTimeFileSink.cpp.

References fPresentationTime.

00079 {return fPresentationTime;}


Field Documentation

unsigned SubsessionBuffer::fBufferSize [private]

Definition at line 53 of file AVIFileSink.cpp.

Referenced by bytesAvailable().

struct timeval SubsessionBuffer::fPresentationTime [read, private]

Definition at line 54 of file AVIFileSink.cpp.

Referenced by presentationTime(), and setPresentationTime().

unsigned char* SubsessionBuffer::fData [private]

Definition at line 55 of file AVIFileSink.cpp.

Referenced by dataEnd(), dataStart(), SubsessionBuffer(), and ~SubsessionBuffer().

unsigned SubsessionBuffer::fBytesInUse [private]

Definition at line 56 of file AVIFileSink.cpp.

Referenced by addBytes(), bytesAvailable(), bytesInUse(), dataEnd(), and reset().

struct timeval SubsessionBuffer::fPresentationTime [read, private]

Definition at line 83 of file QuickTimeFileSink.cpp.

unsigned char* SubsessionBuffer::fData [private]

Definition at line 84 of file QuickTimeFileSink.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Mar 25 14:40:56 2014 for live by  doxygen 1.5.2