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

#include <OggFileSink.hh>

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

Public Types

typedef void() afterPlayingFunc(void *clientData)
 

Public Member Functions

Boolean startPlaying (MediaSource &source, afterPlayingFunc *afterFunc, void *afterClientData)
 
virtual void stopPlaying ()
 
virtual Boolean isRTPSink () const
 
FramedSourcesource () const
 
UsageEnvironmentenvir () const
 
char const * name () const
 
virtual Boolean isSource () 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 OggFileSinkcreateNew (UsageEnvironment &env, char const *fileName, unsigned samplingFrequency=0, char const *configStr=NULL, unsigned bufferSize=100000, Boolean oneFilePerFrame=False)
 
static FileSinkcreateNew (UsageEnvironment &env, char const *fileName, unsigned bufferSize=20000, Boolean oneFilePerFrame=False)
 
static Boolean lookupByName (UsageEnvironment &env, char const *sinkName, MediaSink *&resultSink)
 
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

 OggFileSink (UsageEnvironment &env, FILE *fid, unsigned samplingFrequency, char const *configStr, unsigned bufferSize, char const *perFrameFileNamePrefix)
 
virtual ~OggFileSink ()
 
virtual Boolean continuePlaying ()
 
virtual void addData (unsigned char const *data, unsigned dataSize, struct timeval presentationTime)
 
virtual void afterGettingFrame (unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime)
 
virtual Boolean sourceIsCompatibleWithUs (MediaSource &source)
 
void onSourceClosure ()
 
TaskTokennextTask ()
 

Static Protected Member Functions

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

Protected Attributes

FILE * fOutFid
 
unsigned char * fBuffer
 
unsigned fBufferSize
 
char * fPerFrameFileNamePrefix
 
char * fPerFrameFileNameBuffer
 
struct timeval fPrevPresentationTime
 
unsigned fSamePresentationTimeCounter
 
FramedSourcefSource
 

Private Member Functions

void ourOnSourceClosure ()
 
virtual Boolean isSink () const
 

Static Private Member Functions

static void ourOnSourceClosure (void *clientData)
 

Private Attributes

unsigned fSamplingFrequency
 
char const * fConfigStr
 
Boolean fHaveWrittenFirstFrame
 
Boolean fHaveSeenEOF
 
struct timeval fFirstPresentationTime
 
int64_t fGranulePosition
 
int64_t fGranulePositionAdjustment
 
u_int32_t fPageSequenceNumber
 
u_int8_t fPageHeaderBytes [27]
 
Boolean fIsTheora
 
u_int64_t fGranuleIncrementPerFrame
 
unsigned char * fAltBuffer
 
unsigned fAltFrameSize
 
unsigned fAltNumTruncatedBytes
 
struct timeval fAltPresentationTime
 
afterPlayingFuncfAfterFunc
 
void * fAfterClientData
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Detailed Description

Definition at line 28 of file OggFileSink.hh.

Member Typedef Documentation

◆ afterPlayingFunc

typedef void() MediaSink::afterPlayingFunc(void *clientData)
inherited

Definition at line 33 of file MediaSink.hh.

Constructor & Destructor Documentation

◆ OggFileSink()

OggFileSink::OggFileSink ( UsageEnvironment env,
FILE *  fid,
unsigned  samplingFrequency,
char const *  configStr,
unsigned  bufferSize,
char const *  perFrameFileNamePrefix 
)
protected

◆ ~OggFileSink()

virtual OggFileSink::~OggFileSink ( )
protectedvirtual

Member Function Documentation

◆ addData()

virtual void OggFileSink::addData ( unsigned char const *  data,
unsigned  dataSize,
struct timeval  presentationTime 
)
protectedvirtual

Reimplemented from FileSink.

◆ afterGettingFrame() [1/2]

virtual void OggFileSink::afterGettingFrame ( unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime 
)
protectedvirtual

Reimplemented from FileSink.

◆ afterGettingFrame() [2/2]

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

◆ close() [1/2]

static void Medium::close ( Medium medium)
staticinherited

◆ close() [2/2]

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

◆ continuePlaying()

virtual Boolean OggFileSink::continuePlaying ( )
protectedvirtual

Reimplemented from FileSink.

◆ createNew() [1/2]

static FileSink * FileSink::createNew ( UsageEnvironment env,
char const *  fileName,
unsigned  bufferSize = 20000,
Boolean  oneFilePerFrame = False 
)
staticinherited

◆ createNew() [2/2]

static OggFileSink * OggFileSink::createNew ( UsageEnvironment env,
char const *  fileName,
unsigned  samplingFrequency = 0,
char const *  configStr = NULL,
unsigned  bufferSize = 100000,
Boolean  oneFilePerFrame = 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.

◆ isRTPSink()

virtual Boolean MediaSink::isRTPSink ( ) const
virtualinherited

Reimplemented in RTPSink.

◆ 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 MediaSink::isSink ( ) const
privatevirtualinherited

Reimplemented from Medium.

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ lookupByName() [1/2]

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

◆ lookupByName() [2/2]

static Boolean MediaSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
MediaSink *&  resultSink 
)
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.

◆ onSourceClosure() [1/2]

void MediaSink::onSourceClosure ( )
protectedinherited

◆ onSourceClosure() [2/2]

static void MediaSink::onSourceClosure ( void *  clientData)
staticprotectedinherited

◆ ourOnSourceClosure() [1/2]

void OggFileSink::ourOnSourceClosure ( )
private

◆ ourOnSourceClosure() [2/2]

static void OggFileSink::ourOnSourceClosure ( void *  clientData)
staticprivate

◆ source()

FramedSource * MediaSink::source ( ) const
inlineinherited

Definition at line 42 of file MediaSink.hh.

42{return fSource;}
FramedSource * fSource
Definition: MediaSink.hh:58

References MediaSink::fSource.

◆ sourceIsCompatibleWithUs()

virtual Boolean MediaSink::sourceIsCompatibleWithUs ( MediaSource source)
protectedvirtualinherited

◆ startPlaying()

Boolean MediaSink::startPlaying ( MediaSource source,
afterPlayingFunc afterFunc,
void *  afterClientData 
)
inherited

◆ stopPlaying()

virtual void MediaSink::stopPlaying ( )
virtualinherited

Reimplemented in MultiFramedRTPSink.

Field Documentation

◆ fAfterClientData

void* MediaSink::fAfterClientData
privateinherited

Definition at line 67 of file MediaSink.hh.

◆ fAfterFunc

afterPlayingFunc* MediaSink::fAfterFunc
privateinherited

Definition at line 66 of file MediaSink.hh.

◆ fAltBuffer

unsigned char* OggFileSink::fAltBuffer
private

Definition at line 74 of file OggFileSink.hh.

◆ fAltFrameSize

unsigned OggFileSink::fAltFrameSize
private

Definition at line 75 of file OggFileSink.hh.

◆ fAltNumTruncatedBytes

unsigned OggFileSink::fAltNumTruncatedBytes
private

Definition at line 75 of file OggFileSink.hh.

◆ fAltPresentationTime

struct timeval OggFileSink::fAltPresentationTime
private

Definition at line 76 of file OggFileSink.hh.

◆ fBuffer

unsigned char* FileSink::fBuffer
protectedinherited

Definition at line 63 of file FileSink.hh.

◆ fBufferSize

unsigned FileSink::fBufferSize
protectedinherited

Definition at line 64 of file FileSink.hh.

◆ fConfigStr

char const* OggFileSink::fConfigStr
private

Definition at line 59 of file OggFileSink.hh.

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fFirstPresentationTime

struct timeval OggFileSink::fFirstPresentationTime
private

Definition at line 61 of file OggFileSink.hh.

◆ fGranuleIncrementPerFrame

u_int64_t OggFileSink::fGranuleIncrementPerFrame
private

Definition at line 70 of file OggFileSink.hh.

◆ fGranulePosition

int64_t OggFileSink::fGranulePosition
private

Definition at line 62 of file OggFileSink.hh.

◆ fGranulePositionAdjustment

int64_t OggFileSink::fGranulePositionAdjustment
private

Definition at line 63 of file OggFileSink.hh.

◆ fHaveSeenEOF

Boolean OggFileSink::fHaveSeenEOF
private

Definition at line 60 of file OggFileSink.hh.

◆ fHaveWrittenFirstFrame

Boolean OggFileSink::fHaveWrittenFirstFrame
private

Definition at line 60 of file OggFileSink.hh.

◆ fIsTheora

Boolean OggFileSink::fIsTheora
private

Definition at line 69 of file OggFileSink.hh.

◆ fMediumName

char Medium::fMediumName[mediumNameMaxLen]
privateinherited

Definition at line 83 of file Media.hh.

Referenced by Medium::name().

◆ fNextTask

TaskToken Medium::fNextTask
privateinherited

Definition at line 84 of file Media.hh.

Referenced by Medium::nextTask().

◆ fOutFid

FILE* FileSink::fOutFid
protectedinherited

Definition at line 62 of file FileSink.hh.

◆ fPageHeaderBytes

u_int8_t OggFileSink::fPageHeaderBytes[27]
private

Definition at line 65 of file OggFileSink.hh.

◆ fPageSequenceNumber

u_int32_t OggFileSink::fPageSequenceNumber
private

Definition at line 64 of file OggFileSink.hh.

◆ fPerFrameFileNameBuffer

char* FileSink::fPerFrameFileNameBuffer
protectedinherited

Definition at line 66 of file FileSink.hh.

◆ fPerFrameFileNamePrefix

char* FileSink::fPerFrameFileNamePrefix
protectedinherited

Definition at line 65 of file FileSink.hh.

◆ fPrevPresentationTime

struct timeval FileSink::fPrevPresentationTime
protectedinherited

Definition at line 67 of file FileSink.hh.

◆ fSamePresentationTimeCounter

unsigned FileSink::fSamePresentationTimeCounter
protectedinherited

Definition at line 68 of file FileSink.hh.

◆ fSamplingFrequency

unsigned OggFileSink::fSamplingFrequency
private

Definition at line 58 of file OggFileSink.hh.

◆ fSource

FramedSource* MediaSink::fSource
protectedinherited

Definition at line 58 of file MediaSink.hh.

Referenced by MediaSink::source().


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