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

MNRTPSinkSH.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_RTP_SINK_STREAM_HANDLER_H 00025 #define MN_RTP_SINK_STREAM_HANDLER_H 00026 00027 #include <sys/types.h> 00028 00029 #include "SH.h" 00030 #include "SHEndpoint.h" 00031 #include "SHEndpointSpec.h" 00032 #include "var_type.h" 00033 #include "MNRTPcallback.h" 00034 #include "sdp/PayloadTypes.h" 00035 #include "sdp/PayloadTypeEntry.h" 00036 #include "sdp/TransportTypes.h" 00037 00038 class MNRope; 00039 class MNRTP; 00040 class MNRTCPPacket; 00041 class MNRTPPacket; 00042 class MNUDPSocket; 00043 00044 namespace SH 00045 { 00046 00047 class RTPSinkSH; 00048 00053 /**********************************************************************/ 00054 /* RTPSinkEndpoint */ 00055 /**********************************************************************/ 00056 00057 class RTPSinkEndpoint 00058 : public SinkEndpoint 00059 , public MNRTP_RTCPreader_callback 00060 , public MNRTP_RTCPbye_callback 00061 { 00062 public: 00063 RTPSinkEndpoint( RTPSinkSH* mySH ); 00064 virtual ~RTPSinkEndpoint( ); 00065 virtual void RTCPreader_cb( RPtr<MNRTCPPacket> packet ); 00066 virtual void RTCPbye_cb( u_int32 ssrc, 00067 text_item_t* bye_text) ; 00068 00069 virtual SH_RC push( DataPtr item ); 00070 00071 RTPSinkSH* fsh(); 00072 }; 00073 00074 /**********************************************************************/ 00075 /* RTPSinkSH */ 00076 /**********************************************************************/ 00077 00078 class RTPSinkSH 00079 : public Base 00080 { 00081 public: 00082 RTPSinkSH( SHGraphManager* mgr, 00083 u_int32_t runtimeId, 00084 MNSelector& sel, 00085 RTSP::TransportTypes req_transport = RTSP::RTP_AVP_UDP ); 00086 00087 virtual ~RTPSinkSH(); 00088 00089 private: 00090 00091 MNRTP* _rtp; 00096 RTPSinkSH( const RTPSinkSH& ); 00097 00102 RTPSinkSH& operator=( const RTPSinkSH& ); 00103 00104 /* seqnumber and rtptime of last rtp packet 00105 */ 00106 u_int16 _rtp_seq; 00107 u_int32 _rtp_time; 00108 00109 00110 public: 00113 virtual SH_RC initSH(); 00116 virtual SH_RC uninitSH(); 00117 00120 virtual SH_RC startStreaming(); 00123 virtual SH_RC stopStreaming(); 00124 00125 SH_RC push_to_net( DataPtr item ); 00126 00127 virtual void pushReport( ReportPtr report, Direction d ); 00128 00129 virtual u_int16 get_rtp_seq(); 00130 virtual u_int32 get_rtp_time(); 00131 virtual u_int32 get_ssrc(); 00132 00133 /******************************************************************/ 00134 /* additional attributes for the set() functions */ 00135 /******************************************************************/ 00136 public: 00139 SA_RTPSNK_RTP_SOCK_PORT _rtp_socket; 00140 00145 SA_RTPSNK_RTCP_SOCK_PORT _rtcp_socket; 00146 SA_RTPSNK_CLIENT_NAME _client; 00147 SA_RTPSNK_CLIENT_PORT _port; 00148 SA_RTP_BANDWIDTH _bandwidth; 00149 SA_RTP_RTP_PAYLOAD_TYPE _rtp_pt; 00150 // change (VK) The payload type table is added to allow retrieving 00151 // the timestamp frequency for dynamic payload types. 00152 const SDP::PayloadTypeTable* _payload_types; 00153 00154 private: 00155 int _file_handle; 00156 00158 RTSP::TransportTypes _req_transport; 00159 00160 /******************************************************************/ 00161 /* functions required for SH::Spec */ 00162 /******************************************************************/ 00163 protected: 00164 friend class RTPSinkEndpoint; 00165 00166 SinkEndpoint* _in_ep_a[1]; 00167 RTPSinkEndpoint _inEP; 00168 00169 public: 00170 void set_payload_types(const SDP::PayloadTypeTable* ptt_ptr); 00171 00172 virtual SinkEndpoint** getSinkSpecs(); 00173 virtual SourceEndpoint** getSourceSpecs(); 00174 00175 /******************************************************************/ 00176 /* functions required for SHStatus */ 00177 /******************************************************************/ 00187 virtual bool isConnected() const; 00188 }; 00189 00191 00192 }; // namespace SH 00193 00194 #endif /* MN_RTP_SINK_STREAM_HANDLER_H */ 00195

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