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
timeval fPrevPresentationTime
unsigned fSamePresentationTimeCounter
FramedSourcefSource

Friends

class MediaLookupTable

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 (  )  [protected, virtual]


Member Function Documentation

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

Reimplemented in AMRAudioFileSink.

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

Reimplemented in OggFileSink.

virtual Boolean FileSink::continuePlaying (  )  [protected, virtual]

Implements MediaSink.

Reimplemented in OggFileSink.

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

virtual void FileSink::afterGettingFrame ( unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime 
) [protected, virtual]

Reimplemented in AMRAudioFileSink, H264or5VideoFileSink, and OggFileSink.

static Boolean MediaSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
MediaSink *&  resultSink 
) [static, inherited]

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

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

virtual void MediaSink::stopPlaying (  )  [virtual, inherited]

Reimplemented in MultiFramedRTPSink.

virtual Boolean MediaSink::isRTPSink (  )  const [virtual, inherited]

Reimplemented in RTPSink.

FramedSource* MediaSink::source (  )  const [inline, inherited]

Definition at line 42 of file MediaSink.hh.

References MediaSink::fSource.

00042 {return fSource;}

virtual Boolean MediaSink::sourceIsCompatibleWithUs ( MediaSource source  )  [protected, virtual, inherited]

Reimplemented in AMRAudioFileSink, AMRAudioRTPSink, DVVideoRTPSink, H264VideoRTPSink, H265VideoRTPSink, JPEGVideoRTPSink, MPEG1or2VideoRTPSink, and MPEG4ESVideoRTPSink.

static void MediaSink::onSourceClosure ( void *  clientData  )  [static, protected, inherited]

void MediaSink::onSourceClosure (  )  [protected, inherited]

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
) [static, inherited]

static void Medium::close ( Medium medium  )  [static, inherited]

UsageEnvironment& Medium::envir (  )  const [inline, inherited]

Definition at line 59 of file Media.hh.

References Medium::fEnviron.

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

00059 {return fEnviron;}

char const* Medium::name (  )  const [inline, inherited]

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

00061 {return fMediumName;}

virtual Boolean Medium::isSource (  )  const [virtual, inherited]

Reimplemented in MediaSource.

virtual Boolean Medium::isRTCPInstance (  )  const [virtual, inherited]

Reimplemented in RTCPInstance.

virtual Boolean Medium::isRTSPClient (  )  const [virtual, inherited]

Reimplemented in RTSPClient.

virtual Boolean Medium::isRTSPServer (  )  const [virtual, inherited]

Reimplemented in RTSPServer.

virtual Boolean Medium::isMediaSession (  )  const [virtual, inherited]

Reimplemented in MediaSession.

virtual Boolean Medium::isServerMediaSession (  )  const [virtual, inherited]

Reimplemented in ServerMediaSession.

virtual Boolean Medium::isDarwinInjector (  )  const [virtual, inherited]

Reimplemented in DarwinInjector.

TaskToken& Medium::nextTask (  )  [inline, protected, inherited]

Definition at line 78 of file Media.hh.

References Medium::fNextTask.

00078                         {
00079         return fNextTask;
00080   }


Friends And Related Function Documentation

friend class MediaLookupTable [friend, inherited]

Definition at line 74 of file Media.hh.


Field Documentation

FILE* FileSink::fOutFid [protected]

Definition at line 62 of file FileSink.hh.

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.

char* FileSink::fPerFrameFileNamePrefix [protected]

Definition at line 65 of file FileSink.hh.

char* FileSink::fPerFrameFileNameBuffer [protected]

Definition at line 66 of file FileSink.hh.

struct timeval FileSink::fPrevPresentationTime [read, protected]

Definition at line 67 of file FileSink.hh.

unsigned FileSink::fSamePresentationTimeCounter [protected]

Definition at line 68 of file FileSink.hh.

FramedSource* MediaSink::fSource [protected, inherited]

Definition at line 58 of file MediaSink.hh.

Referenced by MediaSink::source().


The documentation for this class was generated from the following file:
Generated on Thu Oct 16 16:19:24 2014 for live by  doxygen 1.5.2