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

#include <MPEG2TransportStreamTrickModeFilter.hh>

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

Boolean seekTo (unsigned long tsPacketNumber, unsigned long indexRecordNumber)
 
unsigned long nextIndexRecordNum () const
 
void forgetInputSource ()
 
FramedSourceinputSource () const
 
void reassignInputSource (FramedSource *newInputSource)
 
void detachInputSource ()
 
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
 
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
 
virtual Boolean isDarwinInjector () const
 

Static Public Member Functions

static
MPEG2TransportStreamTrickModeFilter
createNew (UsageEnvironment &env, FramedSource *inputSource, MPEG2TransportStreamIndexFile *indexFile, int scale)
 
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

 MPEG2TransportStreamTrickModeFilter (UsageEnvironment &env, FramedSource *inputSource, MPEG2TransportStreamIndexFile *indexFile, int scale)
 
virtual ~MPEG2TransportStreamTrickModeFilter ()
 
virtual char const * MIMEtype () const
 
virtual void getAttributes () const
 
TaskTokennextTask ()
 

Protected Attributes

FramedSourcefInputSource
 
unsigned char * fTo
 
unsigned fMaxSize
 
unsigned fFrameSize
 
unsigned fNumTruncatedBytes
 
struct timeval fPresentationTime
 
unsigned fDurationInMicroseconds
 

Private Types

enum  { SKIPPING_FRAME, DELIVERING_SAVED_FRAME, SAVING_AND_DELIVERING_FRAME }
 

Private Member Functions

virtual void doGetNextFrame ()
 
virtual void doStopGettingFrames ()
 
void attemptDeliveryToClient ()
 
void seekToTransportPacket (unsigned long tsPacketNum)
 
void readTransportPacket (unsigned long tsPacketNum)
 
void afterGettingFrame1 (unsigned frameSize)
 
void onSourceClosure1 ()
 

Static Private Member Functions

static void afterGettingFrame (void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
 
static void onSourceClosure (void *clientData)
 

Private Attributes

Boolean fHaveStarted
 
MPEG2TransportStreamIndexFilefIndexFile
 
int fScale
 
int fDirection
 
enum
MPEG2TransportStreamTrickModeFilter:: { ... }  
fState
 
unsigned fFrameCount
 
unsigned long fNextIndexRecordNum
 
unsigned long fNextTSPacketNum
 
unsigned char fInputBuffer [TRANSPORT_PACKET_SIZE]
 
unsigned long fCurrentTSPacketNum
 
unsigned long fDesiredTSPacketNum
 
u_int8_t fDesiredDataOffset
 
u_int8_t fDesiredDataSize
 
float fDesiredDataPCR
 
float fFirstPCR
 
unsigned long fSavedFrameIndexRecordStart
 
unsigned long fSavedSequentialIndexRecordNum
 
Boolean fUseSavedFrameNextTime
 

Detailed Description

Definition at line 38 of file MPEG2TransportStreamTrickModeFilter.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.

Member Enumeration Documentation

anonymous enum
private

Constructor & Destructor Documentation

MPEG2TransportStreamTrickModeFilter::MPEG2TransportStreamTrickModeFilter ( UsageEnvironment env,
FramedSource inputSource,
MPEG2TransportStreamIndexFile indexFile,
int  scale 
)
protected
virtual MPEG2TransportStreamTrickModeFilter::~MPEG2TransportStreamTrickModeFilter ( )
protectedvirtual

Member Function Documentation

static void FramedSource::afterGetting ( FramedSource source)
staticinherited
static void MPEG2TransportStreamTrickModeFilter::afterGettingFrame ( void *  clientData,
unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime,
unsigned  durationInMicroseconds 
)
staticprivate
void MPEG2TransportStreamTrickModeFilter::afterGettingFrame1 ( unsigned  frameSize)
private
void MPEG2TransportStreamTrickModeFilter::attemptDeliveryToClient ( )
private
static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
)
staticinherited
static void Medium::close ( Medium medium)
staticinherited
static MPEG2TransportStreamTrickModeFilter* MPEG2TransportStreamTrickModeFilter::createNew ( UsageEnvironment env,
FramedSource inputSource,
MPEG2TransportStreamIndexFile indexFile,
int  scale 
)
static
void FramedFilter::detachInputSource ( )
inherited
virtual void MPEG2TransportStreamTrickModeFilter::doGetNextFrame ( )
privatevirtual

Implements FramedSource.

virtual void MPEG2TransportStreamTrickModeFilter::doStopGettingFrames ( )
privatevirtual

Reimplemented from FramedFilter.

UsageEnvironment& Medium::envir ( ) const
inlineinherited

Definition at line 59 of file Media.hh.

References Medium::fEnviron.

Referenced by MediaSubsession::env(), RTPInterface::envir(), RTSPServer::RTSPClientConnection::envir(), and RTSPServer::RTSPClientSession::envir().

59 {return fEnviron;}
UsageEnvironment & fEnviron
Definition: Media.hh:83
void MPEG2TransportStreamTrickModeFilter::forgetInputSource ( )
inline

Definition at line 48 of file MPEG2TransportStreamTrickModeFilter.hh.

References FramedFilter::fInputSource, and NULL.

48 { fInputSource = NULL; }
FramedSource * fInputSource
Definition: FramedFilter.hh:49
#define NULL
virtual void FramedFilter::getAttributes ( ) const
protectedvirtualinherited

Reimplemented from MediaSource.

Reimplemented in MP3ADUTranscoder.

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
FramedSource* FramedFilter::inputSource ( ) const
inlineinherited

Definition at line 30 of file FramedFilter.hh.

References FramedFilter::fInputSource.

30 { return fInputSource; }
FramedSource * fInputSource
Definition: FramedFilter.hh:49
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 Medium::isDarwinInjector ( ) const
virtualinherited

Reimplemented in DarwinInjector.

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* FramedFilter::MIMEtype ( ) const
protectedvirtualinherited

Reimplemented from MediaSource.

Reimplemented in MP3FromADUSource, and ADUFromMP3Source.

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:84
unsigned long MPEG2TransportStreamTrickModeFilter::nextIndexRecordNum ( ) const
inline
TaskToken& Medium::nextTask ( )
inlineprotectedinherited

Definition at line 78 of file Media.hh.

References Medium::fNextTask.

78  {
79  return fNextTask;
80  }
TaskToken fNextTask
Definition: Media.hh:85
static void MPEG2TransportStreamTrickModeFilter::onSourceClosure ( void *  clientData)
staticprivate
void MPEG2TransportStreamTrickModeFilter::onSourceClosure1 ( )
private
void MPEG2TransportStreamTrickModeFilter::readTransportPacket ( unsigned long  tsPacketNum)
private
void FramedFilter::reassignInputSource ( FramedSource newInputSource)
inlineinherited

Definition at line 32 of file FramedFilter.hh.

References FramedFilter::fInputSource.

32 { fInputSource = newInputSource; }
FramedSource * fInputSource
Definition: FramedFilter.hh:49
Boolean MPEG2TransportStreamTrickModeFilter::seekTo ( unsigned long  tsPacketNumber,
unsigned long  indexRecordNumber 
)
void MPEG2TransportStreamTrickModeFilter::seekToTransportPacket ( unsigned long  tsPacketNum)
private
void FramedSource::stopGettingFrames ( )
inherited

Field Documentation

unsigned long MPEG2TransportStreamTrickModeFilter::fCurrentTSPacketNum
private

Definition at line 90 of file MPEG2TransportStreamTrickModeFilter.hh.

u_int8_t MPEG2TransportStreamTrickModeFilter::fDesiredDataOffset
private

Definition at line 92 of file MPEG2TransportStreamTrickModeFilter.hh.

float MPEG2TransportStreamTrickModeFilter::fDesiredDataPCR
private

Definition at line 93 of file MPEG2TransportStreamTrickModeFilter.hh.

u_int8_t MPEG2TransportStreamTrickModeFilter::fDesiredDataSize
private

Definition at line 92 of file MPEG2TransportStreamTrickModeFilter.hh.

unsigned long MPEG2TransportStreamTrickModeFilter::fDesiredTSPacketNum
private

Definition at line 91 of file MPEG2TransportStreamTrickModeFilter.hh.

int MPEG2TransportStreamTrickModeFilter::fDirection
private

Definition at line 80 of file MPEG2TransportStreamTrickModeFilter.hh.

unsigned FramedSource::fDurationInMicroseconds
protectedinherited
float MPEG2TransportStreamTrickModeFilter::fFirstPCR
private

Definition at line 93 of file MPEG2TransportStreamTrickModeFilter.hh.

unsigned MPEG2TransportStreamTrickModeFilter::fFrameCount
private

Definition at line 86 of file MPEG2TransportStreamTrickModeFilter.hh.

unsigned FramedSource::fFrameSize
protectedinherited

Definition at line 77 of file FramedSource.hh.

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

Boolean MPEG2TransportStreamTrickModeFilter::fHaveStarted
private

Definition at line 77 of file MPEG2TransportStreamTrickModeFilter.hh.

MPEG2TransportStreamIndexFile* MPEG2TransportStreamTrickModeFilter::fIndexFile
private

Definition at line 78 of file MPEG2TransportStreamTrickModeFilter.hh.

unsigned char MPEG2TransportStreamTrickModeFilter::fInputBuffer[TRANSPORT_PACKET_SIZE]
private

Definition at line 89 of file MPEG2TransportStreamTrickModeFilter.hh.

FramedSource* FramedFilter::fInputSource
protectedinherited
unsigned FramedSource::fMaxSize
protectedinherited

Definition at line 76 of file FramedSource.hh.

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

unsigned long MPEG2TransportStreamTrickModeFilter::fNextIndexRecordNum
private

Definition at line 87 of file MPEG2TransportStreamTrickModeFilter.hh.

Referenced by nextIndexRecordNum().

unsigned long MPEG2TransportStreamTrickModeFilter::fNextTSPacketNum
private

Definition at line 88 of file MPEG2TransportStreamTrickModeFilter.hh.

unsigned FramedSource::fNumTruncatedBytes
protectedinherited
struct timeval FramedSource::fPresentationTime
protectedinherited
unsigned long MPEG2TransportStreamTrickModeFilter::fSavedFrameIndexRecordStart
private

Definition at line 94 of file MPEG2TransportStreamTrickModeFilter.hh.

unsigned long MPEG2TransportStreamTrickModeFilter::fSavedSequentialIndexRecordNum
private

Definition at line 95 of file MPEG2TransportStreamTrickModeFilter.hh.

int MPEG2TransportStreamTrickModeFilter::fScale
private

Definition at line 79 of file MPEG2TransportStreamTrickModeFilter.hh.

enum { ... } MPEG2TransportStreamTrickModeFilter::fState
unsigned char* FramedSource::fTo
protectedinherited

Definition at line 75 of file FramedSource.hh.

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

Boolean MPEG2TransportStreamTrickModeFilter::fUseSavedFrameNextTime
private

Definition at line 96 of file MPEG2TransportStreamTrickModeFilter.hh.


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