live
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
MPEG2TransportStreamMultiplexor Class Referenceabstract

#include <MPEG2TransportStreamMultiplexor.hh>

Inheritance diagram for MPEG2TransportStreamMultiplexor:
Inheritance graph
[legend]
Collaboration diagram for MPEG2TransportStreamMultiplexor:
Collaboration graph
[legend]

Public Types

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

Public Member Functions

void setTimedSegmentation (unsigned segmentationDuration, onEndOfSegmentFunc *onEndOfSegmentFunc=NULL, void *onEndOfSegmentClientData=NULL)
 
double currentSegmentDuration () const
 
Boolean canDeliverNewFrameImmediately () 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
 
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 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

 MPEG2TransportStreamMultiplexor (UsageEnvironment &env)
 
virtual ~MPEG2TransportStreamMultiplexor ()
 
virtual void awaitNewBuffer (unsigned char *oldBuffer)=0
 
void handleNewBuffer (unsigned char *buffer, unsigned bufferSize, int mpegVersion, MPEG1or2Demux::SCR scr, int16_t PID=-1)
 
virtual void doStopGettingFrames ()
 
TaskTokennextTask ()
 

Protected Attributes

Boolean fHaveVideoStreams
 
unsigned char * fTo
 
unsigned fMaxSize
 
unsigned fFrameSize
 
unsigned fNumTruncatedBytes
 
struct timeval fPresentationTime
 
unsigned fDurationInMicroseconds
 

Private Member Functions

virtual Boolean isMPEG2TransportStreamMultiplexor () const
 
virtual void doGetNextFrame ()
 
void deliverDataToClient (u_int16_t pid, unsigned char *buffer, unsigned bufferSize, unsigned &startPositionInBuffer)
 
void deliverPATPacket ()
 
void deliverPMTPacket (Boolean hasChanged)
 
void setProgramStreamMap (unsigned frameSize)
 
Boolean segmentationIsTimed () const
 
virtual Boolean isFramedSource () const
 
virtual Boolean isSource () const
 

Private Attributes

unsigned fOutgoingPacketCounter
 
unsigned fProgramMapVersion
 
u_int8_t fPreviousInputProgramMapVersion
 
u_int8_t fCurrentInputProgramMapVersion
 
struct {
   unsigned   counter
 
   u_int8_t   streamType
 
fPIDState [PID_TABLE_SIZE]
 
u_int16_t fPCR_PID
 
u_int16_t fCurrentPID
 
MPEG1or2Demux::SCR fPCR
 
unsigned char * fInputBuffer
 
unsigned fInputBufferSize
 
unsigned fInputBufferBytesUsed
 
Boolean fIsFirstAdaptationField
 
unsigned fSegmentationDuration
 
u_int8_t fSegmentationIndication
 
double fCurrentSegmentDuration
 
double fPreviousPTS
 
onEndOfSegmentFuncfOnEndOfSegmentFunc
 
void * fOnEndOfSegmentClientData
 
afterGettingFuncfAfterGettingFunc
 
void * fAfterGettingClientData
 
onCloseFuncfOnCloseFunc
 
void * fOnCloseClientData
 
Boolean fIsCurrentlyAwaitingData
 
UsageEnvironmentfEnviron
 
char fMediumName [mediumNameMaxLen]
 
TaskToken fNextTask
 

Detailed Description

Definition at line 34 of file MPEG2TransportStreamMultiplexor.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.

◆ onEndOfSegmentFunc

typedef void() MPEG2TransportStreamMultiplexor::onEndOfSegmentFunc(void *clientData, double segmentDuration)

Definition at line 36 of file MPEG2TransportStreamMultiplexor.hh.

Constructor & Destructor Documentation

◆ MPEG2TransportStreamMultiplexor()

MPEG2TransportStreamMultiplexor::MPEG2TransportStreamMultiplexor ( UsageEnvironment env)
protected

◆ ~MPEG2TransportStreamMultiplexor()

virtual MPEG2TransportStreamMultiplexor::~MPEG2TransportStreamMultiplexor ( )
protectedvirtual

Member Function Documentation

◆ afterGetting()

static void FramedSource::afterGetting ( FramedSource source)
staticinherited

◆ awaitNewBuffer()

virtual void MPEG2TransportStreamMultiplexor::awaitNewBuffer ( unsigned char *  oldBuffer)
protectedpure virtual

◆ canDeliverNewFrameImmediately()

Boolean MPEG2TransportStreamMultiplexor::canDeliverNewFrameImmediately ( ) const
inline

◆ close() [1/2]

static void Medium::close ( Medium medium)
staticinherited

◆ close() [2/2]

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

◆ currentSegmentDuration()

double MPEG2TransportStreamMultiplexor::currentSegmentDuration ( ) const
inline

◆ deliverDataToClient()

void MPEG2TransportStreamMultiplexor::deliverDataToClient ( u_int16_t  pid,
unsigned char *  buffer,
unsigned  bufferSize,
unsigned &  startPositionInBuffer 
)
private

◆ deliverPATPacket()

void MPEG2TransportStreamMultiplexor::deliverPATPacket ( )
private

◆ deliverPMTPacket()

void MPEG2TransportStreamMultiplexor::deliverPMTPacket ( Boolean  hasChanged)
private

◆ doGetNextFrame()

virtual void MPEG2TransportStreamMultiplexor::doGetNextFrame ( )
privatevirtual

Implements FramedSource.

◆ doStopGettingFrames()

virtual void FramedSource::doStopGettingFrames ( )
protectedvirtualinherited

◆ envir()

UsageEnvironment & Medium::envir ( ) const
inlineinherited

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

void FramedSource::handleClosure ( )
inherited

◆ handleClosure() [2/2]

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

◆ handleNewBuffer()

void MPEG2TransportStreamMultiplexor::handleNewBuffer ( unsigned char *  buffer,
unsigned  bufferSize,
int  mpegVersion,
MPEG1or2Demux::SCR  scr,
int16_t  PID = -1 
)
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.

◆ 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 MPEG2TransportStreamMultiplexor::isMPEG2TransportStreamMultiplexor ( ) const
privatevirtual

Reimplemented from MediaSource.

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

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

◆ segmentationIsTimed()

Boolean MPEG2TransportStreamMultiplexor::segmentationIsTimed ( ) const
inlineprivate

◆ setProgramStreamMap()

void MPEG2TransportStreamMultiplexor::setProgramStreamMap ( unsigned  frameSize)
private

◆ setTimedSegmentation()

void MPEG2TransportStreamMultiplexor::setTimedSegmentation ( unsigned  segmentationDuration,
onEndOfSegmentFunc onEndOfSegmentFunc = NULL,
void *  onEndOfSegmentClientData = NULL 
)

◆ stopGettingFrames()

void FramedSource::stopGettingFrames ( )
inherited

Field Documentation

◆ counter

unsigned MPEG2TransportStreamMultiplexor::counter

Definition at line 91 of file MPEG2TransportStreamMultiplexor.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.

◆ fCurrentInputProgramMapVersion

u_int8_t MPEG2TransportStreamMultiplexor::fCurrentInputProgramMapVersion
private

Definition at line 88 of file MPEG2TransportStreamMultiplexor.hh.

◆ fCurrentPID

u_int16_t MPEG2TransportStreamMultiplexor::fCurrentPID
private

Definition at line 94 of file MPEG2TransportStreamMultiplexor.hh.

◆ fCurrentSegmentDuration

double MPEG2TransportStreamMultiplexor::fCurrentSegmentDuration
private

Definition at line 110 of file MPEG2TransportStreamMultiplexor.hh.

Referenced by currentSegmentDuration().

◆ fDurationInMicroseconds

unsigned FramedSource::fDurationInMicroseconds
protectedinherited

◆ fEnviron

UsageEnvironment& Medium::fEnviron
privateinherited

Definition at line 82 of file Media.hh.

Referenced by Medium::envir().

◆ fFrameSize

unsigned FramedSource::fFrameSize
protectedinherited

◆ fHaveVideoStreams

Boolean MPEG2TransportStreamMultiplexor::fHaveVideoStreams
protected

Definition at line 83 of file MPEG2TransportStreamMultiplexor.hh.

◆ fInputBuffer

unsigned char* MPEG2TransportStreamMultiplexor::fInputBuffer
private

Definition at line 96 of file MPEG2TransportStreamMultiplexor.hh.

◆ fInputBufferBytesUsed

unsigned MPEG2TransportStreamMultiplexor::fInputBufferBytesUsed
private

Definition at line 97 of file MPEG2TransportStreamMultiplexor.hh.

Referenced by canDeliverNewFrameImmediately().

◆ fInputBufferSize

unsigned MPEG2TransportStreamMultiplexor::fInputBufferSize
private

Definition at line 97 of file MPEG2TransportStreamMultiplexor.hh.

Referenced by canDeliverNewFrameImmediately().

◆ fIsCurrentlyAwaitingData

Boolean FramedSource::fIsCurrentlyAwaitingData
privateinherited

Definition at line 92 of file FramedSource.hh.

Referenced by FramedSource::isCurrentlyAwaitingData().

◆ fIsFirstAdaptationField

Boolean MPEG2TransportStreamMultiplexor::fIsFirstAdaptationField
private

Definition at line 98 of file MPEG2TransportStreamMultiplexor.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().

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

◆ fOnEndOfSegmentClientData

void* MPEG2TransportStreamMultiplexor::fOnEndOfSegmentClientData
private

Definition at line 112 of file MPEG2TransportStreamMultiplexor.hh.

◆ fOnEndOfSegmentFunc

onEndOfSegmentFunc* MPEG2TransportStreamMultiplexor::fOnEndOfSegmentFunc
private

Definition at line 111 of file MPEG2TransportStreamMultiplexor.hh.

◆ fOutgoingPacketCounter

unsigned MPEG2TransportStreamMultiplexor::fOutgoingPacketCounter
private

Definition at line 86 of file MPEG2TransportStreamMultiplexor.hh.

◆ fPCR

MPEG1or2Demux::SCR MPEG2TransportStreamMultiplexor::fPCR
private

Definition at line 95 of file MPEG2TransportStreamMultiplexor.hh.

◆ fPCR_PID

u_int16_t MPEG2TransportStreamMultiplexor::fPCR_PID
private

Definition at line 94 of file MPEG2TransportStreamMultiplexor.hh.

◆ 

struct { ... } MPEG2TransportStreamMultiplexor::fPIDState[PID_TABLE_SIZE]

◆ fPresentationTime

struct timeval FramedSource::fPresentationTime
protectedinherited

◆ fPreviousInputProgramMapVersion

u_int8_t MPEG2TransportStreamMultiplexor::fPreviousInputProgramMapVersion
private

Definition at line 88 of file MPEG2TransportStreamMultiplexor.hh.

◆ fPreviousPTS

double MPEG2TransportStreamMultiplexor::fPreviousPTS
private

Definition at line 110 of file MPEG2TransportStreamMultiplexor.hh.

◆ fProgramMapVersion

unsigned MPEG2TransportStreamMultiplexor::fProgramMapVersion
private

Definition at line 87 of file MPEG2TransportStreamMultiplexor.hh.

◆ fSegmentationDuration

unsigned MPEG2TransportStreamMultiplexor::fSegmentationDuration
private

Definition at line 99 of file MPEG2TransportStreamMultiplexor.hh.

Referenced by segmentationIsTimed().

◆ fSegmentationIndication

u_int8_t MPEG2TransportStreamMultiplexor::fSegmentationIndication
private

Definition at line 105 of file MPEG2TransportStreamMultiplexor.hh.

◆ fTo

unsigned char* FramedSource::fTo
protectedinherited

◆ streamType

u_int8_t MPEG2TransportStreamMultiplexor::streamType

Definition at line 92 of file MPEG2TransportStreamMultiplexor.hh.


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