H264VideoStreamDiscreteFramer Class Reference

#include <H264VideoStreamDiscreteFramer.hh>

Inheritance diagram for H264VideoStreamDiscreteFramer:

Inheritance graph
[legend]
Collaboration diagram for H264VideoStreamDiscreteFramer:

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

void getVPSandSPSandPPS (u_int8_t *&vps, unsigned &vpsSize, u_int8_t *&sps, unsigned &spsSize, u_int8_t *&pps, unsigned &ppsSize) const
void setVPSandSPSandPPS (u_int8_t *vps, unsigned vpsSize, u_int8_t *sps, unsigned spsSize, u_int8_t *pps, unsigned ppsSize)
BooleanpictureEndMarker ()
void flushInput ()
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 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 H264VideoStreamDiscreteFramercreateNew (UsageEnvironment &env, FramedSource *inputSource)
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

 H264VideoStreamDiscreteFramer (UsageEnvironment &env, FramedSource *inputSource)
virtual ~H264VideoStreamDiscreteFramer ()
virtual void doGetNextFrame ()
void afterGettingFrame1 (unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
void saveCopyOfVPS (u_int8_t *from, unsigned size)
void saveCopyOfSPS (u_int8_t *from, unsigned size)
void saveCopyOfPPS (u_int8_t *from, unsigned size)
void setPresentationTime ()
Boolean isVPS (u_int8_t nal_unit_type)
Boolean isSPS (u_int8_t nal_unit_type)
Boolean isPPS (u_int8_t nal_unit_type)
Boolean isVCL (u_int8_t nal_unit_type)
void computePresentationTime (unsigned numAdditionalPictures)
void setTimeCode (unsigned hours, unsigned minutes, unsigned seconds, unsigned pictures, unsigned picturesSinceLastGOP)
virtual char const * MIMEtype () const
virtual void getAttributes () const
virtual void doStopGettingFrames ()
TaskTokennextTask ()

Static Protected Member Functions

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

Protected Attributes

int fHNumber
u_int8_t * fLastSeenVPS
unsigned fLastSeenVPSSize
u_int8_t * fLastSeenSPS
unsigned fLastSeenSPSSize
u_int8_t * fLastSeenPPS
unsigned fLastSeenPPSSize
timeval fNextPresentationTime
double fFrameRate
unsigned fPictureCount
Boolean fPictureEndMarker
timeval fPresentationTimeBase
MPEGVideoStreamParserfParser
FramedSourcefInputSource
unsigned char * fTo
unsigned fMaxSize
unsigned fFrameSize
unsigned fNumTruncatedBytes
timeval fPresentationTime
unsigned fDurationInMicroseconds

Private Member Functions

virtual Boolean isH264VideoStreamFramer () const

Friends

class H264or5VideoStreamParser
class MPEGVideoStreamParser
class MediaLookupTable

Detailed Description

Definition at line 31 of file H264VideoStreamDiscreteFramer.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.


Constructor & Destructor Documentation

H264VideoStreamDiscreteFramer::H264VideoStreamDiscreteFramer ( UsageEnvironment env,
FramedSource inputSource 
) [protected]

virtual H264VideoStreamDiscreteFramer::~H264VideoStreamDiscreteFramer (  )  [protected, virtual]


Member Function Documentation

static H264VideoStreamDiscreteFramer* H264VideoStreamDiscreteFramer::createNew ( UsageEnvironment env,
FramedSource inputSource 
) [static]

virtual Boolean H264VideoStreamDiscreteFramer::isH264VideoStreamFramer (  )  const [private, virtual]

Reimplemented from MediaSource.

virtual void H264or5VideoStreamDiscreteFramer::doGetNextFrame (  )  [protected, virtual, inherited]

Reimplemented from MPEGVideoStreamFramer.

static void H264or5VideoStreamDiscreteFramer::afterGettingFrame ( void *  clientData,
unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime,
unsigned  durationInMicroseconds 
) [static, protected, inherited]

void H264or5VideoStreamDiscreteFramer::afterGettingFrame1 ( unsigned  frameSize,
unsigned  numTruncatedBytes,
struct timeval  presentationTime,
unsigned  durationInMicroseconds 
) [protected, inherited]

void H264or5VideoStreamFramer::getVPSandSPSandPPS ( u_int8_t *&  vps,
unsigned &  vpsSize,
u_int8_t *&  sps,
unsigned &  spsSize,
u_int8_t *&  pps,
unsigned &  ppsSize 
) const [inline, inherited]

Definition at line 30 of file H264or5VideoStreamFramer.hh.

References H264or5VideoStreamFramer::fLastSeenPPS, H264or5VideoStreamFramer::fLastSeenPPSSize, H264or5VideoStreamFramer::fLastSeenSPS, H264or5VideoStreamFramer::fLastSeenSPSSize, H264or5VideoStreamFramer::fLastSeenVPS, and H264or5VideoStreamFramer::fLastSeenVPSSize.

00032                                                                    {
00033     // Returns pointers to copies of the most recently seen VPS (video parameter set)
00034     // SPS (sequence parameter set) and PPS (picture parameter set) NAL units.
00035     // (NULL pointers are returned if the NAL units have not yet been seen.)
00036     vps = fLastSeenVPS; vpsSize = fLastSeenVPSSize;
00037     sps = fLastSeenSPS; spsSize = fLastSeenSPSSize;
00038     pps = fLastSeenPPS; ppsSize = fLastSeenPPSSize;
00039   }

void H264or5VideoStreamFramer::setVPSandSPSandPPS ( u_int8_t *  vps,
unsigned  vpsSize,
u_int8_t *  sps,
unsigned  spsSize,
u_int8_t *  pps,
unsigned  ppsSize 
) [inline, inherited]

Definition at line 41 of file H264or5VideoStreamFramer.hh.

References H264or5VideoStreamFramer::saveCopyOfPPS(), H264or5VideoStreamFramer::saveCopyOfSPS(), and H264or5VideoStreamFramer::saveCopyOfVPS().

00043                                                            {
00044     // Assigns copies of the VPS, SPS and PPS NAL units.  If this function is not called,
00045     // then these NAL units are assigned only if/when they appear in the input stream.
00046     saveCopyOfVPS(vps, vpsSize);
00047     saveCopyOfSPS(sps, spsSize);
00048     saveCopyOfPPS(pps, ppsSize);
00049   }

void H264or5VideoStreamFramer::saveCopyOfVPS ( u_int8_t *  from,
unsigned  size 
) [protected, inherited]

Referenced by H264or5VideoStreamFramer::setVPSandSPSandPPS().

void H264or5VideoStreamFramer::saveCopyOfSPS ( u_int8_t *  from,
unsigned  size 
) [protected, inherited]

Referenced by H264or5VideoStreamFramer::setVPSandSPSandPPS().

void H264or5VideoStreamFramer::saveCopyOfPPS ( u_int8_t *  from,
unsigned  size 
) [protected, inherited]

Referenced by H264or5VideoStreamFramer::setVPSandSPSandPPS().

void H264or5VideoStreamFramer::setPresentationTime (  )  [inline, protected, inherited]

Definition at line 62 of file H264or5VideoStreamFramer.hh.

References H264or5VideoStreamFramer::fNextPresentationTime, and FramedSource::fPresentationTime.

Boolean H264or5VideoStreamFramer::isVPS ( u_int8_t  nal_unit_type  )  [protected, inherited]

Boolean H264or5VideoStreamFramer::isSPS ( u_int8_t  nal_unit_type  )  [protected, inherited]

Boolean H264or5VideoStreamFramer::isPPS ( u_int8_t  nal_unit_type  )  [protected, inherited]

Boolean H264or5VideoStreamFramer::isVCL ( u_int8_t  nal_unit_type  )  [protected, inherited]

Boolean& MPEGVideoStreamFramer::pictureEndMarker (  )  [inline, inherited]

Definition at line 40 of file MPEGVideoStreamFramer.hh.

References MPEGVideoStreamFramer::fPictureEndMarker.

00040 { return fPictureEndMarker; }

void MPEGVideoStreamFramer::flushInput (  )  [inherited]

void MPEGVideoStreamFramer::computePresentationTime ( unsigned  numAdditionalPictures  )  [protected, inherited]

void MPEGVideoStreamFramer::setTimeCode ( unsigned  hours,
unsigned  minutes,
unsigned  seconds,
unsigned  pictures,
unsigned  picturesSinceLastGOP 
) [protected, inherited]

FramedSource* FramedFilter::inputSource (  )  const [inline, inherited]

Definition at line 30 of file FramedFilter.hh.

References FramedFilter::fInputSource.

00030 { return fInputSource; }

void FramedFilter::reassignInputSource ( FramedSource newInputSource  )  [inline, inherited]

Definition at line 32 of file FramedFilter.hh.

References FramedFilter::fInputSource.

00032 { fInputSource = newInputSource; }

void FramedFilter::detachInputSource (  )  [inherited]

virtual char const* FramedFilter::MIMEtype (  )  const [protected, virtual, inherited]

Reimplemented from MediaSource.

Reimplemented in ADUFromMP3Source, and MP3FromADUSource.

virtual void FramedFilter::getAttributes (  )  const [protected, virtual, inherited]

Reimplemented from MediaSource.

Reimplemented in MP3ADUTranscoder.

virtual void FramedFilter::doStopGettingFrames (  )  [protected, virtual, inherited]

Reimplemented from FramedSource.

Reimplemented in MPEG2TransportStreamFramer, MPEG2TransportStreamTrickModeFilter, and T140IdleFilter.

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

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

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

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

static void FramedSource::handleClosure ( void *  clientData  )  [static, inherited]

void FramedSource::handleClosure (  )  [inherited]

void FramedSource::stopGettingFrames (  )  [inherited]

virtual unsigned FramedSource::maxFrameSize (  )  const [virtual, inherited]

Reimplemented in MPEG1or2DemuxedElementaryStream.

Boolean FramedSource::isCurrentlyAwaitingData (  )  const [inline, inherited]

Definition at line 61 of file FramedSource.hh.

References FramedSource::fIsCurrentlyAwaitingData.

00061 {return fIsCurrentlyAwaitingData;}

static void FramedSource::afterGetting ( FramedSource source  )  [static, inherited]

virtual Boolean MediaSource::isRTPSource (  )  const [virtual, inherited]

Reimplemented in RTPSource.

virtual Boolean MediaSource::isMPEG1or2VideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in MPEG1or2VideoStreamFramer.

virtual Boolean MediaSource::isMPEG4VideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in MPEG4VideoStreamFramer.

virtual Boolean MediaSource::isH265VideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in H265VideoStreamDiscreteFramer, and H265VideoStreamFramer.

virtual Boolean MediaSource::isDVVideoStreamFramer (  )  const [virtual, inherited]

Reimplemented in DVVideoStreamFramer.

virtual Boolean MediaSource::isJPEGVideoSource (  )  const [virtual, inherited]

Reimplemented in JPEGVideoSource.

virtual Boolean MediaSource::isAMRAudioSource (  )  const [virtual, inherited]

Reimplemented in AMRAudioSource.

static void Medium::close ( UsageEnvironment env,
char const *  mediumName 
) [static, inherited]

static void Medium::close ( Medium medium  )  [static, inherited]

UsageEnvironment& Medium::envir (  )  const [inline, inherited]

Definition at line 59 of file Media.hh.

References Medium::fEnviron.

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

00059 {return fEnviron;}

char const* Medium::name (  )  const [inline, inherited]

Definition at line 61 of file Media.hh.

References Medium::fMediumName.

00061 {return fMediumName;}

virtual Boolean Medium::isSink (  )  const [virtual, inherited]

Reimplemented in MediaSink.

virtual Boolean Medium::isRTCPInstance (  )  const [virtual, inherited]

Reimplemented in RTCPInstance.

virtual Boolean Medium::isRTSPClient (  )  const [virtual, inherited]

Reimplemented in RTSPClient.

virtual Boolean Medium::isRTSPServer (  )  const [virtual, inherited]

Reimplemented in RTSPServer.

virtual Boolean Medium::isMediaSession (  )  const [virtual, inherited]

Reimplemented in MediaSession.

virtual Boolean Medium::isServerMediaSession (  )  const [virtual, inherited]

Reimplemented in ServerMediaSession.

virtual Boolean Medium::isDarwinInjector (  )  const [virtual, inherited]

Reimplemented in DarwinInjector.

TaskToken& Medium::nextTask (  )  [inline, protected, inherited]

Definition at line 78 of file Media.hh.

References Medium::fNextTask.

00078                         {
00079         return fNextTask;
00080   }


Friends And Related Function Documentation

friend class H264or5VideoStreamParser [friend, inherited]

Definition at line 78 of file H264or5VideoStreamFramer.hh.

friend class MPEGVideoStreamParser [friend, inherited]

Definition at line 74 of file MPEGVideoStreamFramer.hh.

friend class MediaLookupTable [friend, inherited]

Definition at line 74 of file Media.hh.


Field Documentation

int H264or5VideoStreamFramer::fHNumber [protected, inherited]

Definition at line 70 of file H264or5VideoStreamFramer.hh.

u_int8_t* H264or5VideoStreamFramer::fLastSeenVPS [protected, inherited]

Definition at line 71 of file H264or5VideoStreamFramer.hh.

Referenced by H264or5VideoStreamFramer::getVPSandSPSandPPS().

unsigned H264or5VideoStreamFramer::fLastSeenVPSSize [protected, inherited]

Definition at line 72 of file H264or5VideoStreamFramer.hh.

Referenced by H264or5VideoStreamFramer::getVPSandSPSandPPS().

u_int8_t* H264or5VideoStreamFramer::fLastSeenSPS [protected, inherited]

Definition at line 73 of file H264or5VideoStreamFramer.hh.

Referenced by H264or5VideoStreamFramer::getVPSandSPSandPPS().

unsigned H264or5VideoStreamFramer::fLastSeenSPSSize [protected, inherited]

Definition at line 74 of file H264or5VideoStreamFramer.hh.

Referenced by H264or5VideoStreamFramer::getVPSandSPSandPPS().

u_int8_t* H264or5VideoStreamFramer::fLastSeenPPS [protected, inherited]

Definition at line 75 of file H264or5VideoStreamFramer.hh.

Referenced by H264or5VideoStreamFramer::getVPSandSPSandPPS().

unsigned H264or5VideoStreamFramer::fLastSeenPPSSize [protected, inherited]

Definition at line 76 of file H264or5VideoStreamFramer.hh.

Referenced by H264or5VideoStreamFramer::getVPSandSPSandPPS().

struct timeval H264or5VideoStreamFramer::fNextPresentationTime [read, protected, inherited]

Definition at line 77 of file H264or5VideoStreamFramer.hh.

Referenced by H264or5VideoStreamFramer::setPresentationTime().

double MPEGVideoStreamFramer::fFrameRate [protected, inherited]

Definition at line 67 of file MPEGVideoStreamFramer.hh.

unsigned MPEGVideoStreamFramer::fPictureCount [protected, inherited]

Definition at line 68 of file MPEGVideoStreamFramer.hh.

Boolean MPEGVideoStreamFramer::fPictureEndMarker [protected, inherited]

Definition at line 69 of file MPEGVideoStreamFramer.hh.

Referenced by MPEGVideoStreamFramer::pictureEndMarker().

struct timeval MPEGVideoStreamFramer::fPresentationTimeBase [read, protected, inherited]

Definition at line 70 of file MPEGVideoStreamFramer.hh.

class MPEGVideoStreamParser* MPEGVideoStreamFramer::fParser [protected, inherited]

Definition at line 73 of file MPEGVideoStreamFramer.hh.

FramedSource* FramedFilter::fInputSource [protected, inherited]

Definition at line 49 of file FramedFilter.hh.

Referenced by MPEG2TransportStreamFramer::changeInputSource(), MPEG2TransportStreamTrickModeFilter::forgetInputSource(), FramedFilter::inputSource(), and FramedFilter::reassignInputSource().

unsigned char* FramedSource::fTo [protected, inherited]

Definition at line 75 of file FramedSource.hh.

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

unsigned FramedSource::fMaxSize [protected, inherited]

Definition at line 76 of file FramedSource.hh.

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

unsigned FramedSource::fFrameSize [protected, inherited]

Definition at line 77 of file FramedSource.hh.

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

unsigned FramedSource::fNumTruncatedBytes [protected, inherited]

Definition at line 78 of file FramedSource.hh.

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

struct timeval FramedSource::fPresentationTime [read, protected, inherited]

Definition at line 79 of file FramedSource.hh.

Referenced by OggDemuxedTrack::presentationTime(), MatroskaDemuxedTrack::presentationTime(), and H264or5VideoStreamFramer::setPresentationTime().

unsigned FramedSource::fDurationInMicroseconds [protected, inherited]

Definition at line 80 of file FramedSource.hh.

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


The documentation for this class was generated from the following file:
Generated on Wed Dec 17 07:46:47 2014 for live by  doxygen 1.5.2