ByteStreamFileSource Class Reference

#include <ByteStreamFileSource.hh>

Inheritance diagram for ByteStreamFileSource:

Inheritance graph
[legend]
Collaboration diagram for ByteStreamFileSource:

Collaboration graph
[legend]

Public Types

typedef void( afterGettingFunc )(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
typedef void( onCloseFunc )(void *clientData)

Public Member Functions

u_int64_t fileSize () const
void seekToByteAbsolute (u_int64_t byteNumber, u_int64_t numBytesToStream=0)
void seekToByteRelative (int64_t offset, u_int64_t numBytesToStream=0)
void seekToEnd ()
void getNextFrame (unsigned char *to, unsigned maxSize, afterGettingFunc *afterGettingFunc, void *afterGettingClientData, onCloseFunc *onCloseFunc, void *onCloseClientData)
void handleClosure ()
void stopGettingFrames ()
virtual unsigned maxFrameSize () const
Boolean isCurrentlyAwaitingData () const
virtual void getAttributes () const
virtual char const * MIMEtype () const
virtual Boolean isRTPSource () const
virtual Boolean isMPEG1or2VideoStreamFramer () const
virtual Boolean isMPEG4VideoStreamFramer () const
virtual Boolean isH264VideoStreamFramer () const
virtual Boolean isH265VideoStreamFramer () const
virtual Boolean isDVVideoStreamFramer () const
virtual Boolean isJPEGVideoSource () const
virtual Boolean isAMRAudioSource () const
UsageEnvironmentenvir () const
char const * name () 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
virtual Boolean isDarwinInjector () const

Static Public Member Functions

static ByteStreamFileSourcecreateNew (UsageEnvironment &env, char const *fileName, unsigned preferredFrameSize=0, unsigned playTimePerFrame=0)
static ByteStreamFileSourcecreateNew (UsageEnvironment &env, FILE *fid, unsigned preferredFrameSize=0, unsigned playTimePerFrame=0)
static Boolean lookupByName (UsageEnvironment &env, char const *sourceName, FramedSource *&resultSource)
static Boolean lookupByName (UsageEnvironment &env, char const *sourceName, MediaSource *&resultSource)
static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium)
static void handleClosure (void *clientData)
static void afterGetting (FramedSource *source)
static void close (UsageEnvironment &env, char const *mediumName)
static void close (Medium *medium)

Protected Member Functions

 ByteStreamFileSource (UsageEnvironment &env, FILE *fid, unsigned preferredFrameSize, unsigned playTimePerFrame)
virtual ~ByteStreamFileSource ()
void doReadFromFile ()
TaskTokennextTask ()

Static Protected Member Functions

static void fileReadableHandler (ByteStreamFileSource *source, int mask)

Protected Attributes

u_int64_t fFileSize
FILE * fFid
unsigned char * fTo
unsigned fMaxSize
unsigned fFrameSize
unsigned fNumTruncatedBytes
timeval fPresentationTime
unsigned fDurationInMicroseconds

Private Member Functions

virtual void doGetNextFrame ()
virtual void doStopGettingFrames ()

Private Attributes

unsigned fPreferredFrameSize
unsigned fPlayTimePerFrame
Boolean fFidIsSeekable
unsigned fLastPlayTime
Boolean fHaveStartedReading
Boolean fLimitNumBytesToStream
u_int64_t fNumBytesToStream

Friends

class MediaLookupTable

Detailed Description

Definition at line 28 of file ByteStreamFileSource.hh.


Member Typedef Documentation

typedef void( FramedSource::afterGettingFunc)(void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds) [inherited]

Definition at line 36 of file FramedSource.hh.

typedef void( FramedSource::onCloseFunc)(void *clientData) [inherited]

Definition at line 40 of file FramedSource.hh.


Constructor & Destructor Documentation

ByteStreamFileSource::ByteStreamFileSource ( UsageEnvironment env,
FILE *  fid,
unsigned  preferredFrameSize,
unsigned  playTimePerFrame 
) [protected]

virtual ByteStreamFileSource::~ByteStreamFileSource (  )  [protected, virtual]


Member Function Documentation

static ByteStreamFileSource* ByteStreamFileSource::createNew ( UsageEnvironment env,
char const *  fileName,
unsigned  preferredFrameSize = 0,
unsigned  playTimePerFrame = 0 
) [static]

static ByteStreamFileSource* ByteStreamFileSource::createNew ( UsageEnvironment env,
FILE *  fid,
unsigned  preferredFrameSize = 0,
unsigned  playTimePerFrame = 0 
) [static]

u_int64_t ByteStreamFileSource::fileSize (  )  const [inline]

Definition at line 44 of file ByteStreamFileSource.hh.

References fFileSize.

00044 { return fFileSize; }

void ByteStreamFileSource::seekToByteAbsolute ( u_int64_t  byteNumber,
u_int64_t  numBytesToStream = 0 
)

void ByteStreamFileSource::seekToByteRelative ( int64_t  offset,
u_int64_t  numBytesToStream = 0 
)

void ByteStreamFileSource::seekToEnd (  ) 

static void ByteStreamFileSource::fileReadableHandler ( ByteStreamFileSource source,
int  mask 
) [static, protected]

void ByteStreamFileSource::doReadFromFile (  )  [protected]

virtual void ByteStreamFileSource::doGetNextFrame (  )  [private, virtual]

Implements FramedSource.

virtual void ByteStreamFileSource::doStopGettingFrames (  )  [private, virtual]

Reimplemented from FramedSource.

static Boolean FramedSource::lookupByName ( UsageEnvironment env,
char const *  sourceName,
FramedSource *&  resultSource 
) [static, inherited]

static Boolean MediaSource::lookupByName ( UsageEnvironment env,
char const *  sourceName,
MediaSource *&  resultSource 
) [static, inherited]

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

void FramedSource::getNextFrame ( unsigned char *  to,
unsigned  maxSize,
afterGettingFunc afterGettingFunc,
void *  afterGettingClientData,
onCloseFunc onCloseFunc,
void *  onCloseClientData 
) [inherited]

static void FramedSource::handleClosure ( void *  clientData  )  [static, inherited]

void FramedSource::handleClosure (  )  [inherited]

void FramedSource::stopGettingFrames (  )  [inherited]

virtual unsigned FramedSource::maxFrameSize (  )  const [virtual, inherited]

Reimplemented in MPEG1or2DemuxedElementaryStream.

Boolean FramedSource::isCurrentlyAwaitingData (  )  const [inline, inherited]

Definition at line 61 of file FramedSource.hh.

References FramedSource::fIsCurrentlyAwaitingData.

00061 {return fIsCurrentlyAwaitingData;}

static void FramedSource::afterGetting ( FramedSource source  )  [static, inherited]

virtual void MediaSource::getAttributes (  )  const [virtual, inherited]

Reimplemented in FramedFilter, MP3ADUTranscoder, MP3FileSource, and RTPSource.

virtual char const* MediaSource::MIMEtype (  )  const [virtual, inherited]

Reimplemented in AC3AudioRTPSource, AMRAudioSource, DVVideoRTPSource, FramedFilter, H261VideoRTPSource, H263plusVideoRTPSource, H264VideoRTPSource, H265VideoRTPSource, JPEGVideoRTPSource, ADUFromMP3Source, MP3FromADUSource, MP3ADURTPSource, MP3FileSource, MPEG1or2AudioRTPSource, MPEG1or2DemuxedElementaryStream, MPEG1or2VideoRTPSource, MPEG4ESVideoRTPSource, MPEG4GenericRTPSource, MPEG4LATMAudioRTPSource, QuickTimeGenericRTPSource, SimpleRTPSource, TheoraVideoRTPSource, VorbisAudioRTPSource, VP8VideoRTPSource, MatroskaDemuxedTrack, and OggDemuxedTrack.

virtual Boolean MediaSource::isRTPSource (  )  const [virtual, inherited]

Reimplemented in RTPSource.

virtual Boolean MediaSource::isMPEG1or2VideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in MPEG1or2VideoStreamFramer.

virtual Boolean MediaSource::isMPEG4VideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in MPEG4VideoStreamFramer.

virtual Boolean MediaSource::isH264VideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in H264VideoStreamDiscreteFramer, and H264VideoStreamFramer.

virtual Boolean MediaSource::isH265VideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in H265VideoStreamDiscreteFramer, and H265VideoStreamFramer.

virtual Boolean MediaSource::isDVVideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in DVVideoStreamFramer.

virtual Boolean MediaSource::isJPEGVideoSource (  )  const [virtual, inherited]

Reimplemented in JPEGVideoSource.

virtual Boolean MediaSource::isAMRAudioSource (  )  const [virtual, inherited]

Reimplemented in AMRAudioSource.

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::isSink (  )  const [virtual, inherited]

Reimplemented in MediaSink.

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

u_int64_t ByteStreamFileSource::fFileSize [protected]

Definition at line 70 of file ByteStreamFileSource.hh.

Referenced by fileSize().

unsigned ByteStreamFileSource::fPreferredFrameSize [private]

Definition at line 73 of file ByteStreamFileSource.hh.

unsigned ByteStreamFileSource::fPlayTimePerFrame [private]

Definition at line 74 of file ByteStreamFileSource.hh.

Boolean ByteStreamFileSource::fFidIsSeekable [private]

Definition at line 75 of file ByteStreamFileSource.hh.

unsigned ByteStreamFileSource::fLastPlayTime [private]

Definition at line 76 of file ByteStreamFileSource.hh.

Boolean ByteStreamFileSource::fHaveStartedReading [private]

Definition at line 77 of file ByteStreamFileSource.hh.

Boolean ByteStreamFileSource::fLimitNumBytesToStream [private]

Definition at line 78 of file ByteStreamFileSource.hh.

u_int64_t ByteStreamFileSource::fNumBytesToStream [private]

Definition at line 79 of file ByteStreamFileSource.hh.

FILE* FramedFileSource::fFid [protected, inherited]

Definition at line 34 of file FramedFileSource.hh.

unsigned char* FramedSource::fTo [protected, inherited]

Definition at line 75 of file FramedSource.hh.

Referenced by OggDemuxedTrack::to(), and MatroskaDemuxedTrack::to().

unsigned FramedSource::fMaxSize [protected, inherited]

Definition at line 76 of file FramedSource.hh.

Referenced by OggDemuxedTrack::maxSize(), and MatroskaDemuxedTrack::maxSize().

unsigned FramedSource::fFrameSize [protected, inherited]

Definition at line 77 of file FramedSource.hh.

Referenced by OggDemuxedTrack::frameSize(), and MatroskaDemuxedTrack::frameSize().

unsigned FramedSource::fNumTruncatedBytes [protected, inherited]

Definition at line 78 of file FramedSource.hh.

Referenced by OggDemuxedTrack::numTruncatedBytes(), and MatroskaDemuxedTrack::numTruncatedBytes().

struct timeval FramedSource::fPresentationTime [read, protected, inherited]

Definition at line 79 of file FramedSource.hh.

Referenced by OggDemuxedTrack::presentationTime(), MatroskaDemuxedTrack::presentationTime(), and H264or5VideoStreamFramer::setPresentationTime().

unsigned FramedSource::fDurationInMicroseconds [protected, inherited]

Definition at line 80 of file FramedSource.hh.

Referenced by OggDemuxedTrack::durationInMicroseconds(), and MatroskaDemuxedTrack::durationInMicroseconds().


The documentation for this class was generated from the following file:
Generated on Tue Aug 26 14:36:32 2014 for live by  doxygen 1.5.2