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

SendBlockStreamerGM.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 #ifndef MN_SendBlockStreamerGM_H 00026 #define MN_SendBlockStreamerGM_H 00027 00028 #include <sys/types.h> 00029 #include "var_type.h" 00030 00031 #include "ServerGM.h" 00032 #include "MNFileSourceSH.h" 00033 #include "MNSem.h" 00034 #include "MNMutex.h" 00035 #include "MNRTPutildefs.h" 00036 00037 namespace SH 00038 { 00039 class Base; 00040 class RTPEncoderSH; 00041 class DummyLayerSourceSH; 00042 class SendBlockSH; 00043 }; 00044 00045 class MNUDPSocket; 00046 00051 class SendBlockStreamerGM : public ServerGM 00052 { 00053 struct timeval* _tv; 00054 00055 SH::Base* _ssh; 00056 MNString _client; 00057 00058 MediaState _streamer_state; 00059 MNSem _eof_sig; 00060 MNMutex _eof_lock; 00061 bool _initialized; 00062 00066 MNSocket* _local_down_rtp; 00067 MNSocket* _local_down_rtcp; 00068 int _DistantPortDown; 00069 00070 public: 00083 SendBlockStreamerGM( GMUser* user, 00084 MNSelector& sel ); 00085 00089 virtual ~SendBlockStreamerGM(); 00090 00097 virtual void init(int idx); 00098 00101 virtual void uninit(); 00102 00103 virtual u_int32 getSsrc(); 00104 00109 virtual void start(); 00110 00119 virtual void set_hostnames( const MNString& client, const MNString& server ); 00120 virtual void set_ports( int idx, 00121 MNSocket* locDownRtp, 00122 MNSocket* locDownRtcp, 00123 int distDown, 00124 MNSocket* locUpRtp, 00125 MNSocket* locUpRtcp, 00126 int distUp ); 00127 virtual bool graphManNotify( int idx, SH::Base* caller, SH::Notification attribute, void* msg ); 00128 00129 private: 00130 virtual int start_streamer( int idx, int bandwidth ); 00131 00132 public: 00133 00153 virtual int open_file( int idx, 00154 const char* name, 00155 int rtp_pt, 00156 SDP::PayloadTypes int_pt, 00157 u_int32 bw, 00158 SDP::RetransTypes int_rt, 00159 int packetsize ); 00160 virtual int play( int startp, int stopp ); 00161 virtual int stop( ); 00162 virtual int pause( ); 00163 virtual int jump ( long pos ); 00164 virtual long getFilePos(); 00165 00178 void send_forced( size_t timeout, size_t packetsize ); 00179 00183 void stop_forced( ); 00184 00188 void recv_forced( ); 00189 00191 virtual bool synchronousGet( GetValue what, u_int32& outVar ); 00192 00193 // new requirements due to the integration of LCFtpSend, 00194 // dummies right now 00195 00201 void set_repeat_times( u_int32 /*lc_max_loop*/ ) { } 00202 }; 00203 00205 00206 #endif /* MN_SendBlockStreamerGM_H */ 00207

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