class OpalMediaFormat

This class describes a media format as used in the OPAL system.

Inheritance:


Public Methods

[more] OpalMediaFormat ()
Default constructor creates a PCM-16 media format
[more] 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.
[more] OpalMediaFormat ( const char* fullName, unsigned defaultSessionID, RTP_DataFrame::PayloadTypes rtpPayloadType, BOOL needsJitter, unsigned bandwidth, PINDEX frameSize = 0, unsigned frameTime = 0, unsigned timeUnits = 0 )
This form of the constructor will register the full details of the media format into an internal database.
[more]BOOL IsValid () const
Return TRUE if media format info is valid.
[more]RTP_DataFrame::PayloadTypes GetPayloadType () const
Get the RTP payload type that is to be used for this media format.
[more]unsigned GetDefaultSessionID () const
Get the default session ID for media format
[more]BOOL NeedsJitterBuffer () const
Determine if the media format requires a jitter buffer.
[more]unsigned GetBandwidth () const
Get the average bandwidth used in bits/second
[more]PINDEX GetFrameSize () const
Get the maximum frame size in bytes.
[more]unsigned GetFrameTime () const
Get the frame rate in RTP timestamp units.
[more]unsigned GetTimeUnits () const
Get the number of RTP timestamp units per millisecond
[more]static List GetRegisteredMediaFormats ()
Get the list of media formats that have been registered


Documentation

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.

There

o OpalMediaFormat()
Default constructor creates a PCM-16 media format

o 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:
search - Name to search for
exact - Flag for if search is to match name exactly

o OpalMediaFormat( const char* fullName, unsigned defaultSessionID, RTP_DataFrame::PayloadTypes rtpPayloadType, BOOL needsJitter, unsigned bandwidth, PINDEX frameSize = 0, unsigned frameTime = 0, unsigned timeUnits = 0 )
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:
fullName - Full name of media format
defaultSessionID - Default session for codec type
rtpPayloadType - RTP payload type code
needsJitter - Indicate format requires a jitter buffer
bandwidth - Bandwidth in bits/second
frameSize - Size of frame in bytes (if applicable)
frameTime - Time for frame in RTP units (if applicable)
timeUnits - RTP units for frameTime (if applicable)

oBOOL IsValid() const
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.

oRTP_DataFrame::PayloadTypes GetPayloadType() const
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.

ounsigned GetDefaultSessionID() const
Get the default session ID for media format

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

ounsigned GetBandwidth() const
Get the average bandwidth used in bits/second

oPINDEX GetFrameSize() const
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.

ounsigned GetFrameTime() const
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

ounsigned GetTimeUnits() const
Get the number of RTP timestamp units per millisecond

ostatic List GetRegisteredMediaFormats()
Get the list of media formats that have been registered


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.