OPAL
Version 3.10.4
|
#include <channels.h>
Public Member Functions | |
virtual bool | OnMediaCommand (const OpalMediaCommand &) |
Construction | |
H323Channel (H323Connection &connection, const H323Capability &capability) | |
~H323Channel () | |
Overrides from PObject | |
virtual void | PrintOn (ostream &strm) const |
Member variable access | |
const H323ChannelNumber & | GetNumber () const |
void | SetNumber (const H323ChannelNumber &num) |
const H323ChannelNumber & | GetReverseChannel () const |
void | SetReverseChannel (const H323ChannelNumber &num) |
unsigned | GetBandwidthUsed () const |
PBoolean | SetBandwidthUsed (unsigned bandwidth) |
const H323Capability & | GetCapability () const |
PBoolean | IsPaused () const |
void | SetPause (PBoolean pause) |
Protected Member Functions | |
virtual void | InternalClose () |
Protected Attributes | |
H323EndPoint & | endpoint |
H323Connection & | connection |
H323Capability * | capability |
H323ChannelNumber | number |
H323ChannelNumber | reverseChannel |
bool | opened |
bool | paused |
PAtomicInteger | m_terminating |
Operations | |
enum | Directions { IsBidirectional, IsTransmitter, IsReceiver, NumDirections } |
virtual Directions | GetDirection () const =0 |
virtual unsigned | GetSessionID () const |
virtual bool | SetSessionID (unsigned sessionID) |
virtual PBoolean | GetMediaTransportAddress (OpalTransportAddress &data, OpalTransportAddress &control) const |
virtual PBoolean | SetInitialBandwidth ()=0 |
virtual PBoolean | Open () |
virtual PBoolean | Start ()=0 |
virtual void | Close () |
PBoolean | IsOpen () const |
virtual OpalMediaStreamPtr | GetMediaStream () const |
virtual PBoolean | OnSendingPDU (H245_OpenLogicalChannel &openPDU) const =0 |
virtual void | OnSendOpenAck (const H245_OpenLogicalChannel &open, H245_OpenLogicalChannelAck &ack) const |
virtual PBoolean | OnReceivedPDU (const H245_OpenLogicalChannel &pdu, unsigned &errorCode) |
virtual PBoolean | OnReceivedAckPDU (const H245_OpenLogicalChannelAck &pdu) |
virtual void | OnFlowControl (long bitRateRestriction) |
virtual void | OnMiscellaneousCommand (const H245_MiscellaneousCommand_type &type) |
virtual void | OnMiscellaneousIndication (const H245_MiscellaneousIndication_type &type) |
virtual void | OnJitterIndication (DWORD jitter, int skippedFrameCount, int additionalBuffer) |
Additional Inherited Members |
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.
H323Channel::H323Channel | ( | H323Connection & | connection, |
const H323Capability & | capability | ||
) |
Create a new channel.
connection | Connection to endpoint for channel |
capability | Capability channel is using |
H323Channel::~H323Channel | ( | ) |
Destroy new channel. To avoid usage of deleted objects in background threads, this waits for the H323LogicalChannelThread to terminate before continuing.
|
virtual |
This is called to clean up any threads on connection termination.
|
inline |
Get the bandwidth used by the channel in 100's of bits/sec.
|
inline |
Get the capability that created this channel.
References capability.
|
pure virtual |
Indicate the direction of the channel. Return if the channel is bidirectional, or unidirectional, and which direction for the latter case.
Implemented in H323BidirectionalChannel, and H323UnidirectionalChannel.
|
virtual |
Get the media stream associated with this logical channel.
If the argument is set to true, the mediaStream is about to be deleted so all internal references to the mediaStream must be removed. The default behaviour returns NULL.
Reimplemented in H323UnidirectionalChannel.
|
virtual |
Get the media transport address for the connection. This is primarily used to determine if media bypass is possible for the call between two connections.
The default behaviour returns false.
data | Data channel address |
control | Control channel address |
Reimplemented in H323_ExternalRTPChannel.
|
inline |
Get the number of the channel.
References number.
|
inline |
Get the number of the reverse channel (if present).
References reverseChannel.
|
virtual |
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.
Reimplemented in H323DataChannel, H323_ExternalRTPChannel, and H323_RTPChannel.
|
protectedvirtual |
Reimplemented in H323DataChannel, and H323UnidirectionalChannel.
|
inline |
Indicate if has been opened.
References m_terminating, and opened.
|
inline |
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.
References paused.
|
virtual |
Limit bit flow for the logical channel. The default behaviour passes this on to the codec if not NULL.
bitRateRestriction | Bit rate limitation |
|
virtual |
Limit bit flow for the logical channel. The default behaviour does nothing.
jitter | Estimated received jitter in microseconds |
skippedFrameCount | Frames skipped by decodec |
additionalBuffer | Additional size of video decoder buffer |
|
virtual |
|
virtual |
Process a miscellaneous command on the logical channel. The default behaviour passes this on to the codec if not NULL.
type | Command to process |
|
virtual |
Process a miscellaneous indication on the logical channel. The default behaviour passes this on to the codec if not NULL.
type | Indication to process |
|
virtual |
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.
pdu | Acknowledgement PDU |
Reimplemented in H323DataChannel, H323_RealTimeChannel, and H323_T120Channel.
|
virtual |
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.
pdu | Open PDU |
errorCode | Error code on failure |
Reimplemented in H323DataChannel, H323_RealTimeChannel, and H323_T120Channel.
|
pure virtual |
Fill out the OpenLogicalChannel PDU for the particular channel type.
openPDU | Open PDU to send. |
Implemented in H323DataChannel, H323_RealTimeChannel, and H323_T120Channel.
|
virtual |
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.
open | Open PDU |
ack | Acknowledgement PDU |
Reimplemented in H323DataChannel, H323_RealTimeChannel, and H323_T120Channel.
|
virtual |
Open the channel. The default behaviour just calls connection.OnStartLogicalChannel() and if successful sets the opened member variable.
Reimplemented in H323UnidirectionalChannel.
|
virtual |
PBoolean H323Channel::SetBandwidthUsed | ( | unsigned | bandwidth | ) |
Get the bandwidth used by the channel in 100's of bits/sec.
bandwidth | New bandwidth |
|
pure virtual |
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.
Implemented in H323UnidirectionalChannel.
|
inline |
Set the number of the channel.
References number.
|
inline |
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.
pause | New pause flag |
References paused.
|
inline |
Set the number of the reverse channel (if present).
References reverseChannel.
|
virtual |
Set the session number of the channel. During OLC negotations teh master may change the session number being used for the logical channel.
Returns false if the sesion could not be renumbered.
sessionID | New session ID |
Reimplemented in H323_RTPChannel.
|
pure virtual |
This is called when the channel can start transferring data.
Implemented in H323_ExternalRTPChannel, H323BidirectionalChannel, and H323UnidirectionalChannel.
|
protected |
Referenced by GetCapability().
|
protected |
|
protected |
|
protected |
Referenced by IsOpen().
|
protected |
Referenced by GetNumber(), and SetNumber().
|
protected |
Referenced by IsOpen().
|
protected |
Referenced by IsPaused(), and SetPause().
|
protected |
Referenced by GetReverseChannel(), and SetReverseChannel().