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
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073 #ifndef __OPAL_H323RTP_H
00074 #define __OPAL_H323RTP_H
00075
00076 #ifdef P_USE_PRAGMA
00077 #pragma interface
00078 #endif
00079
00080
00081 #include "rtp.h"
00082
00083
00084 class H225_RTPSession;
00085
00086 class H245_TransportAddress;
00087 class H245_H2250LogicalChannelParameters;
00088 class H245_H2250LogicalChannelAckParameters;
00089
00090 class H323Connection;
00091 class H323_RTPChannel;
00092
00093 class H245_TransportCapability;
00094
00095
00097
00100 class H323_RTP_Session : public RTP_UserData
00101 {
00102 PCLASSINFO(H323_RTP_Session, RTP_UserData);
00103
00112 virtual void OnTxStatistics(
00113 const RTP_Session & session
00114 ) const;
00115
00122 virtual void OnRxStatistics(
00123 const RTP_Session & session
00124 ) const;
00126
00131 virtual BOOL OnSendingPDU(
00132 const H323_RTPChannel & channel,
00133 H245_H2250LogicalChannelParameters & param
00134 ) const = 0;
00135
00139 virtual void OnSendingAckPDU(
00140 const H323_RTPChannel & channel,
00141 H245_H2250LogicalChannelAckParameters & param
00142 ) const = 0;
00143
00148 virtual BOOL OnReceivedPDU(
00149 H323_RTPChannel & channel,
00150 const H245_H2250LogicalChannelParameters & param,
00151 unsigned & errorCode
00152 ) = 0;
00153
00158 virtual BOOL OnReceivedAckPDU(
00159 H323_RTPChannel & channel,
00160 const H245_H2250LogicalChannelAckParameters & param
00161 ) = 0;
00162
00169 virtual void OnSendRasInfo(
00170 H225_RTPSession & info
00171 ) = 0;
00173
00174
00175 protected:
00180 H323_RTP_Session(
00181 const H323Connection & connection
00182 );
00184
00185 const H323Connection & connection;
00186 };
00187
00188
00191 class H323_RTP_UDP : public H323_RTP_Session
00192 {
00193 PCLASSINFO(H323_RTP_UDP, H323_RTP_Session);
00194
00195 public:
00200 H323_RTP_UDP(
00201 const H323Connection & connection,
00202 RTP_UDP & rtp,
00203 RTP_QOS * rtpqos = NULL
00204 );
00206
00211 virtual BOOL OnSendingPDU(
00212 const H323_RTPChannel & channel,
00213 H245_H2250LogicalChannelParameters & param
00214 ) const;
00215
00219 virtual void OnSendingAckPDU(
00220 const H323_RTPChannel & channel,
00221 H245_H2250LogicalChannelAckParameters & param
00222 ) const;
00223
00230 virtual BOOL OnReceivedPDU(
00231 H323_RTPChannel & channel,
00232 const H245_H2250LogicalChannelParameters & param,
00233 unsigned & errorCode
00234 );
00235
00242 virtual BOOL OnReceivedAckPDU(
00243 H323_RTPChannel & channel,
00244 const H245_H2250LogicalChannelAckParameters & param
00245 );
00246
00253 virtual void OnSendRasInfo(
00254 H225_RTPSession & info
00255 );
00257
00258 #if P_HAS_QOS
00259
00263 virtual BOOL WriteTransportCapPDU(
00264 H245_TransportCapability & cap,
00265 const H323_RTPChannel & channel
00266 ) const;
00267
00270 virtual void ReadTransportCapPDU(
00271 const H245_TransportCapability & cap,
00272 H323_RTPChannel & channel
00273 );
00275 #endif
00276
00277 protected:
00278 virtual BOOL ExtractTransport(
00279 const H245_TransportAddress & pdu,
00280 BOOL isDataPort,
00281 unsigned & errorCode
00282 );
00283
00284 RTP_UDP & rtp;
00285 };
00286
00287
00288 #endif // __OPAL_H323RTP_H
00289
00290