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

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

Issue 3010263002: Events - backup
Patch Set: Compiles Created 3 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/logging/rtc_event_log/rtc_event_log.h ('k') | webrtc/voice_engine/channel.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) 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 friend std::unique_ptr<RtcEventLog> RtcEventLog::Create(); 99 friend std::unique_ptr<RtcEventLog> RtcEventLog::Create();
100 100
101 public: 101 public:
102 ~RtcEventLogImpl() override; 102 ~RtcEventLogImpl() override;
103 103
104 bool StartLogging(const std::string& file_name, 104 bool StartLogging(const std::string& file_name,
105 int64_t max_size_bytes) override; 105 int64_t max_size_bytes) override;
106 bool StartLogging(rtc::PlatformFile platform_file, 106 bool StartLogging(rtc::PlatformFile platform_file,
107 int64_t max_size_bytes) override; 107 int64_t max_size_bytes) override;
108 void StopLogging() override; 108 void StopLogging() override;
109 void LogRtcEvent(std::unique_ptr<RtcEvent> event) override;
109 void LogVideoReceiveStreamConfig(const rtclog::StreamConfig& config) override; 110 void LogVideoReceiveStreamConfig(const rtclog::StreamConfig& config) override;
110 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override; 111 void LogVideoSendStreamConfig(const rtclog::StreamConfig& config) override;
111 void LogAudioReceiveStreamConfig(const rtclog::StreamConfig& config) override; 112 void LogAudioReceiveStreamConfig(const rtclog::StreamConfig& config) override;
112 void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override; 113 void LogAudioSendStreamConfig(const rtclog::StreamConfig& config) override;
113 // TODO(terelius): This can be removed as soon as the interface has been 114 // TODO(terelius): This can be removed as soon as the interface has been
114 // updated. 115 // updated.
115 void LogRtpHeader(PacketDirection direction, 116 void LogRtpHeader(PacketDirection direction,
116 const uint8_t* header, 117 const uint8_t* header,
117 size_t packet_length) override; 118 size_t packet_length) override;
118 // TODO(terelius): This can be made private, non-virtual as soon as the 119 // TODO(terelius): This can be made private, non-virtual as soon as the
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 StopLogFile(stop_time); 321 StopLogFile(stop_time);
321 } 322 }
322 file_finished.Set(); 323 file_finished.Set();
323 }); 324 });
324 325
325 file_finished.Wait(rtc::Event::kForever); 326 file_finished.Wait(rtc::Event::kForever);
326 327
327 LOG(LS_INFO) << "WebRTC event log successfully stopped."; 328 LOG(LS_INFO) << "WebRTC event log successfully stopped.";
328 } 329 }
329 330
331 void RtcEventLogImpl::LogRtcEvent(std::unique_ptr<RtcEvent> event) {}
332
330 void RtcEventLogImpl::LogVideoReceiveStreamConfig( 333 void RtcEventLogImpl::LogVideoReceiveStreamConfig(
331 const rtclog::StreamConfig& config) { 334 const rtclog::StreamConfig& config) {
332 std::unique_ptr<rtclog::Event> event(new rtclog::Event()); 335 std::unique_ptr<rtclog::Event> event(new rtclog::Event());
333 event->set_timestamp_us(rtc::TimeMicros()); 336 event->set_timestamp_us(rtc::TimeMicros());
334 event->set_type(rtclog::Event::VIDEO_RECEIVER_CONFIG_EVENT); 337 event->set_type(rtclog::Event::VIDEO_RECEIVER_CONFIG_EVENT);
335 338
336 rtclog::VideoReceiveConfig* receiver_config = 339 rtclog::VideoReceiveConfig* receiver_config =
337 event->mutable_video_receiver_config(); 340 event->mutable_video_receiver_config();
338 receiver_config->set_remote_ssrc(config.remote_ssrc); 341 receiver_config->set_remote_ssrc(config.remote_ssrc);
339 receiver_config->set_local_ssrc(config.local_ssrc); 342 receiver_config->set_local_ssrc(config.local_ssrc);
(...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 #else 875 #else
873 return CreateNull(); 876 return CreateNull();
874 #endif // ENABLE_RTC_EVENT_LOG 877 #endif // ENABLE_RTC_EVENT_LOG
875 } 878 }
876 879
877 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() { 880 std::unique_ptr<RtcEventLog> RtcEventLog::CreateNull() {
878 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl()); 881 return std::unique_ptr<RtcEventLog>(new RtcEventLogNullImpl());
879 } 882 }
880 883
881 } // namespace webrtc 884 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log.h ('k') | webrtc/voice_engine/channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698