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

Side by Side Diff: webrtc/video/video_send_stream_tests.cc

Issue 1335923002: Add RTC_ prefix to (D)CHECKs and related macros. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 5 years, 3 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 | « webrtc/video/video_send_stream.cc ('k') | webrtc/video_engine/encoder_state_feedback.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 test_generic_packetization_(test_generic_packetization), 504 test_generic_packetization_(test_generic_packetization),
505 use_fec_(use_fec), 505 use_fec_(use_fec),
506 packet_count_(0), 506 packet_count_(0),
507 accumulated_size_(0), 507 accumulated_size_(0),
508 accumulated_payload_(0), 508 accumulated_payload_(0),
509 fec_packet_received_(false), 509 fec_packet_received_(false),
510 current_size_rtp_(start_size), 510 current_size_rtp_(start_size),
511 current_size_frame_(static_cast<int32_t>(start_size)) { 511 current_size_frame_(static_cast<int32_t>(start_size)) {
512 // Fragmentation required, this test doesn't make sense without it. 512 // Fragmentation required, this test doesn't make sense without it.
513 encoder_.SetFrameSize(start_size); 513 encoder_.SetFrameSize(start_size);
514 DCHECK_GT(stop_size, max_packet_size); 514 RTC_DCHECK_GT(stop_size, max_packet_size);
515 transport_adapter_.Enable(); 515 transport_adapter_.Enable();
516 } 516 }
517 517
518 private: 518 private:
519 Action OnSendRtp(const uint8_t* packet, size_t size) override { 519 Action OnSendRtp(const uint8_t* packet, size_t size) override {
520 size_t length = size; 520 size_t length = size;
521 RTPHeader header; 521 RTPHeader header;
522 EXPECT_TRUE(parser_->Parse(packet, length, &header)); 522 EXPECT_TRUE(parser_->Parse(packet, length, &header));
523 523
524 EXPECT_LE(length, max_packet_size_); 524 EXPECT_LE(length, max_packet_size_);
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 size_t length, 962 size_t length,
963 const PacketTime& packet_time) override { 963 const PacketTime& packet_time) override {
964 EXPECT_TRUE(media_type == MediaType::ANY || 964 EXPECT_TRUE(media_type == MediaType::ANY ||
965 media_type == MediaType::VIDEO); 965 media_type == MediaType::VIDEO);
966 if (RtpHeaderParser::IsRtcp(packet, length)) 966 if (RtpHeaderParser::IsRtcp(packet, length))
967 return DELIVERY_OK; 967 return DELIVERY_OK;
968 968
969 RTPHeader header; 969 RTPHeader header;
970 if (!parser_->Parse(packet, length, &header)) 970 if (!parser_->Parse(packet, length, &header))
971 return DELIVERY_PACKET_ERROR; 971 return DELIVERY_PACKET_ERROR;
972 DCHECK(stream_ != nullptr); 972 RTC_DCHECK(stream_ != nullptr);
973 VideoSendStream::Stats stats = stream_->GetStats(); 973 VideoSendStream::Stats stats = stream_->GetStats();
974 if (!stats.substreams.empty()) { 974 if (!stats.substreams.empty()) {
975 EXPECT_EQ(1u, stats.substreams.size()); 975 EXPECT_EQ(1u, stats.substreams.size());
976 int total_bitrate_bps = 976 int total_bitrate_bps =
977 stats.substreams.begin()->second.total_bitrate_bps; 977 stats.substreams.begin()->second.total_bitrate_bps;
978 test::PrintResult("bitrate_stats_", 978 test::PrintResult("bitrate_stats_",
979 "min_transmit_bitrate_low_remb", 979 "min_transmit_bitrate_low_remb",
980 "bitrate_bps", 980 "bitrate_bps",
981 static_cast<size_t>(total_bitrate_bps), 981 static_cast<size_t>(total_bitrate_bps),
982 "bps", 982 "bps",
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
1747 uint8_t buffer[16] = {0}; 1747 uint8_t buffer[16] = {0};
1748 EncodedImage encoded(buffer, sizeof(buffer), sizeof(buffer)); 1748 EncodedImage encoded(buffer, sizeof(buffer), sizeof(buffer));
1749 encoded._timeStamp = input_image.timestamp(); 1749 encoded._timeStamp = input_image.timestamp();
1750 encoded.capture_time_ms_ = input_image.render_time_ms(); 1750 encoded.capture_time_ms_ = input_image.render_time_ms();
1751 1751
1752 for (size_t i = 0; i < kNumStreams; ++i) { 1752 for (size_t i = 0; i < kNumStreams; ++i) {
1753 specifics.codecSpecific.generic.simulcast_idx = static_cast<uint8_t>(i); 1753 specifics.codecSpecific.generic.simulcast_idx = static_cast<uint8_t>(i);
1754 encoded._frameType = (*frame_types)[i]; 1754 encoded._frameType = (*frame_types)[i];
1755 encoded._encodedWidth = kEncodedResolution[i].width; 1755 encoded._encodedWidth = kEncodedResolution[i].width;
1756 encoded._encodedHeight = kEncodedResolution[i].height; 1756 encoded._encodedHeight = kEncodedResolution[i].height;
1757 DCHECK(callback_ != nullptr); 1757 RTC_DCHECK(callback_ != nullptr);
1758 if (callback_->Encoded(encoded, &specifics, nullptr) != 0) 1758 if (callback_->Encoded(encoded, &specifics, nullptr) != 0)
1759 return -1; 1759 return -1;
1760 } 1760 }
1761 1761
1762 observation_complete_->Set(); 1762 observation_complete_->Set();
1763 return 0; 1763 return 0;
1764 } 1764 }
1765 void ModifyConfigs(VideoSendStream::Config* send_config, 1765 void ModifyConfigs(VideoSendStream::Config* send_config,
1766 std::vector<VideoReceiveStream::Config>* receive_configs, 1766 std::vector<VideoReceiveStream::Config>* receive_configs,
1767 VideoEncoderConfig* encoder_config) override { 1767 VideoEncoderConfig* encoder_config) override {
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 EXPECT_TRUE(vp9videoHeader->flexible_mode); 1891 EXPECT_TRUE(vp9videoHeader->flexible_mode);
1892 observation_complete_->Set(); 1892 observation_complete_->Set();
1893 } 1893 }
1894 1894
1895 } test; 1895 } test;
1896 1896
1897 RunBaseTest(&test); 1897 RunBaseTest(&test);
1898 } 1898 }
1899 1899
1900 } // namespace webrtc 1900 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/video_send_stream.cc ('k') | webrtc/video_engine/encoder_state_feedback.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698