OPAL  Version 3.18.8
OpalIntraFrameControl Class Reference

#include <vidcodec.h>

Inherits PObject.

Public Member Functions

 OpalIntraFrameControl (const PTimeInterval &minThrottle=DefaultMinThrottle, const PTimeInterval &maxThrottle=DefaultMaxThrottle, const PTimeInterval &periodic=DefaultPeriodic)
 
void IntraFrameRequest ()
 
bool RequireIntraFrame ()
 
void IntraFrameDetected ()
 
void SetTimes (const PTimeInterval &minThrottle, const PTimeInterval &maxThrottle, const PTimeInterval &periodic, const PTimeInterval &retry)
 

Static Public Attributes

static PTimeInterval const DefaultMinThrottle
 
static PTimeInterval const DefaultMaxThrottle
 
static PTimeInterval const DefaultPeriodic
 

Protected Types

enum  State {
  e_Idle, e_Periodic, e_Throttled, e_Requesting,
  e_Requested
}
 

Protected Member Functions

 PDECLARE_MUTEX (m_mutex)
 
 PDECLARE_NOTIFIER (PTimer, OpalIntraFrameControl, OnTimedRequest)
 

Protected Attributes

PTimeInterval m_minThrottleTime
 
PTimeInterval m_maxThrottleTime
 
PTimeInterval m_periodicTime
 
PTimeInterval m_retryTime
 
PTimeInterval m_currentThrottleTime
 
enum OpalIntraFrameControl::State m_state
 
unsigned m_stuckCount
 
PTime m_lastRequest
 
PTimer m_requestTimer
 

Detailed Description

Handle logic for Intra frame control. This class deals with issues of too many and too few Intra frames being sent in response to requests from various sources.

Member Enumeration Documentation

Enumerator
e_Idle 
e_Periodic 
e_Throttled 
e_Requesting 
e_Requested 

Constructor & Destructor Documentation

OpalIntraFrameControl::OpalIntraFrameControl ( const PTimeInterval &  minThrottle = DefaultMinThrottle,
const PTimeInterval &  maxThrottle = DefaultMaxThrottle,
const PTimeInterval &  periodic = DefaultPeriodic 
)
Parameters
minThrottleMinimum time between intra frames
maxThrottleIf many requests, throttle period increases to this
periodicMake sure Intra frames are at least this often

Member Function Documentation

void OpalIntraFrameControl::IntraFrameDetected ( )

Detected Intra frame, so can cease requests.

void OpalIntraFrameControl::IntraFrameRequest ( )

Handling incoming request for Intra frame.

OpalIntraFrameControl::PDECLARE_MUTEX ( m_mutex  )
protected
OpalIntraFrameControl::PDECLARE_NOTIFIER ( PTimer  ,
OpalIntraFrameControl  ,
OnTimedRequest   
)
protected
bool OpalIntraFrameControl::RequireIntraFrame ( )

Indicate that now is the time for an Intra frame to be generated.

void OpalIntraFrameControl::SetTimes ( const PTimeInterval &  minThrottle,
const PTimeInterval &  maxThrottle,
const PTimeInterval &  periodic,
const PTimeInterval &  retry 
)

Set throttle times for controlling Intra Frame. This is

Parameters
minThrottleMinimum time between intra frames
maxThrottleIf many requests, throttle period increases to this
periodicMake sure Intra frames are at least this often
retryRetry request, typically the media round trip time, plus a bit.

Referenced by OpalVideoTranscoder::SetDecodingIntraFrameControlTimes(), and OpalVideoTranscoder::SetEncodingIntraFrameControlTimes().

Field Documentation

PTimeInterval const OpalIntraFrameControl::DefaultMaxThrottle
static
PTimeInterval const OpalIntraFrameControl::DefaultMinThrottle
static
PTimeInterval const OpalIntraFrameControl::DefaultPeriodic
static
PTimeInterval OpalIntraFrameControl::m_currentThrottleTime
protected
PTime OpalIntraFrameControl::m_lastRequest
protected
PTimeInterval OpalIntraFrameControl::m_maxThrottleTime
protected
PTimeInterval OpalIntraFrameControl::m_minThrottleTime
protected
PTimeInterval OpalIntraFrameControl::m_periodicTime
protected
PTimer OpalIntraFrameControl::m_requestTimer
protected
PTimeInterval OpalIntraFrameControl::m_retryTime
protected
enum OpalIntraFrameControl::State OpalIntraFrameControl::m_state
protected
unsigned OpalIntraFrameControl::m_stuckCount
protected

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