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

ServerGM.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 SERVER_GM_H 00025 #define SERVER_GM_H 00026 00027 #include "SHGraphManager.h" 00028 00029 class MNString; 00030 class MNUDPSocket; 00031 class GMUser; 00032 00033 namespace SDP 00034 { 00035 struct PayloadTypeTable; 00036 }; 00037 00046 //class GMUser 00047 //{ 00048 //public: 00049 // GMUser( ); 00050 // 00051 // virtual ~GMUser( ); 00052 // 00053 // temporary hack, to be removed 00054 // virtual const SDP::PayloadTypeTable* getPayloadTypes() = 0; 00055 // virtual SDP::PayloadTypes getInternalPayloadType() = 0; 00056 // virtual int getRTPPayloadType() = 0; 00057 // virtual void fileComplete( const char* filename, bool comp ); 00058 //}; 00059 00060 class ServerGM : public SHGraphManager 00061 { 00062 //GMUser* _user; 00063 00064 private: 00065 bool _use_lcrtp; 00066 bool _use_send_tfrc; 00067 bool _use_recv_tfrc; 00068 00069 protected: 00070 //GMUser* getUser(); 00071 /* Experimental for TFRC - MZ */ 00072 int _client_max_bw; 00073 00074 inline bool lcrtp() const { 00075 return _use_lcrtp; 00076 } 00077 00078 inline bool send_tfrc() const { 00079 return _use_send_tfrc; 00080 } 00081 00082 inline bool recv_tfrc() const { 00083 return _use_recv_tfrc; 00084 } 00085 00086 public: 00087 ServerGM( GMUser* user, MNSelector& sel ); 00088 00089 virtual ~ServerGM( ); 00090 00091 00092 virtual void init(int idx) = 0; 00093 00094 virtual void uninit() = 0; 00095 virtual void start() = 0; 00096 virtual void set_hostnames( const MNString& Client, 00097 const MNString& Server ) = 0; 00098 virtual void set_ports( int idx, 00099 MNSocket* locDownRtp, 00100 MNSocket* locDownRtcp, 00101 int distDown, 00102 MNSocket* locUpRtp, 00103 MNSocket* locUpRtcp, 00104 int distUp ) = 0; 00105 void set_lcrtp( bool lcrtp ); 00106 00112 virtual void set_send_tfrc( bool tfrc ); 00113 00118 virtual void set_recv_tfrc( bool tfrc ); 00119 00120 virtual void setNptSeek(int npt); 00121 virtual int getNptSeconds(); 00122 virtual void setRTPTimestamp(int idx, u_int32 rtptime); 00123 00124 virtual void set_client_max_bw( int client_max_bw ); 00125 private: 00126 virtual int start_streamer(int idx, int bandwidth ) = 0; 00127 public: 00128 virtual int open_file( int idx, 00129 const char* name, 00130 int rtp_pt, 00131 SDP::PayloadTypes int_pt, 00132 u_int32_t bw, 00133 SDP::RetransTypes int_rt, 00134 int packetsize ) = 0; 00135 virtual int play( int start, int stopp ) = 0; 00136 virtual int stop( ) = 0; 00137 virtual int pause( ) = 0; 00138 virtual int jump ( long pos ) = 0; 00139 00140 virtual void setLCRTPMode( bool /*lcmode*/ ) 00141 { } 00142 00143 virtual long getFilePos () 00144 { return -1; } 00145 }; 00146 00148 00149 #endif /* SERVER_GM_H */ 00150

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