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

LCRTPFileRecorderGM.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_LCRTPFileRecorderGM_H 00025 #define MN_LCRTPFileRecorderGM_H 00026 00027 #include <sys/types.h> 00028 #include "var_type.h" 00029 00030 #include "ServerGM.h" 00031 #include "MNFileSinkSH.h" 00032 #include "MNSem.h" 00033 #include "MNMutex.h" 00034 #include "MNRTPutildefs.h" 00035 00036 namespace SH 00037 { 00038 class Base; 00039 class RTPDecoderSH; 00040 class FileSinkSH; 00041 }; 00042 00047 class LCRTPFileRecorderGM : public ServerGM 00048 { 00049 struct timeval* _tv; 00050 00051 SH::FileSinkSH* _fsh; 00052 SH::RTPDecoderSH* _dsh; 00053 SH::Base* _ssh; 00054 00055 MediaState _streamer_state; 00056 MNSem _eof_sig; 00057 MNMutex _eof_lock; 00058 MNString _server; 00059 00060 // int _LocalPortUp; 00061 MNSocket* _local_upstream_rtp; 00062 MNSocket* _local_upstream_rtcp; 00063 int _DistantPortUp; 00064 00065 public: 00066 LCRTPFileRecorderGM( GMUser* user, MNSelector& sel ); 00067 00068 virtual ~LCRTPFileRecorderGM(); 00069 00070 virtual void init(int idx); 00071 00072 virtual void uninit(); 00073 00074 virtual void start(); 00075 00090 virtual void set_hostnames( const MNString& client, 00091 const MNString& server ); 00092 00122 virtual void set_ports( int idx, 00123 MNSocket* locDownRtp, 00124 MNSocket* locDownRtcp, 00125 int distDown, 00126 MNSocket* locUpRtp, 00127 MNSocket* locUpRtcp, 00128 int distUp ); 00129 00130 virtual bool graphManNotify( int idx, 00131 SH::Base* caller, 00132 SH::Notification attribute, 00133 void* msg ); 00134 private: 00135 virtual int start_streamer( int idx, int bandwidth ); 00136 00137 public: 00156 virtual int open_file( int idx, 00157 const char* name, 00158 int rtp_pt, 00159 SDP::PayloadTypes int_pt, 00160 u_int32 bandwidth, 00161 SDP::RetransTypes int_rt, 00162 int packetsize ); 00163 00164 virtual int play( int startp, int stopp ); 00165 virtual int stop( ); 00166 virtual int pause( ); 00167 virtual int jump ( long pos ); 00168 00175 void set_repeat_times( u_int32 lc_max_loop ); 00176 00182 void set_listpacket_timeout( u_int32 secs ); 00183 00189 void set_endpacket_timeout( u_int32 secs ); 00190 }; 00191 00193 00194 #endif /* MN_LCRTPFileRecorderGM_H */ 00195

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