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

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

Issue 2851303007: Replace AudioReceiveStream::Config with rtclog::StreamConfig. (Closed)
Patch Set: Rebased. Created 3 years, 7 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 RtcEventLogImpl(); 57 RtcEventLogImpl();
58 ~RtcEventLogImpl() override; 58 ~RtcEventLogImpl() override;
59 59
60 bool StartLogging(const std::string& file_name, 60 bool StartLogging(const std::string& file_name,
61 int64_t max_size_bytes) override; 61 int64_t max_size_bytes) override;
62 bool StartLogging(rtc::PlatformFile platform_file, 62 bool StartLogging(rtc::PlatformFile platform_file,
63 int64_t max_size_bytes) override; 63 int64_t max_size_bytes) override;
64 void StopLogging() override; 64 void StopLogging() override;
65 void LogVideoReceiveStreamConfig(const rtclog::StreamConfig& config) override; 65 void LogVideoReceiveStreamConfig(const rtclog::StreamConfig& config) override;
66 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override; 66 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override;
67 void LogAudioReceiveStreamConfig( 67 void LogAudioReceiveStreamConfig(const rtclog::StreamConfig& config) override;
68 const AudioReceiveStream::Config& config) override;
69 void LogAudioSendStreamConfig(const AudioSendStream::Config& config) override; 68 void LogAudioSendStreamConfig(const AudioSendStream::Config& config) override;
70 void LogRtpHeader(PacketDirection direction, 69 void LogRtpHeader(PacketDirection direction,
71 MediaType media_type, 70 MediaType media_type,
72 const uint8_t* header, 71 const uint8_t* header,
73 size_t packet_length) override; 72 size_t packet_length) override;
74 void LogRtpHeader(PacketDirection direction, 73 void LogRtpHeader(PacketDirection direction,
75 MediaType media_type, 74 MediaType media_type,
76 const uint8_t* header, 75 const uint8_t* header,
77 size_t packet_length, 76 size_t packet_length,
78 int probe_cluster_id) override; 77 int probe_cluster_id) override;
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 LOG(WARNING) << "LogVideoSendStreamConfig currently only supports one " 343 LOG(WARNING) << "LogVideoSendStreamConfig currently only supports one "
345 << "codec. Logging codec :" << codec.payload_name; 344 << "codec. Logging codec :" << codec.payload_name;
346 break; 345 break;
347 } 346 }
348 } 347 }
349 348
350 StoreEvent(&event); 349 StoreEvent(&event);
351 } 350 }
352 351
353 void RtcEventLogImpl::LogAudioReceiveStreamConfig( 352 void RtcEventLogImpl::LogAudioReceiveStreamConfig(
354 const AudioReceiveStream::Config& config) { 353 const rtclog::StreamConfig& config) {
355 std::unique_ptr<rtclog::Event> event(new rtclog::Event()); 354 std::unique_ptr<rtclog::Event> event(new rtclog::Event());
356 event->set_timestamp_us(rtc::TimeMicros()); 355 event->set_timestamp_us(rtc::TimeMicros());
357 event->set_type(rtclog::Event::AUDIO_RECEIVER_CONFIG_EVENT); 356 event->set_type(rtclog::Event::AUDIO_RECEIVER_CONFIG_EVENT);
358 357
359 rtclog::AudioReceiveConfig* receiver_config = 358 rtclog::AudioReceiveConfig* receiver_config =
360 event->mutable_audio_receiver_config(); 359 event->mutable_audio_receiver_config();
361 receiver_config->set_remote_ssrc(config.rtp.remote_ssrc); 360 receiver_config->set_remote_ssrc(config.remote_ssrc);
362 receiver_config->set_local_ssrc(config.rtp.local_ssrc); 361 receiver_config->set_local_ssrc(config.local_ssrc);
363 362
364 for (const auto& e : config.rtp.extensions) { 363 for (const auto& e : config.rtp_extensions) {
365 rtclog::RtpHeaderExtension* extension = 364 rtclog::RtpHeaderExtension* extension =
366 receiver_config->add_header_extensions(); 365 receiver_config->add_header_extensions();
367 extension->set_name(e.uri); 366 extension->set_name(e.uri);
368 extension->set_id(e.id); 367 extension->set_id(e.id);
369 } 368 }
370 StoreEvent(&event); 369 StoreEvent(&event);
371 } 370 }
372 371
373 void RtcEventLogImpl::LogAudioSendStreamConfig( 372 void RtcEventLogImpl::LogAudioSendStreamConfig(
374 const AudioSendStream::Config& config) { 373 const AudioSendStream::Config& config) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 #else 621 #else
623 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); 622 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl());
624 #endif // ENABLE_RTC_EVENT_LOG 623 #endif // ENABLE_RTC_EVENT_LOG
625 } 624 }
626 625
627 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { 626 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() {
628 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); 627 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl());
629 } 628 }
630 629
631 } // namespace webrtc 630 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log.h ('k') | webrtc/logging/rtc_event_log/rtc_event_log2text.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698