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

Side by Side Diff: webrtc/video/call_perf_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/call.cc ('k') | webrtc/video/encoded_frame_callback_adapter.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> 10 #include <algorithm>
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 send_transport_receiver_ = send_transport_receiver; 541 send_transport_receiver_ = send_transport_receiver;
542 test::RtpRtcpObserver::SetReceivers(this, receive_transport_receiver); 542 test::RtpRtcpObserver::SetReceivers(this, receive_transport_receiver);
543 } 543 }
544 544
545 DeliveryStatus DeliverPacket(MediaType media_type, 545 DeliveryStatus DeliverPacket(MediaType media_type,
546 const uint8_t* packet, 546 const uint8_t* packet,
547 size_t length, 547 size_t length,
548 const PacketTime& packet_time) override { 548 const PacketTime& packet_time) override {
549 VideoSendStream::Stats stats = send_stream_->GetStats(); 549 VideoSendStream::Stats stats = send_stream_->GetStats();
550 if (stats.substreams.size() > 0) { 550 if (stats.substreams.size() > 0) {
551 DCHECK_EQ(1u, stats.substreams.size()); 551 RTC_DCHECK_EQ(1u, stats.substreams.size());
552 int bitrate_kbps = 552 int bitrate_kbps =
553 stats.substreams.begin()->second.total_bitrate_bps / 1000; 553 stats.substreams.begin()->second.total_bitrate_bps / 1000;
554 if (bitrate_kbps > 0) { 554 if (bitrate_kbps > 0) {
555 test::PrintResult( 555 test::PrintResult(
556 "bitrate_stats_", 556 "bitrate_stats_",
557 (pad_to_min_bitrate_ ? "min_transmit_bitrate" 557 (pad_to_min_bitrate_ ? "min_transmit_bitrate"
558 : "without_min_transmit_bitrate"), 558 : "without_min_transmit_bitrate"),
559 "bitrate_kbps", 559 "bitrate_kbps",
560 static_cast<size_t>(bitrate_kbps), 560 static_cast<size_t>(bitrate_kbps),
561 "kbps", 561 "kbps",
(...skipping 26 matching lines...) Expand all
588 const std::vector<VideoReceiveStream*>& receive_streams) override { 588 const std::vector<VideoReceiveStream*>& receive_streams) override {
589 send_stream_ = send_stream; 589 send_stream_ = send_stream;
590 } 590 }
591 591
592 void ModifyConfigs(VideoSendStream::Config* send_config, 592 void ModifyConfigs(VideoSendStream::Config* send_config,
593 std::vector<VideoReceiveStream::Config>* receive_configs, 593 std::vector<VideoReceiveStream::Config>* receive_configs,
594 VideoEncoderConfig* encoder_config) override { 594 VideoEncoderConfig* encoder_config) override {
595 if (pad_to_min_bitrate_) { 595 if (pad_to_min_bitrate_) {
596 encoder_config->min_transmit_bitrate_bps = kMinTransmitBitrateBps; 596 encoder_config->min_transmit_bitrate_bps = kMinTransmitBitrateBps;
597 } else { 597 } else {
598 DCHECK_EQ(0, encoder_config->min_transmit_bitrate_bps); 598 RTC_DCHECK_EQ(0, encoder_config->min_transmit_bitrate_bps);
599 } 599 }
600 } 600 }
601 601
602 void PerformTest() override { 602 void PerformTest() override {
603 EXPECT_EQ(kEventSignaled, Wait()) 603 EXPECT_EQ(kEventSignaled, Wait())
604 << "Timeout while waiting for send-bitrate stats."; 604 << "Timeout while waiting for send-bitrate stats.";
605 } 605 }
606 606
607 VideoSendStream* send_stream_; 607 VideoSendStream* send_stream_;
608 PacketReceiver* send_transport_receiver_; 608 PacketReceiver* send_transport_receiver_;
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 int encoder_inits_; 703 int encoder_inits_;
704 uint32_t last_set_bitrate_; 704 uint32_t last_set_bitrate_;
705 VideoSendStream* send_stream_; 705 VideoSendStream* send_stream_;
706 VideoEncoderConfig encoder_config_; 706 VideoEncoderConfig encoder_config_;
707 } test; 707 } test;
708 708
709 RunBaseTest(&test); 709 RunBaseTest(&test);
710 } 710 }
711 711
712 } // namespace webrtc 712 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/call.cc ('k') | webrtc/video/encoded_frame_callback_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698