h323rtp.h

Go to the documentation of this file.
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.13  2006/01/26 03:44:53  shorne
00031  * added Transport Capability exchange
00032  *
00033  * Revision 1.12  2005/11/30 13:05:01  csoutheren
00034  * Changed tags for Doxygen
00035  *
00036  * Revision 1.11  2003/10/27 06:03:39  csoutheren
00037  * Added support for QoS
00038  *   Thanks to Henry Harrison of AliceStreet
00039  *
00040  * Revision 1.10  2003/02/07 00:27:59  robertj
00041  * Changed function to virtual to help in using external multiicast RTP stacks.
00042  *
00043  * Revision 1.9  2002/09/16 01:14:15  robertj
00044  * Added #define so can select if #pragma interface/implementation is used on
00045  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00046  *
00047  * Revision 1.8  2002/09/03 06:19:37  robertj
00048  * Normalised the multi-include header prevention ifdef/define symbol.
00049  *
00050  * Revision 1.7  2002/08/05 10:03:47  robertj
00051  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00052  *
00053  * Revision 1.6  2001/02/09 05:16:24  robertj
00054  * Added #pragma interface for GNU C++.
00055  *
00056  * Revision 1.5  2000/08/31 08:15:32  robertj
00057  * Added support for dynamic RTP payload types in H.245 OpenLogicalChannel negotiations.
00058  *
00059  * Revision 1.4  2000/05/18 11:53:34  robertj
00060  * Changes to support doc++ documentation generation.
00061  *
00062  * Revision 1.3  2000/05/02 04:32:24  robertj
00063  * Fixed copyright notice comment.
00064  *
00065  * Revision 1.2  2000/04/05 03:17:31  robertj
00066  * Added more RTP statistics gathering and H.245 round trip delay calculation.
00067  *
00068  * Revision 1.1  1999/12/23 23:02:35  robertj
00069  * File reorganision for separating RTP from H.323 and creation of LID for VPB support.
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 

Generated on Wed Feb 6 09:02:38 2008 for OpenH323 by  doxygen 1.5.4