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
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Friends

class AVISubsessionIOState
 

Detailed Description

Definition at line 28 of file AVIFileSink.hh.

Member Typedef Documentation

◆ afterPlayingFunc

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

Definition at line 39 of file AVIFileSink.hh.

Constructor & Destructor Documentation

◆ AVIFileSink()

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

◆ ~AVIFileSink()

virtual AVIFileSink::~AVIFileSink ( )
privatevirtual

Member Function Documentation

◆ _header() [1/8]

AVIFileSink::_header ( AVI  )
private

◆ _header() [2/8]

AVIFileSink::_header ( avih  )
private

◆ _header() [3/8]

AVIFileSink::_header ( hdrl  )
private

◆ _header() [4/8]

AVIFileSink::_header ( JUNK  )
private

◆ _header() [5/8]

AVIFileSink::_header ( movi  )
private

◆ _header() [6/8]

AVIFileSink::_header ( strf  )
private

◆ _header() [7/8]

AVIFileSink::_header ( strh  )
private

◆ _header() [8/8]

AVIFileSink::_header ( strl  )
private

◆ add4ByteString()

unsigned AVIFileSink::add4ByteString ( char const *  str)
private

◆ addByte()

unsigned AVIFileSink::addByte ( unsigned char  byte)
inlineprivate

Definition at line 85 of file AVIFileSink.hh.

85 {
86 putc(byte, fOutFid);
87 return 1;
88 }
FILE * fOutFid
Definition: AVIFileSink.hh:67

References fOutFid.

◆ addHalfWord()

unsigned AVIFileSink::addHalfWord ( unsigned short  halfWord)
private

◆ addIndexRecord()

void AVIFileSink::addIndexRecord ( class AVIIndexRecord *  newIndexRecord)
private

◆ addWord()

unsigned AVIFileSink::addWord ( unsigned  word)
private

◆ addZeroWords()

unsigned AVIFileSink::addZeroWords ( unsigned  numWords)
private

◆ afterGettingFrame()

static void AVIFileSink::afterGettingFrame ( void *  clientData,
unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime,
unsigned  durationInMicroseconds 
)
staticprivate

◆ close() [1/2]

static void Medium::close ( Medium medium)
staticinherited

◆ close() [2/2]

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited

◆ completeOutputFile()

void AVIFileSink::completeOutputFile ( )
private

◆ continuePlaying()

Boolean AVIFileSink::continuePlaying ( )
private

◆ createNew()

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

◆ envir()

UsageEnvironment & Medium::envir ( ) const
inlineinherited

◆ isMediaSession()

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

◆ isRTCPInstance()

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

◆ isRTSPClient()

virtual Boolean Medium::isRTSPClient ( ) const
virtualinherited

Reimplemented in RTSPClient.

◆ isRTSPServer()

virtual Boolean Medium::isRTSPServer ( ) const
virtualinherited

Reimplemented in RTSPServer.

◆ isServerMediaSession()

virtual Boolean Medium::isServerMediaSession ( ) const
virtualinherited

Reimplemented in ServerMediaSession.

◆ isSink()

virtual Boolean Medium::isSink ( ) const
virtualinherited

Reimplemented in MediaSink.

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ lookupByName()

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

◆ name()

char const * Medium::name ( ) const
inlineinherited

Definition at line 61 of file Media.hh.

61{return fMediumName;}
char fMediumName[mediumNameMaxLen]
Definition: Media.hh:83

References Medium::fMediumName.

◆ nextTask()

TaskToken & Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

77 {
78 return fNextTask;
79 }
TaskToken fNextTask
Definition: Media.hh:84

References Medium::fNextTask.

◆ numActiveSubsessions()

unsigned AVIFileSink::numActiveSubsessions ( ) const
inline

Definition at line 43 of file AVIFileSink.hh.

43{ return fNumSubsessions; }
unsigned fNumSubsessions
Definition: AVIFileSink.hh:75

References fNumSubsessions.

◆ onRTCPBye()

static void AVIFileSink::onRTCPBye ( void *  clientData)
staticprivate

◆ onSourceClosure()

static void AVIFileSink::onSourceClosure ( void *  clientData)
staticprivate

◆ onSourceClosure1()

void AVIFileSink::onSourceClosure1 ( )
private

◆ setWord()

void AVIFileSink::setWord ( unsigned  filePosn,
unsigned  size 
)
private

◆ startPlaying()

Boolean AVIFileSink::startPlaying ( afterPlayingFunc afterFunc,
void *  afterClientData 
)

Friends And Related Function Documentation

◆ AVISubsessionIOState

friend class AVISubsessionIOState
friend

Definition at line 65 of file AVIFileSink.hh.

Field Documentation

◆ fAfterClientData

void* AVIFileSink::fAfterClientData
private

Definition at line 74 of file AVIFileSink.hh.

◆ fAfterFunc

afterPlayingFunc* AVIFileSink::fAfterFunc
private

Definition at line 73 of file AVIFileSink.hh.

◆ fAreCurrentlyBeingPlayed

Boolean AVIFileSink::fAreCurrentlyBeingPlayed
private

Definition at line 72 of file AVIFileSink.hh.

◆ fAVIHFrameCountPosition

unsigned AVIFileSink::fAVIHFrameCountPosition
private

Definition at line 109 of file AVIFileSink.hh.

◆ fAVIHMaxBytesPerSecondPosition

unsigned AVIFileSink::fAVIHMaxBytesPerSecondPosition
private

Definition at line 108 of file AVIFileSink.hh.

◆ fBufferSize

unsigned AVIFileSink::fBufferSize
private

Definition at line 70 of file AVIFileSink.hh.

◆ fCurrentIOState

class AVISubsessionIOState* AVIFileSink::fCurrentIOState
private

Definition at line 111 of file AVIFileSink.hh.

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fHaveCompletedOutputFile

Boolean AVIFileSink::fHaveCompletedOutputFile
private

Definition at line 78 of file AVIFileSink.hh.

◆ fIndexRecordsHead

class AVIIndexRecord* AVIFileSink::fIndexRecordsHead
private

Definition at line 68 of file AVIFileSink.hh.

◆ fIndexRecordsTail

class AVIIndexRecord * AVIFileSink::fIndexRecordsTail
private

Definition at line 68 of file AVIFileSink.hh.

◆ fInputSession

MediaSession& AVIFileSink::fInputSession
private

Definition at line 66 of file AVIFileSink.hh.

◆ fJunkNumber

unsigned AVIFileSink::fJunkNumber
private

Definition at line 112 of file AVIFileSink.hh.

◆ fMediumName

char Medium::fMediumName[mediumNameMaxLen]
privateinherited

Definition at line 83 of file Media.hh.

Referenced by Medium::name().

◆ fMovieFPS

unsigned AVIFileSink::fMovieFPS
private

Definition at line 106 of file AVIFileSink.hh.

◆ fMovieHeight

unsigned short AVIFileSink::fMovieHeight
private

Definition at line 105 of file AVIFileSink.hh.

◆ fMovieWidth

unsigned short AVIFileSink::fMovieWidth
private

Definition at line 105 of file AVIFileSink.hh.

◆ fMoviSizePosition

unsigned AVIFileSink::fMoviSizePosition
private

Definition at line 110 of file AVIFileSink.hh.

◆ fMoviSizeValue

unsigned AVIFileSink::fMoviSizeValue
private

Definition at line 110 of file AVIFileSink.hh.

◆ fNextTask

TaskToken Medium::fNextTask
privateinherited

Definition at line 84 of file Media.hh.

Referenced by Medium::nextTask().

◆ fNumBytesWritten

unsigned AVIFileSink::fNumBytesWritten
private

Definition at line 76 of file AVIFileSink.hh.

◆ fNumIndexRecords

unsigned AVIFileSink::fNumIndexRecords
private

Definition at line 69 of file AVIFileSink.hh.

◆ fNumSubsessions

unsigned AVIFileSink::fNumSubsessions
private

Definition at line 75 of file AVIFileSink.hh.

Referenced by numActiveSubsessions().

◆ fOutFid

FILE* AVIFileSink::fOutFid
private

Definition at line 67 of file AVIFileSink.hh.

Referenced by addByte().

◆ fPacketLossCompensate

Boolean AVIFileSink::fPacketLossCompensate
private

Definition at line 71 of file AVIFileSink.hh.

◆ fRIFFSizePosition

unsigned AVIFileSink::fRIFFSizePosition
private

Definition at line 107 of file AVIFileSink.hh.

◆ fRIFFSizeValue

unsigned AVIFileSink::fRIFFSizeValue
private

Definition at line 107 of file AVIFileSink.hh.

◆ fStartTime

struct timeval AVIFileSink::fStartTime
private

Definition at line 77 of file AVIFileSink.hh.


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