| OLD | NEW |
| 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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "media/cast/rtp_common/rtp_defines.h" | |
| 9 #include "media/cast/rtp_receiver/rtp_parser/rtp_parser.h" | 8 #include "media/cast/rtp_receiver/rtp_parser/rtp_parser.h" |
| 10 #include "media/cast/rtp_receiver/rtp_parser/test/rtp_packet_builder.h" | 9 #include "media/cast/rtp_receiver/rtp_parser/test/rtp_packet_builder.h" |
| 11 #include "media/cast/rtp_receiver/rtp_receiver.h" | 10 #include "media/cast/rtp_receiver/rtp_receiver.h" |
| 11 #include "media/cast/rtp_receiver/rtp_receiver_defines.h" |
| 12 | 12 |
| 13 namespace media { | 13 namespace media { |
| 14 namespace cast { | 14 namespace cast { |
| 15 | 15 |
| 16 static const size_t kPacketLength = 1500; | 16 static const size_t kPacketLength = 1500; |
| 17 static const int kTestPayloadType = 127; | 17 static const int kTestPayloadType = 127; |
| 18 static const uint32 kTestSsrc = 1234; | 18 static const uint32 kTestSsrc = 1234; |
| 19 static const uint32 kTestTimestamp = 111111; | 19 static const uint32 kTestTimestamp = 111111; |
| 20 static const uint16 kTestSeqNum = 4321; | 20 static const uint16 kTestSeqNum = 4321; |
| 21 static const uint8 kRefFrameId = 17; | 21 static const uint8 kRefFrameId = 17; |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 uint8 packet[kPacketLength]; | 189 uint8 packet[kPacketLength]; |
| 190 packet_builder_.BuildHeader(packet, kPacketLength); | 190 packet_builder_.BuildHeader(packet, kPacketLength); |
| 191 // Parse packet as is. | 191 // Parse packet as is. |
| 192 RtpCastHeader rtp_header; | 192 RtpCastHeader rtp_header; |
| 193 rtp_data_->SetExpectedHeader(cast_header_); | 193 rtp_data_->SetExpectedHeader(cast_header_); |
| 194 EXPECT_TRUE(rtp_parser_->ParsePacket(packet, kPacketLength, &rtp_header)); | 194 EXPECT_TRUE(rtp_parser_->ParsePacket(packet, kPacketLength, &rtp_header)); |
| 195 } | 195 } |
| 196 | 196 |
| 197 } // namespace cast | 197 } // namespace cast |
| 198 } // namespace media | 198 } // namespace media |
| OLD | NEW |