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

Side by Side Diff: webrtc/call/rtc_event_log.cc

Issue 1984983002: Remove use of RtpHeaderExtension and clean up (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed nit Created 4 years, 6 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 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 for (const auto& kv : config.rtp.rtx) { 261 for (const auto& kv : config.rtp.rtx) {
262 rtclog::RtxMap* rtx = receiver_config->add_rtx_map(); 262 rtclog::RtxMap* rtx = receiver_config->add_rtx_map();
263 rtx->set_payload_type(kv.first); 263 rtx->set_payload_type(kv.first);
264 rtx->mutable_config()->set_rtx_ssrc(kv.second.ssrc); 264 rtx->mutable_config()->set_rtx_ssrc(kv.second.ssrc);
265 rtx->mutable_config()->set_rtx_payload_type(kv.second.payload_type); 265 rtx->mutable_config()->set_rtx_payload_type(kv.second.payload_type);
266 } 266 }
267 267
268 for (const auto& e : config.rtp.extensions) { 268 for (const auto& e : config.rtp.extensions) {
269 rtclog::RtpHeaderExtension* extension = 269 rtclog::RtpHeaderExtension* extension =
270 receiver_config->add_header_extensions(); 270 receiver_config->add_header_extensions();
271 extension->set_name(e.name); 271 extension->set_name(e.uri);
272 extension->set_id(e.id); 272 extension->set_id(e.id);
273 } 273 }
274 274
275 for (const auto& d : config.decoders) { 275 for (const auto& d : config.decoders) {
276 rtclog::DecoderConfig* decoder = receiver_config->add_decoders(); 276 rtclog::DecoderConfig* decoder = receiver_config->add_decoders();
277 decoder->set_name(d.payload_name); 277 decoder->set_name(d.payload_name);
278 decoder->set_payload_type(d.payload_type); 278 decoder->set_payload_type(d.payload_type);
279 } 279 }
280 if (!event_queue_.Insert(&event)) { 280 if (!event_queue_.Insert(&event)) {
281 LOG(LS_WARNING) << "Config queue full. Not logging config event."; 281 LOG(LS_WARNING) << "Config queue full. Not logging config event.";
282 } 282 }
283 } 283 }
284 284
285 void RtcEventLogImpl::LogVideoSendStreamConfig( 285 void RtcEventLogImpl::LogVideoSendStreamConfig(
286 const VideoSendStream::Config& config) { 286 const VideoSendStream::Config& config) {
287 std::unique_ptr<rtclog::Event> event(new rtclog::Event()); 287 std::unique_ptr<rtclog::Event> event(new rtclog::Event());
288 event->set_timestamp_us(clock_->TimeInMicroseconds()); 288 event->set_timestamp_us(clock_->TimeInMicroseconds());
289 event->set_type(rtclog::Event::VIDEO_SENDER_CONFIG_EVENT); 289 event->set_type(rtclog::Event::VIDEO_SENDER_CONFIG_EVENT);
290 290
291 rtclog::VideoSendConfig* sender_config = event->mutable_video_sender_config(); 291 rtclog::VideoSendConfig* sender_config = event->mutable_video_sender_config();
292 292
293 for (const auto& ssrc : config.rtp.ssrcs) { 293 for (const auto& ssrc : config.rtp.ssrcs) {
294 sender_config->add_ssrcs(ssrc); 294 sender_config->add_ssrcs(ssrc);
295 } 295 }
296 296
297 for (const auto& e : config.rtp.extensions) { 297 for (const auto& e : config.rtp.extensions) {
298 rtclog::RtpHeaderExtension* extension = 298 rtclog::RtpHeaderExtension* extension =
299 sender_config->add_header_extensions(); 299 sender_config->add_header_extensions();
300 extension->set_name(e.name); 300 extension->set_name(e.uri);
301 extension->set_id(e.id); 301 extension->set_id(e.id);
302 } 302 }
303 303
304 for (const auto& rtx_ssrc : config.rtp.rtx.ssrcs) { 304 for (const auto& rtx_ssrc : config.rtp.rtx.ssrcs) {
305 sender_config->add_rtx_ssrcs(rtx_ssrc); 305 sender_config->add_rtx_ssrcs(rtx_ssrc);
306 } 306 }
307 sender_config->set_rtx_payload_type(config.rtp.rtx.payload_type); 307 sender_config->set_rtx_payload_type(config.rtp.rtx.payload_type);
308 308
309 rtclog::EncoderConfig* encoder = sender_config->mutable_encoder(); 309 rtclog::EncoderConfig* encoder = sender_config->mutable_encoder();
310 encoder->set_name(config.encoder_settings.payload_name); 310 encoder->set_name(config.encoder_settings.payload_name);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 // RtcEventLog member functions. 453 // RtcEventLog member functions.
454 std::unique_ptr<RtcEventLog> RtcEventLog::Create(const Clock* clock) { 454 std::unique_ptr<RtcEventLog> RtcEventLog::Create(const Clock* clock) {
455 #ifdef ENABLE_RTC_EVENT_LOG 455 #ifdef ENABLE_RTC_EVENT_LOG
456 return std::unique_ptr<RtcEventLog>(new RtcEventLogImpl(clock)); 456 return std::unique_ptr<RtcEventLog>(new RtcEventLogImpl(clock));
457 #else 457 #else
458 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); 458 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl());
459 #endif // ENABLE_RTC_EVENT_LOG 459 #endif // ENABLE_RTC_EVENT_LOG
460 } 460 }
461 461
462 } // namespace webrtc 462 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698