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-2001 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 2.6  2005/11/30 13:35:26  csoutheren
00031  * Changed tags for Doxygen
00032  *
00033  * Revision 2.5  2004/02/24 11:28:45  rjongbloed
00034  * Normalised RTP session management across protocols
00035  *
00036  * Revision 2.4  2004/02/19 10:46:44  rjongbloed
00037  * Merged OpenH323 version 1.13.1 changes.
00038  *
00039  * Revision 2.3  2002/11/10 11:33:17  robertj
00040  * Updated to OpenH323 v1.10.3
00041  *
00042  * Revision 2.2  2002/09/16 02:52:34  robertj
00043  * Added #define so can select if #pragma interface/implementation is used on
00044  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00045  *
00046  * Revision 2.1  2002/09/04 06:01:47  robertj
00047  * Updated to OpenH323 v1.9.6
00048  *
00049  * Revision 2.0  2001/07/27 15:48:24  robertj
00050  * Conversion of OpenH323 to Open Phone Abstraction Library (OPAL)
00051  *
00052  * Revision 1.11  2003/10/27 06:03:39  csoutheren
00053  * Added support for QoS
00054  *   Thanks to Henry Harrison of AliceStreet
00055  *
00056  * Revision 1.10  2003/02/07 00:27:59  robertj
00057  * Changed function to virtual to help in using external multiicast RTP stacks.
00058  *
00059  * Revision 1.9  2002/09/16 01:14:15  robertj
00060  * Added #define so can select if #pragma interface/implementation is used on
00061  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00062  *
00063  * Revision 1.8  2002/09/03 06:19:37  robertj
00064  * Normalised the multi-include header prevention ifdef/define symbol.
00065  *
00066  * Revision 1.7  2002/08/05 10:03:47  robertj
00067  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00068  *
00069  * Revision 1.6  2001/02/09 05:16:24  robertj
00070  * Added #pragma interface for GNU C++.
00071  *
00072  * Revision 1.5  2000/08/31 08:15:32  robertj
00073  * Added support for dynamic RTP payload types in H.245 OpenLogicalChannel negotiations.
00074  *
00075  * Revision 1.4  2000/05/18 11:53:34  robertj
00076  * Changes to support doc++ documentation generation.
00077  *
00078  * Revision 1.3  2000/05/02 04:32:24  robertj
00079  * Fixed copyright notice comment.
00080  *
00081  * Revision 1.2  2000/04/05 03:17:31  robertj
00082  * Added more RTP statistics gathering and H.245 round trip delay calculation.
00083  *
00084  * Revision 1.1  1999/12/23 23:02:35  robertj
00085  * File reorganision for separating RTP from H.323 and creation of LID for VPB support.
00086  *
00087  */
00088 
00089 #ifndef __OPAL_H323RTP_H
00090 #define __OPAL_H323RTP_H
00091 
00092 #ifdef P_USE_PRAGMA
00093 #pragma interface
00094 #endif
00095 
00096 
00097 #include <rtp/rtp.h>
00098 
00099 
00100 class H225_RTPSession;
00101 
00102 class H245_TransportAddress;
00103 class H245_H2250LogicalChannelParameters;
00104 class H245_H2250LogicalChannelAckParameters;
00105 
00106 class H323Connection;
00107 class H323_RTPChannel;
00108 
00109 
00111 
00114 class H323_RTP_Session : public RTP_UserData
00115 {
00116   PCLASSINFO(H323_RTP_Session, RTP_UserData);
00117 
00126     virtual void OnTxStatistics(
00127       const RTP_Session & session   
00128     ) const;
00129 
00136     virtual void OnRxStatistics(
00137       const RTP_Session & session   
00138     ) const;
00140 
00145     virtual BOOL OnSendingPDU(
00146       const H323_RTPChannel & channel,            
00147       H245_H2250LogicalChannelParameters & param  
00148     ) const = 0;
00149 
00153     virtual void OnSendingAckPDU(
00154       const H323_RTPChannel & channel,              
00155       H245_H2250LogicalChannelAckParameters & param 
00156     ) const = 0;
00157 
00162     virtual BOOL OnReceivedPDU(
00163       H323_RTPChannel & channel,                  
00164       const H245_H2250LogicalChannelParameters & param, 
00165       unsigned & errorCode                              
00166     ) = 0;
00167 
00172     virtual BOOL OnReceivedAckPDU(
00173       H323_RTPChannel & channel,                  
00174       const H245_H2250LogicalChannelAckParameters & param 
00175     ) = 0;
00176 
00183     virtual void OnSendRasInfo(
00184       H225_RTPSession & info  
00185     ) = 0;
00187 
00188 
00189   protected:
00194     H323_RTP_Session(
00195       const H323Connection & connection  
00196     );
00198 
00199     const H323Connection & connection; 
00200 };
00201 
00202 
00205 class H323_RTP_UDP : public H323_RTP_Session
00206 {
00207   PCLASSINFO(H323_RTP_UDP, H323_RTP_Session);
00208 
00209   public:
00214     H323_RTP_UDP(
00215       const H323Connection & connection, 
00216       RTP_UDP & rtp                      
00217     );
00219 
00224     virtual BOOL OnSendingPDU(
00225       const H323_RTPChannel & channel,            
00226       H245_H2250LogicalChannelParameters & param  
00227     ) const;
00228 
00232     virtual void OnSendingAckPDU(
00233       const H323_RTPChannel & channel,              
00234       H245_H2250LogicalChannelAckParameters & param 
00235     ) const;
00236 
00243     virtual BOOL OnReceivedPDU(
00244       H323_RTPChannel & channel,                  
00245       const H245_H2250LogicalChannelParameters & param, 
00246       unsigned & errorCode                              
00247     );
00248 
00255     virtual BOOL OnReceivedAckPDU(
00256       H323_RTPChannel & channel,                  
00257       const H245_H2250LogicalChannelAckParameters & param 
00258     );
00259 
00266     virtual void OnSendRasInfo(
00267       H225_RTPSession & info  
00268     );
00270 
00271   protected:
00272     virtual BOOL ExtractTransport(
00273       const H245_TransportAddress & pdu,
00274       BOOL isDataPort,
00275       unsigned & errorCode
00276     );
00277 
00278     RTP_UDP & rtp;
00279 };
00280 
00281 
00282 #endif // __OPAL_H323RTP_H
00283 
00284 

Generated on Fri Mar 7 06:33:31 2008 for OPAL by  doxygen 1.5.1