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

MNRTPutildefs.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 MNRTPUTILSDEFS_H 00025 #define MNRTPUTILSDEFS_H 00026 00027 #include "MNRTPdefs.h" 00028 #include "MNRTP.h" 00029 /* MNRTPutilsdefs.h 00030 * standard RTPutils definitions 00031 */ 00032 00033 /* RTPutils defs */ 00034 00035 enum MediaState 00036 { 00037 STOPPED = 0, 00038 PLAYING = 1, 00039 PAUSED = 2, 00040 FORWARDING = 3, 00041 REWINDING = 4, 00042 RECORDING = 5, 00043 CLOSED = 6 00044 }; 00045 00046 enum stream_event_t 00047 { 00048 EVNT_OK = 0, 00049 EVNT_EOF = 1, 00050 EVNT_ERROR = 2, 00051 EVNT_TIME = 3, 00052 EVNT_NOT_LENGTH = 4 00053 }; 00054 00055 ostream& operator<<( ostream& ostr, stream_event_t ev ); 00056 00057 enum streamer_state_t 00058 { 00059 NO_INIT = 0, 00060 EDITOR_MODE = 1, 00061 NORMAL_MODE = 2, 00062 FORCED_MODE = 3 00063 }; 00064 00065 enum FdType 00066 { 00067 FD_FILE = 0, 00068 FD_SOCK = 1, 00069 FD_DUMMY = 2 00070 }; 00071 00072 struct streamer_send_t 00073 { 00074 virtual ~streamer_send_t(); 00075 00076 /* file */ 00077 u_int64 mlength; 00078 u_int64 mposition; 00079 bool read_only; 00080 bool seekable; 00081 struct timeval play_offset; 00082 bool bandwidth_ok; 00083 u_int32_t packet_size; 00084 00085 /* states */ 00086 MediaState mstate; 00087 MediaState old_mstate; 00088 00089 /* rtp */ 00090 MNRTP* rtp; 00091 int codec; 00092 00093 }; 00094 00095 class streamer_recv_t 00096 { 00097 public: 00098 streamer_recv_t( MediaState m ); 00099 00100 virtual ~streamer_recv_t(); 00101 00102 inline MediaState Mstate( ) const { 00103 return _mstate; 00104 } 00105 00106 inline void setMstate( MediaState m ) { 00107 _mstate = m; 00108 } 00109 00110 private: 00112 streamer_recv_t( ); 00114 streamer_recv_t( const streamer_recv_t& ); 00116 streamer_recv_t& operator=( const streamer_recv_t& ); 00117 00118 private: 00119 MediaState _mstate; 00120 }; 00121 00122 #define MAX_TU 512 00123 #define MAX_USEC 1000000 00124 #define STREAMER_BUFFER_SIZE 4096 00125 00126 /* Fehler */ 00127 #define RTPSTREAMER_OK 0 00128 #define RTPSTREAMER_ERROR -101 00129 #define RTPSTREAMER_RTP_ERR -102 00130 #define RTPSTREAMER_NO_FD -103 00131 #define RTPSTREAMER_ERR_FD -104 00132 #define RTPSTREAMER_NOT_STARTED -105 00133 #define RTPSTREAMER_ALREADY_STARTED -106 00134 #define RTPSTREAMER_NOT_INIT -107 00135 #define RTPSTREAMER_NOT_NORMAL_MODE -108 00136 #define RTPSTREAMER_NOT_EDITOR_MODE -109 00137 #define RTPSTREAMER_NOT_FORCED_MODE -110 00138 #define RTPSTREAMER_FD_ALREADY_STORED -111 00139 #define RTPSTREAMER_MAX_FILES_EXCEEDED -112 00140 #define RTPSTREAMER_OPEN_ERROR -113 00141 #define RTPSTREAMER_SEEK_ERROR -114 00142 #define RTPSTREAMER_SEND_FD_EXCEEDED -115 00143 #define RTPSTREAMER_RECV_FD_EXCEEDED -116 00144 #define RTPSTREAMER_NOT_STOPPED -117 00145 #define RTPSTREAMER_FILE_EXISTS -118 00146 #define RTPSTREAMER_CLOSE_ERROR -119 00147 #define RTPSTREAMER_FD_NOT_FOUND -120 00148 #define RTPSTREAMER_SSRC_NOT_FOUND -121 00149 #define RTPSTREAMER_NO_UDP_PORT -122 00150 #define RTPSTREAMER_NO_UDP_TARGET -123 00151 00152 /* CODEC Fehler */ 00153 #define RTPCODEC_SEEK_ERROR -150 00154 #define RTPCODEC_READ_ERROR -151 00155 #define RTPCODEC_WRITE_ERROR -152 00156 #define RTPCODEC_WRITE_LENGTH_NOT_EQUAL -153 00157 #endif 00158

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