瀏覽代碼

Added ability to see how many nack parts there are in a NACK packet

Staz M 4 年之前
父節點
當前提交
45bbe642fc
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      include/rtc/rtp.hpp

+ 5 - 0
include/rtc/rtp.hpp

@@ -424,6 +424,7 @@ struct RTCP_NACK_PART {
 };
 
 class RTCP_NACK {
+public:
     RTCP_FB_HEADER header;
     RTCP_NACK_PART parts[1];
 public:
@@ -459,6 +460,10 @@ public:
     [[nodiscard]] static unsigned int getSize(unsigned int discreteSeqNoCount) {
         return offsetof(RTCP_NACK, parts) + sizeof(RTCP_NACK_PART) * discreteSeqNoCount;
     }
+
+    [[nodiscard]] unsigned int getSeqNoCount() {
+        return header.header.length() - 2;
+    }
 };
 
 class RTP_RTX {