H323Capability Class Reference

#include <h323caps.h>

Inheritance diagram for H323Capability:

H323_UserInputCapability H323DataCapability H323GenericControlCapability H323RealTimeCapability H323_H224_AnnexQCapability H323_H224_HDLCTunnelingCapability H323_T120Capability H323NonStandardDataCapability H323H239ControlCapability H323AudioCapability H323VideoCapability H323_G711Capability H323AudioPluginCapability H323GenericAudioCapability H323NonStandardAudioCapability H323GenericVideoCapability H323NonStandardVideoCapability H323VideoPluginCapability H323PluginG7231Capability H323CodecPluginGenericAudioCapability H323CodecPluginNonStandardAudioCapability H323CodecPluginGenericVideoCapability H323ExtendedVideoCapability H323CodecPluginNonStandardVideoCapability H323H261PluginCapability H323H263PluginCapability

Identification functions

enum  MainTypes {
  e_Audio, e_Video, e_Data, e_UserInput,
  e_GenericControl, e_NumMainTypes
}
virtual MainTypes GetMainType () const =0
virtual unsigned GetSubType () const =0
virtual PString GetFormatName () const =0

Operations

enum  { DefaultAudioSessionID = 1, DefaultVideoSessionID = 2, DefaultDataSessionID = 3, DefaultH224SessionID = 4 }
virtual unsigned GetDefaultSessionID () const
virtual void SetTxFramesInPacket (unsigned frames)
virtual unsigned GetTxFramesInPacket () const
virtual unsigned GetRxFramesInPacket () const
virtual H323ChannelCreateChannel (H323Connection &connection, H323Channel::Directions dir, unsigned sessionID, const H245_H2250LogicalChannelParameters *param) const =0
static H323CapabilityCreate (const PString &name)

Protocol manipulation

enum  CommandType { e_TCS, e_OLC, e_ReqMode }
virtual PBoolean OnSendingPDU (H245_Capability &pdu) const =0
virtual PBoolean OnSendingPDU (H245_DataType &pdu) const
virtual PBoolean OnSendingPDU (H245_ModeElement &pdu) const =0
virtual PBoolean OnReceivedPDU (const H245_Capability &pdu)
virtual PBoolean OnReceivedPDU (const H245_DataType &pdu, PBoolean receiver)
virtual PBoolean IsMatch (const PASN_Choice &subTypePDU) const
virtual PBoolean IsUsable (const H323Connection &connection) const

Member variable access

enum  CapabilityDirection {
  e_Unknown, e_Receive, e_Transmit, e_ReceiveAndTransmit,
  e_NoDirection, NumCapabilityDirections
}
CapabilityDirection GetCapabilityDirection () const
void SetCapabilityDirection (CapabilityDirection dir)
unsigned GetCapabilityNumber () const
 Get unique capability number.
void SetCapabilityNumber (unsigned num)
 Set unique capability number.
OpalMediaFormat GetMediaFormat () const
bool UpdateMediaFormat (const OpalMediaFormat &format)
RTP_DataFrame::PayloadTypes GetPayloadType () const
 Get the payload type for the capaibility.
void SetPayloadType (RTP_DataFrame::PayloadTypes pt)
 Set the payload type for the capaibility.
virtual void AttachQoS (RTP_QOS *)
 Attach a QoS specification to this channel.

Public Member Functions

Construction
 H323Capability ()
Overrides from class PObject
Comparison Compare (const PObject &obj) const
void PrintOn (ostream &strm) const

Protected Member Functions

OpalMediaFormatGetWritableMediaFormat () const

Protected Attributes

unsigned assignedCapabilityNumber
CapabilityDirection capabilityDirection
 Unique ID assigned to capability.
RTP_DataFrame::PayloadTypes rtpPayloadType

Friends

class H323Capabilities

Detailed Description

This class describes the interface to a capability of the endpoint, usually a codec, used to transfer data via the logical channels opened and managed by the H323 control channel.

Note that this is not an instance of the codec itself. Merely the description of that codec. There is typically only one instance of this class contained in the capability tables of the endpoint. There may be several instances of the actualy codec managing the conversion of an individual stream of data.

An application may create a descendent off this class and override functions as required for describing a codec that it implements.


Member Enumeration Documentation

anonymous enum

Enumerator:
DefaultAudioSessionID 
DefaultVideoSessionID 
DefaultDataSessionID 
DefaultH224SessionID 

enum H323Capability::CapabilityDirection

Enumerator:
e_Unknown 
e_Receive 
e_Transmit 
e_ReceiveAndTransmit 
e_NoDirection 
NumCapabilityDirections 

enum H323Capability::CommandType

Enumerator:
e_TCS 
e_OLC 
e_ReqMode 

enum H323Capability::MainTypes

Enumerator:
e_Audio  Audio codec capability.
e_Video  Video codec capability.
e_Data  Arbitrary data capability.
e_UserInput  User Input capability.
e_GenericControl  Generic Control.
e_NumMainTypes  Count of main types.


Constructor & Destructor Documentation

H323Capability::H323Capability (  ) 

Create a new capability specification.


Member Function Documentation

virtual void H323Capability::AttachQoS ( RTP_QOS  )  [inline, virtual]

Attach a QoS specification to this channel.

Reimplemented in H323RealTimeCapability.

Comparison H323Capability::Compare ( const PObject &  obj  )  const

Compare two capability instances. This compares the main and sub-types of the capability.

Reimplemented in H323H261PluginCapability, H323H263PluginCapability, H323_H224_AnnexQCapability, H323_H224_HDLCTunnelingCapability, H323NonStandardAudioCapability, H323GenericAudioCapability, H323NonStandardVideoCapability, H323GenericVideoCapability, H323H239VideoCapability, and H323NonStandardDataCapability.

static H323Capability* H323Capability::Create ( const PString &  name  )  [static]

Create an H323Capability descendant given a string name. This uses the registration system to create the capability.

Parameters:
name  Name of capability

virtual H323Channel* H323Capability::CreateChannel ( H323Connection connection,
H323Channel::Directions  dir,
unsigned  sessionID,
const H245_H2250LogicalChannelParameters *  param 
) const [pure virtual]

Create the channel instance, allocating resources as required. This creates a logical channel object appropriate for the parameters provided. Not if param is NULL, sessionID must be provided, otherwise this is taken from the fields in param.

Parameters:
connection  Owner connection for channel
dir  Direction of channel
sessionID  Session ID for RTP channel
param  Parameters for channel

Implemented in H323RealTimeCapability, H323GenericControlCapability, H323_UserInputCapability, and H323_T120Capability.

CapabilityDirection H323Capability::GetCapabilityDirection (  )  const [inline]

Get the direction for this capability.

unsigned H323Capability::GetCapabilityNumber (  )  const [inline]

Get unique capability number.

virtual unsigned H323Capability::GetDefaultSessionID (  )  const [virtual]

Get the default RTP session. This function gets the default RTP session ID for the capability type. For example audio capabilities return the value H323Capability::DefaultAudioSessionID etc.

The default behaviour returns zero, indicating it is not an RTP based capability.

Reimplemented in H323AudioCapability, H323VideoCapability, and H323DataCapability.

virtual PString H323Capability::GetFormatName (  )  const [pure virtual]

Get the name of the media data format this class represents.

Implemented in H323AudioPluginCapability, H323CodecPluginNonStandardAudioCapability, H323CodecPluginGenericAudioCapability, H323VideoPluginCapability, H323CodecPluginNonStandardVideoCapability, H323CodecPluginGenericVideoCapability, H323_H224_AnnexQCapability, H323_H224_HDLCTunnelingCapability, H323H239VideoCapability, H323H239ControlCapability, H323_G711Capability, H323_UserInputCapability, and H323_T120Capability.

virtual MainTypes H323Capability::GetMainType (  )  const [pure virtual]

Get the main type of the capability.

This function is overridden by one of the three main sub-classes off which real capabilities would be descendend.

Implemented in H323AudioCapability, H323VideoCapability, H323GenericControlCapability, H323DataCapability, and H323_UserInputCapability.

OpalMediaFormat H323Capability::GetMediaFormat (  )  const

Get media format of the media data this class represents.

RTP_DataFrame::PayloadTypes H323Capability::GetPayloadType (  )  const [inline]

Get the payload type for the capaibility.

virtual unsigned H323Capability::GetRxFramesInPacket (  )  const [virtual]

Get the maximum size (in frames) of data that can be received in a single PDU.

The default behaviour returns the value 1.

Reimplemented in H323AudioCapability.

virtual unsigned H323Capability::GetSubType (  )  const [pure virtual]

Get the sub-type of the capability. This is a code dependent on the main type of the capability.

Implemented in H323AudioPluginCapability, H323VideoPluginCapability, H323_H224_AnnexQCapability, H323_H224_HDLCTunnelingCapability, H323NonStandardAudioCapability, H323GenericAudioCapability, H323NonStandardVideoCapability, H323GenericVideoCapability, H323ExtendedVideoCapability, H323GenericControlCapability, H323NonStandardDataCapability, H323_G711Capability, H323_UserInputCapability, and H323_T120Capability.

virtual unsigned H323Capability::GetTxFramesInPacket (  )  const [virtual]

Get the maximum size (in frames) of data that will be transmitted in a single PDU.

The default behaviour returns the value 1.

Reimplemented in H323AudioCapability.

OpalMediaFormat& H323Capability::GetWritableMediaFormat (  )  const [protected]

virtual PBoolean H323Capability::IsMatch ( const PASN_Choice &  subTypePDU  )  const [virtual]

Compare the PDU part of the capability.

Parameters:
subTypePDU  sub-type PDU of H323Capability

Reimplemented in H323H263PluginCapability, H323NonStandardAudioCapability, H323GenericAudioCapability, H323NonStandardVideoCapability, H323GenericVideoCapability, H323ExtendedVideoCapability, H323GenericControlCapability, and H323NonStandardDataCapability.

virtual PBoolean H323Capability::IsUsable ( const H323Connection connection  )  const [virtual]

Validate that the capability is usable given the connection. This checks agains the negotiated protocol version number and remote application to determine if this capability should be used in TCS or OLC pdus.

The default behaviour returns PTrue.

Reimplemented in H323_UserInputCapability.

virtual PBoolean H323Capability::OnReceivedPDU ( const H245_DataType &  pdu,
PBoolean  receiver 
) [virtual]

This function is called whenever and incoming OpenLogicalChannel PDU has been used to construct the control channel. It allows the capability to set from the PDU fields, information in members specific to the class.

The default behaviour is pure.

Parameters:
pdu  PDU to get information from
receiver  Is receiver OLC

Reimplemented in H323AudioCapability, H323VideoCapability, H323DataCapability, and H323_UserInputCapability.

virtual PBoolean H323Capability::OnReceivedPDU ( const H245_Capability &  pdu  )  [virtual]

This function is called whenever and incoming TerminalCapabilitySet PDU is received on the control channel, and a new H323Capability descendent was created. This completes reading fields from the PDU into the classes members.

If the function returns PFalse then the received PDU codec description is not supported, so will be ignored.

The default behaviour sets the capabilityDirection member variable from the PDU and then returns PTrue. Note that this means it is very important to call the ancestor function when overriding.

Parameters:
pdu  PDU to get information from

Reimplemented in H323AudioCapability, H323VideoCapability, H323GenericControlCapability, H323DataCapability, and H323_UserInputCapability.

virtual PBoolean H323Capability::OnSendingPDU ( H245_ModeElement &  pdu  )  const [pure virtual]

This function is called whenever and outgoing RequestMode PDU is being constructed for the control channel. It allows the capability to set the PDU fields from information in members specific to the class.

The default behaviour is pure.

Parameters:
pdu  PDU to set information on

Implemented in H323AudioCapability, H323VideoCapability, H323GenericControlCapability, H323DataCapability, and H323_UserInputCapability.

virtual PBoolean H323Capability::OnSendingPDU ( H245_DataType &  pdu  )  const [virtual]

This function is called whenever and outgoing OpenLogicalChannel PDU is being constructed for the control channel. It allows the capability to set the PDU fields from information in members specific to the class.

The default behaviour is pure.

Parameters:
pdu  PDU to set information on

Reimplemented in H323AudioCapability, H323VideoCapability, H323DataCapability, and H323_UserInputCapability.

virtual PBoolean H323Capability::OnSendingPDU ( H245_Capability &  pdu  )  const [pure virtual]

This function is called whenever and outgoing TerminalCapabilitySet PDU is being constructed for the control channel. It allows the capability to set the PDU fields from information in members specific to the class.

The default behaviour is pure.

Parameters:
pdu  PDU to set information on

Implemented in H323AudioCapability, H323VideoCapability, H323GenericControlCapability, H323DataCapability, and H323_UserInputCapability.

void H323Capability::PrintOn ( ostream &  strm  )  const

Print out the object to the stream, virtual version of << operator.

Reimplemented in H323H239VideoCapability.

void H323Capability::SetCapabilityDirection ( CapabilityDirection  dir  )  [inline]

Set the direction for this capability.

Parameters:
dir  New direction code

void H323Capability::SetCapabilityNumber ( unsigned  num  )  [inline]

Set unique capability number.

void H323Capability::SetPayloadType ( RTP_DataFrame::PayloadTypes  pt  )  [inline]

Set the payload type for the capaibility.

virtual void H323Capability::SetTxFramesInPacket ( unsigned  frames  )  [virtual]

Set the maximum size (in frames) of data that will be transmitted in a single PDU.

This will also be the desired number that will be sent by most codec implemetations.

The default behaviour does nothing.

Parameters:
frames  Number of frames per packet

Reimplemented in H323AudioCapability.

bool H323Capability::UpdateMediaFormat ( const OpalMediaFormat format  ) 

Set media format option for the media data this class represents.


Friends And Related Function Documentation

friend class H323Capabilities [friend]


Field Documentation

unsigned H323Capability::assignedCapabilityNumber [protected]

CapabilityDirection H323Capability::capabilityDirection [protected]

Unique ID assigned to capability.

RTP_DataFrame::PayloadTypes H323Capability::rtpPayloadType [protected]


The documentation for this class was generated from the following file:
Generated on Mon Feb 21 20:19:22 2011 for OPAL by  doxygen 1.4.7