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

Side by Side Diff: webrtc/config.h

Issue 2185953002: Add decoder-specific settings with proper lifetime. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 4 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/config.cc » ('j') | webrtc/media/engine/webrtcvideoengine2.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 // TODO(pbos): Move Config from common.h to here. 11 // TODO(pbos): Move Config from common.h to here.
12 12
13 #ifndef WEBRTC_CONFIG_H_ 13 #ifndef WEBRTC_CONFIG_H_
14 #define WEBRTC_CONFIG_H_ 14 #define WEBRTC_CONFIG_H_
15 15
16 #include <string> 16 #include <string>
17 #include <vector> 17 #include <vector>
18 18
19 #include "webrtc/base/optional.h"
20 #include "webrtc/base/refcount.h"
21 #include "webrtc/base/scoped_ref_ptr.h"
sprang_webrtc 2016/07/27 08:37:25 Not sure what the current policy is regarding impo
19 #include "webrtc/common.h" 22 #include "webrtc/common.h"
20 #include "webrtc/common_types.h" 23 #include "webrtc/common_types.h"
21 #include "webrtc/typedefs.h" 24 #include "webrtc/typedefs.h"
22 25
23 namespace webrtc { 26 namespace webrtc {
24 27
25 // Settings for NACK, see RFC 4585 for details. 28 // Settings for NACK, see RFC 4585 for details.
26 struct NackConfig { 29 struct NackConfig {
27 NackConfig() : rtp_history_ms(0) {} 30 NackConfig() : rtp_history_ms(0) {}
28 std::string ToString() const; 31 std::string ToString() const;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void* encoder_specific_settings; 142 void* encoder_specific_settings;
140 143
141 // Padding will be used up to this bitrate regardless of the bitrate produced 144 // Padding will be used up to this bitrate regardless of the bitrate produced
142 // by the encoder. Padding above what's actually produced by the encoder helps 145 // by the encoder. Padding above what's actually produced by the encoder helps
143 // maintaining a higher bitrate estimate. Padding will however not be sent 146 // maintaining a higher bitrate estimate. Padding will however not be sent
144 // unless the estimated bandwidth indicates that the link can handle it. 147 // unless the estimated bandwidth indicates that the link can handle it.
145 int min_transmit_bitrate_bps; 148 int min_transmit_bitrate_bps;
146 bool expect_encode_from_texture; 149 bool expect_encode_from_texture;
147 }; 150 };
148 151
152 struct VideoDecoderH264extraSettings {
153 std::string spropParameterSets;
154 };
155
156 // These are reference counted to permit copying VideoDecoderConfig and be
157 // kept alive until all decoder_specific_settings go out of scope.
158 //
159 class DecoderSpecificSettings : public rtc::RefCountInterface {
160 public:
161 virtual ~DecoderSpecificSettings() {}
162 rtc::Optional<VideoDecoderH264extraSettings> h264_extra_settings;
163 // vp8_extra_settings, and vp9_extra_settings will be added when required
164 };
sprang_webrtc 2016/07/27 08:37:25 If we're using an Optional for each codec, I'm not
165
149 // Controls the capacity of the packet buffer in NetEq. The capacity is the 166 // Controls the capacity of the packet buffer in NetEq. The capacity is the
150 // maximum number of packets that the buffer can contain. If the limit is 167 // maximum number of packets that the buffer can contain. If the limit is
151 // exceeded, the buffer will be flushed. The capacity does not affect the actual 168 // exceeded, the buffer will be flushed. The capacity does not affect the actual
152 // audio delay in the general case, since this is governed by the target buffer 169 // audio delay in the general case, since this is governed by the target buffer
153 // level (calculated from the jitter profile). It is only in the rare case of 170 // level (calculated from the jitter profile). It is only in the rare case of
154 // severe network freezes that a higher capacity will lead to a (transient) 171 // severe network freezes that a higher capacity will lead to a (transient)
155 // increase in audio delay. 172 // increase in audio delay.
156 struct NetEqCapacityConfig { 173 struct NetEqCapacityConfig {
157 NetEqCapacityConfig() : enabled(false), capacity(0) {} 174 NetEqCapacityConfig() : enabled(false), capacity(0) {}
158 explicit NetEqCapacityConfig(int value) : enabled(true), capacity(value) {} 175 explicit NetEqCapacityConfig(int value) : enabled(true), capacity(value) {}
(...skipping 12 matching lines...) Expand all
171 struct VoicePacing { 188 struct VoicePacing {
172 VoicePacing() : enabled(false) {} 189 VoicePacing() : enabled(false) {}
173 explicit VoicePacing(bool value) : enabled(value) {} 190 explicit VoicePacing(bool value) : enabled(value) {}
174 static const ConfigOptionID identifier = ConfigOptionID::kVoicePacing; 191 static const ConfigOptionID identifier = ConfigOptionID::kVoicePacing;
175 bool enabled; 192 bool enabled;
176 }; 193 };
177 194
178 } // namespace webrtc 195 } // namespace webrtc
179 196
180 #endif // WEBRTC_CONFIG_H_ 197 #endif // WEBRTC_CONFIG_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/config.cc » ('j') | webrtc/media/engine/webrtcvideoengine2.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698