| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 const uint8_t* packet, | 29 const uint8_t* packet, |
| 30 size_t length); | 30 size_t length); |
| 31 | 31 |
| 32 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; | 32 rtc::scoped_ptr<RtpHeaderParser> rtp_header_parser_; |
| 33 }; | 33 }; |
| 34 | 34 |
| 35 void PacketInjectionTest::InjectIncorrectPacket(CodecType codec_type, | 35 void PacketInjectionTest::InjectIncorrectPacket(CodecType codec_type, |
| 36 uint8_t payload_type, | 36 uint8_t payload_type, |
| 37 const uint8_t* packet, | 37 const uint8_t* packet, |
| 38 size_t length) { | 38 size_t length) { |
| 39 test::NullTransport transport; | 39 CreateSenderCall(Call::Config()); |
| 40 CreateSenderCall(Call::Config(&transport)); | 40 CreateReceiverCall(Call::Config()); |
| 41 CreateReceiverCall(Call::Config(&transport)); | |
| 42 | 41 |
| 43 CreateSendConfig(1); | 42 test::NullTransport null_transport; |
| 44 CreateMatchingReceiveConfigs(); | 43 CreateSendConfig(1, &null_transport); |
| 44 CreateMatchingReceiveConfigs(&null_transport); |
| 45 receive_configs_[0].decoders[0].payload_type = payload_type; | 45 receive_configs_[0].decoders[0].payload_type = payload_type; |
| 46 switch (codec_type) { | 46 switch (codec_type) { |
| 47 case CodecType::kVp8: | 47 case CodecType::kVp8: |
| 48 receive_configs_[0].decoders[0].payload_name = "VP8"; | 48 receive_configs_[0].decoders[0].payload_name = "VP8"; |
| 49 break; | 49 break; |
| 50 case CodecType::kH264: | 50 case CodecType::kH264: |
| 51 receive_configs_[0].decoders[0].payload_name = "H264"; | 51 receive_configs_[0].decoders[0].payload_name = "H264"; |
| 52 break; | 52 break; |
| 53 } | 53 } |
| 54 CreateStreams(); | 54 CreateStreams(); |
| (...skipping 27 matching lines...) Expand all Loading... |
| 82 0xED, | 82 0xED, |
| 83 0x58, | 83 0x58, |
| 84 0xCB, | 84 0xCB, |
| 85 0xED, | 85 0xED, |
| 86 0xDF}; | 86 0xDF}; |
| 87 | 87 |
| 88 InjectIncorrectPacket(CodecType::kH264, 101, kPacket, sizeof(kPacket)); | 88 InjectIncorrectPacket(CodecType::kH264, 101, kPacket, sizeof(kPacket)); |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace webrtc | 91 } // namespace webrtc |
| OLD | NEW |