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 * @author Didier Barvaux <didier@barvaux.org> 00022 * 00023 * See section 5.1 of RFC 1889 for details. 00024 */ 00025 00026 #ifndef ROHC_PROTOCOLS_RTP_H 00027 #define ROHC_PROTOCOLS_RTP_H 00028 00029 #include <stdint.h> 00030 00031 #include "config.h" /* for WORDS_BIGENDIAN */ 00032 00033 00034 /** 00035 * @brief The RTP header 00036 * 00037 * See section 5.1 of RFC 1889 for details. 00038 */ 00039 struct rtphdr 00040 { 00041 #if WORDS_BIGENDIAN == 1 00042 uint16_t version:2; 00043 uint16_t padding:1; 00044 uint16_t extension:1; 00045 uint16_t cc:4; 00046 uint16_t m:1; 00047 uint16_t pt:7; 00048 #else 00049 uint16_t cc:4; ///< CSRC Count 00050 uint16_t extension:1; ///< Extension bit 00051 uint16_t padding:1; ///< Padding bit 00052 uint16_t version:2; ///< RTP version 00053 uint16_t pt:7; ///< Payload Type 00054 uint16_t m:1; ///< Marker 00055 #endif 00056 uint16_t sn; ///< Sequence Number 00057 uint32_t timestamp; ///< Timestamp 00058 uint32_t ssrc; ///< Synchronization SouRCe (SSRC) identifier 00059 } __attribute__((packed)); 00060 00061 00062 #endif 00063