class H323Channel: public PObject

This class describes a logical channel between the two endpoints.

Inheritance:


Public

[more] Construction
[more] Overriedes from PObject
[more] Operations
[more] Member variable access


Documentation

This class describes a logical channel between the two endpoints. They may be created and deleted as required in the H245 protocol.

An application may create a descendent off this class and override functions as required for operating the channel protocol.

o Construction

o H323Channel( H323Connection & connection, const H323Capability & capability )
Create a new channel.
Parameters:
connection - Connection to endpoint for channel
capability - Capability channel is using

o ~H323Channel()
Destroy new channel. To avoid usage of deleted objects in background threads, this waits for the H323LogicalChannelThread to terminate before continuing.

o Overriedes from PObject

o Operations

ovirtual Directions GetDirection() const
Indicate the direction of the channel. Return if the channel is bidirectional, or unidirectional, and which direction for the latter case.

ovirtual unsigned GetSessionID() const
Indicate the session number of the channel. Return session for channel. This is primarily for use by RTP based channels, for channels for which the concept of a session is not meaningfull, the default simply returns 0.

ovirtual BOOL SetInitialBandwidth()
Set the initial bandwidth for the channel. This calculates the initial bandwidth required by the channel and returns TRUE if the connection can support this bandwidth.

The default behaviour gets the bandwidth requirement from the codec object created by the channel.

ovirtual BOOL Open()
Open the channel

ovirtual BOOL Start()
This is called when the channel can start transferring data

ovirtual void CleanUpOnTermination()
This is called to clean up any threads on connection termination

oBOOL IsRunning() const
Indicate if background thread(s) are running

ovirtual void Receive()
Handle channel data reception.

This is called by the thread started by the Start() function and is typically a loop writing to the codec and reading from the transport (eg RTP_session).

ovirtual void Transmit()
Handle channel data transmission.

This is called by the thread started by the Start() function and is typically a loop reading from the codec and writing to the transport (eg an RTP_session).

ovirtual BOOL OnSendingPDU( H245_OpenLogicalChannel & openPDU ) const
Fill out the OpenLogicalChannel PDU for the particular channel type.
Parameters:
openPDU - Open PDU to send.

ovirtual void OnSendOpenAck( const H245_OpenLogicalChannel & open, H245_OpenLogicalChannelAck & ack ) const
This is called when request to create a channel is received from a remote machine and is about to be acknowledged.

The default behaviour does nothing.

Parameters:
open - Open PDU
ack - Acknowledgement PDU

ovirtual BOOL OnReceivedPDU( const H245_OpenLogicalChannel & pdu, unsigned & errorCode )
This is called after a request to create a channel occurs from the local machine via the H245LogicalChannelDict::Open() function, and the request has been acknowledged by the remote endpoint.

The default behaviour just returns TRUE.

Parameters:
pdu - Open PDU
errorCode - Error code on failure

ovirtual BOOL OnReceivedAckPDU( const H245_OpenLogicalChannelAck & pdu )
This is called after a request to create a channel occurs from the local machine via the H245LogicalChannelDict::Open() function, and the request has been acknowledged by the remote endpoint.

The default behaviour just returns TRUE.

Parameters:
pdu - Acknowledgement PDU

ovirtual void OnFlowControl( long bitRateRestriction )
Limit bit flow for the logical channel. The default behaviour passes this on to the codec if not NULL.
Parameters:
bitRateRestriction - Bit rate limitation

ovirtual void OnMiscellaneousCommand( const H245_MiscellaneousCommand_type & type )
Process a miscellaneous command on the logical channel. The default behaviour passes this on to the codec if not NULL.
Parameters:
type - Command to process

ovirtual void OnMiscellaneousIndication( const H245_MiscellaneousIndication_type & type )
Process a miscellaneous indication on the logical channel. The default behaviour passes this on to the codec if not NULL.
Parameters:
type - Indication to process

ovirtual void OnJitterIndication( DWORD jitter, int skippedFrameCount, int additionalBuffer )
Limit bit flow for the logical channel. The default behaviour does nothing.
Parameters:
jitter - Estimated received jitter in microseconds
skippedFrameCount - Frames skipped by decodec
additionalBuffer - Additional size of video decoder buffer

o Member variable access

oconst H323ChannelNumber& GetNumber() const
Get the number of the channel

ovoid SetNumber(const H323ChannelNumber & num)
Set the number of the channel

oconst H323ChannelNumber& GetReverseChannel() const
Get the number of the reverse channel (if present)

ovoid SetReverseChannel(const H323ChannelNumber & num)
Set the number of the reverse channel (if present)

ounsigned GetBandwidthUsed() const
Get the bandwidth used by the channel in 100's of bits/sec

oBOOL SetBandwidthUsed( unsigned bandwidth )
Get the bandwidth used by the channel in 100's of bits/sec.
Parameters:
bandwidth - New bandwidth

oconst H323Capability& GetCapability() const
Get the capability that created this channel

oH323Codec* GetCodec() const
Get the codec, if any, associated with the channel

oBOOL IsPaused() const
Get the "pause" flag. A paused channel is one that prevents the annunciation of the channels data. For example for audio this would mute the data, for video it would still frame.

Note that channel is not stopped, and may continue to actually receive data, it is just that nothing is done with it.

ovoid SetPause( BOOL pause )
Set the "pause" flag. A paused channel is one that prevents the annunciation of the channels data. For example for audio this would mute the data, for video it would still frame.

Note that channel is not stopped, and may continue to actually receive data, it is just that nothing is done with it.

Parameters:
pause - New pause flag


Direct child classes:
H323UnidirectionalChannel
H323BidirectionalChannel

Alphabetic index HTML hierarchy of classes or Java



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