Index: webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h |
diff --git a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h |
index a1208293bce0318049f86c123ee04db64893c2da..5e5cdc0c347e85f2e456a837a46c3cc797179d38 100644 |
--- a/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h |
+++ b/webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h |
@@ -23,6 +23,18 @@ class CommonHeader; |
class TransportFeedback : public Rtpfb { |
public: |
+ class ReceivedPacket { |
+ public: |
+ ReceivedPacket(uint16_t sequence_number, int16_t delta_ticks) |
+ : sequence_number_(sequence_number), delta_ticks_(delta_ticks) {} |
+ uint16_t sequence_number() const { return sequence_number_; } |
+ int16_t delta_ticks() const { return delta_ticks_; } |
+ int32_t delta_us() const { return delta_ticks_ * kDeltaScaleFactor; } |
+ |
+ private: |
+ uint16_t sequence_number_; |
+ int16_t delta_ticks_; |
sprang_webrtc
2017/01/17 09:22:02
Looks like these can be const as well?
danilchap
2017/01/17 09:36:30
Let me try... no, they can't:
ReceivedPacket is in
sprang_webrtc
2017/01/17 09:56:21
I see. Don't remember what the style guide says, m
danilchap
2017/01/17 10:11:27
You right, explicit it better, even if copy is tri
|
+ }; |
// TODO(sprang): IANA reg? |
static constexpr uint8_t kFeedbackMessageType = 15; |
// Convert to multiples of 0.25ms. |
@@ -38,6 +50,7 @@ class TransportFeedback : public Rtpfb { |
void SetFeedbackSequenceNumber(uint8_t feedback_sequence); |
// NOTE: This method requires increasing sequence numbers (excepting wraps). |
bool AddReceivedPacket(uint16_t sequence_number, int64_t timestamp_us); |
+ const std::vector<ReceivedPacket>& GetReceivedPackets() const; |
enum class StatusSymbol { |
kNotReceived, |
@@ -76,12 +89,6 @@ class TransportFeedback : public Rtpfb { |
using DeltaSize = uint8_t; |
// Keeps DeltaSizes that can be encoded into single chunk if it is last chunk. |
class LastChunk; |
- struct ReceivedPacket { |
- ReceivedPacket(uint16_t sequence_number, int16_t delta_ticks) |
- : sequence_number(sequence_number), delta_ticks(delta_ticks) {} |
- uint16_t sequence_number; |
- int16_t delta_ticks; |
- }; |
// Reset packet to consistent empty state. |
void Clear(); |