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

#include <QuickTimeFileSink.hh>

Inheritance diagram for QuickTimeFileSink:
Inheritance graph
[legend]
Collaboration diagram for QuickTimeFileSink:
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 QuickTimeFileSinkcreateNew (UsageEnvironment &env, MediaSession &inputSession, char const *outputFileName, unsigned bufferSize=20000, unsigned short movieWidth=240, unsigned short movieHeight=180, unsigned movieFPS=15, Boolean packetLossCompensate=False, Boolean syncStreams=False, Boolean generateHintTracks=False, Boolean generateMP4Format=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

 QuickTimeFileSink (UsageEnvironment &env, MediaSession &inputSession, char const *outputFileName, unsigned bufferSize, unsigned short movieWidth, unsigned short movieHeight, unsigned movieFPS, Boolean packetLossCompensate, Boolean syncStreams, Boolean generateHintTracks, Boolean generateMP4Format)
 
virtual ~QuickTimeFileSink ()
 
virtual void noteRecordedFrame (MediaSubsession &inputSubsession, unsigned packetDataSize, struct timeval const &presentationTime)
 
TaskTokennextTask ()
 

Private Member Functions

Boolean continuePlaying ()
 
void onSourceClosure1 ()
 
void completeOutputFile ()
 
unsigned addWord64 (u_int64_t word)
 
unsigned addWord (unsigned word)
 
unsigned addHalfWord (unsigned short halfWord)
 
unsigned addByte (unsigned char byte)
 
unsigned addZeroWords (unsigned numWords)
 
unsigned add4ByteString (char const *str)
 
unsigned addArbitraryString (char const *str, Boolean oneByteLength=True)
 
unsigned addAtomHeader (char const *atomName)
 
unsigned addAtomHeader64 (char const *atomName)
 
void setWord (int64_t filePosn, unsigned size)
 
void setWord64 (int64_t filePosn, u_int64_t size)
 
unsigned movieTimeScale () const
 
 _atom (ftyp)
 
 _atom (moov)
 
 _atom (mvhd)
 
 _atom (iods)
 
 _atom (trak)
 
 _atom (tkhd)
 
 _atom (edts)
 
 _atom (elst)
 
 _atom (tref)
 
 _atom (hint)
 
 _atom (mdia)
 
 _atom (mdhd)
 
 _atom (hdlr)
 
 _atom (minf)
 
 _atom (smhd)
 
 _atom (vmhd)
 
 _atom (gmhd)
 
 _atom (gmin)
 
unsigned addAtom_hdlr2 ()
 
 _atom (dinf)
 
 _atom (dref)
 
 _atom (alis)
 
 _atom (stbl)
 
 _atom (stsd)
 
unsigned addAtom_genericMedia ()
 
unsigned addAtom_soundMediaGeneral ()
 
 _atom (ulaw)
 
 _atom (alaw)
 
 _atom (Qclp)
 
 _atom (wave)
 
 _atom (frma)
 
 _atom (Fclp)
 
 _atom (Hclp)
 
 _atom (mp4a)
 
 _atom (esds)
 
 _atom (srcq)
 
 _atom (h263)
 
 _atom (avc1)
 
 _atom (avcC)
 
 _atom (hvc1)
 
 _atom (hvcC)
 
 _atom (mp4v)
 
 _atom (rtp)
 
 _atom (tims)
 
 _atom (stts)
 
 _atom (stss)
 
 _atom (stsc)
 
 _atom (stsz)
 
 _atom (co64)
 
 _atom (udta)
 
 _atom (name)
 
 _atom (hnti)
 
 _atom (sdp)
 
 _atom (hinf)
 
 _atom (totl)
 
 _atom (npck)
 
 _atom (tpay)
 
 _atom (trpy)
 
 _atom (nump)
 
 _atom (tpyl)
 
 _atom (dmed)
 
 _atom (dimm)
 
 _atom (drep)
 
 _atom (tmin)
 
 _atom (tmax)
 
 _atom (pmax)
 
 _atom (dmax)
 
 _atom (payt)
 
unsigned addAtom_dummy ()
 

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
 
unsigned fBufferSize
 
Boolean fPacketLossCompensate
 
Boolean fSyncStreams
 
Boolean fGenerateMP4Format
 
struct timeval fNewestSyncTime fFirstDataTime
 
Boolean fAreCurrentlyBeingPlayed
 
afterPlayingFuncfAfterFunc
 
void * fAfterClientData
 
unsigned fAppleCreationTime
 
unsigned fLargestRTPtimestampFrequency
 
unsigned fNumSubsessions
 
unsigned fNumSyncedSubsessions
 
struct timeval fStartTime
 
Boolean fHaveCompletedOutputFile
 
unsigned short fMovieWidth
 
unsigned short fMovieHeight
 
unsigned fMovieFPS
 
int64_t fMDATposition
 
int64_t fMVHD_durationPosn
 
unsigned fMaxTrackDurationM
 
class SubsessionIOStatefCurrentIOState
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Friends

class SubsessionIOState
 

Detailed Description

Definition at line 28 of file QuickTimeFileSink.hh.

Member Typedef Documentation

◆ afterPlayingFunc

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

Definition at line 42 of file QuickTimeFileSink.hh.

Constructor & Destructor Documentation

◆ QuickTimeFileSink()

QuickTimeFileSink::QuickTimeFileSink ( UsageEnvironment env,
MediaSession inputSession,
char const *  outputFileName,
unsigned  bufferSize,
unsigned short  movieWidth,
unsigned short  movieHeight,
unsigned  movieFPS,
Boolean  packetLossCompensate,
Boolean  syncStreams,
Boolean  generateHintTracks,
Boolean  generateMP4Format 
)
protected

◆ ~QuickTimeFileSink()

virtual QuickTimeFileSink::~QuickTimeFileSink ( )
protectedvirtual

Member Function Documentation

◆ _atom() [1/65]

QuickTimeFileSink::_atom ( alaw  )
private

◆ _atom() [2/65]

QuickTimeFileSink::_atom ( alis  )
private

◆ _atom() [3/65]

QuickTimeFileSink::_atom ( avc1  )
private

◆ _atom() [4/65]

QuickTimeFileSink::_atom ( avcC  )
private

◆ _atom() [5/65]

QuickTimeFileSink::_atom ( co64  )
private

◆ _atom() [6/65]

QuickTimeFileSink::_atom ( dimm  )
private

◆ _atom() [7/65]

QuickTimeFileSink::_atom ( dinf  )
private

◆ _atom() [8/65]

QuickTimeFileSink::_atom ( dmax  )
private

◆ _atom() [9/65]

QuickTimeFileSink::_atom ( dmed  )
private

◆ _atom() [10/65]

QuickTimeFileSink::_atom ( dref  )
private

◆ _atom() [11/65]

QuickTimeFileSink::_atom ( drep  )
private

◆ _atom() [12/65]

QuickTimeFileSink::_atom ( edts  )
private

◆ _atom() [13/65]

QuickTimeFileSink::_atom ( elst  )
private

◆ _atom() [14/65]

QuickTimeFileSink::_atom ( esds  )
private

◆ _atom() [15/65]

QuickTimeFileSink::_atom ( Fclp  )
private

◆ _atom() [16/65]

QuickTimeFileSink::_atom ( frma  )
private

◆ _atom() [17/65]

QuickTimeFileSink::_atom ( ftyp  )
private

◆ _atom() [18/65]

QuickTimeFileSink::_atom ( gmhd  )
private

◆ _atom() [19/65]

QuickTimeFileSink::_atom ( gmin  )
private

◆ _atom() [20/65]

QuickTimeFileSink::_atom ( h263  )
private

◆ _atom() [21/65]

QuickTimeFileSink::_atom ( Hclp  )
private

◆ _atom() [22/65]

QuickTimeFileSink::_atom ( hdlr  )
private

◆ _atom() [23/65]

QuickTimeFileSink::_atom ( hinf  )
private

◆ _atom() [24/65]

QuickTimeFileSink::_atom ( hint  )
private

◆ _atom() [25/65]

QuickTimeFileSink::_atom ( hnti  )
private

◆ _atom() [26/65]

QuickTimeFileSink::_atom ( hvc1  )
private

◆ _atom() [27/65]

QuickTimeFileSink::_atom ( hvcC  )
private

◆ _atom() [28/65]

QuickTimeFileSink::_atom ( iods  )
private

◆ _atom() [29/65]

QuickTimeFileSink::_atom ( mdhd  )
private

◆ _atom() [30/65]

QuickTimeFileSink::_atom ( mdia  )
private

◆ _atom() [31/65]

QuickTimeFileSink::_atom ( minf  )
private

◆ _atom() [32/65]

QuickTimeFileSink::_atom ( moov  )
private

◆ _atom() [33/65]

QuickTimeFileSink::_atom ( mp4a  )
private

◆ _atom() [34/65]

QuickTimeFileSink::_atom ( mp4v  )
private

◆ _atom() [35/65]

QuickTimeFileSink::_atom ( mvhd  )
private

◆ _atom() [36/65]

QuickTimeFileSink::_atom ( name  )
private

◆ _atom() [37/65]

QuickTimeFileSink::_atom ( npck  )
private

◆ _atom() [38/65]

QuickTimeFileSink::_atom ( nump  )
private

◆ _atom() [39/65]

QuickTimeFileSink::_atom ( payt  )
private

◆ _atom() [40/65]

QuickTimeFileSink::_atom ( pmax  )
private

◆ _atom() [41/65]

QuickTimeFileSink::_atom ( Qclp  )
private

◆ _atom() [42/65]

QuickTimeFileSink::_atom ( rtp  )
private

◆ _atom() [43/65]

QuickTimeFileSink::_atom ( sdp  )
private

◆ _atom() [44/65]

QuickTimeFileSink::_atom ( smhd  )
private

◆ _atom() [45/65]

QuickTimeFileSink::_atom ( srcq  )
private

◆ _atom() [46/65]

QuickTimeFileSink::_atom ( stbl  )
private

◆ _atom() [47/65]

QuickTimeFileSink::_atom ( stsc  )
private

◆ _atom() [48/65]

QuickTimeFileSink::_atom ( stsd  )
private

◆ _atom() [49/65]

QuickTimeFileSink::_atom ( stss  )
private

◆ _atom() [50/65]

QuickTimeFileSink::_atom ( stsz  )
private

◆ _atom() [51/65]

QuickTimeFileSink::_atom ( stts  )
private

◆ _atom() [52/65]

QuickTimeFileSink::_atom ( tims  )
private

◆ _atom() [53/65]

QuickTimeFileSink::_atom ( tkhd  )
private

◆ _atom() [54/65]

QuickTimeFileSink::_atom ( tmax  )
private

◆ _atom() [55/65]

QuickTimeFileSink::_atom ( tmin  )
private

◆ _atom() [56/65]

QuickTimeFileSink::_atom ( totl  )
private

◆ _atom() [57/65]

QuickTimeFileSink::_atom ( tpay  )
private

◆ _atom() [58/65]

QuickTimeFileSink::_atom ( tpyl  )
private

◆ _atom() [59/65]

QuickTimeFileSink::_atom ( trak  )
private

◆ _atom() [60/65]

QuickTimeFileSink::_atom ( tref  )
private

◆ _atom() [61/65]

QuickTimeFileSink::_atom ( trpy  )
private

◆ _atom() [62/65]

QuickTimeFileSink::_atom ( udta  )
private

◆ _atom() [63/65]

QuickTimeFileSink::_atom ( ulaw  )
private

◆ _atom() [64/65]

QuickTimeFileSink::_atom ( vmhd  )
private

◆ _atom() [65/65]

QuickTimeFileSink::_atom ( wave  )
private

◆ add4ByteString()

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

◆ addArbitraryString()

unsigned QuickTimeFileSink::addArbitraryString ( char const *  str,
Boolean  oneByteLength = True 
)
private

◆ addAtom_dummy()

unsigned QuickTimeFileSink::addAtom_dummy ( )
private

◆ addAtom_genericMedia()

unsigned QuickTimeFileSink::addAtom_genericMedia ( )
private

◆ addAtom_hdlr2()

unsigned QuickTimeFileSink::addAtom_hdlr2 ( )
private

◆ addAtom_soundMediaGeneral()

unsigned QuickTimeFileSink::addAtom_soundMediaGeneral ( )
private

◆ addAtomHeader()

unsigned QuickTimeFileSink::addAtomHeader ( char const *  atomName)
private

◆ addAtomHeader64()

unsigned QuickTimeFileSink::addAtomHeader64 ( char const *  atomName)
private

◆ addByte()

unsigned QuickTimeFileSink::addByte ( unsigned char  byte)
inlineprivate

Definition at line 95 of file QuickTimeFileSink.hh.

95 {
96 putc(byte, fOutFid);
97 return 1;
98 }

References fOutFid.

◆ addHalfWord()

unsigned QuickTimeFileSink::addHalfWord ( unsigned short  halfWord)
private

◆ addWord()

unsigned QuickTimeFileSink::addWord ( unsigned  word)
private

◆ addWord64()

unsigned QuickTimeFileSink::addWord64 ( u_int64_t  word)
private

◆ addZeroWords()

unsigned QuickTimeFileSink::addZeroWords ( unsigned  numWords)
private

◆ afterGettingFrame()

static void QuickTimeFileSink::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 QuickTimeFileSink::completeOutputFile ( )
private

◆ continuePlaying()

Boolean QuickTimeFileSink::continuePlaying ( )
private

◆ createNew()

static QuickTimeFileSink * QuickTimeFileSink::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,
Boolean  syncStreams = False,
Boolean  generateHintTracks = False,
Boolean  generateMP4Format = 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

◆ movieTimeScale()

unsigned QuickTimeFileSink::movieTimeScale ( ) const
inlineprivate

Definition at line 109 of file QuickTimeFileSink.hh.

References fLargestRTPtimestampFrequency.

◆ 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.

◆ noteRecordedFrame()

virtual void QuickTimeFileSink::noteRecordedFrame ( MediaSubsession inputSubsession,
unsigned  packetDataSize,
struct timeval const &  presentationTime 
)
protectedvirtual

◆ numActiveSubsessions()

unsigned QuickTimeFileSink::numActiveSubsessions ( ) const
inline

Definition at line 46 of file QuickTimeFileSink.hh.

46{ return fNumSubsessions; }

References fNumSubsessions.

◆ onRTCPBye()

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

◆ onSourceClosure()

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

◆ onSourceClosure1()

void QuickTimeFileSink::onSourceClosure1 ( )
private

◆ setWord()

void QuickTimeFileSink::setWord ( int64_t  filePosn,
unsigned  size 
)
private

◆ setWord64()

void QuickTimeFileSink::setWord64 ( int64_t  filePosn,
u_int64_t  size 
)
private

◆ startPlaying()

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

Friends And Related Function Documentation

◆ SubsessionIOState

friend class SubsessionIOState
friend

Definition at line 73 of file QuickTimeFileSink.hh.

Field Documentation

◆ fAfterClientData

void* QuickTimeFileSink::fAfterClientData
private

Definition at line 82 of file QuickTimeFileSink.hh.

◆ fAfterFunc

afterPlayingFunc* QuickTimeFileSink::fAfterFunc
private

Definition at line 81 of file QuickTimeFileSink.hh.

◆ fAppleCreationTime

unsigned QuickTimeFileSink::fAppleCreationTime
private

Definition at line 83 of file QuickTimeFileSink.hh.

◆ fAreCurrentlyBeingPlayed

Boolean QuickTimeFileSink::fAreCurrentlyBeingPlayed
private

Definition at line 80 of file QuickTimeFileSink.hh.

◆ fBufferSize

unsigned QuickTimeFileSink::fBufferSize
private

Definition at line 76 of file QuickTimeFileSink.hh.

◆ fCurrentIOState

class SubsessionIOState* QuickTimeFileSink::fCurrentIOState
private

Definition at line 191 of file QuickTimeFileSink.hh.

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fFirstDataTime

struct timeval fNewestSyncTime QuickTimeFileSink::fFirstDataTime
private

Definition at line 79 of file QuickTimeFileSink.hh.

◆ fGenerateMP4Format

Boolean QuickTimeFileSink::fGenerateMP4Format
private

Definition at line 78 of file QuickTimeFileSink.hh.

◆ fHaveCompletedOutputFile

Boolean QuickTimeFileSink::fHaveCompletedOutputFile
private

Definition at line 87 of file QuickTimeFileSink.hh.

◆ fInputSession

MediaSession& QuickTimeFileSink::fInputSession
private

Definition at line 74 of file QuickTimeFileSink.hh.

◆ fLargestRTPtimestampFrequency

unsigned QuickTimeFileSink::fLargestRTPtimestampFrequency
private

Definition at line 84 of file QuickTimeFileSink.hh.

Referenced by movieTimeScale().

◆ fMaxTrackDurationM

unsigned QuickTimeFileSink::fMaxTrackDurationM
private

Definition at line 190 of file QuickTimeFileSink.hh.

◆ fMDATposition

int64_t QuickTimeFileSink::fMDATposition
private

Definition at line 188 of file QuickTimeFileSink.hh.

◆ fMediumName

char Medium::fMediumName[mediumNameMaxLen]
privateinherited

Definition at line 83 of file Media.hh.

Referenced by Medium::name().

◆ fMovieFPS

unsigned QuickTimeFileSink::fMovieFPS
private

Definition at line 187 of file QuickTimeFileSink.hh.

◆ fMovieHeight

unsigned short QuickTimeFileSink::fMovieHeight
private

Definition at line 186 of file QuickTimeFileSink.hh.

◆ fMovieWidth

unsigned short QuickTimeFileSink::fMovieWidth
private

Definition at line 186 of file QuickTimeFileSink.hh.

◆ fMVHD_durationPosn

int64_t QuickTimeFileSink::fMVHD_durationPosn
private

Definition at line 189 of file QuickTimeFileSink.hh.

◆ fNextTask

TaskToken Medium::fNextTask
privateinherited

Definition at line 84 of file Media.hh.

Referenced by Medium::nextTask().

◆ fNumSubsessions

unsigned QuickTimeFileSink::fNumSubsessions
private

Definition at line 85 of file QuickTimeFileSink.hh.

Referenced by numActiveSubsessions().

◆ fNumSyncedSubsessions

unsigned QuickTimeFileSink::fNumSyncedSubsessions
private

Definition at line 85 of file QuickTimeFileSink.hh.

◆ fOutFid

FILE* QuickTimeFileSink::fOutFid
private

Definition at line 75 of file QuickTimeFileSink.hh.

Referenced by addByte().

◆ fPacketLossCompensate

Boolean QuickTimeFileSink::fPacketLossCompensate
private

Definition at line 77 of file QuickTimeFileSink.hh.

◆ fStartTime

struct timeval QuickTimeFileSink::fStartTime
private

Definition at line 86 of file QuickTimeFileSink.hh.

◆ fSyncStreams

Boolean QuickTimeFileSink::fSyncStreams
private

Definition at line 78 of file QuickTimeFileSink.hh.


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