Turned AudioDecoderFactory into a RefCounted thing to use with scoped_refptr.
First step of AudioDecoderFactory injection CLs. AudioDecoderFactories will be shared, and shared_ptr is currently off the table, so this CL changes the current uses of AudioDecoderFactory from std::unique_ptr to rtc::scoped_refptr. BUG=webrtc:5805 Review-Url: https://codereview.webrtc.org/1990803004 Cr-Commit-Position: refs/heads/master@{#12815}
This commit is contained in:
@ -69,7 +69,8 @@ class DecoderDatabase {
|
||||
// only 7 bits).
|
||||
static const uint8_t kRtpPayloadTypeError = 0xFF;
|
||||
|
||||
DecoderDatabase(std::unique_ptr<AudioDecoderFactory> decoder_factory);
|
||||
DecoderDatabase(
|
||||
const rtc::scoped_refptr<AudioDecoderFactory>& decoder_factory);
|
||||
|
||||
virtual ~DecoderDatabase();
|
||||
|
||||
@ -160,7 +161,7 @@ class DecoderDatabase {
|
||||
int active_decoder_type_;
|
||||
int active_cng_decoder_type_;
|
||||
std::unique_ptr<ComfortNoiseDecoder> active_cng_decoder_;
|
||||
const std::unique_ptr<AudioDecoderFactory> decoder_factory_;
|
||||
rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
|
||||
|
||||
RTC_DISALLOW_COPY_AND_ASSIGN(DecoderDatabase);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user