live
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
FileSink Class Reference

#include <FileSink.hh>

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

Public Types

typedef void( afterPlayingFunc )(void *clientData)
 

Public Member Functions

virtual void addData (unsigned char const *data, unsigned dataSize, struct timeval presentationTime)
 
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
 
virtual Boolean isDarwinInjector () const
 

Static Public Member Functions

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

 FileSink (UsageEnvironment &env, FILE *fid, unsigned bufferSize, char const *perFrameFileNamePrefix)
 
virtual ~FileSink ()
 
virtual Boolean continuePlaying ()
 
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
 

Detailed Description

Definition at line 28 of file FileSink.hh.

Member Typedef Documentation

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

Definition at line 33 of file MediaSink.hh.

Constructor & Destructor Documentation

FileSink::FileSink ( UsageEnvironment env,
FILE *  fid,
unsigned  bufferSize,
char const *  perFrameFileNamePrefix 
)
protected
virtual FileSink::~FileSink ( )
protectedvirtual

Member Function Documentation

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

Reimplemented in OggFileSink.

static void FileSink::afterGettingFrame ( void *  clientData,
unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime,
unsigned  durationInMicroseconds 
)
staticprotected
virtual void FileSink::afterGettingFrame ( unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime 
)
protectedvirtual
static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited
static void Medium::close ( Medium medium)
staticinherited
virtual Boolean FileSink::continuePlaying ( )
protectedvirtual

Implements MediaSink.

Reimplemented in OggFileSink.

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

Definition at line 59 of file Media.hh.

References Medium::fEnviron.

Referenced by MediaSubsession::env(), RTPInterface::envir(), RTSPServer::RTSPClientConnection::envir(), and RTSPServer::RTSPClientSession::envir().

59 {return fEnviron;}
UsageEnvironment & fEnviron
Definition: Media.hh:83
virtual Boolean Medium::isDarwinInjector ( ) const
virtualinherited

Reimplemented in DarwinInjector.

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

virtual Boolean MediaSink::isRTPSink ( ) const
virtualinherited

Reimplemented in RTPSink.

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::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

static Boolean MediaSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
MediaSink *&  resultSink 
)
staticinherited
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:84
TaskToken& Medium::nextTask ( )
inlineprotectedinherited

Definition at line 78 of file Media.hh.

References Medium::fNextTask.

78  {
79  return fNextTask;
80  }
TaskToken fNextTask
Definition: Media.hh:85
static void MediaSink::onSourceClosure ( void *  clientData)
staticprotectedinherited
void MediaSink::onSourceClosure ( )
protectedinherited
FramedSource* MediaSink::source ( ) const
inlineinherited

Definition at line 42 of file MediaSink.hh.

References MediaSink::fSource.

42 {return fSource;}
FramedSource * fSource
Definition: MediaSink.hh:58
virtual Boolean MediaSink::sourceIsCompatibleWithUs ( MediaSource source)
protectedvirtualinherited
Boolean MediaSink::startPlaying ( MediaSource source,
afterPlayingFunc afterFunc,
void *  afterClientData 
)
inherited
virtual void MediaSink::stopPlaying ( )
virtualinherited

Reimplemented in MultiFramedRTPSink.

Field Documentation

unsigned char* FileSink::fBuffer
protected

Definition at line 63 of file FileSink.hh.

unsigned FileSink::fBufferSize
protected

Definition at line 64 of file FileSink.hh.

FILE* FileSink::fOutFid
protected

Definition at line 62 of file FileSink.hh.

char* FileSink::fPerFrameFileNameBuffer
protected

Definition at line 66 of file FileSink.hh.

char* FileSink::fPerFrameFileNamePrefix
protected

Definition at line 65 of file FileSink.hh.

struct timeval FileSink::fPrevPresentationTime
protected

Definition at line 67 of file FileSink.hh.

unsigned FileSink::fSamePresentationTimeCounter
protected

Definition at line 68 of file FileSink.hh.

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: