live
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
MP3FileSource Class Reference

#include <MP3FileSource.hh>

Inheritance diagram for MP3FileSource:
Inheritance graph
[legend]
Collaboration diagram for MP3FileSource:
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

float filePlayTime () const
 
unsigned fileSize () const
 
void setPresentationTimeScale (unsigned scale)
 
void seekWithinFile (double seekNPT, double streamDuration)
 
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 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 MP3FileSourcecreateNew (UsageEnvironment &env, char const *fileName)
 
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

 MP3FileSource (UsageEnvironment &env, FILE *fid)
 
virtual ~MP3FileSource ()
 
void assignStream (FILE *fid, unsigned filesize)
 
Boolean initializeStream ()
 
MP3StreamStatestreamState ()
 
virtual void doStopGettingFrames ()
 
TaskTokennextTask ()
 

Protected Attributes

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

Private Member Functions

virtual void doGetNextFrame ()
 
virtual char const * MIMEtype () const
 
virtual void getAttributes () const
 
virtual Boolean doGetNextFrame1 ()
 

Private Attributes

MP3StreamStatefStreamState
 
Boolean fHaveJustInitialized
 
struct timeval fFirstFramePresentationTime
 
Boolean fLimitNumBytesToStream
 
unsigned fNumBytesToStream
 

Detailed Description

Definition at line 30 of file MP3FileSource.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

◆ MP3FileSource()

MP3FileSource::MP3FileSource ( UsageEnvironment env,
FILE *  fid 
)
protected

◆ ~MP3FileSource()

virtual MP3FileSource::~MP3FileSource ( )
protectedvirtual

Member Function Documentation

◆ afterGetting()

static void FramedSource::afterGetting ( FramedSource source)
staticinherited

◆ assignStream()

void MP3FileSource::assignStream ( FILE *  fid,
unsigned  filesize 
)
protected

◆ close() [1/2]

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

◆ close() [2/2]

static void Medium::close ( Medium medium)
staticinherited

◆ createNew()

static MP3FileSource* MP3FileSource::createNew ( UsageEnvironment env,
char const *  fileName 
)
static

◆ doGetNextFrame()

virtual void MP3FileSource::doGetNextFrame ( )
privatevirtual

Implements FramedSource.

◆ doGetNextFrame1()

virtual Boolean MP3FileSource::doGetNextFrame1 ( )
privatevirtual

◆ doStopGettingFrames()

virtual void FramedSource::doStopGettingFrames ( )
protectedvirtualinherited

◆ envir()

UsageEnvironment& Medium::envir ( ) const
inlineinherited

◆ filePlayTime()

float MP3FileSource::filePlayTime ( ) const

◆ fileSize()

unsigned MP3FileSource::fileSize ( ) const

◆ getAttributes()

virtual void MP3FileSource::getAttributes ( ) const
privatevirtual

Reimplemented from MediaSource.

◆ 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

◆ initializeStream()

Boolean MP3FileSource::initializeStream ( )
protected

◆ 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* MP3FileSource::MIMEtype ( ) const
privatevirtual

Reimplemented from MediaSource.

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

◆ seekWithinFile()

void MP3FileSource::seekWithinFile ( double  seekNPT,
double  streamDuration 
)

◆ setPresentationTimeScale()

void MP3FileSource::setPresentationTimeScale ( unsigned  scale)

◆ stopGettingFrames()

void FramedSource::stopGettingFrames ( )
inherited

◆ streamState()

MP3StreamState* MP3FileSource::streamState ( )
inlineprotected

Definition at line 50 of file MP3FileSource.hh.

50 {return fStreamState;}
MP3StreamState * fStreamState

References fStreamState.

Field Documentation

◆ fDurationInMicroseconds

unsigned FramedSource::fDurationInMicroseconds
protectedinherited

◆ fFid

FILE* FramedFileSource::fFid
protectedinherited

Definition at line 34 of file FramedFileSource.hh.

◆ fFirstFramePresentationTime

struct timeval MP3FileSource::fFirstFramePresentationTime
private

Definition at line 64 of file MP3FileSource.hh.

◆ fFrameSize

unsigned FramedSource::fFrameSize
protectedinherited

◆ fHaveJustInitialized

Boolean MP3FileSource::fHaveJustInitialized
private

Definition at line 63 of file MP3FileSource.hh.

◆ fLimitNumBytesToStream

Boolean MP3FileSource::fLimitNumBytesToStream
private

Definition at line 65 of file MP3FileSource.hh.

◆ fMaxSize

unsigned FramedSource::fMaxSize
protectedinherited

◆ fNumBytesToStream

unsigned MP3FileSource::fNumBytesToStream
private

Definition at line 66 of file MP3FileSource.hh.

◆ fNumTruncatedBytes

unsigned FramedSource::fNumTruncatedBytes
protectedinherited

◆ fPresentationTime

struct timeval FramedSource::fPresentationTime
protectedinherited

◆ fStreamState

MP3StreamState* MP3FileSource::fStreamState
private

Definition at line 62 of file MP3FileSource.hh.

Referenced by streamState().

◆ fTo

unsigned char* FramedSource::fTo
protectedinherited

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