00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00049 #include "config.h"
00050 #undef PACKAGE
00051 #undef VERSION
00052 #include <cc++/config.h>
00053 #include <cc++/socket.h>
00054 #include <cc++/export.h>
00055 #include "rtp.h"
00056 #include "rtpext.h"
00057
00058
00059
00060 #ifdef HAVE_LIBNANA
00061 # include "nana.h"
00062 # include "DL.h"
00063 #else
00064 # define I(e)
00065 # define DL(e)
00066 # define VDL(e)
00067 #endif
00068
00069 #ifdef HAVE_CSTDLIB
00070 #include <cstdlib>
00071 #else
00072 # ifdef HAVE_STDLIB_H
00073 # include <stdlib.h>
00074 # else
00075 # warning "Your system does not have cstdlib nor stdlib.h"
00076 #define getenv(w) ("unidentifiable_user")
00077 # endif //HAVE_STDLIB_H
00078 #endif //HAVE_CSTDLIB
00079
00080 #ifdef HAVE_SYS_UTSNAME_H
00081 # include <sys/utsname.h>
00082 #else
00083 # error "Portability problem: you do not have sys/utsname.h"
00084 #endif
00085
00086 #ifdef CCXX_NAMESPACES
00087 namespace ost {
00088 #endif
00089
00090
00099
00120 #pragma pack(1)
00121
00129 struct ReceiverInfo
00130 {
00131 uint8 flost;
00132 uint8 lost_msb;
00133 uint16 lost_lsb;
00134 uint32 highest_seqnum;
00135 uint32 jitter;
00136 uint32 lsr;
00137 uint32 dlsr;
00138 } ;
00139
00146 typedef struct
00147 {
00148 uint32 ssrc;
00149 ReceiverInfo rinfo;
00150 } RRBlock;
00151
00158 typedef struct
00159 {
00160 uint32 ssrc;
00161 RRBlock blocks [0];
00162 } RecvReport;
00163
00169 struct SenderInfo
00170 {
00171 uint32 NTP_msb;
00172 uint32 NTP_lsb;
00173 uint32 RTPtimestamp;
00174 uint32 packet_count;
00175 uint32 octet_count;
00176 } ;
00177
00183 typedef struct
00184 {
00185 uint32 ssrc;
00186 SenderInfo sinfo;
00187 RRBlock blocks [0];
00188 } SendReport;
00189
00195 typedef struct
00196 {
00197 uint8 type;
00198 uint8 len;
00199 } SDESItem;
00200
00206 typedef struct
00207 {
00208 uint32 ssrc;
00209 SDESItem item;
00210 } SDESChunk;
00211
00217 typedef struct
00218 {
00219 uint32 ssrc;
00220 uint8 length;
00221 char reason [0];
00222 } BYEPacket;
00223
00229 typedef struct
00230 {
00231 uint32 ssrc;
00232 char name [4];
00233 char* data;
00234 } APPPacket;
00235
00246 struct RTCPPacket
00247 {
00248 RTCPFixedHeader fh;
00249 union
00250 {
00251 SendReport SR;
00252 RecvReport RR;
00253 SDESChunk SDES;
00254 BYEPacket BYE;
00255 APPPacket APP;
00256 } info;
00257 } ;
00258
00259 #pragma pack()
00260
00261 #ifdef CCXX_NAMESPACES
00262 };
00263 #endif
00264