Adding flag to force Opus application and DTX while toggling.
Currently, we only allow Opus DTX in combination with Opus kVoip mode. When one of them is toggled, the other might need to change as well. This CL is to introduce a flag to force a co-config. BUG= R=henrik.lundin@webrtc.org, tina.legrand@webrtc.org Review URL: https://webrtc-codereview.appspot.com/40159004 Cr-Commit-Position: refs/heads/master@{#8698} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8698 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -77,6 +77,7 @@ AudioEncoderOpus::AudioEncoderOpus(const Config& config)
|
||||
num_channels_(config.num_channels),
|
||||
payload_type_(config.payload_type),
|
||||
application_(config.application),
|
||||
dtx_enabled_(config.dtx_enabled),
|
||||
samples_per_10ms_frame_(rtc::CheckedDivExact(kSampleRateHz, 100) *
|
||||
num_channels_),
|
||||
packet_loss_rate_(0.0) {
|
||||
|
||||
@ -55,6 +55,7 @@ class AudioEncoderOpus final : public AudioEncoder {
|
||||
|
||||
double packet_loss_rate() const { return packet_loss_rate_; }
|
||||
ApplicationMode application() const { return application_; }
|
||||
bool dtx_enabled() const { return dtx_enabled_; }
|
||||
|
||||
protected:
|
||||
void EncodeInternal(uint32_t rtp_timestamp,
|
||||
@ -69,6 +70,7 @@ class AudioEncoderOpus final : public AudioEncoder {
|
||||
const int payload_type_;
|
||||
const ApplicationMode application_;
|
||||
int bitrate_bps_;
|
||||
const bool dtx_enabled_;
|
||||
const int samples_per_10ms_frame_;
|
||||
std::vector<int16_t> input_buffer_;
|
||||
OpusEncInst* inst_;
|
||||
|
||||
Reference in New Issue
Block a user