chiark / gitweb /
Concentrate knowledge about the `pcre' API in one place.
[disorder] / lib / rtp.h
CommitLineData
e83d0967
RK
1/*
2 * This file is part of DisOrder.
3 * Copyright (C) 2007 Richard Kettlewell
4 *
e7eb3a27 5 * This program is free software: you can redistribute it and/or modify
e83d0967 6 * it under the terms of the GNU General Public License as published by
e7eb3a27 7 * the Free Software Foundation, either version 3 of the License, or
e83d0967 8 * (at your option) any later version.
e7eb3a27
RK
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
e83d0967 15 * You should have received a copy of the GNU General Public License
e7eb3a27 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
e83d0967 17 */
132a5a4a
RK
18/** @file lib/rtp.h
19 * @brief RTP packet header format
20 *
21 * See <a href="http://www.ietf.org/rfc/rfc1889.txt">RFC1889</a>.
22 */
e83d0967
RK
23
24#ifndef RTP_H
25#define RTP_H
26
132a5a4a
RK
27/** @brief RTP packet header format
28 *
29 * See <a href="http://www.ietf.org/rfc/rfc1889.txt">RFC1889</a> (now obsoleted
30 * by <a href="http://www.ietf.org/rfc/rfc3550.txt">RFC3550</a>).
28f1495a
RK
31 *
32 * All values in this structure are big-endian.
132a5a4a 33 */
0b75463f 34struct attribute((packed)) rtp_header {
132a5a4a
RK
35 /** @brief Version, padding, extension and CSRC
36 *
37 * Version is bits 6 and 7; currently always 2.
38 *
39 * Padding is bit 5; if set frame includes padding octets.
40 *
41 * eXtension is bit 4; if set there is a header extension.
42 *
43 * CSRC Count is bits 0-3 and is the number of CSRC identifiers following the
44 * header.
45 */
e83d0967 46 uint8_t vpxcc;
132a5a4a
RK
47
48 /** @brief Marker and payload type
49 *
50 * Marker is bit 7. Profile-defined.
51 *
52 * Payload Type is bits 0-6. Profile defined.
53 */
e83d0967 54 uint8_t mpt;
132a5a4a
RK
55
56 /** @brief Sequence number */
e83d0967 57 uint16_t seq;
132a5a4a
RK
58
59 /** @brief Timestamp */
e83d0967 60 uint32_t timestamp;
132a5a4a
RK
61
62 /** @brief Synchronization source */
e83d0967
RK
63 uint32_t ssrc;
64};
65
28f1495a
RK
66/** @brief RTP packet header format
67 *
68 * See <a href="http://www.ietf.org/rfc/rfc1889.txt">RFC1889</a> (now obsoleted
69 * by <a href="http://www.ietf.org/rfc/rfc3550.txt">RFC3550</a>).
70 *
71 * All values in this structure are big-endian.
72 */
73struct attribute((packed)) rtp_extension {
74 /** @brief Profile-defined extension type */
75 uint16_t type;
76
77 /** @brief Length of rest of extension */
78 uint16_t length;
79};
80
e83d0967
RK
81#endif /* RTP_H */
82
83/*
84Local Variables:
85c-basic-offset:2
86comment-column:40
87fill-column:79
88indent-tabs-mode:nil
89End:
90*/