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_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ | 11 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ |
12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ | 12 #define WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 #include <string> | 15 #include <string> |
| 16 #include <vector> |
16 | 17 |
17 #include "webrtc/base/platform_file.h" | 18 #include "webrtc/base/platform_file.h" |
18 #include "webrtc/call/audio_receive_stream.h" | 19 #include "webrtc/call/audio_receive_stream.h" |
19 #include "webrtc/call/audio_send_stream.h" | 20 #include "webrtc/call/audio_send_stream.h" |
20 #include "webrtc/video_receive_stream.h" | 21 #include "webrtc/video_receive_stream.h" |
21 #include "webrtc/video_send_stream.h" | 22 #include "webrtc/video_send_stream.h" |
22 | 23 |
23 namespace webrtc { | 24 namespace webrtc { |
24 | 25 |
25 // Forward declaration of storage class that is automatically generated from | 26 // Forward declaration of storage class that is automatically generated from |
26 // the protobuf file. | 27 // the protobuf file. |
27 namespace rtclog { | 28 namespace rtclog { |
28 class EventStream; | 29 class EventStream; |
| 30 |
| 31 struct StreamConfig { |
| 32 uint32_t local_ssrc = 0; |
| 33 uint32_t remote_ssrc = 0; |
| 34 uint32_t rtx_ssrc = 0; |
| 35 std::string rsid; |
| 36 |
| 37 bool remb = false; |
| 38 std::vector<RtpExtension> rtp_extensions; |
| 39 |
| 40 RtcpMode rtcp_mode = RtcpMode::kReducedSize; |
| 41 |
| 42 struct Codec { |
| 43 Codec(const std::string& payload_name, |
| 44 int payload_type, |
| 45 int rtx_payload_type) |
| 46 : payload_name(payload_name), |
| 47 payload_type(payload_type), |
| 48 rtx_payload_type(rtx_payload_type) {} |
| 49 |
| 50 std::string payload_name; |
| 51 int payload_type; |
| 52 int rtx_payload_type; |
| 53 }; |
| 54 std::vector<Codec> codecs; |
| 55 }; |
| 56 |
29 } // namespace rtclog | 57 } // namespace rtclog |
30 | 58 |
31 class Clock; | 59 class Clock; |
32 class RtcEventLogImpl; | 60 class RtcEventLogImpl; |
33 struct AudioEncoderRuntimeConfig; | 61 struct AudioEncoderRuntimeConfig; |
34 | 62 |
35 enum class MediaType; | 63 enum class MediaType; |
36 enum class BandwidthUsage; | 64 enum class BandwidthUsage; |
37 | 65 |
38 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; | 66 enum PacketDirection { kIncomingPacket = 0, kOutgoingPacket }; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 } | 105 } |
78 | 106 |
79 // Deprecated. Pass an explicit file size limit. | 107 // Deprecated. Pass an explicit file size limit. |
80 bool StartLogging(rtc::PlatformFile platform_file) { | 108 bool StartLogging(rtc::PlatformFile platform_file) { |
81 return StartLogging(platform_file, 10000000); | 109 return StartLogging(platform_file, 10000000); |
82 } | 110 } |
83 | 111 |
84 // Stops logging to file and waits until the thread has finished. | 112 // Stops logging to file and waits until the thread has finished. |
85 virtual void StopLogging() = 0; | 113 virtual void StopLogging() = 0; |
86 | 114 |
87 // Logs configuration information for webrtc::VideoReceiveStream. | 115 // Logs configuration information for video receive stream. |
88 virtual void LogVideoReceiveStreamConfig( | 116 virtual void LogVideoReceiveStreamConfig( |
89 const webrtc::VideoReceiveStream::Config& config) = 0; | 117 const rtclog::StreamConfig& config) = 0; |
90 | 118 |
91 // Logs configuration information for webrtc::VideoSendStream. | 119 // Logs configuration information for webrtc::VideoSendStream. |
92 virtual void LogVideoSendStreamConfig( | 120 virtual void LogVideoSendStreamConfig( |
93 const webrtc::VideoSendStream::Config& config) = 0; | 121 const webrtc::VideoSendStream::Config& config) = 0; |
94 | 122 |
95 // Logs configuration information for webrtc::AudioReceiveStream. | 123 // Logs configuration information for webrtc::AudioReceiveStream. |
96 virtual void LogAudioReceiveStreamConfig( | 124 virtual void LogAudioReceiveStreamConfig( |
97 const webrtc::AudioReceiveStream::Config& config) = 0; | 125 const webrtc::AudioReceiveStream::Config& config) = 0; |
98 | 126 |
99 // Logs configuration information for webrtc::AudioSendStream. | 127 // Logs configuration information for webrtc::AudioSendStream. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 class RtcEventLogNullImpl final : public RtcEventLog { | 193 class RtcEventLogNullImpl final : public RtcEventLog { |
166 public: | 194 public: |
167 bool StartLogging(const std::string& file_name, | 195 bool StartLogging(const std::string& file_name, |
168 int64_t max_size_bytes) override { | 196 int64_t max_size_bytes) override { |
169 return false; | 197 return false; |
170 } | 198 } |
171 bool StartLogging(rtc::PlatformFile platform_file, | 199 bool StartLogging(rtc::PlatformFile platform_file, |
172 int64_t max_size_bytes) override; | 200 int64_t max_size_bytes) override; |
173 void StopLogging() override {} | 201 void StopLogging() override {} |
174 void LogVideoReceiveStreamConfig( | 202 void LogVideoReceiveStreamConfig( |
175 const VideoReceiveStream::Config& config) override {} | 203 const rtclog::StreamConfig& config) override {} |
176 void LogVideoSendStreamConfig( | 204 void LogVideoSendStreamConfig( |
177 const VideoSendStream::Config& config) override {} | 205 const VideoSendStream::Config& config) override {} |
178 void LogAudioReceiveStreamConfig( | 206 void LogAudioReceiveStreamConfig( |
179 const AudioReceiveStream::Config& config) override {} | 207 const AudioReceiveStream::Config& config) override {} |
180 void LogAudioSendStreamConfig( | 208 void LogAudioSendStreamConfig( |
181 const AudioSendStream::Config& config) override {} | 209 const AudioSendStream::Config& config) override {} |
182 void LogRtpHeader(PacketDirection direction, | 210 void LogRtpHeader(PacketDirection direction, |
183 MediaType media_type, | 211 MediaType media_type, |
184 const uint8_t* header, | 212 const uint8_t* header, |
185 size_t packet_length) override {} | 213 size_t packet_length) override {} |
(...skipping 19 matching lines...) Expand all Loading... |
205 int min_probes, | 233 int min_probes, |
206 int min_bytes) override{}; | 234 int min_bytes) override{}; |
207 void LogProbeResultSuccess(int id, int bitrate_bps) override{}; | 235 void LogProbeResultSuccess(int id, int bitrate_bps) override{}; |
208 void LogProbeResultFailure(int id, | 236 void LogProbeResultFailure(int id, |
209 ProbeFailureReason failure_reason) override{}; | 237 ProbeFailureReason failure_reason) override{}; |
210 }; | 238 }; |
211 | 239 |
212 } // namespace webrtc | 240 } // namespace webrtc |
213 | 241 |
214 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ | 242 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_H_ |
OLD | NEW |