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
 
virtual Boolean isMPEG2TransportStreamMultiplexor () 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

◆ afterGettingFunc

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

Definition at line 36 of file FramedSource.hh.

◆ onCloseFunc

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

Definition at line 40 of file FramedSource.hh.

Constructor & Destructor Documentation

◆ ByteStreamFileSource()

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

◆ ~ByteStreamFileSource()

virtual ByteStreamFileSource::~ByteStreamFileSource ( )
protectedvirtual

Member Function Documentation

◆ afterGetting()

static void FramedSource::afterGetting ( FramedSource source)
staticinherited

◆ close() [1/2]

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

◆ close() [2/2]

static void Medium::close ( Medium medium)
staticinherited

◆ createNew() [1/2]

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

◆ createNew() [2/2]

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

◆ doGetNextFrame()

virtual void ByteStreamFileSource::doGetNextFrame ( )
privatevirtual

Implements FramedSource.

◆ doReadFromFile()

void ByteStreamFileSource::doReadFromFile ( )
protected

◆ doStopGettingFrames()

virtual void ByteStreamFileSource::doStopGettingFrames ( )
privatevirtual

Reimplemented from FramedSource.

◆ envir()

UsageEnvironment& Medium::envir ( ) const
inlineinherited

◆ fileReadableHandler()

static void ByteStreamFileSource::fileReadableHandler ( ByteStreamFileSource source,
int  mask 
)
staticprotected

◆ fileSize()

u_int64_t ByteStreamFileSource::fileSize ( ) const
inline

Definition at line 44 of file ByteStreamFileSource.hh.

44 { return fFileSize; }

References fFileSize.

◆ getAttributes()

virtual void MediaSource::getAttributes ( ) const
virtualinherited

◆ getNextFrame()

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

◆ handleClosure() [1/2]

static void FramedSource::handleClosure ( void *  clientData)
staticinherited

◆ handleClosure() [2/2]

void FramedSource::handleClosure ( )
inherited

◆ isAMRAudioSource()

virtual Boolean MediaSource::isAMRAudioSource ( ) const
virtualinherited

Reimplemented in AMRAudioSource.

◆ isCurrentlyAwaitingData()

Boolean FramedSource::isCurrentlyAwaitingData ( ) const
inlineinherited

Definition at line 61 of file FramedSource.hh.

Boolean fIsCurrentlyAwaitingData
Definition: FramedSource.hh:92

References FramedSource::fIsCurrentlyAwaitingData.

◆ isDVVideoStreamFramer()

virtual Boolean MediaSource::isDVVideoStreamFramer ( ) const
virtualinherited

Reimplemented in DVVideoStreamFramer.

◆ isH264VideoStreamFramer()

virtual Boolean MediaSource::isH264VideoStreamFramer ( ) const
virtualinherited

◆ isH265VideoStreamFramer()

virtual Boolean MediaSource::isH265VideoStreamFramer ( ) const
virtualinherited

◆ isJPEGVideoSource()

virtual Boolean MediaSource::isJPEGVideoSource ( ) const
virtualinherited

Reimplemented in JPEGVideoSource.

◆ isMediaSession()

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

◆ isMPEG1or2VideoStreamFramer()

virtual Boolean MediaSource::isMPEG1or2VideoStreamFramer ( ) const
virtualinherited

Reimplemented in MPEG1or2VideoStreamFramer.

◆ isMPEG2TransportStreamMultiplexor()

virtual Boolean MediaSource::isMPEG2TransportStreamMultiplexor ( ) const
virtualinherited

◆ isMPEG4VideoStreamFramer()

virtual Boolean MediaSource::isMPEG4VideoStreamFramer ( ) const
virtualinherited

Reimplemented in MPEG4VideoStreamFramer.

◆ isRTCPInstance()

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

◆ isRTPSource()

virtual Boolean MediaSource::isRTPSource ( ) const
virtualinherited

Reimplemented in RTPSource.

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

Reimplemented in MediaSink.

◆ lookupByName() [1/3]

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

◆ lookupByName() [2/3]

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

◆ lookupByName() [3/3]

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

◆ maxFrameSize()

virtual unsigned FramedSource::maxFrameSize ( ) const
virtualinherited

◆ MIMEtype()

virtual char const* MediaSource::MIMEtype ( ) const
virtualinherited

◆ 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.

◆ seekToByteAbsolute()

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

◆ seekToByteRelative()

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

◆ seekToEnd()

void ByteStreamFileSource::seekToEnd ( )

◆ stopGettingFrames()

void FramedSource::stopGettingFrames ( )
inherited

Field Documentation

◆ fDurationInMicroseconds

unsigned FramedSource::fDurationInMicroseconds
protectedinherited

◆ fFid

FILE* FramedFileSource::fFid
protectedinherited

Definition at line 34 of file FramedFileSource.hh.

◆ fFidIsSeekable

Boolean ByteStreamFileSource::fFidIsSeekable
private

Definition at line 75 of file ByteStreamFileSource.hh.

◆ fFileSize

u_int64_t ByteStreamFileSource::fFileSize
protected

Definition at line 70 of file ByteStreamFileSource.hh.

Referenced by fileSize().

◆ fFrameSize

unsigned FramedSource::fFrameSize
protectedinherited

◆ fHaveStartedReading

Boolean ByteStreamFileSource::fHaveStartedReading
private

Definition at line 77 of file ByteStreamFileSource.hh.

◆ fLastPlayTime

unsigned ByteStreamFileSource::fLastPlayTime
private

Definition at line 76 of file ByteStreamFileSource.hh.

◆ fLimitNumBytesToStream

Boolean ByteStreamFileSource::fLimitNumBytesToStream
private

Definition at line 78 of file ByteStreamFileSource.hh.

◆ fMaxSize

unsigned FramedSource::fMaxSize
protectedinherited

◆ fNumBytesToStream

u_int64_t ByteStreamFileSource::fNumBytesToStream
private

Definition at line 79 of file ByteStreamFileSource.hh.

◆ fNumTruncatedBytes

unsigned FramedSource::fNumTruncatedBytes
protectedinherited

◆ fPlayTimePerFrame

unsigned ByteStreamFileSource::fPlayTimePerFrame
private

Definition at line 74 of file ByteStreamFileSource.hh.

◆ fPreferredFrameSize

unsigned ByteStreamFileSource::fPreferredFrameSize
private

Definition at line 73 of file ByteStreamFileSource.hh.

◆ fPresentationTime

struct timeval FramedSource::fPresentationTime
protectedinherited

◆ fTo

unsigned char* FramedSource::fTo
protectedinherited

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