Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OpalMediaFormat Class Reference

#include <mediafmt.h>

List of all members.

Public Types

enum  { DefaultAudioSessionID = 1, DefaultVideoSessionID = 2, DefaultDataSessionID = 3 }
enum  StandardTimeUnits { AudioTimeUnits = 8, VideoTimeUnits = 90 }

Public Member Functions

 PLIST (List, OpalMediaFormat)
 OpalMediaFormat ()
 OpalMediaFormat (const char *search, BOOL exact=TRUE)
BOOL IsValid () const
RTP_DataFrame::PayloadTypes GetPayloadType () const
unsigned GetDefaultSessionID () const
BOOL NeedsJitterBuffer () const
unsigned GetBandwidth () const
PINDEX GetFrameSize () const
unsigned GetFrameTime () const
unsigned GetTimeUnits () const

Static Public Member Functions

List GetRegisteredMediaFormats ()
void GetRegisteredMediaFormats (List &list)

Protected Member Functions

 OpalMediaFormat (const char *fullName, unsigned defaultSessionID, RTP_DataFrame::PayloadTypes rtpPayloadType, BOOL needsJitter, unsigned bandwidth, PINDEX frameSize=0, unsigned frameTime=0, unsigned timeUnits=0, time_t timeStamp=0)

Protected Attributes

RTP_DataFrame::PayloadTypes rtpPayloadType
unsigned defaultSessionID
BOOL needsJitter
unsigned bandwidth
PINDEX frameSize
unsigned frameTime
unsigned timeUnits
time_t codecBaseTime


Detailed Description

This class describes a media format as used in the OPAL system. A media format is the type of any media data that is trasferred between OPAL entities. For example an audio codec such as G.723.1 is a media format, a video codec such as H.261 is also a media format.


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
DefaultAudioSessionID 
DefaultVideoSessionID 
DefaultDataSessionID 

enum OpalMediaFormat::StandardTimeUnits
 

Enumeration values:
AudioTimeUnits 
VideoTimeUnits 


Constructor & Destructor Documentation

OpalMediaFormat::OpalMediaFormat  ) 
 

Default constructor creates a PCM-16 media format.

OpalMediaFormat::OpalMediaFormat const char *  search,
BOOL  exact = TRUE
 

A constructor that only has a string name will search through the RegisteredMediaFormats list for the full specification so the other information fields can be set from the database.

Parameters:
exact  Name to search for Flag for if search is to match name exactly

OpalMediaFormat::OpalMediaFormat const char *  fullName,
unsigned  defaultSessionID,
RTP_DataFrame::PayloadTypes  rtpPayloadType,
BOOL  needsJitter,
unsigned  bandwidth,
PINDEX  frameSize = 0,
unsigned  frameTime = 0,
unsigned  timeUnits = 0,
time_t  timeStamp = 0
[protected]
 

This form of the constructor will register the full details of the media format into an internal database. This would typically be used as a static global. In fact it would be very dangerous for an instance to use this constructor in any other way, especially local variables.

If the rtpPayloadType is RTP_DataFrame::DynamicBase, then the RTP payload type is actually set to teh first unused dynamic RTP payload type that is in the registers set of media formats.

The frameSize parameter indicates that the media format has a maximum size for each data frame, eg G.723.1 frames are no more than 24 bytes long. If zero then there is no intrinsic maximum, eg G.711.

Parameters:
defaultSessionID  Full name of media format
rtpPayloadType  Default session for codec type
needsJitter  RTP payload type code
bandwidth  Indicate format requires a jitter buffer
frameSize  Bandwidth in bits/second
frameTime  Size of frame in bytes (if applicable)
timeUnits  Time for frame in RTP units (if applicable)
timeStamp  RTP units for frameTime (if applicable) timestamp (for versioning)


Member Function Documentation

unsigned OpalMediaFormat::GetBandwidth  )  const [inline]
 

Get the average bandwidth used in bits/second.

unsigned OpalMediaFormat::GetDefaultSessionID  )  const [inline]
 

Get the default session ID for media format.

PINDEX OpalMediaFormat::GetFrameSize  )  const [inline]
 

Get the maximum frame size in bytes. If this returns zero then the media format has no intrinsic maximum frame size, eg G.711 would return zero but G.723.1 whoud return 24.

unsigned OpalMediaFormat::GetFrameTime  )  const [inline]
 

Get the frame rate in RTP timestamp units. If this returns zero then the media format is not real time and has no intrinsic timing eg

RTP_DataFrame::PayloadTypes OpalMediaFormat::GetPayloadType  )  const [inline]
 

Get the RTP payload type that is to be used for this media format. This will either be an intrinsic one for the media format eg GSM or it will be automatically calculated as a dynamic media format that will be uniqueue amongst the registered media formats.

void OpalMediaFormat::GetRegisteredMediaFormats List &  list  )  [static]
 

List OpalMediaFormat::GetRegisteredMediaFormats  )  [static]
 

Get the list of media formats that have been registered.

unsigned OpalMediaFormat::GetTimeUnits  )  const [inline]
 

Get the number of RTP timestamp units per millisecond.

BOOL OpalMediaFormat::IsValid  )  const [inline]
 

Return TRUE if media format info is valid. This may be used if the single string constructor is used to check that it matched something in the registered media formats database.

BOOL OpalMediaFormat::NeedsJitterBuffer  )  const [inline]
 

Determine if the media format requires a jitter buffer. As a rule an audio codec needs a jitter buffer and all others do not.

OpalMediaFormat::PLIST List  ,
OpalMediaFormat 
 


Member Data Documentation

unsigned OpalMediaFormat::bandwidth [protected]
 

time_t OpalMediaFormat::codecBaseTime [protected]
 

unsigned OpalMediaFormat::defaultSessionID [protected]
 

PINDEX OpalMediaFormat::frameSize [protected]
 

unsigned OpalMediaFormat::frameTime [protected]
 

BOOL OpalMediaFormat::needsJitter [protected]
 

RTP_DataFrame::PayloadTypes OpalMediaFormat::rtpPayloadType [protected]
 

unsigned OpalMediaFormat::timeUnits [protected]
 


The documentation for this class was generated from the following file:
Generated on Sat Jul 24 17:04:28 2004 for OpenH323 by doxygen 1.3.7