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

Side by Side Diff: webrtc/modules/audio_coding/neteq/decoder_database.h

Issue 2348233002: AcmReceiver: Ask NetEq to delete all decoders at once instead of one by one (Closed)
Patch Set: unit tests 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
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // as a decoder of type |codec_type| with |rtp_payload_type|. 129 // as a decoder of type |codec_type| with |rtp_payload_type|.
130 virtual int InsertExternal(uint8_t rtp_payload_type, 130 virtual int InsertExternal(uint8_t rtp_payload_type,
131 NetEqDecoder codec_type, 131 NetEqDecoder codec_type,
132 const std::string& codec_name, 132 const std::string& codec_name,
133 AudioDecoder* decoder); 133 AudioDecoder* decoder);
134 134
135 // Removes the entry for |rtp_payload_type| from the database. 135 // Removes the entry for |rtp_payload_type| from the database.
136 // Returns kDecoderNotFound or kOK depending on the outcome of the operation. 136 // Returns kDecoderNotFound or kOK depending on the outcome of the operation.
137 virtual int Remove(uint8_t rtp_payload_type); 137 virtual int Remove(uint8_t rtp_payload_type);
138 138
139 // Remove all entries.
140 virtual void RemoveAll();
141
139 // Returns a pointer to the DecoderInfo struct for |rtp_payload_type|. If 142 // Returns a pointer to the DecoderInfo struct for |rtp_payload_type|. If
140 // no decoder is registered with that |rtp_payload_type|, NULL is returned. 143 // no decoder is registered with that |rtp_payload_type|, NULL is returned.
141 virtual const DecoderInfo* GetDecoderInfo(uint8_t rtp_payload_type) const; 144 virtual const DecoderInfo* GetDecoderInfo(uint8_t rtp_payload_type) const;
142 145
143 // Returns one RTP payload type associated with |codec_type|, or 146 // Returns one RTP payload type associated with |codec_type|, or
144 // kDecoderNotFound if no entry exists for that value. Note that one 147 // kDecoderNotFound if no entry exists for that value. Note that one
145 // |codec_type| may be registered with several RTP payload types, and the 148 // |codec_type| may be registered with several RTP payload types, and the
146 // method may return any of them. 149 // method may return any of them.
147 virtual uint8_t GetRtpPayloadType(NetEqDecoder codec_type) const; 150 virtual uint8_t GetRtpPayloadType(NetEqDecoder codec_type) const;
148 151
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 int active_decoder_type_; 198 int active_decoder_type_;
196 int active_cng_decoder_type_; 199 int active_cng_decoder_type_;
197 mutable std::unique_ptr<ComfortNoiseDecoder> active_cng_decoder_; 200 mutable std::unique_ptr<ComfortNoiseDecoder> active_cng_decoder_;
198 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 201 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
199 202
200 RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase); 203 RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase);
201 }; 204 };
202 205
203 } // namespace webrtc 206 } // namespace webrtc
204 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_ 207 #endif // WEBRTC_MODULES_AUDIO_CODING_NETEQ_DECODER_DATABASE_H_
OLDNEW
« no previous file with comments | « webrtc/modules/audio_coding/acm2/audio_coding_module.cc ('k') | webrtc/modules/audio_coding/neteq/decoder_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698