Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

MNShared_RTP_RTCP.h

Go to the documentation of this file.
00001 /* Copyright (C) 2000 KOM/Darmstadt University of Technology 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, code may be used in unmodified form provided 00006 * that this copyright notice and this permission notice appear in 00007 * supporting documentation. 00008 * 00009 * This software is provided "as is" and without any express or implied 00010 * warranties, including, without limitation, the implied warranty of 00011 * fitness for a particular purpose. 00012 * 00013 * The code may be subjected to the GNU General Public License, Version 2, 00014 * and re-distributed under the terms of this license. 00015 * As a special exception, permission is granted to link this code 00016 * with the Qt library and distribute executables, as long as you 00017 * follow the requirements of the GNU GPL in regard to all of the 00018 * software in the executable aside from Qt. 00019 * 00020 * Commercial use other than under the terms of the GNU General Public 00021 * License is allowed only after express negotiation of conditions 00022 * with the authors. 00023 */ 00024 #ifndef MN_SHARED_RTP_RTCP_H 00025 #define MN_SHARED_RTP_RTCP_H 00026 00027 #include "MNMutex.h" 00028 #include "MNRTPdefs.h" 00029 #include "MNValid.h" 00030 #include "MNSelector.h" 00031 #include "sdp/PayloadTypes.h" 00032 00033 namespace SDP 00034 { 00035 class PayloadTypeTable; 00036 } 00037 00038 /**********************************************************************/ 00046 class MNShared_RTP_RTCP 00047 { 00048 DECLARE_VALID 00049 00050 private: 00051 MNSelector& _main_selector; 00052 00057 mutable MNMutex _lock; 00058 00063 char* _targetaddr; 00064 00066 u_int32_t _bandwidth; 00067 00071 int32_t _pt_type; 00072 00073 // SDP::PayloadTypes _int_pt_type; 00074 int32_t _dpt_ts_rate; 00075 00079 bool _react_on_bye; 00080 00084 bool _rtcp_send_bye; 00085 00087 bool _ssrc_collision; 00088 00090 bool _rtcp_allowed; 00091 00093 u_int32_t _rtp_bad_ver; 00094 00096 u_int32_t _rtp_bad_length; 00097 00099 u_int32_t _rtcp_bad_ver; 00100 00105 u_int32_t _rtcp_bad_pt; 00106 00107 public: 00109 char* _bye_msg; 00110 00112 int _bye_msg_len; 00113 00114 public: 00120 MNShared_RTP_RTCP( MNSelector& sel ); 00121 00136 MNShared_RTP_RTCP( MNSelector& sel, 00137 u_int32 bandwidth, 00138 int32 payload_type, 00139 const char* targetaddr , 00140 int32 dpt_ts_rate=-1); 00141 00142 ~MNShared_RTP_RTCP(); 00143 00144 inline MNSelector& mainSelector() { 00145 return _main_selector; 00146 } 00147 00148 private: 00153 void set_targetaddr( const char* addr ); 00154 00155 public: 00159 const char* get_targetaddr( ) const; 00160 00163 void set_bandwidth( u_int32_t bw ); 00164 00167 u_int32_t bandwidth() const; 00168 00171 void set_pt_type( int32_t t ); 00172 00175 int32_t pt_type( ) const; 00176 00179 void set_dpt_ts_rate(int32_t t ); 00180 00183 int32_t dpt_ts_rate( ) const; 00184 00185 /* 00187 void set_int_pt_type( SDP::PayloadTypes t ); 00188 00190 SDP::PayloadTypes int_pt_type( ) const; 00191 */ 00192 00202 void set_bye( bool on, const char* msg ); 00203 00206 void set_react_on_bye( bool val ); 00207 00210 bool react_on_bye( ) const; 00211 00214 bool rtcp_send_bye( ) const; 00215 00220 void set_ssrc_collision( bool val ); 00223 bool ssrc_collision( ) const; 00224 00227 void set_rtcp_allowed( bool val ); 00230 bool rtcp_allowed( ) const; 00231 00234 void set_rtp_bad_ver( u_int32_t val ); 00237 void inc_rtp_bad_ver( ); 00240 u_int32_t rtp_bad_ver( ) const; 00241 00244 void set_rtp_bad_length( u_int32_t val ); 00247 void inc_rtp_bad_length( ); 00250 u_int32_t rtp_bad_length( ) const; 00251 00254 void set_rtcp_bad_ver( u_int32_t val ); 00257 void inc_rtcp_bad_ver( ); 00260 u_int32_t rtcp_bad_ver( ) const; 00261 00264 void set_rtcp_bad_pt( u_int32_t val ); 00267 void inc_rtcp_bad_pt( ); 00270 u_int32_t rtcp_bad_pt( ) const; 00271 00272 private: 00274 MNShared_RTP_RTCP( const MNShared_RTP_RTCP& ); 00275 00277 MNShared_RTP_RTCP& operator=( const MNShared_RTP_RTCP& ); 00278 }; 00279 00280 #endif /* MN_SHARED_RTP_RTCP_H */ 00281

Generated on Sun Mar 6 13:35:49 2005 for Komssys by doxygen 1.3.8