Revert "Add fine grained dropped video frames counters on sending side"
This reverts commit 4b1a363e4c238f2e1ec2d8a9ce1f819f59d710ce. Reason for revert: Breaks dependent android projects. Original change's description: > Add fine grained dropped video frames counters on sending side > > 4 new counters added to SendStatisticsProxy and reported to UMA and logs. > > Bug: webrtc:8355 > Change-Id: Idf9b8dfc295c92821e058a97cb3894dc6a446082 > Reviewed-on: https://webrtc-review.googlesource.com/12260 > Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> > Reviewed-by: Stefan Holmer <stefan@webrtc.org> > Reviewed-by: Erik Språng <sprang@webrtc.org> > Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> > Cr-Commit-Position: refs/heads/master@{#20347} TBR=deadbeef@webrtc.org,ilnik@webrtc.org,sprang@webrtc.org,stefan@webrtc.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: webrtc:8355 Change-Id: I59b02f4eb77abad7ff1fbcbfa61844918c95d723 Reviewed-on: https://webrtc-review.googlesource.com/14500 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/master@{#20378}
This commit is contained in:

committed by
Commit Bot

parent
8d3444df2d
commit
1c1a6815ae
@ -27,8 +27,7 @@ inline size_t FrameSize(const size_t& min_frame_size,
|
||||
|
||||
class FakeEncodedImageCallback : public EncodedImageCallback {
|
||||
public:
|
||||
FakeEncodedImageCallback()
|
||||
: last_frame_was_timing_(false), num_frames_dropped_(0) {}
|
||||
FakeEncodedImageCallback() : last_frame_was_timing_(false) {}
|
||||
Result OnEncodedImage(const EncodedImage& encoded_image,
|
||||
const CodecSpecificInfo* codec_specific_info,
|
||||
const RTPFragmentationHeader* fragmentation) override {
|
||||
@ -37,15 +36,10 @@ class FakeEncodedImageCallback : public EncodedImageCallback {
|
||||
return Result(Result::OK);
|
||||
};
|
||||
|
||||
void OnDroppedFrame(DropReason reason) override { ++num_frames_dropped_; }
|
||||
|
||||
bool WasTimingFrame() { return last_frame_was_timing_; }
|
||||
|
||||
size_t GetNumFramesDropped() { return num_frames_dropped_; }
|
||||
|
||||
private:
|
||||
bool last_frame_was_timing_;
|
||||
size_t num_frames_dropped_;
|
||||
};
|
||||
|
||||
enum class FrameType {
|
||||
@ -196,34 +190,5 @@ TEST(TestVCMEncodedFrameCallback, NoTimingFrameIfNoEncodeStartTime) {
|
||||
EXPECT_FALSE(sink.WasTimingFrame());
|
||||
}
|
||||
|
||||
TEST(TestVCMEncodedFrameCallback, NotifiesAboutDroppedFrames) {
|
||||
EncodedImage image;
|
||||
CodecSpecificInfo codec_specific;
|
||||
const int64_t timestamp1 = 100;
|
||||
const int64_t timestamp2 = 110;
|
||||
const int64_t timestamp3 = 120;
|
||||
const int64_t timestamp4 = 130;
|
||||
codec_specific.codecType = kVideoCodecGeneric;
|
||||
codec_specific.codecSpecific.generic.simulcast_idx = 0;
|
||||
FakeEncodedImageCallback sink;
|
||||
VCMEncodedFrameCallback callback(&sink, nullptr);
|
||||
callback.OnEncodeStarted(timestamp1, 0);
|
||||
EXPECT_EQ(0u, sink.GetNumFramesDropped());
|
||||
image.capture_time_ms_ = timestamp1;
|
||||
callback.OnEncodedImage(image, &codec_specific, nullptr);
|
||||
callback.OnEncodeStarted(timestamp2, 0);
|
||||
// No OnEncodedImageCall for timestamp2. Yet, at this moment it's not known
|
||||
// that frame with timestamp2 was dropped.
|
||||
EXPECT_EQ(0u, sink.GetNumFramesDropped());
|
||||
callback.OnEncodeStarted(timestamp3, 0);
|
||||
image.capture_time_ms_ = timestamp3;
|
||||
callback.OnEncodedImage(image, &codec_specific, nullptr);
|
||||
EXPECT_EQ(1u, sink.GetNumFramesDropped());
|
||||
callback.OnEncodeStarted(timestamp4, 0);
|
||||
image.capture_time_ms_ = timestamp4;
|
||||
callback.OnEncodedImage(image, &codec_specific, nullptr);
|
||||
EXPECT_EQ(1u, sink.GetNumFramesDropped());
|
||||
}
|
||||
|
||||
} // namespace test
|
||||
} // namespace webrtc
|
||||
|
Reference in New Issue
Block a user