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

Side by Side Diff: media/cast/receiver/frame_receiver_unittest.cc

Issue 916973003: Rename the members of FrameReceiverConfig (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « media/cast/receiver/frame_receiver.cc ('k') | media/cast/test/cast_benchmarks.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <deque> 5 #include <deque>
6 #include <utility> 6 #include <utility>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 void FeedLipSyncInfoIntoReceiver() { 120 void FeedLipSyncInfoIntoReceiver() {
121 const base::TimeTicks now = testing_clock_->NowTicks(); 121 const base::TimeTicks now = testing_clock_->NowTicks();
122 const int64 rtp_timestamp = (now - start_time_) * 122 const int64 rtp_timestamp = (now - start_time_) *
123 config_.rtp_timebase / base::TimeDelta::FromSeconds(1); 123 config_.rtp_timebase / base::TimeDelta::FromSeconds(1);
124 CHECK_LE(0, rtp_timestamp); 124 CHECK_LE(0, rtp_timestamp);
125 uint32 ntp_seconds; 125 uint32 ntp_seconds;
126 uint32 ntp_fraction; 126 uint32 ntp_fraction;
127 ConvertTimeTicksToNtp(now, &ntp_seconds, &ntp_fraction); 127 ConvertTimeTicksToNtp(now, &ntp_seconds, &ntp_fraction);
128 TestRtcpPacketBuilder rtcp_packet; 128 TestRtcpPacketBuilder rtcp_packet;
129 rtcp_packet.AddSrWithNtp(config_.incoming_ssrc, 129 rtcp_packet.AddSrWithNtp(config_.sender_ssrc,
130 ntp_seconds, ntp_fraction, 130 ntp_seconds, ntp_fraction,
131 static_cast<uint32>(rtp_timestamp)); 131 static_cast<uint32>(rtp_timestamp));
132 ASSERT_TRUE(receiver_->ProcessPacket(rtcp_packet.GetPacket().Pass())); 132 ASSERT_TRUE(receiver_->ProcessPacket(rtcp_packet.GetPacket().Pass()));
133 } 133 }
134 134
135 FrameReceiverConfig config_; 135 FrameReceiverConfig config_;
136 std::vector<uint8> payload_; 136 std::vector<uint8> payload_;
137 RtpCastHeader rtp_header_; 137 RtpCastHeader rtp_header_;
138 base::SimpleTestTickClock* testing_clock_; // Owned by CastEnvironment. 138 base::SimpleTestTickClock* testing_clock_; // Owned by CastEnvironment.
139 base::TimeTicks start_time_; 139 base::TimeTicks start_time_;
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 EXPECT_GE(kFirstFrameId + 3, frame_events[i].frame_id); 411 EXPECT_GE(kFirstFrameId + 3, frame_events[i].frame_id);
412 const int frame_offset = frame_events[i].frame_id - kFirstFrameId; 412 const int frame_offset = frame_events[i].frame_id - kFirstFrameId;
413 EXPECT_EQ(frame_offset * rtp_advance_per_frame, 413 EXPECT_EQ(frame_offset * rtp_advance_per_frame,
414 frame_events[i].rtp_timestamp); 414 frame_events[i].rtp_timestamp);
415 } 415 }
416 cast_environment_->Logging()->RemoveRawEventSubscriber(&event_subscriber); 416 cast_environment_->Logging()->RemoveRawEventSubscriber(&event_subscriber);
417 } 417 }
418 418
419 } // namespace cast 419 } // namespace cast
420 } // namespace media 420 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/receiver/frame_receiver.cc ('k') | media/cast/test/cast_benchmarks.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698