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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 // Forward declaration of storage class that is automatically generated from | 23 // Forward declaration of storage class that is automatically generated from |
24 // the protobuf file. | 24 // the protobuf file. |
25 namespace rtclog { | 25 namespace rtclog { |
26 class EventStream; | 26 class EventStream; |
27 } // namespace rtclog | 27 } // namespace rtclog |
28 | 28 |
29 class RtcEventLogImpl; | 29 class RtcEventLogImpl; |
30 | 30 |
31 enum class MediaType; | 31 enum class MediaType; |
32 | 32 |
| 33 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; |
| 34 |
33 class RtcEventLog { | 35 class RtcEventLog { |
34 public: | 36 public: |
35 virtual ~RtcEventLog() {} | 37 virtual ~RtcEventLog() {} |
36 | 38 |
37 static rtc::scoped_ptr<RtcEventLog> Create(); | 39 static rtc::scoped_ptr<RtcEventLog> Create(); |
38 | 40 |
39 // Sets the time that events are stored in the internal event buffer | 41 // Sets the time that events are stored in the internal event buffer |
40 // before the user calls StartLogging. The default is 10 000 000 us = 10 s | 42 // before the user calls StartLogging. The default is 10 000 000 us = 10 s |
41 virtual void SetBufferDuration(int64_t buffer_duration_us) = 0; | 43 virtual void SetBufferDuration(int64_t buffer_duration_us) = 0; |
42 | 44 |
(...skipping 13 matching lines...) Expand all Loading... |
56 // Logs configuration information for webrtc::VideoReceiveStream | 58 // Logs configuration information for webrtc::VideoReceiveStream |
57 virtual void LogVideoReceiveStreamConfig( | 59 virtual void LogVideoReceiveStreamConfig( |
58 const webrtc::VideoReceiveStream::Config& config) = 0; | 60 const webrtc::VideoReceiveStream::Config& config) = 0; |
59 | 61 |
60 // Logs configuration information for webrtc::VideoSendStream | 62 // Logs configuration information for webrtc::VideoSendStream |
61 virtual void LogVideoSendStreamConfig( | 63 virtual void LogVideoSendStreamConfig( |
62 const webrtc::VideoSendStream::Config& config) = 0; | 64 const webrtc::VideoSendStream::Config& config) = 0; |
63 | 65 |
64 // Logs the header of an incoming or outgoing RTP packet. packet_length | 66 // Logs the header of an incoming or outgoing RTP packet. packet_length |
65 // is the total length of the packet, including both header and payload. | 67 // is the total length of the packet, including both header and payload. |
66 virtual void LogRtpHeader(bool incoming, | 68 virtual void LogRtpHeader(PacketDirection direction, |
67 MediaType media_type, | 69 MediaType media_type, |
68 const uint8_t* header, | 70 const uint8_t* header, |
69 size_t packet_length) = 0; | 71 size_t packet_length) = 0; |
70 | 72 |
71 // Logs an incoming or outgoing RTCP packet. | 73 // Logs an incoming or outgoing RTCP packet. |
72 virtual void LogRtcpPacket(bool incoming, | 74 virtual void LogRtcpPacket(PacketDirection direction, |
73 MediaType media_type, | 75 MediaType media_type, |
74 const uint8_t* packet, | 76 const uint8_t* packet, |
75 size_t length) = 0; | 77 size_t length) = 0; |
76 | 78 |
77 // Logs an audio playout event | 79 // Logs an audio playout event |
78 virtual void LogAudioPlayout(uint32_t ssrc) = 0; | 80 virtual void LogAudioPlayout(uint32_t ssrc) = 0; |
79 | 81 |
80 // Logs a bitrate update from the bandwidth estimator based on packet loss. | 82 // Logs a bitrate update from the bandwidth estimator based on packet loss. |
81 virtual void LogBwePacketLossEvent(int32_t bitrate, | 83 virtual void LogBwePacketLossEvent(int32_t bitrate, |
82 uint8_t fraction_loss, | 84 uint8_t fraction_loss, |
83 int32_t total_packets) = 0; | 85 int32_t total_packets) = 0; |
84 | 86 |
85 // Reads an RtcEventLog file and returns true when reading was successful. | 87 // Reads an RtcEventLog file and returns true when reading was successful. |
86 // The result is stored in the given EventStream object. | 88 // The result is stored in the given EventStream object. |
87 static bool ParseRtcEventLog(const std::string& file_name, | 89 static bool ParseRtcEventLog(const std::string& file_name, |
88 rtclog::EventStream* result); | 90 rtclog::EventStream* result); |
89 }; | 91 }; |
90 | 92 |
91 } // namespace webrtc | 93 } // namespace webrtc |
92 | 94 |
93 #endif // WEBRTC_CALL_RTC_EVENT_LOG_H_ | 95 #endif // WEBRTC_CALL_RTC_EVENT_LOG_H_ |
OLD | NEW |