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

#include <WAVAudioFileSource.hh>

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

unsigned numPCMBytes () const
 
void setScaleFactor (int scale)
 
void seekToPCMByte (unsigned byteNumber)
 
void limitNumBytesToStream (unsigned numBytesToStream)
 
unsigned char getAudioFormat ()
 
unsigned char bitsPerSample () const
 
unsigned char numChannels () const
 
unsigned samplingFrequency () const
 
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 WAVAudioFileSourcecreateNew (UsageEnvironment &env, char const *fileName)
 
static AudioInputDevicecreateNew (UsageEnvironment &env, int inputPortNumber, unsigned char bitsPerSample, unsigned char numChannels, unsigned samplingFrequency, unsigned granularityInMS=20)
 
static AudioPortNamesgetPortNames ()
 
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)
 

Static Public Attributes

static char ** allowedDeviceNames
 

Protected Member Functions

 WAVAudioFileSource (UsageEnvironment &env, FILE *fid)
 
virtual ~WAVAudioFileSource ()
 
void doReadFromFile ()
 
TaskTokennextTask ()
 

Static Protected Member Functions

static void fileReadableHandler (WAVAudioFileSource *source, int mask)
 

Protected Attributes

unsigned fPreferredFrameSize
 
unsigned char fBitsPerSample
 
unsigned char fNumChannels
 
unsigned fSamplingFrequency
 
unsigned fGranularityInMS
 
unsigned char * fTo
 
unsigned fMaxSize
 
unsigned fFrameSize
 
unsigned fNumTruncatedBytes
 
struct timeval fPresentationTime
 
unsigned fDurationInMicroseconds
 

Private Member Functions

virtual void doGetNextFrame ()
 
virtual void doStopGettingFrames ()
 
virtual Boolean setInputPort (int portIndex)
 
virtual double getAverageLevel () const
 
virtual Boolean isFramedSource () const
 
virtual Boolean isSource () const
 

Private Attributes

FILE * fFid
 
double fPlayTimePerSample
 
Boolean fFidIsSeekable
 
unsigned fLastPlayTime
 
Boolean fHaveStartedReading
 
unsigned fWAVHeaderSize
 
unsigned fFileSize
 
int fScaleFactor
 
Boolean fLimitNumBytesToStream
 
unsigned fNumBytesToStream
 
unsigned char fAudioFormat
 
afterGettingFuncfAfterGettingFunc
 
void * fAfterGettingClientData
 
onCloseFuncfOnCloseFunc
 
void * fOnCloseClientData
 
Boolean fIsCurrentlyAwaitingData
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Detailed Description

Definition at line 39 of file WAVAudioFileSource.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

◆ WAVAudioFileSource()

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

◆ ~WAVAudioFileSource()

virtual WAVAudioFileSource::~WAVAudioFileSource ( )
protectedvirtual

Member Function Documentation

◆ afterGetting()

static void FramedSource::afterGetting ( FramedSource source)
staticinherited

◆ bitsPerSample()

unsigned char AudioInputDevice::bitsPerSample ( ) const
inlineinherited

Definition at line 38 of file AudioInputDevice.hh.

38{ return fBitsPerSample; }
unsigned char fBitsPerSample

References AudioInputDevice::fBitsPerSample.

◆ close() [1/2]

static void Medium::close ( Medium medium)
staticinherited

◆ close() [2/2]

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

◆ createNew() [1/2]

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

◆ createNew() [2/2]

static AudioInputDevice * AudioInputDevice::createNew ( UsageEnvironment env,
int  inputPortNumber,
unsigned char  bitsPerSample,
unsigned char  numChannels,
unsigned  samplingFrequency,
unsigned  granularityInMS = 20 
)
staticinherited

◆ doGetNextFrame()

virtual void WAVAudioFileSource::doGetNextFrame ( )
privatevirtual

Implements FramedSource.

◆ doReadFromFile()

void WAVAudioFileSource::doReadFromFile ( )
protected

◆ doStopGettingFrames()

virtual void WAVAudioFileSource::doStopGettingFrames ( )
privatevirtual

Reimplemented from FramedSource.

◆ envir()

UsageEnvironment & Medium::envir ( ) const
inlineinherited

◆ fileReadableHandler()

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

◆ getAttributes()

virtual void MediaSource::getAttributes ( ) const
virtualinherited

◆ getAudioFormat()

unsigned char WAVAudioFileSource::getAudioFormat ( )

◆ getAverageLevel()

virtual double WAVAudioFileSource::getAverageLevel ( ) const
privatevirtual

Implements AudioInputDevice.

◆ getNextFrame()

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

◆ getPortNames()

static AudioPortNames * AudioInputDevice::getPortNames ( )
staticinherited

◆ handleClosure() [1/2]

void FramedSource::handleClosure ( )
inherited

◆ handleClosure() [2/2]

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

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

◆ isFramedSource()

virtual Boolean FramedSource::isFramedSource ( ) const
privatevirtualinherited

Reimplemented from MediaSource.

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

◆ isSource()

virtual Boolean MediaSource::isSource ( ) const
privatevirtualinherited

Reimplemented from Medium.

◆ limitNumBytesToStream()

void WAVAudioFileSource::limitNumBytesToStream ( unsigned  numBytesToStream)

◆ lookupByName() [1/3]

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

◆ lookupByName() [2/3]

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

◆ lookupByName() [3/3]

static Boolean MediaSource::lookupByName ( UsageEnvironment env,
char const *  sourceName,
MediaSource *&  resultSource 
)
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.

◆ numChannels()

unsigned char AudioInputDevice::numChannels ( ) const
inlineinherited

Definition at line 39 of file AudioInputDevice.hh.

39{ return fNumChannels; }
unsigned char fNumChannels

References AudioInputDevice::fNumChannels.

◆ numPCMBytes()

unsigned WAVAudioFileSource::numPCMBytes ( ) const

◆ samplingFrequency()

unsigned AudioInputDevice::samplingFrequency ( ) const
inlineinherited

Definition at line 40 of file AudioInputDevice.hh.

40{ return fSamplingFrequency; }
unsigned fSamplingFrequency

References AudioInputDevice::fSamplingFrequency.

◆ seekToPCMByte()

void WAVAudioFileSource::seekToPCMByte ( unsigned  byteNumber)

◆ setInputPort()

virtual Boolean WAVAudioFileSource::setInputPort ( int  portIndex)
privatevirtual

Implements AudioInputDevice.

◆ setScaleFactor()

void WAVAudioFileSource::setScaleFactor ( int  scale)

◆ stopGettingFrames()

void FramedSource::stopGettingFrames ( )
inherited

Field Documentation

◆ allowedDeviceNames

char** AudioInputDevice::allowedDeviceNames
staticinherited

Definition at line 51 of file AudioInputDevice.hh.

◆ fAfterGettingClientData

void* FramedSource::fAfterGettingClientData
privateinherited

Definition at line 88 of file FramedSource.hh.

◆ fAfterGettingFunc

afterGettingFunc* FramedSource::fAfterGettingFunc
privateinherited

Definition at line 87 of file FramedSource.hh.

◆ fAudioFormat

unsigned char WAVAudioFileSource::fAudioFormat
private

Definition at line 83 of file WAVAudioFileSource.hh.

◆ fBitsPerSample

unsigned char AudioInputDevice::fBitsPerSample
protectedinherited

Definition at line 66 of file AudioInputDevice.hh.

Referenced by AudioInputDevice::bitsPerSample().

◆ fDurationInMicroseconds

unsigned FramedSource::fDurationInMicroseconds
protectedinherited

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fFid

FILE* WAVAudioFileSource::fFid
private

Definition at line 73 of file WAVAudioFileSource.hh.

◆ fFidIsSeekable

Boolean WAVAudioFileSource::fFidIsSeekable
private

Definition at line 75 of file WAVAudioFileSource.hh.

◆ fFileSize

unsigned WAVAudioFileSource::fFileSize
private

Definition at line 79 of file WAVAudioFileSource.hh.

◆ fFrameSize

unsigned FramedSource::fFrameSize
protectedinherited

◆ fGranularityInMS

unsigned AudioInputDevice::fGranularityInMS
protectedinherited

Definition at line 68 of file AudioInputDevice.hh.

◆ fHaveStartedReading

Boolean WAVAudioFileSource::fHaveStartedReading
private

Definition at line 77 of file WAVAudioFileSource.hh.

◆ fIsCurrentlyAwaitingData

Boolean FramedSource::fIsCurrentlyAwaitingData
privateinherited

Definition at line 92 of file FramedSource.hh.

Referenced by FramedSource::isCurrentlyAwaitingData().

◆ fLastPlayTime

unsigned WAVAudioFileSource::fLastPlayTime
private

Definition at line 76 of file WAVAudioFileSource.hh.

◆ fLimitNumBytesToStream

Boolean WAVAudioFileSource::fLimitNumBytesToStream
private

Definition at line 81 of file WAVAudioFileSource.hh.

◆ fMaxSize

unsigned FramedSource::fMaxSize
protectedinherited

◆ fMediumName

char Medium::fMediumName[mediumNameMaxLen]
privateinherited

Definition at line 83 of file Media.hh.

Referenced by Medium::name().

◆ fNextTask

TaskToken Medium::fNextTask
privateinherited

Definition at line 84 of file Media.hh.

Referenced by Medium::nextTask().

◆ fNumBytesToStream

unsigned WAVAudioFileSource::fNumBytesToStream
private

Definition at line 82 of file WAVAudioFileSource.hh.

◆ fNumChannels

unsigned char AudioInputDevice::fNumChannels
protectedinherited

Definition at line 66 of file AudioInputDevice.hh.

Referenced by AudioInputDevice::numChannels().

◆ fNumTruncatedBytes

unsigned FramedSource::fNumTruncatedBytes
protectedinherited

◆ fOnCloseClientData

void* FramedSource::fOnCloseClientData
privateinherited

Definition at line 90 of file FramedSource.hh.

◆ fOnCloseFunc

onCloseFunc* FramedSource::fOnCloseFunc
privateinherited

Definition at line 89 of file FramedSource.hh.

◆ fPlayTimePerSample

double WAVAudioFileSource::fPlayTimePerSample
private

Definition at line 74 of file WAVAudioFileSource.hh.

◆ fPreferredFrameSize

unsigned WAVAudioFileSource::fPreferredFrameSize
protected

Definition at line 70 of file WAVAudioFileSource.hh.

◆ fPresentationTime

struct timeval FramedSource::fPresentationTime
protectedinherited

◆ fSamplingFrequency

unsigned AudioInputDevice::fSamplingFrequency
protectedinherited

Definition at line 67 of file AudioInputDevice.hh.

Referenced by AudioInputDevice::samplingFrequency().

◆ fScaleFactor

int WAVAudioFileSource::fScaleFactor
private

Definition at line 80 of file WAVAudioFileSource.hh.

◆ fTo

unsigned char* FramedSource::fTo
protectedinherited

◆ fWAVHeaderSize

unsigned WAVAudioFileSource::fWAVHeaderSize
private

Definition at line 78 of file WAVAudioFileSource.hh.


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