X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/e7eb3a2744aa45179daea235800753d3d1955338..985bb670b4e07d35cb1580780253ded2524a342e:/lib/rtp.h?ds=inline
diff --git a/lib/rtp.h b/lib/rtp.h
index 3ac14be..b923fda 100644
--- a/lib/rtp.h
+++ b/lib/rtp.h
@@ -15,19 +15,69 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+/** @file lib/rtp.h
+ * @brief RTP packet header format
+ *
+ * See RFC1889.
+ */
#ifndef RTP_H
#define RTP_H
-/* RTP is defined in RFC1889 */
+/** @brief RTP packet header format
+ *
+ * See RFC1889 (now obsoleted
+ * by RFC3550).
+ *
+ * All values in this structure are big-endian.
+ */
struct attribute((packed)) rtp_header {
+ /** @brief Version, padding, extension and CSRC
+ *
+ * Version is bits 6 and 7; currently always 2.
+ *
+ * Padding is bit 5; if set frame includes padding octets.
+ *
+ * eXtension is bit 4; if set there is a header extension.
+ *
+ * CSRC Count is bits 0-3 and is the number of CSRC identifiers following the
+ * header.
+ */
uint8_t vpxcc;
+
+ /** @brief Marker and payload type
+ *
+ * Marker is bit 7. Profile-defined.
+ *
+ * Payload Type is bits 0-6. Profile defined.
+ */
uint8_t mpt;
+
+ /** @brief Sequence number */
uint16_t seq;
+
+ /** @brief Timestamp */
uint32_t timestamp;
+
+ /** @brief Synchronization source */
uint32_t ssrc;
};
+/** @brief RTP packet header format
+ *
+ * See RFC1889 (now obsoleted
+ * by RFC3550).
+ *
+ * All values in this structure are big-endian.
+ */
+struct attribute((packed)) rtp_extension {
+ /** @brief Profile-defined extension type */
+ uint16_t type;
+
+ /** @brief Length of rest of extension */
+ uint16_t length;
+};
+
#endif /* RTP_H */
/*