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

#include <HLSSegmenter.hh>

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

Public Types

typedef void() onEndOfSegmentFunc(void *clientData, char const *segmentFileName, double segmentDuration)
 
typedef void() afterPlayingFunc(void *clientData)
 

Public Member Functions

Boolean startPlaying (MediaSource &source, afterPlayingFunc *afterFunc, void *afterClientData)
 
virtual void stopPlaying ()
 
virtual Boolean isRTPSink () const
 
FramedSourcesource () const
 
UsageEnvironmentenvir () const
 
char const * name () const
 
virtual Boolean isSource () 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 HLSSegmentercreateNew (UsageEnvironment &env, unsigned segmentationDuration, char const *fileNamePrefix, onEndOfSegmentFunc *onEndOfSegmentFunc=NULL, void *onEndOfSegmentClientData=NULL)
 
static Boolean lookupByName (UsageEnvironment &env, char const *sinkName, MediaSink *&resultSink)
 
static Boolean lookupByName (UsageEnvironment &env, char const *mediumName, Medium *&resultMedium)
 
static void close (UsageEnvironment &env, char const *mediumName)
 
static void close (Medium *medium)
 

Protected Member Functions

void onSourceClosure ()
 
TaskTokennextTask ()
 

Static Protected Member Functions

static void onSourceClosure (void *clientData)
 

Protected Attributes

FramedSourcefSource
 

Private Member Functions

 HLSSegmenter (UsageEnvironment &env, unsigned segmentationDuration, char const *fileNamePrefix, onEndOfSegmentFunc *onEndOfSegmentFunc, void *onEndOfSegmentClientData)
 
virtual ~HLSSegmenter ()
 
void ourEndOfSegmentHandler (double segmentDuration)
 
Boolean openNextOutputSegment ()
 
virtual void afterGettingFrame (unsigned frameSize, unsigned numTruncatedBytes)
 
void ourOnSourceClosure ()
 
virtual Boolean sourceIsCompatibleWithUs (MediaSource &source)
 
virtual Boolean continuePlaying ()
 

Static Private Member Functions

static void ourEndOfSegmentHandler (void *clientData, double segmentDuration)
 
static void afterGettingFrame (void *clientData, unsigned frameSize, unsigned numTruncatedBytes, struct timeval presentationTime, unsigned durationInMicroseconds)
 
static void ourOnSourceClosure (void *clientData)
 

Private Attributes

unsigned fSegmentationDuration
 
char const * fFileNamePrefix
 
onEndOfSegmentFuncfOnEndOfSegmentFunc
 
void * fOnEndOfSegmentClientData
 
Boolean fHaveConfiguredUpstreamSource
 
unsigned fCurrentSegmentCounter
 
char * fOutputSegmentFileName
 
FILE * fOutFid
 
unsigned char * fOutputFileBuffer
 

Detailed Description

Definition at line 30 of file HLSSegmenter.hh.

Member Typedef Documentation

◆ afterPlayingFunc

typedef void() MediaSink::afterPlayingFunc(void *clientData)
inherited

Definition at line 33 of file MediaSink.hh.

◆ onEndOfSegmentFunc

typedef void() HLSSegmenter::onEndOfSegmentFunc(void *clientData, char const *segmentFileName, double segmentDuration)

Definition at line 32 of file HLSSegmenter.hh.

Constructor & Destructor Documentation

◆ HLSSegmenter()

HLSSegmenter::HLSSegmenter ( UsageEnvironment env,
unsigned  segmentationDuration,
char const *  fileNamePrefix,
onEndOfSegmentFunc onEndOfSegmentFunc,
void *  onEndOfSegmentClientData 
)
private

◆ ~HLSSegmenter()

virtual HLSSegmenter::~HLSSegmenter ( )
privatevirtual

Member Function Documentation

◆ afterGettingFrame() [1/2]

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

◆ afterGettingFrame() [2/2]

virtual void HLSSegmenter::afterGettingFrame ( unsigned  frameSize,
unsigned  numTruncatedBytes 
)
privatevirtual

◆ close() [1/2]

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

◆ close() [2/2]

static void Medium::close ( Medium medium)
staticinherited

◆ continuePlaying()

virtual Boolean HLSSegmenter::continuePlaying ( )
privatevirtual

Implements MediaSink.

◆ createNew()

static HLSSegmenter* HLSSegmenter::createNew ( UsageEnvironment env,
unsigned  segmentationDuration,
char const *  fileNamePrefix,
onEndOfSegmentFunc onEndOfSegmentFunc = NULL,
void *  onEndOfSegmentClientData = NULL 
)
static

◆ envir()

UsageEnvironment& Medium::envir ( ) const
inlineinherited

◆ isMediaSession()

virtual Boolean Medium::isMediaSession ( ) const
virtualinherited

Reimplemented in MediaSession.

◆ isRTCPInstance()

virtual Boolean Medium::isRTCPInstance ( ) const
virtualinherited

Reimplemented in RTCPInstance.

◆ isRTPSink()

virtual Boolean MediaSink::isRTPSink ( ) const
virtualinherited

Reimplemented in RTPSink.

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

◆ isSource()

virtual Boolean Medium::isSource ( ) const
virtualinherited

Reimplemented in MediaSource.

◆ lookupByName() [1/2]

static Boolean MediaSink::lookupByName ( UsageEnvironment env,
char const *  sinkName,
MediaSink *&  resultSink 
)
staticinherited

◆ lookupByName() [2/2]

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

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

◆ onSourceClosure() [1/2]

static void MediaSink::onSourceClosure ( void *  clientData)
staticprotectedinherited

◆ onSourceClosure() [2/2]

void MediaSink::onSourceClosure ( )
protectedinherited

◆ openNextOutputSegment()

Boolean HLSSegmenter::openNextOutputSegment ( )
private

◆ ourEndOfSegmentHandler() [1/2]

static void HLSSegmenter::ourEndOfSegmentHandler ( void *  clientData,
double  segmentDuration 
)
staticprivate

◆ ourEndOfSegmentHandler() [2/2]

void HLSSegmenter::ourEndOfSegmentHandler ( double  segmentDuration)
private

◆ ourOnSourceClosure() [1/2]

static void HLSSegmenter::ourOnSourceClosure ( void *  clientData)
staticprivate

◆ ourOnSourceClosure() [2/2]

void HLSSegmenter::ourOnSourceClosure ( )
private

◆ source()

FramedSource* MediaSink::source ( ) const
inlineinherited

Definition at line 42 of file MediaSink.hh.

42 {return fSource;}
FramedSource * fSource
Definition: MediaSink.hh:58

References MediaSink::fSource.

◆ sourceIsCompatibleWithUs()

virtual Boolean HLSSegmenter::sourceIsCompatibleWithUs ( MediaSource source)
privatevirtual

Reimplemented from MediaSink.

◆ startPlaying()

Boolean MediaSink::startPlaying ( MediaSource source,
afterPlayingFunc afterFunc,
void *  afterClientData 
)
inherited

◆ stopPlaying()

virtual void MediaSink::stopPlaying ( )
virtualinherited

Reimplemented in MultiFramedRTPSink.

Field Documentation

◆ fCurrentSegmentCounter

unsigned HLSSegmenter::fCurrentSegmentCounter
private

Definition at line 70 of file HLSSegmenter.hh.

◆ fFileNamePrefix

char const* HLSSegmenter::fFileNamePrefix
private

Definition at line 66 of file HLSSegmenter.hh.

◆ fHaveConfiguredUpstreamSource

Boolean HLSSegmenter::fHaveConfiguredUpstreamSource
private

Definition at line 69 of file HLSSegmenter.hh.

◆ fOnEndOfSegmentClientData

void* HLSSegmenter::fOnEndOfSegmentClientData
private

Definition at line 68 of file HLSSegmenter.hh.

◆ fOnEndOfSegmentFunc

onEndOfSegmentFunc* HLSSegmenter::fOnEndOfSegmentFunc
private

Definition at line 67 of file HLSSegmenter.hh.

◆ fOutFid

FILE* HLSSegmenter::fOutFid
private

Definition at line 72 of file HLSSegmenter.hh.

◆ fOutputFileBuffer

unsigned char* HLSSegmenter::fOutputFileBuffer
private

Definition at line 73 of file HLSSegmenter.hh.

◆ fOutputSegmentFileName

char* HLSSegmenter::fOutputSegmentFileName
private

Definition at line 71 of file HLSSegmenter.hh.

◆ fSegmentationDuration

unsigned HLSSegmenter::fSegmentationDuration
private

Definition at line 65 of file HLSSegmenter.hh.

◆ fSource

FramedSource* MediaSink::fSource
protectedinherited

Definition at line 58 of file MediaSink.hh.

Referenced by MediaSink::source().


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