OpenH323 1.18.0
|
00001 /* 00002 * h323rtp.h 00003 * 00004 * H.323 RTP protocol handler 00005 * 00006 * Open H323 Library 00007 * 00008 * Copyright (c) 1998-2000 Equivalence Pty. Ltd. 00009 * 00010 * The contents of this file are subject to the Mozilla Public License 00011 * Version 1.0 (the "License"); you may not use this file except in 00012 * compliance with the License. You may obtain a copy of the License at 00013 * http://www.mozilla.org/MPL/ 00014 * 00015 * Software distributed under the License is distributed on an "AS IS" 00016 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00017 * the License for the specific language governing rights and limitations 00018 * under the License. 00019 * 00020 * The Original Code is Open H323 Library. 00021 * 00022 * The Initial Developer of the Original Code is Equivalence Pty. Ltd. 00023 * 00024 * Portions of this code were written with the assisance of funding from 00025 * Vovida Networks, Inc. http://www.vovida.com. 00026 * 00027 * Contributor(s): ______________________________________. 00028 * 00029 * $Log: h323rtp.h,v $ 00030 * Revision 1.12 2005/11/30 13:05:01 csoutheren 00031 * Changed tags for Doxygen 00032 * 00033 * Revision 1.11 2003/10/27 06:03:39 csoutheren 00034 * Added support for QoS 00035 * Thanks to Henry Harrison of AliceStreet 00036 * 00037 * Revision 1.10 2003/02/07 00:27:59 robertj 00038 * Changed function to virtual to help in using external multiicast RTP stacks. 00039 * 00040 * Revision 1.9 2002/09/16 01:14:15 robertj 00041 * Added #define so can select if #pragma interface/implementation is used on 00042 * platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan. 00043 * 00044 * Revision 1.8 2002/09/03 06:19:37 robertj 00045 * Normalised the multi-include header prevention ifdef/define symbol. 00046 * 00047 * Revision 1.7 2002/08/05 10:03:47 robertj 00048 * Cosmetic changes to normalise the usage of pragma interface/implementation. 00049 * 00050 * Revision 1.6 2001/02/09 05:16:24 robertj 00051 * Added #pragma interface for GNU C++. 00052 * 00053 * Revision 1.5 2000/08/31 08:15:32 robertj 00054 * Added support for dynamic RTP payload types in H.245 OpenLogicalChannel negotiations. 00055 * 00056 * Revision 1.4 2000/05/18 11:53:34 robertj 00057 * Changes to support doc++ documentation generation. 00058 * 00059 * Revision 1.3 2000/05/02 04:32:24 robertj 00060 * Fixed copyright notice comment. 00061 * 00062 * Revision 1.2 2000/04/05 03:17:31 robertj 00063 * Added more RTP statistics gathering and H.245 round trip delay calculation. 00064 * 00065 * Revision 1.1 1999/12/23 23:02:35 robertj 00066 * File reorganision for separating RTP from H.323 and creation of LID for VPB support. 00067 * 00068 */ 00069 00070 #ifndef __OPAL_H323RTP_H 00071 #define __OPAL_H323RTP_H 00072 00073 #ifdef P_USE_PRAGMA 00074 #pragma interface 00075 #endif 00076 00077 00078 #include "rtp.h" 00079 00080 00081 class H225_RTPSession; 00082 00083 class H245_TransportAddress; 00084 class H245_H2250LogicalChannelParameters; 00085 class H245_H2250LogicalChannelAckParameters; 00086 00087 class H323Connection; 00088 class H323_RTPChannel; 00089 00090 00091 00093 00096 class H323_RTP_Session : public RTP_UserData 00097 { 00098 PCLASSINFO(H323_RTP_Session, RTP_UserData); 00099 00108 virtual void OnTxStatistics( 00109 const RTP_Session & session 00110 ) const; 00111 00118 virtual void OnRxStatistics( 00119 const RTP_Session & session 00120 ) const; 00122 00127 virtual BOOL OnSendingPDU( 00128 const H323_RTPChannel & channel, 00129 H245_H2250LogicalChannelParameters & param 00130 ) const = 0; 00131 00135 virtual void OnSendingAckPDU( 00136 const H323_RTPChannel & channel, 00137 H245_H2250LogicalChannelAckParameters & param 00138 ) const = 0; 00139 00144 virtual BOOL OnReceivedPDU( 00145 H323_RTPChannel & channel, 00146 const H245_H2250LogicalChannelParameters & param, 00147 unsigned & errorCode 00148 ) = 0; 00149 00154 virtual BOOL OnReceivedAckPDU( 00155 H323_RTPChannel & channel, 00156 const H245_H2250LogicalChannelAckParameters & param 00157 ) = 0; 00158 00165 virtual void OnSendRasInfo( 00166 H225_RTPSession & info 00167 ) = 0; 00169 00170 00171 protected: 00176 H323_RTP_Session( 00177 const H323Connection & connection 00178 ); 00180 00181 const H323Connection & connection; 00182 }; 00183 00184 00187 class H323_RTP_UDP : public H323_RTP_Session 00188 { 00189 PCLASSINFO(H323_RTP_UDP, H323_RTP_Session); 00190 00191 public: 00196 H323_RTP_UDP( 00197 const H323Connection & connection, 00198 RTP_UDP & rtp, 00199 RTP_QOS * rtpqos = NULL 00200 ); 00202 00207 virtual BOOL OnSendingPDU( 00208 const H323_RTPChannel & channel, 00209 H245_H2250LogicalChannelParameters & param 00210 ) const; 00211 00215 virtual void OnSendingAckPDU( 00216 const H323_RTPChannel & channel, 00217 H245_H2250LogicalChannelAckParameters & param 00218 ) const; 00219 00226 virtual BOOL OnReceivedPDU( 00227 H323_RTPChannel & channel, 00228 const H245_H2250LogicalChannelParameters & param, 00229 unsigned & errorCode 00230 ); 00231 00238 virtual BOOL OnReceivedAckPDU( 00239 H323_RTPChannel & channel, 00240 const H245_H2250LogicalChannelAckParameters & param 00241 ); 00242 00249 virtual void OnSendRasInfo( 00250 H225_RTPSession & info 00251 ); 00253 00254 protected: 00255 virtual BOOL ExtractTransport( 00256 const H245_TransportAddress & pdu, 00257 BOOL isDataPort, 00258 unsigned & errorCode 00259 ); 00260 00261 RTP_UDP & rtp; 00262 }; 00263 00264 00265 #endif // __OPAL_H323RTP_H 00266 00267