00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef __OPAL_H323RTP_H
00035 #define __OPAL_H323RTP_H
00036
00037 #ifdef P_USE_PRAGMA
00038 #pragma interface
00039 #endif
00040
00041 #include <opal/buildopts.h>
00042
00043 #include <rtp/rtp.h>
00044
00045
00046 class H225_RTPSession;
00047
00048 class H245_TransportAddress;
00049 class H245_H2250LogicalChannelParameters;
00050 class H245_H2250LogicalChannelAckParameters;
00051
00052 class H323Connection;
00053 class H323_RTPChannel;
00054
00055
00057
00060 class H323_RTP_Session : public RTP_UserData
00061 {
00062 PCLASSINFO(H323_RTP_Session, RTP_UserData);
00063
00072 virtual void OnTxStatistics(
00073 const RTP_Session & session
00074 ) const;
00075
00082 virtual void OnRxStatistics(
00083 const RTP_Session & session
00084 ) const;
00086
00091 virtual PBoolean OnSendingPDU(
00092 const H323_RTPChannel & channel,
00093 H245_H2250LogicalChannelParameters & param
00094 ) const = 0;
00095
00099 virtual void OnSendingAckPDU(
00100 const H323_RTPChannel & channel,
00101 H245_H2250LogicalChannelAckParameters & param
00102 ) const = 0;
00103
00108 virtual PBoolean OnReceivedPDU(
00109 H323_RTPChannel & channel,
00110 const H245_H2250LogicalChannelParameters & param,
00111 unsigned & errorCode
00112 ) = 0;
00113
00118 virtual PBoolean OnReceivedAckPDU(
00119 H323_RTPChannel & channel,
00120 const H245_H2250LogicalChannelAckParameters & param
00121 ) = 0;
00122
00129 virtual void OnSendRasInfo(
00130 H225_RTPSession & info
00131 ) = 0;
00133
00134
00135 protected:
00140 H323_RTP_Session(
00141 const H323Connection & connection
00142 );
00144
00145 const H323Connection & connection;
00146 };
00147
00148
00151 class H323_RTP_UDP : public H323_RTP_Session
00152 {
00153 PCLASSINFO(H323_RTP_UDP, H323_RTP_Session);
00154
00155 public:
00160 H323_RTP_UDP(
00161 const H323Connection & connection,
00162 RTP_UDP & rtp
00163 );
00165
00170 virtual PBoolean OnSendingPDU(
00171 const H323_RTPChannel & channel,
00172 H245_H2250LogicalChannelParameters & param
00173 ) const;
00174
00178 virtual void OnSendingAckPDU(
00179 const H323_RTPChannel & channel,
00180 H245_H2250LogicalChannelAckParameters & param
00181 ) const;
00182
00189 virtual PBoolean OnReceivedPDU(
00190 H323_RTPChannel & channel,
00191 const H245_H2250LogicalChannelParameters & param,
00192 unsigned & errorCode
00193 );
00194
00201 virtual PBoolean OnReceivedAckPDU(
00202 H323_RTPChannel & channel,
00203 const H245_H2250LogicalChannelAckParameters & param
00204 );
00205
00212 virtual void OnSendRasInfo(
00213 H225_RTPSession & info
00214 );
00216
00217 protected:
00218 virtual PBoolean ExtractTransport(
00219 const H245_TransportAddress & pdu,
00220 PBoolean isDataPort,
00221 unsigned & errorCode
00222 );
00223
00224 RTP_UDP & rtp;
00225 };
00226
00227
00228 #endif // __OPAL_H323RTP_H
00229
00230