Revert of Make the new jitter buffer the default jitter buffer. (patchset #2 id:230001 of https://codereview.webrtc.org/2642753002/ )
Reason for revert:
Breaks tests downstream.
Original issue's description:
> Reland of Make the new jitter buffer the default jitter buffer. (patchset #1 id:1 of https://codereview.chromium.org/2632123005/ )
>
> Reason for revert:
> Fix in this CL: https://codereview.chromium.org/2640793003/
>
> Original issue's description:
> > Revert of Make the new jitter buffer the default jitter buffer. (patchset #7 id:120001 of https://codereview.chromium.org/2627463004/ )
> >
> > Reason for revert:
> > Breaks android bots.
> >
> > Original issue's description:
> > > Make the new jitter buffer the default jitter buffer.
> > >
> > > This CL contains only the changes necessary to make the switch to the new jitter
> > > buffer, clean up will be done in follow up CLs.
> > >
> > > In this CL:
> > > - Removed the WebRTC-NewVideoJitterBuffer experiment and made the
> > > new video jitter buffer the default one.
> > > - Moved WebRTC.Video.KeyFramesReceivedInPermille and
> > > WebRTC.Video.JitterBufferDelayInMs to the ReceiveStatisticsProxy.
> > >
> > > BUG=webrtc:5514
> > >
> > > Review-Url: https://codereview.webrtc.org/2627463004
> > > Cr-Commit-Position: refs/heads/master@{#16114}
> > > Committed: https://chromium.googlesource.com/external/webrtc/+/0f0763d86d5d4e7f27e8dece02560e39c6da97d6
> >
> > TBR=stefan@webrtc.org,terelius@webrtc.org
> > # Skipping CQ checks because original CL landed less than 1 days ago.
> > NOPRESUBMIT=true
> > NOTREECHECKS=true
> > NOTRY=true
> > BUG=webrtc:5514
> >
> > Review-Url: https://codereview.webrtc.org/2632123005
> > Cr-Commit-Position: refs/heads/master@{#16117}
> > Committed: https://chromium.googlesource.com/external/webrtc/+/c08c191f7d206dc0de945185370d18f29d556931
>
> TBR=stefan@webrtc.org,terelius@webrtc.org
> # Not skipping CQ checks because original CL landed more than 1 days ago.
> BUG=webrtc:5514
>
> Review-Url: https://codereview.webrtc.org/2642753002
> Cr-Commit-Position: refs/heads/master@{#16149}
> Committed: https://chromium.googlesource.com/external/webrtc/+/f20dd0014d1cfc8a2e859a9e177e7fe2b21274ca
TBR=stefan@webrtc.org,terelius@webrtc.org,philipel@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5514
Review-Url: https://codereview.webrtc.org/2638423003
Cr-Commit-Position: refs/heads/master@{#16159}
diff --git a/webrtc/modules/video_coding/frame_buffer2.h b/webrtc/modules/video_coding/frame_buffer2.h
index 7af48d3..f667fd5 100644
--- a/webrtc/modules/video_coding/frame_buffer2.h
+++ b/webrtc/modules/video_coding/frame_buffer2.h
@@ -28,7 +28,6 @@
namespace webrtc {
class Clock;
-class VCMReceiveStatisticsCallback;
class VCMJitterEstimator;
class VCMTiming;
@@ -40,8 +39,7 @@
FrameBuffer(Clock* clock,
VCMJitterEstimator* jitter_estimator,
- VCMTiming* timing,
- VCMReceiveStatisticsCallback* stats_proxy);
+ VCMTiming* timing);
virtual ~FrameBuffer();
@@ -143,6 +141,8 @@
void UpdateJitterDelay() EXCLUSIVE_LOCKS_REQUIRED(crit_);
+ void UpdateHistograms() const;
+
void ClearFramesAndHistory() EXCLUSIVE_LOCKS_REQUIRED(crit_);
FrameMap frames_ GUARDED_BY(crit_);
@@ -160,9 +160,16 @@
int num_frames_buffered_ GUARDED_BY(crit_);
bool stopped_ GUARDED_BY(crit_);
VCMVideoProtection protection_mode_ GUARDED_BY(crit_);
- VCMReceiveStatisticsCallback* const stats_callback_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FrameBuffer);
+
+ // For WebRTC.Video.JitterBufferDelayInMs metric.
+ int64_t accumulated_delay_ = 0;
+ int64_t accumulated_delay_samples_ = 0;
+
+ // For WebRTC.Video.KeyFramesReceivedInPermille metric.
+ int64_t num_total_frames_ = 0;
+ int64_t num_key_frames_ = 0;
};
} // namespace video_coding