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

Side by Side Diff: webrtc/modules/audio_coding/neteq/tools/rtc_event_log_source.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
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 if (!debug_event.has_type() || 56 if (!debug_event.has_type() ||
57 debug_event.type() != rtclog::DebugEvent::AUDIO_PLAYOUT) 57 debug_event.type() != rtclog::DebugEvent::AUDIO_PLAYOUT)
58 return nullptr; 58 return nullptr;
59 return &debug_event; 59 return &debug_event;
60 } 60 }
61 61
62 } // namespace 62 } // namespace
63 63
64 RtcEventLogSource* RtcEventLogSource::Create(const std::string& file_name) { 64 RtcEventLogSource* RtcEventLogSource::Create(const std::string& file_name) {
65 RtcEventLogSource* source = new RtcEventLogSource(); 65 RtcEventLogSource* source = new RtcEventLogSource();
66 CHECK(source->OpenFile(file_name)); 66 RTC_CHECK(source->OpenFile(file_name));
67 return source; 67 return source;
68 } 68 }
69 69
70 RtcEventLogSource::~RtcEventLogSource() {} 70 RtcEventLogSource::~RtcEventLogSource() {}
71 71
72 bool RtcEventLogSource::RegisterRtpHeaderExtension(RTPExtensionType type, 72 bool RtcEventLogSource::RegisterRtpHeaderExtension(RTPExtensionType type,
73 uint8_t id) { 73 uint8_t id) {
74 CHECK(parser_.get()); 74 RTC_CHECK(parser_.get());
75 return parser_->RegisterRtpHeaderExtension(type, id); 75 return parser_->RegisterRtpHeaderExtension(type, id);
76 } 76 }
77 77
78 Packet* RtcEventLogSource::NextPacket() { 78 Packet* RtcEventLogSource::NextPacket() {
79 while (rtp_packet_index_ < event_log_->stream_size()) { 79 while (rtp_packet_index_ < event_log_->stream_size()) {
80 const rtclog::Event& event = event_log_->stream(rtp_packet_index_); 80 const rtclog::Event& event = event_log_->stream(rtp_packet_index_);
81 const rtclog::RtpPacket* rtp_packet = GetRtpPacket(event); 81 const rtclog::RtpPacket* rtp_packet = GetRtpPacket(event);
82 rtp_packet_index_++; 82 rtp_packet_index_++;
83 if (rtp_packet) { 83 if (rtp_packet) {
84 uint8_t* packet_header = new uint8_t[rtp_packet->header().size()]; 84 uint8_t* packet_header = new uint8_t[rtp_packet->header().size()];
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 RtcEventLogSource::RtcEventLogSource() 118 RtcEventLogSource::RtcEventLogSource()
119 : PacketSource(), parser_(RtpHeaderParser::Create()) {} 119 : PacketSource(), parser_(RtpHeaderParser::Create()) {}
120 120
121 bool RtcEventLogSource::OpenFile(const std::string& file_name) { 121 bool RtcEventLogSource::OpenFile(const std::string& file_name) {
122 event_log_.reset(new rtclog::EventStream()); 122 event_log_.reset(new rtclog::EventStream());
123 return RtcEventLog::ParseRtcEventLog(file_name, event_log_.get()); 123 return RtcEventLog::ParseRtcEventLog(file_name, event_log_.get());
124 } 124 }
125 125
126 } // namespace test 126 } // namespace test
127 } // namespace webrtc 127 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698