chiark / gitweb /
Tree layout and context menu for playlist picker.
[disorder] / lib / rtp.h
index 3ac14befc419b95984088b06f3785e3c1e99fb3e..b923fda3c7b60f7358ff81f48bb9513a45b13290 100644 (file)
--- a/lib/rtp.h
+++ b/lib/rtp.h
  * You should have received a copy of the GNU General Public License
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
  */
+/** @file lib/rtp.h
+ * @brief RTP packet header format
+ *
+ * See <a href="http://www.ietf.org/rfc/rfc1889.txt">RFC1889</a>.
+ */
 
 #ifndef RTP_H
 #define RTP_H
 
-/* RTP is defined in RFC1889 */
+/** @brief RTP packet header format
+ *
+ * See <a href="http://www.ietf.org/rfc/rfc1889.txt">RFC1889</a> (now obsoleted
+ * by <a href="http://www.ietf.org/rfc/rfc3550.txt">RFC3550</a>).
+ *
+ * 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 <a href="http://www.ietf.org/rfc/rfc1889.txt">RFC1889</a> (now obsoleted
+ * by <a href="http://www.ietf.org/rfc/rfc3550.txt">RFC3550</a>).
+ *
+ * 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 */
 
 /*