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 #ifndef OPAL_H323_H323RTP_H
00035 #define OPAL_H323_H323RTP_H
00036 
00037 #ifdef P_USE_PRAGMA
00038 #pragma interface
00039 #endif
00040 
00041 #include <opal/buildopts.h>
00042 
00043 #if OPAL_H323
00044 
00045 #include <rtp/rtp.h>
00046 
00047 
00048 class H225_RTPSession;
00049 
00050 class H245_TransportAddress;
00051 class H245_H2250LogicalChannelParameters;
00052 class H245_H2250LogicalChannelAckParameters;
00053 
00054 class H323Connection;
00055 class H323_RTPChannel;
00056 
00057 
00059 
00062 class H323_RTP_Session : public RTP_UserData
00063 {
00064   PCLASSINFO(H323_RTP_Session, RTP_UserData);
00065 
00074     virtual void OnTxStatistics(
00075       const RTP_Session & session   
00076     ) const;
00077 
00084     virtual void OnRxStatistics(
00085       const RTP_Session & session   
00086     ) const;
00088 
00093     virtual PBoolean OnSendingPDU(
00094       const H323_RTPChannel & channel,            
00095       H245_H2250LogicalChannelParameters & param  
00096     ) const = 0;
00097 
00101     virtual void OnSendingAckPDU(
00102       const H323_RTPChannel & channel,              
00103       H245_H2250LogicalChannelAckParameters & param 
00104     ) const = 0;
00105 
00110     virtual PBoolean OnReceivedPDU(
00111       H323_RTPChannel & channel,                  
00112       const H245_H2250LogicalChannelParameters & param, 
00113       unsigned & errorCode                              
00114     ) = 0;
00115 
00120     virtual PBoolean OnReceivedAckPDU(
00121       H323_RTPChannel & channel,                  
00122       const H245_H2250LogicalChannelAckParameters & param 
00123     ) = 0;
00124 
00131     virtual void OnSendRasInfo(
00132       H225_RTPSession & info  
00133     ) = 0;
00135 
00136 
00137   protected:
00142     H323_RTP_Session(
00143       const H323Connection & connection  
00144     );
00146 
00147     const H323Connection & connection; 
00148 };
00149 
00150 
00153 class H323_RTP_UDP : public H323_RTP_Session
00154 {
00155   PCLASSINFO(H323_RTP_UDP, H323_RTP_Session);
00156 
00157   public:
00162     H323_RTP_UDP(
00163       const H323Connection & connection, 
00164       RTP_UDP & rtp                      
00165     );
00167 
00172     virtual PBoolean OnSendingPDU(
00173       const H323_RTPChannel & channel,            
00174       H245_H2250LogicalChannelParameters & param  
00175     ) const;
00176 
00180     virtual void OnSendingAckPDU(
00181       const H323_RTPChannel & channel,              
00182       H245_H2250LogicalChannelAckParameters & param 
00183     ) const;
00184 
00191     virtual PBoolean OnReceivedPDU(
00192       H323_RTPChannel & channel,                  
00193       const H245_H2250LogicalChannelParameters & param, 
00194       unsigned & errorCode                              
00195     );
00196 
00203     virtual PBoolean OnReceivedAckPDU(
00204       H323_RTPChannel & channel,                  
00205       const H245_H2250LogicalChannelAckParameters & param 
00206     );
00207 
00214     virtual void OnSendRasInfo(
00215       H225_RTPSession & info  
00216     );
00218 
00219   protected:
00220     virtual PBoolean ExtractTransport(
00221       const H245_TransportAddress & pdu,
00222       PBoolean isDataPort,
00223       unsigned & errorCode
00224     );
00225 
00226     RTP_UDP & rtp;
00227 };
00228 
00229 
00230 #endif // OPAL_H323
00231 
00232 #endif // OPAL_H323_H323RTP_H
00233 
00234