Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: media/cast/logging/stats_event_subscriber_unittest.cc

Issue 228603006: Cast: Log whether the video frame is a key frame in kVideoFrameEncoded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix win x64 compile Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/test/simple_test_tick_clock.h" 7 #include "base/test/simple_test_tick_clock.h"
8 #include "base/time/tick_clock.h" 8 #include "base/time/tick_clock.h"
9 #include "media/cast/cast_environment.h" 9 #include "media/cast/cast_environment.h"
10 #include "media/cast/logging/logging_defines.h" 10 #include "media/cast/logging/logging_defines.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 int num_frames = 10; 50 int num_frames = 10;
51 int frame_size = 123; 51 int frame_size = 123;
52 int delay_base_ms = 10; 52 int delay_base_ms = 10;
53 base::TimeTicks now; 53 base::TimeTicks now;
54 for (int i = 0; i < num_frames; i++) { 54 for (int i = 0; i < num_frames; i++) {
55 now = testing_clock_->NowTicks(); 55 now = testing_clock_->NowTicks();
56 cast_environment_->Logging()->InsertFrameEvent( 56 cast_environment_->Logging()->InsertFrameEvent(
57 now, kVideoFrameReceived, rtp_timestamp, frame_id); 57 now, kVideoFrameReceived, rtp_timestamp, frame_id);
58 testing_clock_->Advance(base::TimeDelta::FromMilliseconds(30)); 58 testing_clock_->Advance(base::TimeDelta::FromMilliseconds(30));
59 59
60 cast_environment_->Logging()->InsertFrameEventWithSize( 60 cast_environment_->Logging()->InsertEncodedFrameEvent(
61 now, kVideoFrameEncoded, rtp_timestamp, i, frame_size); 61 now, kVideoFrameEncoded, rtp_timestamp, i, frame_size, true);
62 testing_clock_->Advance(base::TimeDelta::FromMilliseconds(30)); 62 testing_clock_->Advance(base::TimeDelta::FromMilliseconds(30));
63 63
64 cast_environment_->Logging()->InsertFrameEventWithDelay( 64 cast_environment_->Logging()->InsertFrameEventWithDelay(
65 now, 65 now,
66 kVideoRenderDelay, 66 kVideoRenderDelay,
67 rtp_timestamp, 67 rtp_timestamp,
68 i, 68 i,
69 base::TimeDelta::FromMilliseconds(i * delay_base_ms)); 69 base::TimeDelta::FromMilliseconds(i * delay_base_ms));
70 testing_clock_->Advance(base::TimeDelta::FromMilliseconds(30)); 70 testing_clock_->Advance(base::TimeDelta::FromMilliseconds(30));
71 71
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 subscriber_->GetFrameStats(&frame_stats); 164 subscriber_->GetFrameStats(&frame_stats);
165 EXPECT_EQ(1u, frame_stats.size()); 165 EXPECT_EQ(1u, frame_stats.size());
166 166
167 subscriber_->Reset(); 167 subscriber_->Reset();
168 subscriber_->GetFrameStats(&frame_stats); 168 subscriber_->GetFrameStats(&frame_stats);
169 EXPECT_TRUE(frame_stats.empty()); 169 EXPECT_TRUE(frame_stats.empty());
170 } 170 }
171 171
172 } // namespace cast 172 } // namespace cast
173 } // namespace media 173 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/logging/simple_event_subscriber_unittest.cc ('k') | media/cast/video_sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698