jrtplib
3.7.1
|
00001 /* 00002 00003 This file is a part of JRTPLIB 00004 Copyright (c) 1999-2007 Jori Liesenborgs 00005 00006 Contact: jori.liesenborgs@gmail.com 00007 00008 This library was developed at the "Expertisecentrum Digitale Media" 00009 (http://www.edm.uhasselt.be), a research center of the Hasselt University 00010 (http://www.uhasselt.be). The library is based upon work done for 00011 my thesis at the School for Knowledge Technology (Belgium/The Netherlands). 00012 00013 Permission is hereby granted, free of charge, to any person obtaining a 00014 copy of this software and associated documentation files (the "Software"), 00015 to deal in the Software without restriction, including without limitation 00016 the rights to use, copy, modify, merge, publish, distribute, sublicense, 00017 and/or sell copies of the Software, and to permit persons to whom the 00018 Software is furnished to do so, subject to the following conditions: 00019 00020 The above copyright notice and this permission notice shall be included 00021 in all copies or substantial portions of the Software. 00022 00023 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00024 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00025 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00026 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00027 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00028 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 00029 IN THE SOFTWARE. 00030 00031 */ 00032 00037 #ifndef RTPSTRUCTS_H 00038 00039 #define RTPSTRUCTS_H 00040 00041 #include "rtpconfig.h" 00042 #include "rtptypes.h" 00043 00044 struct RTPHeader 00045 { 00046 #ifdef RTP_BIG_ENDIAN 00047 uint8_t version:2; 00048 uint8_t padding:1; 00049 uint8_t extension:1; 00050 uint8_t csrccount:4; 00051 00052 uint8_t marker:1; 00053 uint8_t payloadtype:7; 00054 #else // little endian 00055 uint8_t csrccount:4; 00056 uint8_t extension:1; 00057 uint8_t padding:1; 00058 uint8_t version:2; 00059 00060 uint8_t payloadtype:7; 00061 uint8_t marker:1; 00062 #endif // RTP_BIG_ENDIAN 00063 00064 uint16_t sequencenumber; 00065 uint32_t timestamp; 00066 uint32_t ssrc; 00067 }; 00068 00069 struct RTPExtensionHeader 00070 { 00071 uint16_t extid; 00072 uint16_t length; 00073 }; 00074 00075 struct RTPSourceIdentifier 00076 { 00077 uint32_t ssrc; 00078 }; 00079 00080 struct RTCPCommonHeader 00081 { 00082 #ifdef RTP_BIG_ENDIAN 00083 uint8_t version:2; 00084 uint8_t padding:1; 00085 uint8_t count:5; 00086 #else // little endian 00087 uint8_t count:5; 00088 uint8_t padding:1; 00089 uint8_t version:2; 00090 #endif // RTP_BIG_ENDIAN 00091 00092 uint8_t packettype; 00093 uint16_t length; 00094 }; 00095 00096 struct RTCPSenderReport 00097 { 00098 uint32_t ntptime_msw; 00099 uint32_t ntptime_lsw; 00100 uint32_t rtptimestamp; 00101 uint32_t packetcount; 00102 uint32_t octetcount; 00103 }; 00104 00105 struct RTCPReceiverReport 00106 { 00107 uint32_t ssrc; // Identifies about which SSRC's data this report is... 00108 uint8_t fractionlost; 00109 uint8_t packetslost[3]; 00110 uint32_t exthighseqnr; 00111 uint32_t jitter; 00112 uint32_t lsr; 00113 uint32_t dlsr; 00114 }; 00115 00116 struct RTCPSDESHeader 00117 { 00118 uint8_t sdesid; 00119 uint8_t length; 00120 }; 00121 00122 #endif // RTPSTRUCTS 00123