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

Side by Side Diff: webrtc/modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h

Issue 2308573002: Adding AudioNetworkAdaptor interfaces. (Closed)
Patch Set: removing non-abstract-class methods Created 4 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
OLDNEW
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ ADAPTOR_H_
12 #define WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWORK_ ADAPTOR_H_
13
14 #include "webrtc/base/optional.h"
15
16 namespace webrtc {
17
18 // An AudioNetworkAdaptor optimizes the audio experience by suggesting a
19 // suitable runtime configuration (bit rate, frame length, FEC, etc.) to the
20 // encoder based on network metrics.
21 class AudioNetworkAdaptor {
22 public:
23 struct EncoderRuntimeConfig {
24 EncoderRuntimeConfig();
25 EncoderRuntimeConfig(const EncoderRuntimeConfig& other);
26 ~EncoderRuntimeConfig();
27 rtc::Optional<int> bitrate_bps;
28 rtc::Optional<int> frame_length_ms;
29 rtc::Optional<float> uplink_packet_loss_fraction;
30 rtc::Optional<bool> enable_fec;
31 rtc::Optional<bool> enable_dtx;
32
33 // Some encoders can encode fewer channels than the actual input to make
34 // better use of the bandwidth. |num_channels| sets the number of channels
35 // to encode.
36 rtc::Optional<size_t> num_channels;
37 };
38
39 virtual ~AudioNetworkAdaptor() = default;
40
41 virtual void SetUplinkBandwidth(int uplink_bandwidth_bps) = 0;
42
43 virtual void SetUplinkPacketLossFraction(
44 float uplink_packet_loss_fraction) = 0;
45
46 virtual void SetReceiverFrameLengthRange(int min_frame_length_ms,
47 int max_frame_length_ms) = 0;
48
49 virtual EncoderRuntimeConfig GetEncoderRuntimeConfig() = 0;
50
51 virtual void StartDebugDump(FILE* file_handle) = 0;
52 };
53
54 } // namespace webrtc
55
56 #endif // WEBRTC_MODULES_AUDIO_CODING_AUDIO_NETWORK_ADAPTOR_INCLUDE_AUDIO_NETWO RK_ADAPTOR_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/audio_network_adaptor/audio_network_adaptor.gypi ('k') | webrtc/modules/modules.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698