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

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

Issue 1949533002: WIP: Move the creation of AudioCodecFactory into PeerConnectionFactory. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 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
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 #include "webrtc/modules/audio_coding/codecs/builtin_audio_decoder_factory.h"
19 20
20 namespace webrtc { 21 namespace webrtc {
21 22
22 DecoderDatabase::DecoderDatabase( 23 DecoderDatabase::DecoderDatabase(
23 std::unique_ptr<AudioDecoderFactory> decoder_factory) 24 std::shared_ptr<AudioDecoderFactory> decoder_factory)
24 : active_decoder_type_(-1), 25 : active_decoder_type_(-1),
25 active_cng_decoder_type_(-1), 26 active_cng_decoder_type_(-1),
26 decoder_factory_(std::move(decoder_factory)) {} 27 decoder_factory_(std::move(decoder_factory)) {}
27 28
28 DecoderDatabase::~DecoderDatabase() = default; 29 DecoderDatabase::~DecoderDatabase() = default;
29 30
30 DecoderDatabase::DecoderInfo::DecoderInfo(NetEqDecoder ct, 31 DecoderDatabase::DecoderInfo::DecoderInfo(NetEqDecoder ct,
31 const std::string& nm, 32 const std::string& nm,
32 int fs, 33 int fs,
33 AudioDecoder* ext_dec) 34 AudioDecoder* ext_dec)
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 LOG(LS_WARNING) << "CheckPayloadTypes: unknown RTP payload type " 275 LOG(LS_WARNING) << "CheckPayloadTypes: unknown RTP payload type "
275 << static_cast<int>((*it)->header.payloadType); 276 << static_cast<int>((*it)->header.payloadType);
276 return kDecoderNotFound; 277 return kDecoderNotFound;
277 } 278 }
278 } 279 }
279 return kOK; 280 return kOK;
280 } 281 }
281 282
282 283
283 } // namespace webrtc 284 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698