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

Side by Side Diff: media/cast/net/rtp/rtp_packetizer_unittest.cc

Issue 1515023002: Simplify interface for media/cast: CastTransportSenderImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/net/pacing/paced_sender_unittest.cc ('k') | media/cast/net/udp_transport.h » ('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 "media/cast/net/rtp/rtp_packetizer.h" 5 #include "media/cast/net/rtp/rtp_packetizer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 parser.ParsePacket(&packet->data[0], packet->data.size(), &rtp_header, 73 parser.ParsePacket(&packet->data[0], packet->data.size(), &rtp_header,
74 &payload_data, &payload_size); 74 &payload_data, &payload_size);
75 VerifyRtpHeader(rtp_header); 75 VerifyRtpHeader(rtp_header);
76 ++sequence_number_; 76 ++sequence_number_;
77 ++expected_packet_id_; 77 ++expected_packet_id_;
78 return true; 78 return true;
79 } 79 }
80 80
81 int64_t GetBytesSent() final { return 0; } 81 int64_t GetBytesSent() final { return 0; }
82 82
83 void StartReceiving(
84 const PacketReceiverCallbackWithStatus& packet_receiver) final {}
85
86 void StopReceiving() final {}
87
83 size_t number_of_packets_received() const { return packets_sent_; } 88 size_t number_of_packets_received() const { return packets_sent_; }
84 89
85 void set_expected_number_of_packets(size_t expected_number_of_packets) { 90 void set_expected_number_of_packets(size_t expected_number_of_packets) {
86 expected_number_of_packets_ = expected_number_of_packets; 91 expected_number_of_packets_ = expected_number_of_packets;
87 } 92 }
88 93
89 void set_rtp_timestamp(RtpTimeTicks rtp_timestamp) { 94 void set_rtp_timestamp(RtpTimeTicks rtp_timestamp) {
90 expected_rtp_timestamp_ = rtp_timestamp; 95 expected_rtp_timestamp_ = rtp_timestamp;
91 } 96 }
92 97
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 video_frame_.reference_time = testing_clock_.NowTicks(); 189 video_frame_.reference_time = testing_clock_.NowTicks();
185 rtp_packetizer_->SendFrameAsPackets(video_frame_); 190 rtp_packetizer_->SendFrameAsPackets(video_frame_);
186 RunTasks(33 + 1); 191 RunTasks(33 + 1);
187 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packet_count()); 192 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packet_count());
188 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); 193 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count());
189 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received()); 194 EXPECT_EQ(expected_num_of_packets, transport_->number_of_packets_received());
190 } 195 }
191 196
192 } // namespace cast 197 } // namespace cast
193 } // namespace media 198 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/net/pacing/paced_sender_unittest.cc ('k') | media/cast/net/udp_transport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698