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

Side by Side Diff: webrtc/api/audio_codecs/audio_encoder.h

Issue 3011623002: Add new ANA stats to GetStats() to count the number of actions taken by each controller. (Closed)
Patch Set: Addressed review comments. Created 3 years, 3 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
« no previous file with comments | « no previous file | webrtc/api/audio_codecs/audio_encoder.cc » ('j') | webrtc/common_types.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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_API_AUDIO_CODECS_AUDIO_ENCODER_H_ 11 #ifndef WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_H_
12 #define WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_H_ 12 #define WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_H_
13 13
14 #include <algorithm> 14 #include <algorithm>
15 #include <memory> 15 #include <memory>
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/common_types.h"
19 #include "webrtc/rtc_base/array_view.h" 20 #include "webrtc/rtc_base/array_view.h"
20 #include "webrtc/rtc_base/buffer.h" 21 #include "webrtc/rtc_base/buffer.h"
21 #include "webrtc/rtc_base/deprecation.h" 22 #include "webrtc/rtc_base/deprecation.h"
22 #include "webrtc/rtc_base/optional.h" 23 #include "webrtc/rtc_base/optional.h"
23 #include "webrtc/typedefs.h" 24 #include "webrtc/typedefs.h"
24 25
25 namespace webrtc { 26 namespace webrtc {
26 27
27 class Clock; 28 class Clock;
28 class RtcEventLog; 29 class RtcEventLog;
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 197
197 // Provides overhead to this encoder to adapt. The overhead is the number of 198 // Provides overhead to this encoder to adapt. The overhead is the number of
198 // bytes that will be added to each packet the encoder generates. 199 // bytes that will be added to each packet the encoder generates.
199 virtual void OnReceivedOverhead(size_t overhead_bytes_per_packet); 200 virtual void OnReceivedOverhead(size_t overhead_bytes_per_packet);
200 201
201 // To allow encoder to adapt its frame length, it must be provided the frame 202 // To allow encoder to adapt its frame length, it must be provided the frame
202 // length range that receivers can accept. 203 // length range that receivers can accept.
203 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms, 204 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms,
204 int max_frame_length_ms); 205 int max_frame_length_ms);
205 206
207 // Get statistics related to audio network adaptation.
208 virtual ANAStats GetANAStats() const;
209
206 protected: 210 protected:
207 // Subclasses implement this to perform the actual encoding. Called by 211 // Subclasses implement this to perform the actual encoding. Called by
208 // Encode(). 212 // Encode().
209 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, 213 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
210 rtc::ArrayView<const int16_t> audio, 214 rtc::ArrayView<const int16_t> audio,
211 rtc::Buffer* encoded) = 0; 215 rtc::Buffer* encoded) = 0;
212 }; 216 };
213 } // namespace webrtc 217 } // namespace webrtc
214 #endif // WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_H_ 218 #endif // WEBRTC_API_AUDIO_CODECS_AUDIO_ENCODER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/audio_codecs/audio_encoder.cc » ('j') | webrtc/common_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698