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

Side by Side Diff: webrtc/logging/rtc_event_log/rtc_event_log_parser.h

Issue 2695923004: Add logging of delay-based bandwidth estimate. (Closed)
Patch Set: Only log BWE update if bitrate or state has changed. Created 3 years, 10 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
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ 10 #ifndef WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 size_t GetNumberOfEvents() const; 64 size_t GetNumberOfEvents() const;
65 65
66 // Reads the arrival timestamp (in microseconds) from a rtclog::Event. 66 // Reads the arrival timestamp (in microseconds) from a rtclog::Event.
67 int64_t GetTimestamp(size_t index) const; 67 int64_t GetTimestamp(size_t index) const;
68 68
69 // Reads the event type of the rtclog::Event at |index|. 69 // Reads the event type of the rtclog::Event at |index|.
70 EventType GetEventType(size_t index) const; 70 EventType GetEventType(size_t index) const;
71 71
72 // Reads the header, direction, media type, header length and packet length 72 // Reads the header, direction, media type, header length and packet length
73 // from the RTP event at |index|, and stores the values in the corresponding 73 // from the RTP event at |index|, and stores the values in the corresponding
74 // output parameters. The output parameters can be set to nullptr if those 74 // output parameters. Each output parameter can be set to nullptr if that
75 // values aren't needed. 75 // value isn't needed.
76 // NB: The header must have space for at least IP_PACKET_SIZE bytes. 76 // NB: The header must have space for at least IP_PACKET_SIZE bytes.
77 void GetRtpHeader(size_t index, 77 void GetRtpHeader(size_t index,
78 PacketDirection* incoming, 78 PacketDirection* incoming,
79 MediaType* media_type, 79 MediaType* media_type,
80 uint8_t* header, 80 uint8_t* header,
81 size_t* header_length, 81 size_t* header_length,
82 size_t* total_length) const; 82 size_t* total_length) const;
83 83
84 // Reads packet, direction, media type and packet length from the RTCP event 84 // Reads packet, direction, media type and packet length from the RTCP event
85 // at |index|, and stores the values in the corresponding output parameters. 85 // at |index|, and stores the values in the corresponding output parameters.
86 // The output parameters can be set to nullptr if those values aren't needed. 86 // Each output parameter can be set to nullptr if that value isn't needed.
87 // NB: The packet must have space for at least IP_PACKET_SIZE bytes. 87 // NB: The packet must have space for at least IP_PACKET_SIZE bytes.
88 void GetRtcpPacket(size_t index, 88 void GetRtcpPacket(size_t index,
89 PacketDirection* incoming, 89 PacketDirection* incoming,
90 MediaType* media_type, 90 MediaType* media_type,
91 uint8_t* packet, 91 uint8_t* packet,
92 size_t* length) const; 92 size_t* length) const;
93 93
94 // Reads a config event to a (non-NULL) VideoReceiveStream::Config struct. 94 // Reads a config event to a (non-NULL) VideoReceiveStream::Config struct.
95 // Only the fields that are stored in the protobuf will be written. 95 // Only the fields that are stored in the protobuf will be written.
96 void GetVideoReceiveConfig(size_t index, 96 void GetVideoReceiveConfig(size_t index,
(...skipping 11 matching lines...) Expand all
108 // Reads a config event to a (non-NULL) AudioSendStream::Config struct. 108 // Reads a config event to a (non-NULL) AudioSendStream::Config struct.
109 // Only the fields that are stored in the protobuf will be written. 109 // Only the fields that are stored in the protobuf will be written.
110 void GetAudioSendConfig(size_t index, AudioSendStream::Config* config) const; 110 void GetAudioSendConfig(size_t index, AudioSendStream::Config* config) const;
111 111
112 // Reads the SSRC from the audio playout event at |index|. The SSRC is stored 112 // Reads the SSRC from the audio playout event at |index|. The SSRC is stored
113 // in the output parameter ssrc. The output parameter can be set to nullptr 113 // in the output parameter ssrc. The output parameter can be set to nullptr
114 // and in that case the function only asserts that the event is well formed. 114 // and in that case the function only asserts that the event is well formed.
115 void GetAudioPlayout(size_t index, uint32_t* ssrc) const; 115 void GetAudioPlayout(size_t index, uint32_t* ssrc) const;
116 116
117 // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of 117 // Reads bitrate, fraction loss (as defined in RFC 1889) and total number of
118 // expected packets from the BWE event at |index| and stores the values in 118 // expected packets from the loss based BWE event at |index| and stores the
119 // the corresponding output parameters. The output parameters can be set to 119 // values in
120 // nullptr if those values aren't needed. 120 // the corresponding output parameters. Each output parameter can be set to
121 // NB: The packet must have space for at least IP_PACKET_SIZE bytes. 121 // nullptr if that
122 // value isn't needed.
122 void GetBwePacketLossEvent(size_t index, 123 void GetBwePacketLossEvent(size_t index,
123 int32_t* bitrate, 124 int32_t* bitrate,
124 uint8_t* fraction_loss, 125 uint8_t* fraction_loss,
125 int32_t* total_packets) const; 126 int32_t* total_packets) const;
126 127
128 // Reads bitrate and detector_state from the delay based BWE event at |index|
129 // and stores the values in the corresponding output parameters. Each output
130 // parameter can be set to nullptr if that
131 // value isn't needed.
132 void GetBwePacketDelayEvent(size_t index,
133 int32_t* bitrate,
134 BandwidthUsage* detector_state) const;
135
127 // Reads a audio network adaptation event to a (non-NULL) 136 // Reads a audio network adaptation event to a (non-NULL)
128 // AudioNetworkAdaptor::EncoderRuntimeConfig struct. Only the fields that are 137 // AudioNetworkAdaptor::EncoderRuntimeConfig struct. Only the fields that are
129 // stored in the protobuf will be written. 138 // stored in the protobuf will be written.
130 void GetAudioNetworkAdaptation( 139 void GetAudioNetworkAdaptation(
131 size_t index, 140 size_t index,
132 AudioNetworkAdaptor::EncoderRuntimeConfig* config) const; 141 AudioNetworkAdaptor::EncoderRuntimeConfig* config) const;
133 142
134 private: 143 private:
135 std::vector<rtclog::Event> events_; 144 std::vector<rtclog::Event> events_;
136 }; 145 };
137 146
138 } // namespace webrtc 147 } // namespace webrtc
139 148
140 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_ 149 #endif // WEBRTC_LOGGING_RTC_EVENT_LOG_RTC_EVENT_LOG_PARSER_H_
OLDNEW
« no previous file with comments | « webrtc/logging/rtc_event_log/rtc_event_log.proto ('k') | webrtc/logging/rtc_event_log/rtc_event_log_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698