live
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
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
 

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
 
struct 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
 

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 ( )
protectedvirtual

Member Function Documentation

static void FramedSource::afterGetting ( FramedSource source)
staticinherited
static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited
static void Medium::close ( Medium medium)
staticinherited
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
virtual void ByteStreamFileSource::doGetNextFrame ( )
privatevirtual

Implements FramedSource.

void ByteStreamFileSource::doReadFromFile ( )
protected
virtual void ByteStreamFileSource::doStopGettingFrames ( )
privatevirtual

Reimplemented from FramedSource.

UsageEnvironment& Medium::envir ( ) const
inlineinherited
static void ByteStreamFileSource::fileReadableHandler ( ByteStreamFileSource source,
int  mask 
)
staticprotected
u_int64_t ByteStreamFileSource::fileSize ( ) const
inline

Definition at line 44 of file ByteStreamFileSource.hh.

References fFileSize.

44 { return fFileSize; }
virtual void MediaSource::getAttributes ( ) const
virtualinherited
void FramedSource::getNextFrame ( unsigned char *  to,
unsigned  maxSize,
afterGettingFunc afterGettingFunc,
void *  afterGettingClientData,
onCloseFunc onCloseFunc,
void *  onCloseClientData 
)
inherited
static void FramedSource::handleClosure ( void *  clientData)
staticinherited
void FramedSource::handleClosure ( )
inherited
virtual Boolean MediaSource::isAMRAudioSource ( ) const
virtualinherited

Reimplemented in AMRAudioSource.

Boolean FramedSource::isCurrentlyAwaitingData ( ) const
inlineinherited

Definition at line 61 of file FramedSource.hh.

References FramedSource::fIsCurrentlyAwaitingData.

Boolean fIsCurrentlyAwaitingData
Definition: FramedSource.hh:92
virtual Boolean MediaSource::isDVVideoStreamFramer ( ) const
virtualinherited

Reimplemented in DVVideoStreamFramer.

virtual Boolean MediaSource::isH264VideoStreamFramer ( ) const
virtualinherited
virtual Boolean MediaSource::isH265VideoStreamFramer ( ) const
virtualinherited
virtual Boolean MediaSource::isJPEGVideoSource ( ) const
virtualinherited

Reimplemented in JPEGVideoSource.

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

virtual Boolean MediaSource::isMPEG1or2VideoStreamFramer ( ) const
virtualinherited

Reimplemented in MPEG1or2VideoStreamFramer.

virtual Boolean MediaSource::isMPEG4VideoStreamFramer ( ) const
virtualinherited

Reimplemented in MPEG4VideoStreamFramer.

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

virtual Boolean MediaSource::isRTPSource ( ) const
virtualinherited

Reimplemented in RTPSource.

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

Reimplemented in MediaSink.

static Boolean MediaSource::lookupByName ( UsageEnvironment env,
char const *  sourceName,
MediaSource *&  resultSource 
)
staticinherited
static Boolean FramedSource::lookupByName ( UsageEnvironment env,
char const *  sourceName,
FramedSource *&  resultSource 
)
staticinherited
static Boolean Medium::lookupByName ( UsageEnvironment env,
char const *  mediumName,
Medium *&  resultMedium 
)
staticinherited
virtual unsigned FramedSource::maxFrameSize ( ) const
virtualinherited
virtual char const* MediaSource::MIMEtype ( ) const
virtualinherited
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:83
TaskToken& Medium::nextTask ( )
inlineprotectedinherited

Definition at line 77 of file Media.hh.

References Medium::fNextTask.

77  {
78  return fNextTask;
79  }
TaskToken fNextTask
Definition: Media.hh:84
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 ( )
void FramedSource::stopGettingFrames ( )
inherited

Field Documentation

unsigned FramedSource::fDurationInMicroseconds
protectedinherited
FILE* FramedFileSource::fFid
protectedinherited

Definition at line 34 of file FramedFileSource.hh.

Boolean ByteStreamFileSource::fFidIsSeekable
private

Definition at line 75 of file ByteStreamFileSource.hh.

u_int64_t ByteStreamFileSource::fFileSize
protected

Definition at line 70 of file ByteStreamFileSource.hh.

Referenced by fileSize().

unsigned FramedSource::fFrameSize
protectedinherited

Definition at line 77 of file FramedSource.hh.

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

Boolean ByteStreamFileSource::fHaveStartedReading
private

Definition at line 77 of file ByteStreamFileSource.hh.

unsigned ByteStreamFileSource::fLastPlayTime
private

Definition at line 76 of file ByteStreamFileSource.hh.

Boolean ByteStreamFileSource::fLimitNumBytesToStream
private

Definition at line 78 of file ByteStreamFileSource.hh.

unsigned FramedSource::fMaxSize
protectedinherited

Definition at line 76 of file FramedSource.hh.

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

u_int64_t ByteStreamFileSource::fNumBytesToStream
private

Definition at line 79 of file ByteStreamFileSource.hh.

unsigned FramedSource::fNumTruncatedBytes
protectedinherited
unsigned ByteStreamFileSource::fPlayTimePerFrame
private

Definition at line 74 of file ByteStreamFileSource.hh.

unsigned ByteStreamFileSource::fPreferredFrameSize
private

Definition at line 73 of file ByteStreamFileSource.hh.

struct timeval FramedSource::fPresentationTime
protectedinherited
unsigned char* FramedSource::fTo
protectedinherited

Definition at line 75 of file FramedSource.hh.

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


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