Setting Opus target application.
This CL is to allow to set Opus target application at the creation of an encoder. According to Opus spec, there are three applications: OPUS_APPLICATION_VOIP OPUS_APPLICATION_AUDIO OPUS_APPLICATION_RESTRICTED_LOWDELAY BUG= R=henrik.lundin@webrtc.org, tina.legrand@webrtc.org Review URL: https://webrtc-codereview.appspot.com/37479004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@8103 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -145,8 +145,10 @@ NetEqOpusFecQualityTest::NetEqOpusFecQualityTest()
|
||||
}
|
||||
|
||||
void NetEqOpusFecQualityTest::SetUp() {
|
||||
// If channels_ == 1, use Opus VOIP mode, otherwise, audio mode.
|
||||
int app = channels_ == 1 ? 0 : 1;
|
||||
// Create encoder memory.
|
||||
WebRtcOpus_EncoderCreate(&opus_encoder_, channels_);
|
||||
WebRtcOpus_EncoderCreate(&opus_encoder_, channels_, app);
|
||||
ASSERT_TRUE(opus_encoder_ != NULL);
|
||||
// Set bitrate.
|
||||
EXPECT_EQ(0, WebRtcOpus_SetBitRate(opus_encoder_, bit_rate_kbps_ * 1000));
|
||||
|
||||
Reference in New Issue
Block a user