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

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 comments from pbos 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 namespace webrtc {
21
22 // Forward declaration of storage class that is automatically generated from
23 // the protobuf file.
24 namespace rtclog {
25 class EventStream;
26 } // namespace rtclog
27
28 class RtcEventLogImpl;
29
30 enum class MediaType;
31
32 class RtcEventLog {
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() {}
38
39 static rtc::scoped_ptr<RtcEventLog> Create();
40
41 // Starts logging for the specified duration to the specified file.
42 // The logging will stop automatically after the specified duration.
43 // If the file already exists it will be overwritten.
44 // 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;
46
47 // Logs configuration information for webrtc::VideoReceiveStream
48 virtual void LogVideoReceiveStreamConfig(
49 const webrtc::VideoReceiveStream::Config& config) = 0;
50
51 // Logs configuration information for webrtc::VideoSendStream
52 virtual void LogVideoSendStreamConfig(
53 const webrtc::VideoSendStream::Config& config) = 0;
54
55 // Logs the header of an incoming or outgoing RTP packet.
56 virtual void LogRtpHeader(bool incoming,
57 MediaType media_type,
58 const uint8_t* header,
59 size_t header_length,
60 size_t total_length) = 0;
61
62 // Logs an incoming or outgoing RTCP packet.
63 virtual void LogRtcpPacket(bool incoming,
64 MediaType media_type,
65 const uint8_t* packet,
66 size_t length) = 0;
67
68 // Logs a debug event.
69 virtual void LogDebugEvent(DebugEvent event_type) = 0;
70
71 // Reads an RtcEventLog file and returns true when reading was successful.
72 // The result is stored in the given RelEventStream object.
73 static bool ParseRtcEventLog(const std::string& file_name,
74 rtclog::EventStream* result);
75 };
76
77 } // namespace webrtc
78
79 #endif // WEBRTC_VIDEO_RTC_EVENT_LOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698