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

Side by Side Diff: webrtc/video/rtc_event_log.h

Issue 1340283002: Added support for logging the SSRC corresponding to AudioPlayout events. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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 13 matching lines...) Expand all
24 namespace rtclog { 24 namespace rtclog {
25 class EventStream; 25 class EventStream;
26 } // namespace rtclog 26 } // namespace rtclog
27 27
28 class RtcEventLogImpl; 28 class RtcEventLogImpl;
29 29
30 enum class MediaType; 30 enum class MediaType;
31 31
32 class RtcEventLog { 32 class RtcEventLog {
33 public: 33 public:
34 // The types of debug events that are currently supported for logging.
35 enum class DebugEvent { kLogStart, kLogEnd, kAudioPlayout };
36
37 virtual ~RtcEventLog() {} 34 virtual ~RtcEventLog() {}
38 35
39 static rtc::scoped_ptr<RtcEventLog> Create(); 36 static rtc::scoped_ptr<RtcEventLog> Create();
40 37
41 // Starts logging for the specified duration to the specified file. 38 // Starts logging for the specified duration to the specified file.
42 // The logging will stop automatically after the specified duration. 39 // The logging will stop automatically after the specified duration.
43 // If the file already exists it will be overwritten. 40 // If the file already exists it will be overwritten.
44 // If the file cannot be opened, the RtcEventLog will not start logging. 41 // If the file cannot be opened, the RtcEventLog will not start logging.
45 virtual void StartLogging(const std::string& file_name, int duration_ms) = 0; 42 virtual void StartLogging(const std::string& file_name, int duration_ms) = 0;
46 43
(...skipping 13 matching lines...) Expand all
60 MediaType media_type, 57 MediaType media_type,
61 const uint8_t* header, 58 const uint8_t* header,
62 size_t packet_length) = 0; 59 size_t packet_length) = 0;
63 60
64 // Logs an incoming or outgoing RTCP packet. 61 // Logs an incoming or outgoing RTCP packet.
65 virtual void LogRtcpPacket(bool incoming, 62 virtual void LogRtcpPacket(bool incoming,
66 MediaType media_type, 63 MediaType media_type,
67 const uint8_t* packet, 64 const uint8_t* packet,
68 size_t length) = 0; 65 size_t length) = 0;
69 66
70 // Logs a debug event. 67 // Log an audio playout event
hlundin-webrtc 2015/09/15 12:30:52 Nit: Logs...
ivoc 2015/09/15 14:55:16 Done.
71 virtual void LogDebugEvent(DebugEvent event_type) = 0; 68 virtual void LogAudioPlayout(uint32_t ssrc) = 0;
terelius 2015/09/15 14:32:29 Since there is no more DebugEvent in the C-interfa
ivoc 2015/09/15 14:55:16 I agree, let's do that in a follow-up CL.
72 69
73 // Reads an RtcEventLog file and returns true when reading was successful. 70 // Reads an RtcEventLog file and returns true when reading was successful.
74 // The result is stored in the given EventStream object. 71 // The result is stored in the given EventStream object.
75 static bool ParseRtcEventLog(const std::string& file_name, 72 static bool ParseRtcEventLog(const std::string& file_name,
76 rtclog::EventStream* result); 73 rtclog::EventStream* result);
77 }; 74 };
78 75
79 } // namespace webrtc 76 } // namespace webrtc
80 77
81 #endif // WEBRTC_VIDEO_RTC_EVENT_LOG_H_ 78 #endif // WEBRTC_VIDEO_RTC_EVENT_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698