OLD | NEW |
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 |
11 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" | 11 #include "webrtc/modules/audio_coding/neteq/decoder_database.h" |
12 | 12 |
13 #include <assert.h> | 13 #include <assert.h> |
14 #include <utility> // pair | 14 #include <utility> // pair |
15 | 15 |
16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
17 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
18 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h" | 18 #include "webrtc/modules/audio_coding/codecs/audio_decoder.h" |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 | 21 |
22 DecoderDatabase::DecoderDatabase( | 22 DecoderDatabase::DecoderDatabase( |
23 std::unique_ptr<AudioDecoderFactory> decoder_factory) | 23 const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory) |
24 : active_decoder_type_(-1), | 24 : active_decoder_type_(-1), |
25 active_cng_decoder_type_(-1), | 25 active_cng_decoder_type_(-1), |
26 decoder_factory_(std::move(decoder_factory)) {} | 26 decoder_factory_(decoder_factory) {} |
27 | 27 |
28 DecoderDatabase::~DecoderDatabase() = default; | 28 DecoderDatabase::~DecoderDatabase() = default; |
29 | 29 |
30 DecoderDatabase::DecoderInfo::DecoderInfo(NetEqDecoder ct, | 30 DecoderDatabase::DecoderInfo::DecoderInfo(NetEqDecoder ct, |
31 const std::string& nm, | 31 const std::string& nm, |
32 int fs, | 32 int fs, |
33 AudioDecoder* ext_dec) | 33 AudioDecoder* ext_dec) |
34 : codec_type(ct), | 34 : codec_type(ct), |
35 name(nm), | 35 name(nm), |
36 fs_hz(fs), | 36 fs_hz(fs), |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 LOG(LS_WARNING) << "CheckPayloadTypes: unknown RTP payload type " | 274 LOG(LS_WARNING) << "CheckPayloadTypes: unknown RTP payload type " |
275 << static_cast<int>((*it)->header.payloadType); | 275 << static_cast<int>((*it)->header.payloadType); |
276 return kDecoderNotFound; | 276 return kDecoderNotFound; |
277 } | 277 } |
278 } | 278 } |
279 return kOK; | 279 return kOK; |
280 } | 280 } |
281 | 281 |
282 | 282 |
283 } // namespace webrtc | 283 } // namespace webrtc |
OLD | NEW |