| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 #include <algorithm> // max | 10 #include <algorithm> // max |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 kRtpExtensionVideoContentType, test::kVideoContentTypeExtensionId)); | 311 kRtpExtensionVideoContentType, test::kVideoContentTypeExtensionId)); |
| 312 } | 312 } |
| 313 | 313 |
| 314 Action OnSendRtp(const uint8_t* packet, size_t length) override { | 314 Action OnSendRtp(const uint8_t* packet, size_t length) override { |
| 315 RTPHeader header; | 315 RTPHeader header; |
| 316 EXPECT_TRUE(parser_->Parse(packet, length, &header)); | 316 EXPECT_TRUE(parser_->Parse(packet, length, &header)); |
| 317 // Only the last packet of the frame must have extension. | 317 // Only the last packet of the frame must have extension. |
| 318 if (!header.markerBit) | 318 if (!header.markerBit) |
| 319 return SEND_PACKET; | 319 return SEND_PACKET; |
| 320 EXPECT_TRUE(header.extension.hasVideoContentType); | 320 EXPECT_TRUE(header.extension.hasVideoContentType); |
| 321 EXPECT_EQ(VideoContentType::SCREENSHARE, | 321 EXPECT_TRUE(videocontenttypehelpers::IsScreenshare( |
| 322 header.extension.videoContentType); | 322 header.extension.videoContentType)); |
| 323 observation_complete_.Set(); | 323 observation_complete_.Set(); |
| 324 return SEND_PACKET; | 324 return SEND_PACKET; |
| 325 } | 325 } |
| 326 | 326 |
| 327 void ModifyVideoConfigs( | 327 void ModifyVideoConfigs( |
| 328 VideoSendStream::Config* send_config, | 328 VideoSendStream::Config* send_config, |
| 329 std::vector<VideoReceiveStream::Config>* receive_configs, | 329 std::vector<VideoReceiveStream::Config>* receive_configs, |
| 330 VideoEncoderConfig* encoder_config) override { | 330 VideoEncoderConfig* encoder_config) override { |
| 331 send_config->rtp.extensions.clear(); | 331 send_config->rtp.extensions.clear(); |
| 332 send_config->rtp.extensions.push_back( | 332 send_config->rtp.extensions.push_back( |
| (...skipping 3171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3504 capturer_ = frame_generator_capturer; | 3504 capturer_ = frame_generator_capturer; |
| 3505 } | 3505 } |
| 3506 | 3506 |
| 3507 test::FrameGeneratorCapturer* capturer_ = nullptr; | 3507 test::FrameGeneratorCapturer* capturer_ = nullptr; |
| 3508 } test; | 3508 } test; |
| 3509 | 3509 |
| 3510 RunBaseTest(&test); | 3510 RunBaseTest(&test); |
| 3511 } | 3511 } |
| 3512 | 3512 |
| 3513 } // namespace webrtc | 3513 } // namespace webrtc |
| OLD | NEW |