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

Unified Diff: webrtc/modules/audio_coding/acm2/acm_receiver.h

Issue 2354453003: AcmReceiver: Look up last decoder in NetEq's table of decoders (Closed)
Patch Set: grammar 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/acm2/acm_receiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/audio_coding/acm2/acm_receiver.h
diff --git a/webrtc/modules/audio_coding/acm2/acm_receiver.h b/webrtc/modules/audio_coding/acm2/acm_receiver.h
index e62e7144d6f9c785a61f42da64b594caa7a87864..d39581ed4cff83361135357068bc951644a3f621 100644
--- a/webrtc/modules/audio_coding/acm2/acm_receiver.h
+++ b/webrtc/modules/audio_coding/acm2/acm_receiver.h
@@ -39,15 +39,6 @@ namespace acm2 {
class AcmReceiver {
public:
- struct Decoder {
- int acm_codec_id;
- uint8_t payload_type;
- // This field is meaningful for codecs where both mono and
- // stereo versions are registered under the same ID.
- size_t channels;
- int sample_rate_hz;
- };
-
// Constructor of the class
explicit AcmReceiver(const AudioCodingModule::Config& config);
@@ -262,14 +253,23 @@ class AcmReceiver {
void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const;
private:
- const Decoder* RtpHeaderToDecoder(const RTPHeader& rtp_header,
- uint8_t payload_type) const
- EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
+ struct Decoder {
+ int acm_codec_id;
+ uint8_t payload_type;
+ // This field is meaningful for codecs where both mono and
+ // stereo versions are registered under the same ID.
+ size_t channels;
+ int sample_rate_hz;
+ };
+
+ const rtc::Optional<CodecInst> RtpHeaderToDecoder(
+ const RTPHeader& rtp_header,
+ uint8_t first_payload_byte) const EXCLUSIVE_LOCKS_REQUIRED(crit_sect_);
uint32_t NowInTimestamp(int decoder_sampling_rate) const;
rtc::CriticalSection crit_sect_;
- const Decoder* last_audio_decoder_ GUARDED_BY(crit_sect_);
+ rtc::Optional<CodecInst> last_audio_decoder_ GUARDED_BY(crit_sect_);
ACMResampler resampler_ GUARDED_BY(crit_sect_);
std::unique_ptr<int16_t[]> last_audio_buffer_ GUARDED_BY(crit_sect_);
CallStatistics call_stats_ GUARDED_BY(crit_sect_);
« no previous file with comments | « no previous file | webrtc/modules/audio_coding/acm2/acm_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698