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

Side by Side Diff: webrtc/modules/audio_coding/codecs/audio_encoder.h

Issue 2177263002: Regression test for issue where Opus DTX status was being forgotten. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Initial version. 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
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
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // true when asked to disable FEC and false when asked to enable it (meaning 120 // true when asked to disable FEC and false when asked to enable it (meaning
121 // that FEC isn't supported). 121 // that FEC isn't supported).
122 virtual bool SetFec(bool enable); 122 virtual bool SetFec(bool enable);
123 123
124 // Enables or disables codec-internal VAD/DTX. Returns true if the codec was 124 // Enables or disables codec-internal VAD/DTX. Returns true if the codec was
125 // able to comply. The default implementation returns true when asked to 125 // able to comply. The default implementation returns true when asked to
126 // disable DTX and false when asked to enable it (meaning that DTX isn't 126 // disable DTX and false when asked to enable it (meaning that DTX isn't
127 // supported). 127 // supported).
128 virtual bool SetDtx(bool enable); 128 virtual bool SetDtx(bool enable);
129 129
130 // Returns the status of codec-internal DTX. The default implementation always
131 // returns false.
132 virtual bool GetDtx();
133
130 // Sets the application mode. Returns true if the codec was able to comply. 134 // Sets the application mode. Returns true if the codec was able to comply.
131 // The default implementation just returns false. 135 // The default implementation just returns false.
132 enum class Application { kSpeech, kAudio }; 136 enum class Application { kSpeech, kAudio };
133 virtual bool SetApplication(Application application); 137 virtual bool SetApplication(Application application);
134 138
135 // Tells the encoder about the highest sample rate the decoder is expected to 139 // Tells the encoder about the highest sample rate the decoder is expected to
136 // use when decoding the bitstream. The encoder would typically use this 140 // use when decoding the bitstream. The encoder would typically use this
137 // information to adjust the quality of the encoding. The default 141 // information to adjust the quality of the encoding. The default
138 // implementation does nothing. 142 // implementation does nothing.
139 virtual void SetMaxPlaybackRate(int frequency_hz); 143 virtual void SetMaxPlaybackRate(int frequency_hz);
(...skipping 20 matching lines...) Expand all
160 164
161 protected: 165 protected:
162 // Subclasses implement this to perform the actual encoding. Called by 166 // Subclasses implement this to perform the actual encoding. Called by
163 // Encode(). 167 // Encode().
164 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp, 168 virtual EncodedInfo EncodeImpl(uint32_t rtp_timestamp,
165 rtc::ArrayView<const int16_t> audio, 169 rtc::ArrayView<const int16_t> audio,
166 rtc::Buffer* encoded) = 0; 170 rtc::Buffer* encoded) = 0;
167 }; 171 };
168 } // namespace webrtc 172 } // namespace webrtc
169 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_ 173 #endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_AUDIO_ENCODER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698