live
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
AVIFileSink Class Reference

#include <AVIFileSink.hh>

Inheritance diagram for AVIFileSink:
Inheritance graph
[legend]
Collaboration diagram for AVIFileSink:
Collaboration graph
[legend]

Public Types

typedef void( afterPlayingFunc )(void *clientData)
 

Public Member Functions

Boolean startPlaying (afterPlayingFunc *afterFunc, void *afterClientData)
 
unsigned numActiveSubsessions () const
 
UsageEnvironmentenvir () const
 
char const * name () const
 
virtual Boolean isSource () const
 
virtual Boolean isSink () const
 
virtual Boolean isRTCPInstance () const
 
virtual Boolean isRTSPClient () const
 
virtual Boolean isRTSPServer () const
 
virtual Boolean isMediaSession () const
 
virtual Boolean isServerMediaSession () const
 

Static Public Member Functions

static AVIFileSinkcreateNew (UsageEnvironment &env, MediaSession &inputSession, char const *outputFileName, unsigned bufferSize=20000, unsigned short movieWidth=240, unsigned short movieHeight=180, unsigned movieFPS=15, Boolean packetLossCompensate=False)
 
static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium)
 
static void close (UsageEnvironment &env, char const *mediumName)
 
static void close (Medium *medium)
 

Protected Member Functions

TaskTokennextTask ()
 

Private Member Functions

 AVIFileSink (UsageEnvironment &env, MediaSession &inputSession, char const *outputFileName, unsigned bufferSize, unsigned short movieWidth, unsigned short movieHeight, unsigned movieFPS, Boolean packetLossCompensate)
 
virtual ~AVIFileSink ()
 
Boolean continuePlaying ()
 
void onSourceClosure1 ()
 
void addIndexRecord (class AVIIndexRecord *newIndexRecord)
 
void completeOutputFile ()
 
unsigned addWord (unsigned word)
 
unsigned addHalfWord (unsigned short halfWord)
 
unsigned addByte (unsigned char byte)
 
unsigned addZeroWords (unsigned numWords)
 
unsigned add4ByteString (char const *str)
 
void setWord (unsigned filePosn, unsigned size)
 
 _header (AVI)
 
 _header (hdrl)
 
 _header (avih)
 
 _header (strl)
 
 _header (strh)
 
 _header (strf)
 
 _header (JUNK)
 
 _header (movi)
 

Static Private Member Functions

static void afterGettingFrame (void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
 
static void onSourceClosure (void *clientData)
 
static void onRTCPBye (void *clientData)
 

Private Attributes

MediaSessionfInputSession
 
FILE * fOutFid
 
class AVIIndexRecord * fIndexRecordsHead
 
class AVIIndexRecord * fIndexRecordsTail
 
unsigned fNumIndexRecords
 
unsigned fBufferSize
 
Boolean fPacketLossCompensate
 
Boolean fAreCurrentlyBeingPlayed
 
afterPlayingFuncfAfterFunc
 
void * fAfterClientData
 
unsigned fNumSubsessions
 
unsigned fNumBytesWritten
 
struct timeval fStartTime
 
Boolean fHaveCompletedOutputFile
 
unsigned short fMovieWidth
 
unsigned short fMovieHeight
 
unsigned fMovieFPS
 
unsigned fRIFFSizePosition
 
unsigned fRIFFSizeValue
 
unsigned fAVIHMaxBytesPerSecondPosition
 
unsigned fAVIHFrameCountPosition
 
unsigned fMoviSizePosition
 
unsigned fMoviSizeValue
 
class AVISubsessionIOStatefCurrentIOState
 
unsigned fJunkNumber
 

Friends

class AVISubsessionIOState
 

Detailed Description

Definition at line 28 of file AVIFileSink.hh.

Member Typedef Documentation

typedef void( AVIFileSink::afterPlayingFunc)(void *clientData)

Definition at line 39 of file AVIFileSink.hh.

Constructor & Destructor Documentation

AVIFileSink::AVIFileSink ( UsageEnvironment env,
MediaSession inputSession,
char const *  outputFileName,
unsigned  bufferSize,
unsigned short  movieWidth,
unsigned short  movieHeight,
unsigned  movieFPS,
Boolean  packetLossCompensate 
)
private
virtual AVIFileSink::~AVIFileSink ( )
privatevirtual

Member Function Documentation

AVIFileSink::_header ( AVI  )
private
AVIFileSink::_header ( hdrl  )
private
AVIFileSink::_header ( avih  )
private
AVIFileSink::_header ( strl  )
private
AVIFileSink::_header ( strh  )
private
AVIFileSink::_header ( strf  )
private
AVIFileSink::_header ( JUNK  )
private
AVIFileSink::_header ( movi  )
private
unsigned AVIFileSink::add4ByteString ( char const *  str)
private
unsigned AVIFileSink::addByte ( unsigned char  byte)
inlineprivate

Definition at line 85 of file AVIFileSink.hh.

References fOutFid.

85  {
86  putc(byte, fOutFid);
87  return 1;
88  }
FILE * fOutFid
Definition: AVIFileSink.hh:67
unsigned AVIFileSink::addHalfWord ( unsigned short  halfWord)
private
void AVIFileSink::addIndexRecord ( class AVIIndexRecord *  newIndexRecord)
private
unsigned AVIFileSink::addWord ( unsigned  word)
private
unsigned AVIFileSink::addZeroWords ( unsigned  numWords)
private
static void AVIFileSink::afterGettingFrame ( void *  clientData,
unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime,
unsigned  durationInMicroseconds 
)
staticprivate
static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited
static void Medium::close ( Medium medium)
staticinherited
void AVIFileSink::completeOutputFile ( )
private
Boolean AVIFileSink::continuePlaying ( )
private
static AVIFileSink* AVIFileSink::createNew ( UsageEnvironment env,
MediaSession inputSession,
char const *  outputFileName,
unsigned  bufferSize = 20000,
unsigned short  movieWidth = 240,
unsigned short  movieHeight = 180,
unsigned  movieFPS = 15,
Boolean  packetLossCompensate = False 
)
static
UsageEnvironment& Medium::envir ( ) const
inlineinherited
virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

virtual Boolean Medium::isSink ( ) const
virtualinherited

Reimplemented in MediaSink.

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited
char const* Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

61 {return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83
TaskToken& Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

References Medium::fNextTask.

77  {
78  return fNextTask;
79  }
TaskToken fNextTask
Definition: Media.hh:84
unsigned AVIFileSink::numActiveSubsessions ( ) const
inline

Definition at line 43 of file AVIFileSink.hh.

References fNumSubsessions.

43 { return fNumSubsessions; }
unsigned fNumSubsessions
Definition: AVIFileSink.hh:75
static void AVIFileSink::onRTCPBye ( void *  clientData)
staticprivate
static void AVIFileSink::onSourceClosure ( void *  clientData)
staticprivate
void AVIFileSink::onSourceClosure1 ( )
private
void AVIFileSink::setWord ( unsigned  filePosn,
unsigned  size 
)
private
Boolean AVIFileSink::startPlaying ( afterPlayingFunc afterFunc,
void *  afterClientData 
)

Friends And Related Function Documentation

friend class AVISubsessionIOState
friend

Definition at line 65 of file AVIFileSink.hh.

Field Documentation

void* AVIFileSink::fAfterClientData
private

Definition at line 74 of file AVIFileSink.hh.

afterPlayingFunc* AVIFileSink::fAfterFunc
private

Definition at line 73 of file AVIFileSink.hh.

Boolean AVIFileSink::fAreCurrentlyBeingPlayed
private

Definition at line 72 of file AVIFileSink.hh.

unsigned AVIFileSink::fAVIHFrameCountPosition
private

Definition at line 109 of file AVIFileSink.hh.

unsigned AVIFileSink::fAVIHMaxBytesPerSecondPosition
private

Definition at line 108 of file AVIFileSink.hh.

unsigned AVIFileSink::fBufferSize
private

Definition at line 70 of file AVIFileSink.hh.

class AVISubsessionIOState* AVIFileSink::fCurrentIOState
private

Definition at line 111 of file AVIFileSink.hh.

Boolean AVIFileSink::fHaveCompletedOutputFile
private

Definition at line 78 of file AVIFileSink.hh.

class AVIIndexRecord* AVIFileSink::fIndexRecordsHead
private

Definition at line 68 of file AVIFileSink.hh.

class AVIIndexRecord * AVIFileSink::fIndexRecordsTail
private

Definition at line 68 of file AVIFileSink.hh.

MediaSession& AVIFileSink::fInputSession
private

Definition at line 66 of file AVIFileSink.hh.

unsigned AVIFileSink::fJunkNumber
private

Definition at line 112 of file AVIFileSink.hh.

unsigned AVIFileSink::fMovieFPS
private

Definition at line 106 of file AVIFileSink.hh.

unsigned short AVIFileSink::fMovieHeight
private

Definition at line 105 of file AVIFileSink.hh.

unsigned short AVIFileSink::fMovieWidth
private

Definition at line 105 of file AVIFileSink.hh.

unsigned AVIFileSink::fMoviSizePosition
private

Definition at line 110 of file AVIFileSink.hh.

unsigned AVIFileSink::fMoviSizeValue
private

Definition at line 110 of file AVIFileSink.hh.

unsigned AVIFileSink::fNumBytesWritten
private

Definition at line 76 of file AVIFileSink.hh.

unsigned AVIFileSink::fNumIndexRecords
private

Definition at line 69 of file AVIFileSink.hh.

unsigned AVIFileSink::fNumSubsessions
private

Definition at line 75 of file AVIFileSink.hh.

Referenced by numActiveSubsessions().

FILE* AVIFileSink::fOutFid
private

Definition at line 67 of file AVIFileSink.hh.

Referenced by addByte().

Boolean AVIFileSink::fPacketLossCompensate
private

Definition at line 71 of file AVIFileSink.hh.

unsigned AVIFileSink::fRIFFSizePosition
private

Definition at line 107 of file AVIFileSink.hh.

unsigned AVIFileSink::fRIFFSizeValue
private

Definition at line 107 of file AVIFileSink.hh.

struct timeval AVIFileSink::fStartTime
private

Definition at line 77 of file AVIFileSink.hh.


The documentation for this class was generated from the following file: