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

LCRTPCachingReflectorGM.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 00025 00026 #ifndef MN_LCRTPCachingReflectorGM_H 00027 #define MN_LCRTPCachingReflectorGM_H 00028 00029 #include <sys/types.h> 00030 #include "var_type.h" 00031 00032 #include "MNSem.h" 00033 #include "MNMutex.h" 00034 00035 #include "MNRTPutildefs.h" 00036 00037 #include "ServerGM.h" 00038 00039 #include "MNFileSinkSH.h" 00040 #include "MNPacketMultiplierSH.h" 00041 00042 #include "SDPMediaDescription.h" 00043 00044 namespace SH 00045 { 00046 class PushPullSH; 00047 class RTPDecoderSH; 00048 class RTPEncoderSH; 00049 class RTPSourceSH; 00050 class RTPSinkSH; 00051 class DummyLayerSinkSH; 00052 }; 00053 00057 struct Subsession 00058 { 00059 SH::RTPSourceSH* _RTPSourceSH; // SH* 00060 SH::PacketMultiplierSH* _MultiplierSH; 00061 SH::RTPDecoderSH* _DecoderSH; 00062 SH::FileSinkSH* _FileSinkSH; 00063 SH::PacketMultiplierSH* _filterMultiSH; 00064 SH::RTPDecoderSH* _filterDecSH; 00065 SH::PushPullSH* _filterBufferSH; 00066 SH::RTPEncoderSH* _filterEncSH; 00067 SH::DummyLayerSinkSH* _filterDropSH; 00068 SH::RTPSinkSH* _RTPSinkSH; 00069 00070 MNSem _eof_sig; 00071 MNMutex _eof_lock; 00072 00073 00074 MNSocket* _local_down_rtp; 00075 MNSocket* _local_down_rtcp; 00076 MNSocket* _local_up_rtp; 00077 MNSocket* _local_up_rtcp; 00078 int _DistantPortDown; 00079 int _DistantPortUp; 00080 bool _use_file; 00081 char* _filename; 00082 MDescPtr _mdesc; 00083 }; 00084 00085 00086 00091 class LCRTPCachingReflectorGM : public ServerGM 00092 { 00096 MNList<struct Subsession*>* _subsessions; 00097 00098 MediaState _streamer_state; 00099 00100 MNString _client; 00101 MNString _server; 00102 00103 bool _initialized; 00104 char* _logfile; 00105 00106 RTSP::TransportTypes _requested_transport; 00107 00108 00109 public: 00110 LCRTPCachingReflectorGM( GMUser* user, MNSelector& sel, RTSP::TransportTypes requested_transport = RTSP::RTP_AVP_UDP ); 00111 virtual ~LCRTPCachingReflectorGM(); 00112 00116 void addSubsession(); // make this virtual and declare in superclass? 00117 00118 virtual void init(); 00121 virtual void init(int idx); 00122 virtual void uninit(); 00123 virtual void set_hostnames( const MNString& Client, const MNString& Server ); 00126 virtual void set_ports( int idx, 00127 MNSocket* locDownRtp, 00128 MNSocket* locDownRtcp, 00129 int distDown, 00130 MNSocket* locUpRtp, 00131 MNSocket* locUpRtcp, 00132 int distUp ); 00135 void set_mdesc(int idx, MDescPtr mdesc); 00136 virtual void start(); 00140 virtual bool graphManNotify( int idx, SH::Base* caller, SH::Notification attribute, void* msg ); 00141 virtual bool synchronousGet( int idx, GetValue what, u_int32& outVar ); 00142 private: 00143 virtual int start_streamer(int idx, int bandwidth ); 00144 00145 public: 00148 virtual int open_file( int idx, 00149 const char* name, 00150 int rtp_pt, 00151 SDP::PayloadTypes int_pt, 00152 u_int32 bw, 00153 SDP::RetransTypes int_rt, 00154 int packetsize ); 00158 virtual int play( int startp, int stopp ); 00159 virtual int stop( ); 00160 virtual int pause( ); 00161 virtual int jump ( long pos ); 00162 void set_write_to_file( int idx, bool yes ); 00163 }; 00164 00166 00167 #endif /* MN_LCRTPFileRecorderGM_H */ 00168

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