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

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

Issue 1230973005: Adds logging of configuration information for VideoReceiveStream (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed Ivo's latest comments Created 5 years, 5 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
(Empty)
1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_VIDEO_RTC_EVENT_LOG_H_
12 #define WEBRTC_VIDEO_RTC_EVENT_LOG_H_
13
14 #include <string>
15
16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/video_receive_stream.h"
18 #include "webrtc/video_send_stream.h"
19
20
21 namespace webrtc {
22
23 // Forward declaration of storage class that is automatically generated from
24 // the protobuf file.
25 class RelEventStream;
26
27 class RtcEventLogImpl;
28
29 enum class MediaType;
30
31 class RtcEventLog {
32 public:
33 // The types of debug events that are currently supported for logging.
34 enum class DebugEvent { kLogStart, kLogEnd, kAudioPlayout };
35
36 virtual ~RtcEventLog() {}
37
38 static rtc::scoped_ptr<RtcEventLog> Create();
39
40 // Starts logging for the specified duration to the specified file.
41 // The logging will stop automatically after the specified duration.
42 // If the file already exists it will be overwritten.
43 // If the file cannot be opened, the RtcEventLog will not start logging.
44 virtual void StartLogging(const std::string& file_name, int duration_ms) = 0;
45
46 // Logs configuration information for webrtc::VideoReceiveStream
47 virtual void LogVideoReceiveStreamConfig(
48 const webrtc::VideoReceiveStream::Config& config) = 0;
49
50 // Logs configuration information for webrtc::VideoSendStream
51 virtual void LogVideoSendStreamConfig(
52 const webrtc::VideoSendStream::Config& config) = 0;
53
54 // Logs the header of an incoming or outgoing RTP packet.
55 virtual void LogRtpHeader(bool incoming,
56 MediaType media_type,
57 const uint8_t* header,
58 size_t header_length,
59 size_t total_length) = 0;
60
61 // Logs an incoming or outgoing RTCP packet.
62 virtual void LogRtcpPacket(bool incoming,
63 MediaType media_type,
64 const uint8_t* packet,
65 size_t length) = 0;
66
67 // Logs a debug event, with optional message.
68 virtual void LogDebugEvent(DebugEvent event_type,
69 const std::string& event_message) = 0;
pbos-webrtc 2015/07/22 11:05:27 If these are always used as constants, can you mak
terelius 2015/07/23 15:54:01 Removed message field from protobuf because the me
70 virtual void LogDebugEvent(DebugEvent event_type) = 0;
pbos-webrtc 2015/07/22 11:05:27 Do you need this one?
terelius 2015/07/23 15:54:01 This is now the only function to log debug events.
71
72 // Reads an RtcEventLog file and returns true when reading was successful.
73 // The result is stored in the given RelEventStream object.
74 static bool ParseRtcEventLog(const std::string& file_name,
pbos-webrtc 2015/07/22 11:05:27 consider const char*
terelius 2015/07/23 15:54:01 This is currently used in the unit test where the
75 RelEventStream* result);
76 };
77
78 } // namespace webrtc
79
80 #endif // WEBRTC_VIDEO_RTC_EVENT_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698