bluetooth: Check return value of start_thread()
[pulseaudio-raopUDP/pulseaudio-raop-alac.git] / src / modules / bluetooth / rtp.h
blob45fddcf150977a9d0c3edc5e916c29e6ea192d01
1 /*
3 * BlueZ - Bluetooth protocol stack for Linux
5 * Copyright (C) 2004-2010 Marcel Holtmann <marcel@holtmann.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #if __BYTE_ORDER == __LITTLE_ENDIAN
26 struct rtp_header {
27 unsigned cc:4;
28 unsigned x:1;
29 unsigned p:1;
30 unsigned v:2;
32 unsigned pt:7;
33 unsigned m:1;
35 uint16_t sequence_number;
36 uint32_t timestamp;
37 uint32_t ssrc;
38 uint32_t csrc[0];
39 } __attribute__ ((packed));
41 struct rtp_payload {
42 unsigned frame_count:4;
43 unsigned rfa0:1;
44 unsigned is_last_fragment:1;
45 unsigned is_first_fragment:1;
46 unsigned is_fragmented:1;
47 } __attribute__ ((packed));
49 #elif __BYTE_ORDER == __BIG_ENDIAN
51 struct rtp_header {
52 unsigned v:2;
53 unsigned p:1;
54 unsigned x:1;
55 unsigned cc:4;
57 unsigned m:1;
58 unsigned pt:7;
60 uint16_t sequence_number;
61 uint32_t timestamp;
62 uint32_t ssrc;
63 uint32_t csrc[0];
64 } __attribute__ ((packed));
66 struct rtp_payload {
67 unsigned is_fragmented:1;
68 unsigned is_first_fragment:1;
69 unsigned is_last_fragment:1;
70 unsigned rfa0:1;
71 unsigned frame_count:4;
72 } __attribute__ ((packed));
74 #else
75 #error "Unknown byte order"
76 #endif