D:/Storage/CVS_Head/h323plus/include/h323rtp.h

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.1  2007/08/06 20:50:49  shorne
00031  * First commit of h323plus
00032  *
00033  * Revision 1.13.2.2  2007/05/23 06:58:02  shorne
00034  * Nat Support for EP's nested behind same NAT
00035  *
00036  * Revision 1.13.2.1  2006/12/23 19:08:02  shorne
00037  * Plugin video codecs & sundry
00038  *
00039  * Revision 1.13  2006/01/26 03:44:53  shorne
00040  * added Transport Capability exchange
00041  *
00042  * Revision 1.12  2005/11/30 13:05:01  csoutheren
00043  * Changed tags for Doxygen
00044  *
00045  * Revision 1.11  2003/10/27 06:03:39  csoutheren
00046  * Added support for QoS
00047  *   Thanks to Henry Harrison of AliceStreet
00048  *
00049  * Revision 1.10  2003/02/07 00:27:59  robertj
00050  * Changed function to virtual to help in using external multiicast RTP stacks.
00051  *
00052  * Revision 1.9  2002/09/16 01:14:15  robertj
00053  * Added #define so can select if #pragma interface/implementation is used on
00054  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00055  *
00056  * Revision 1.8  2002/09/03 06:19:37  robertj
00057  * Normalised the multi-include header prevention ifdef/define symbol.
00058  *
00059  * Revision 1.7  2002/08/05 10:03:47  robertj
00060  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00061  *
00062  * Revision 1.6  2001/02/09 05:16:24  robertj
00063  * Added #pragma interface for GNU C++.
00064  *
00065  * Revision 1.5  2000/08/31 08:15:32  robertj
00066  * Added support for dynamic RTP payload types in H.245 OpenLogicalChannel negotiations.
00067  *
00068  * Revision 1.4  2000/05/18 11:53:34  robertj
00069  * Changes to support doc++ documentation generation.
00070  *
00071  * Revision 1.3  2000/05/02 04:32:24  robertj
00072  * Fixed copyright notice comment.
00073  *
00074  * Revision 1.2  2000/04/05 03:17:31  robertj
00075  * Added more RTP statistics gathering and H.245 round trip delay calculation.
00076  *
00077  * Revision 1.1  1999/12/23 23:02:35  robertj
00078  * File reorganision for separating RTP from H.323 and creation of LID for VPB support.
00079  *
00080  */
00081 
00082 #ifndef __OPAL_H323RTP_H
00083 #define __OPAL_H323RTP_H
00084 
00085 #ifdef P_USE_PRAGMA
00086 #pragma interface
00087 #endif
00088 
00089 
00090 #include "rtp.h"
00091 
00092 
00093 class H225_RTPSession;
00094 
00095 class H245_TransportAddress;
00096 class H245_H2250LogicalChannelParameters;
00097 class H245_H2250LogicalChannelAckParameters;
00098 class H245_ArrayOf_GenericInformation;
00099 
00100 class H323Connection;
00101 class H323_RTPChannel;
00102 
00103 class H245_TransportCapability;
00104 
00105 
00107 
00110 class H323_RTP_Session : public RTP_UserData
00111 {
00112   PCLASSINFO(H323_RTP_Session, RTP_UserData);
00113 
00122     virtual void OnTxStatistics(
00123       const RTP_Session & session   
00124     ) const;
00125 
00132     virtual void OnRxStatistics(
00133       const RTP_Session & session   
00134     ) const;
00135 
00142     virtual void OnFinalStatistics(
00143       const RTP_Session & session   
00144     ) const;
00146 
00151     virtual BOOL OnSendingPDU(
00152       const H323_RTPChannel & channel,            
00153       H245_H2250LogicalChannelParameters & param  
00154     ) const = 0;
00155 
00158         virtual BOOL OnSendingAltPDU(
00159     const H323_RTPChannel & channel,               
00160           H245_ArrayOf_GenericInformation & alternate  
00161         ) const = 0;
00162 
00166     virtual void OnSendingAckPDU(
00167       const H323_RTPChannel & channel,              
00168       H245_H2250LogicalChannelAckParameters & param 
00169     ) const = 0;
00170 
00174         virtual void OnSendOpenAckAlt(
00175     const H323_RTPChannel & channel,              
00176           H245_ArrayOf_GenericInformation & alternate  
00177         ) const = 0;
00178 
00183     virtual BOOL OnReceivedPDU(
00184       H323_RTPChannel & channel,                  
00185       const H245_H2250LogicalChannelParameters & param, 
00186       unsigned & errorCode                              
00187     ) = 0;
00188 
00191         virtual BOOL OnReceivedAltPDU(
00192            H323_RTPChannel & channel,                  
00193           const H245_ArrayOf_GenericInformation & alternate  
00194         ) = 0;
00195 
00200     virtual BOOL OnReceivedAckPDU(
00201       H323_RTPChannel & channel,                  
00202       const H245_H2250LogicalChannelAckParameters & param 
00203     ) = 0;
00204 
00207         virtual BOOL OnReceivedAckAltPDU(
00208       H323_RTPChannel & channel,                         
00209           const H245_ArrayOf_GenericInformation & alternate  
00210         ) = 0;
00211 
00218     virtual void OnSendRasInfo(
00219       H225_RTPSession & info  
00220     ) = 0;
00222 
00223 
00224   protected:
00229     H323_RTP_Session(
00230       const H323Connection & connection  
00231     );
00233 
00234     const H323Connection & connection; 
00235 };
00236 
00237 
00240 class H323_RTP_UDP : public H323_RTP_Session
00241 {
00242   PCLASSINFO(H323_RTP_UDP, H323_RTP_Session);
00243 
00244   public:
00249     H323_RTP_UDP(
00250       const H323Connection & connection, 
00251       RTP_UDP & rtp,                     
00252       RTP_QOS * rtpqos = NULL            
00253     );
00255 
00260     virtual BOOL OnSendingPDU(
00261       const H323_RTPChannel & channel,            
00262       H245_H2250LogicalChannelParameters & param  
00263     ) const;
00264 
00267         virtual BOOL OnSendingAltPDU(
00268     const H323_RTPChannel & channel,               
00269           H245_ArrayOf_GenericInformation & alternate  
00270         ) const;
00271 
00275     virtual void OnSendingAckPDU(
00276       const H323_RTPChannel & channel,              
00277       H245_H2250LogicalChannelAckParameters & param 
00278     ) const;
00279 
00283         virtual void OnSendOpenAckAlt(
00284     const H323_RTPChannel & channel,              
00285           H245_ArrayOf_GenericInformation & alternate  
00286         ) const;
00287 
00294     virtual BOOL OnReceivedPDU(
00295       H323_RTPChannel & channel,                  
00296       const H245_H2250LogicalChannelParameters & param, 
00297       unsigned & errorCode                              
00298     );
00299 
00302         virtual BOOL OnReceivedAltPDU(
00303            H323_RTPChannel & channel,                  
00304           const H245_ArrayOf_GenericInformation & alternate  
00305         );
00306 
00313     virtual BOOL OnReceivedAckPDU(
00314       H323_RTPChannel & channel,                  
00315       const H245_H2250LogicalChannelAckParameters & param 
00316     );
00317 
00320         virtual BOOL OnReceivedAckAltPDU(
00321       H323_RTPChannel & channel,                         
00322           const H245_ArrayOf_GenericInformation & alternate  
00323         );
00324 
00325 
00332     virtual void OnSendRasInfo(
00333       H225_RTPSession & info  
00334     );
00336 
00337 #if P_HAS_QOS
00338 
00342     virtual BOOL WriteTransportCapPDU(
00343        H245_TransportCapability & cap,    
00344        const H323_RTPChannel & channel    
00345        ) const;
00346 
00349     virtual void ReadTransportCapPDU(
00350         const H245_TransportCapability & cap,   
00351         H323_RTPChannel & channel               
00352         );
00354 #endif
00355   
00356   protected:
00357     virtual BOOL ExtractTransport(
00358       const H245_TransportAddress & pdu,
00359       BOOL isDataPort,
00360       unsigned & errorCode
00361     );
00362 
00363     RTP_UDP & rtp;
00364 };
00365 
00366 
00367 #endif // __OPAL_H323RTP_H
00368 
00369 

Generated on Thu Oct 25 13:42:27 2007 for h323plus by  doxygen 1.5.2