summaryrefslogtreecommitdiff
path: root/toxav
diff options
context:
space:
mode:
authoriphydf <iphydf@users.noreply.github.com>2018-01-31 12:13:48 +0000
committeriphydf <iphydf@users.noreply.github.com>2018-01-31 13:50:12 +0000
commitba176f767a7968092a7027754f36aa891f980643 (patch)
tree7a98894074dbf2adfa4c9f6a314c201bd8b7c8c8 /toxav
parent92ffad1a72bc8c422426d52ac408bd71242dd047 (diff)
Change the "capabilities" field to a "flags" field.
This is more appropriate for RTP headers. Capabilities may be negotiated up front, but flags are useful in each packet.
Diffstat (limited to 'toxav')
-rw-r--r--toxav/rtp.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/toxav/rtp.h b/toxav/rtp.h
index 391ace74..03e35498 100644
--- a/toxav/rtp.h
+++ b/toxav/rtp.h
@@ -36,15 +36,19 @@ enum {
36}; 36};
37 37
38/** 38/**
39 * A bit mask (up to 32 bits) specifying features of the current frame affecting 39 * A bit mask (up to 64 bits) specifying features of the current frame affecting
40 * the behaviour of the decoder. 40 * the behaviour of the decoder.
41 */ 41 */
42enum RTPCapabilities { 42enum RTPFlags {
43 /** 43 /**
44 * Support frames larger than 64KiB. The full 32 bit length and offset are 44 * Support frames larger than 64KiB. The full 32 bit length and offset are
45 * set in \ref RTPHeader::data_length_full and \ref RTPHeader::offset_full. 45 * set in \ref RTPHeader::data_length_full and \ref RTPHeader::offset_full.
46 */ 46 */
47 RTP_LARGE_FRAME = 1 << 0, 47 RTP_LARGE_FRAME = 1 << 0,
48 /**
49 * Whether the packet is part of a key frame.
50 */
51 RTP_KEY_FRAME = 1 << 1,
48}; 52};
49 53
50struct RTPHeader { 54struct RTPHeader {
@@ -74,9 +78,9 @@ struct RTPHeader {
74 /* Non-standard Tox-specific fields */ 78 /* Non-standard Tox-specific fields */
75 79
76 /** 80 /**
77 * Bit mask of \ref RTPCapabilities setting features for the current frame. 81 * Bit mask of \ref RTPFlags setting features of the current frame.
78 */ 82 */
79 uint32_t capabilities; 83 uint64_t flags;
80 84
81 /** 85 /**
82 * The full 32 bit data offset of the current data chunk. The \ref 86 * The full 32 bit data offset of the current data chunk. The \ref
@@ -98,7 +102,7 @@ struct RTPHeader {
98 * Unused fields. If you want to add more information to this header, remove 102 * Unused fields. If you want to add more information to this header, remove
99 * one csrc and add the appropriate number of fields in its place. 103 * one csrc and add the appropriate number of fields in its place.
100 */ 104 */
101 uint32_t csrc[12]; 105 uint32_t csrc[11];
102 106
103 /** 107 /**
104 * Data offset of the current part (lower bits). 108 * Data offset of the current part (lower bits).