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

Side by Side Diff: trunk/src/media/cast/rtp_sender/rtp_packetizer/rtp_packetizer_unittest.cc

Issue 25546003: Revert 226264 "Be able to build cast_unittest and related target..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/rtp_sender/rtp_packetizer/rtp_packetizer.h" 5 #include "media/cast/rtp_sender/rtp_packetizer/rtp_packetizer.h"
6 6
7 #include <gtest/gtest.h> 7 #include <gtest/gtest.h>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/cast/cast_config.h" 10 #include "media/cast/cast_config.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 packet_storage_(kMaxPacketStorageTimeMs) { 95 packet_storage_(kMaxPacketStorageTimeMs) {
96 config_.sequence_number = kSeqNum; 96 config_.sequence_number = kSeqNum;
97 config_.ssrc = kSsrc; 97 config_.ssrc = kSsrc;
98 config_.payload_type = kPayload; 98 config_.payload_type = kPayload;
99 config_.max_payload_length = kMaxPacketLength; 99 config_.max_payload_length = kMaxPacketLength;
100 transport_.reset(new TestRtpPacketTransport(config_)); 100 transport_.reset(new TestRtpPacketTransport(config_));
101 rtp_packetizer_.reset( 101 rtp_packetizer_.reset(
102 new RtpPacketizer(transport_.get(), &packet_storage_, config_)); 102 new RtpPacketizer(transport_.get(), &packet_storage_, config_));
103 } 103 }
104 104
105 virtual ~RtpPacketizerTest() {} 105 ~RtpPacketizerTest() {}
106 106
107 virtual void SetUp() { 107 void SetUp() {
108 video_frame_.key_frame = false; 108 video_frame_.key_frame = false;
109 video_frame_.frame_id = kFrameId; 109 video_frame_.frame_id = kFrameId;
110 video_frame_.last_referenced_frame_id = kFrameId - 1; 110 video_frame_.last_referenced_frame_id = kFrameId - 1;
111 video_frame_.data.assign(kFrameSize, 123); 111 video_frame_.data.assign(kFrameSize, 123);
112 } 112 }
113 113
114 scoped_ptr<RtpPacketizer> rtp_packetizer_; 114 scoped_ptr<RtpPacketizer> rtp_packetizer_;
115 RtpPacketizerConfig config_; 115 RtpPacketizerConfig config_;
116 scoped_ptr<TestRtpPacketTransport> transport_; 116 scoped_ptr<TestRtpPacketTransport> transport_;
117 EncodedVideoFrame video_frame_; 117 EncodedVideoFrame video_frame_;
(...skipping 18 matching lines...) Expand all
136 136
137 base::TimeTicks time; 137 base::TimeTicks time;
138 time += base::TimeDelta::FromMilliseconds(kTimestampMs); 138 time += base::TimeDelta::FromMilliseconds(kTimestampMs);
139 rtp_packetizer_->IncomingEncodedVideoFrame(&video_frame_, time); 139 rtp_packetizer_->IncomingEncodedVideoFrame(&video_frame_, time);
140 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packets_count()); 140 EXPECT_EQ(expected_num_of_packets, rtp_packetizer_->send_packets_count());
141 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count()); 141 EXPECT_EQ(kFrameSize, rtp_packetizer_->send_octet_count());
142 } 142 }
143 143
144 } // namespace cast 144 } // namespace cast
145 } // namespace media 145 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698