diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-10-18 23:02:24 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2007-10-18 23:02:24 +0000 |
commit | 347675ea994642c0ccd60f7af70f369f7a2d7a88 (patch) | |
tree | 34946ab29ceed3cfd7983935d733ae7fb3f423fa /audio/pcm_bluetooth.c | |
parent | 2dda76438063672e2bdccf1709db3615d453ad5b (diff) |
Add rtp header.
Diffstat (limited to 'audio/pcm_bluetooth.c')
-rw-r--r-- | audio/pcm_bluetooth.c | 55 |
1 files changed, 1 insertions, 54 deletions
diff --git a/audio/pcm_bluetooth.c b/audio/pcm_bluetooth.c index 806ed37b..ae1a1bcd 100644 --- a/audio/pcm_bluetooth.c +++ b/audio/pcm_bluetooth.c @@ -38,6 +38,7 @@ #include "ipc.h" #include "sbc.h" +#include "rtp.h" //#define ENABLE_DEBUG @@ -66,60 +67,6 @@ #define SCO_RXBUFS 0x04 #endif -#if __BYTE_ORDER == __LITTLE_ENDIAN - -struct rtp_header { - uint8_t cc:4; - uint8_t x:1; - uint8_t p:1; - uint8_t v:2; - - uint8_t pt:7; - uint8_t m:1; - - uint16_t sequence_number; - uint32_t timestamp; - uint32_t ssrc; - uint32_t csrc[0]; -} __attribute__ ((packed)); - -struct rtp_payload { - uint8_t frame_count:4; - uint8_t rfa0:1; - uint8_t is_last_fragment:1; - uint8_t is_first_fragment:1; - uint8_t is_fragmented:1; -} __attribute__ ((packed)); - -#elif __BYTE_ORDER == __BIG_ENDIAN - -struct rtp_header { - uint8_t v:2; - uint8_t p:1; - uint8_t x:1; - uint8_t cc:4; - - uint8_t m:1; - uint8_t pt:7; - - uint16_t sequence_number; - uint32_t timestamp; - uint32_t ssrc; - uint32_t csrc[0]; -} __attribute__ ((packed)); - -struct rtp_payload { - uint8_t is_fragmented:1; - uint8_t is_first_fragment:1; - uint8_t is_last_fragment:1; - uint8_t rfa0:1; - uint8_t frame_count:4; -} __attribute__ ((packed)); - -#else -#error "Unknown byte order" -#endif - struct bluetooth_a2dp { sbc_t sbc; /* Codec data */ int codesize; /* SBC codesize */ |