Dont request keyframes if the stream is inactive or if we are currently receiving a keyframe.

BUG=webrtc:7520

Review-Url: https://codereview.webrtc.org/2853503002
Cr-Commit-Position: refs/heads/master@{#18199}
This commit is contained in:
philipel
2017-05-18 08:08:53 -07:00
committed by Commit bot
parent 5ccdd7285c
commit 3184f8e329
7 changed files with 136 additions and 5 deletions

View File

@ -55,6 +55,10 @@ class PacketBuffer {
void ClearTo(uint16_t seq_num);
void Clear();
// Timestamp (not RTP timestamp) of the last received packet/keyframe packet.
rtc::Optional<int64_t> LastReceivedPacketMs() const;
rtc::Optional<int64_t> LastReceivedKeyframePacketMs() const;
int AddRef() const;
int Release() const;
@ -142,6 +146,10 @@ class PacketBuffer {
// Called when a received frame is found.
OnReceivedFrameCallback* const received_frame_callback_;
// Timestamp (not RTP timestamp) of the last received packet/keyframe packet.
rtc::Optional<int64_t> last_received_packet_ms_ GUARDED_BY(crit_);
rtc::Optional<int64_t> last_received_keyframe_packet_ms_ GUARDED_BY(crit_);
mutable volatile int ref_count_ = 0;
};