ROHC compression/decompression library
|
00001 /* 00002 * This program is free software; you can redistribute it and/or modify 00003 * it under the terms of the GNU General Public License as published by 00004 * the Free Software Foundation; either version 2 of the License, or 00005 * (at your option) any later version. 00006 * 00007 * This program is distributed in the hope that it will be useful, 00008 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00009 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00010 * GNU General Public License for more details. 00011 * 00012 * You should have received a copy of the GNU General Public License 00013 * along with this program; if not, write to the Free Software 00014 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00015 */ 00016 00017 /** 00018 * @file rtp.h 00019 * @brief RTP header 00020 * @author David Moreau from TAS 00021 * 00022 * See section 5.1 of RFC 1889 for details. 00023 */ 00024 00025 #ifndef RTP_H 00026 #define RTP_H 00027 00028 #include <sys/types.h> 00029 00030 00031 /** 00032 * @brief RTP header 00033 * 00034 * See section 5.1 of RFC 1889 for details. 00035 */ 00036 struct rtphdr 00037 { 00038 #if __BYTE_ORDER == __LITTLE_ENDIAN 00039 u_int16_t cc:4; ///< CSRC Count 00040 u_int16_t extension:1; ///< Extension bit 00041 u_int16_t padding:1; ///< Padding bit 00042 u_int16_t version:2; ///< RTP version 00043 u_int16_t pt:7; ///< Payload Type 00044 u_int16_t m:1; ///< Marker 00045 #elif __BYTE_ORDER == __BIG_ENDIAN 00046 u_int16_t version:2; 00047 u_int16_t padding:1; 00048 u_int16_t extension:1; 00049 u_int16_t cc:4; 00050 u_int16_t m:1; 00051 u_int16_t pt:7; 00052 #else 00053 # error "Adjust your <bits/endian.h> defines" 00054 #endif 00055 u_int16_t sn; ///< Sequence Number 00056 u_int32_t timestamp; ///< Timestamp 00057 u_int32_t ssrc; ///< Synchronization SouRCe (SSRC) identifier 00058 } __attribute__((packed)); 00059 00060 00061 #endif 00062