OLD | NEW |
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 |
11 #ifndef WEBRTC_VIDEO_RTC_EVENT_LOG_H_ | 11 #ifndef WEBRTC_VIDEO_RTC_EVENT_LOG_H_ |
12 #define WEBRTC_VIDEO_RTC_EVENT_LOG_H_ | 12 #define WEBRTC_VIDEO_RTC_EVENT_LOG_H_ |
13 | 13 |
14 #include <string> | 14 #include <string> |
15 | 15 |
16 #include "webrtc/base/scoped_ptr.h" | 16 #include "webrtc/base/scoped_ptr.h" |
17 #include "webrtc/video_receive_stream.h" | 17 #include "webrtc/video_receive_stream.h" |
18 #include "webrtc/video_send_stream.h" | 18 #include "webrtc/video_send_stream.h" |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 | 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; | 22 enum class MediaType; |
31 | 23 |
32 class RtcEventLog { | 24 class RtcEventLog { |
33 public: | 25 public: |
34 virtual ~RtcEventLog() {} | 26 virtual ~RtcEventLog() {} |
35 | 27 |
36 static rtc::scoped_ptr<RtcEventLog> Create(); | 28 static rtc::scoped_ptr<RtcEventLog> Create(); |
37 | 29 |
38 // Starts logging for the specified duration to the specified file. | 30 // Starts logging for the specified duration to the specified file. |
39 // The logging will stop automatically after the specified duration. | 31 // The logging will stop automatically after the specified duration. |
(...skipping 20 matching lines...) Expand all Loading... |
60 | 52 |
61 // Logs an incoming or outgoing RTCP packet. | 53 // Logs an incoming or outgoing RTCP packet. |
62 virtual void LogRtcpPacket(bool incoming, | 54 virtual void LogRtcpPacket(bool incoming, |
63 MediaType media_type, | 55 MediaType media_type, |
64 const uint8_t* packet, | 56 const uint8_t* packet, |
65 size_t length) = 0; | 57 size_t length) = 0; |
66 | 58 |
67 // Logs an audio playout event | 59 // Logs an audio playout event |
68 virtual void LogAudioPlayout(uint32_t ssrc) = 0; | 60 virtual void LogAudioPlayout(uint32_t ssrc) = 0; |
69 | 61 |
70 // Reads an RtcEventLog file and returns true when reading was successful. | |
71 // The result is stored in the given EventStream object. | |
72 static bool ParseRtcEventLog(const std::string& file_name, | |
73 rtclog::EventStream* result); | |
74 }; | 62 }; |
75 | 63 |
76 } // namespace webrtc | 64 } // namespace webrtc |
77 | 65 |
78 #endif // WEBRTC_VIDEO_RTC_EVENT_LOG_H_ | 66 #endif // WEBRTC_VIDEO_RTC_EVENT_LOG_H_ |
OLD | NEW |