(Auto)update libjingle 69555283-> 69567902
git-svn-id: http://webrtc.googlecode.com/svn/trunk@6497 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
21794f9862
commit
fbd13286dc
@ -133,9 +133,6 @@ class MediaConstraintsInterface {
|
||||
static const char kHighBitrate[]; // googHighBitrate
|
||||
static const char kVeryHighBitrate[]; // googVeryHighBitrate
|
||||
static const char kPayloadPadding[]; // googPayloadPadding
|
||||
|
||||
// PeerConnection codec constraint keys. This should be combined with the
|
||||
// values above.
|
||||
// kOpusFec controls whether we ask the other side to turn on FEC for Opus.
|
||||
static const char kOpusFec[]; // googOpusFec
|
||||
|
||||
|
@ -118,6 +118,10 @@ void Codec::SetParam(const std::string& name, int value) {
|
||||
params[name] = talk_base::ToString(value);
|
||||
}
|
||||
|
||||
bool Codec::RemoveParam(const std::string& name) {
|
||||
return params.erase(name) == 1;
|
||||
}
|
||||
|
||||
void Codec::AddFeedbackParam(const FeedbackParam& param) {
|
||||
feedback_params.Add(param);
|
||||
}
|
||||
|
@ -104,6 +104,10 @@ struct Codec {
|
||||
void SetParam(const std::string& name, const std::string& value);
|
||||
void SetParam(const std::string& name, int value);
|
||||
|
||||
// It is safe to input a non-existent parameter.
|
||||
// Returns true if the parameter existed, false if it did not exist.
|
||||
bool RemoveParam(const std::string& name);
|
||||
|
||||
bool HasFeedbackParam(const FeedbackParam& param) const;
|
||||
void AddFeedbackParam(const FeedbackParam& param);
|
||||
|
||||
|
@ -278,7 +278,7 @@ TEST_F(CodecTest, TestDataCodecMatches) {
|
||||
EXPECT_FALSE(c1.Matches(DataCodec(95, "D", 0)));
|
||||
}
|
||||
|
||||
TEST_F(CodecTest, TestSetParamAndGetParam) {
|
||||
TEST_F(CodecTest, TestSetParamGetParamAndRemoveParam) {
|
||||
AudioCodec codec;
|
||||
codec.SetParam("a", "1");
|
||||
codec.SetParam("b", "x");
|
||||
@ -295,6 +295,8 @@ TEST_F(CodecTest, TestSetParamAndGetParam) {
|
||||
EXPECT_TRUE(codec.GetParam("b", &str_value));
|
||||
EXPECT_EQ("x", str_value);
|
||||
EXPECT_FALSE(codec.GetParam("c", &str_value));
|
||||
EXPECT_TRUE(codec.RemoveParam("a"));
|
||||
EXPECT_FALSE(codec.RemoveParam("c"));
|
||||
}
|
||||
|
||||
TEST_F(CodecTest, TestIntersectFeedbackParams) {
|
||||
|
@ -423,7 +423,7 @@ static int GetOpusBitrateFromParams(const AudioCodec& codec) {
|
||||
return bitrate;
|
||||
}
|
||||
|
||||
// Return true params[kCodecParamUseInbandFec] == kParamValueTrue, false
|
||||
// Return true if params[kCodecParamUseInbandFec] == "1", false
|
||||
// otherwise.
|
||||
static bool IsOpusFecEnabled(const AudioCodec& codec) {
|
||||
int value;
|
||||
@ -431,11 +431,11 @@ static bool IsOpusFecEnabled(const AudioCodec& codec) {
|
||||
}
|
||||
|
||||
// Set params[kCodecParamUseInbandFec]. Caller should make sure codec is Opus.
|
||||
static void SetOpusFec(AudioCodec *codec, bool opus_fec) {
|
||||
static void SetOpusFec(AudioCodec* codec, bool opus_fec) {
|
||||
if (opus_fec) {
|
||||
codec->params[kCodecParamUseInbandFec] = kParamValueTrue;
|
||||
codec->SetParam(kCodecParamUseInbandFec, 1);
|
||||
} else {
|
||||
codec->params.erase(kCodecParamUseInbandFec);
|
||||
codec->RemoveParam(kCodecParamUseInbandFec);
|
||||
}
|
||||
}
|
||||
|
||||
@ -909,7 +909,7 @@ bool WebRtcVoiceEngine::ApplyOptions(const AudioOptions& options_in) {
|
||||
}
|
||||
}
|
||||
|
||||
bool opus_fec = false;
|
||||
bool opus_fec;
|
||||
if (options.opus_fec.Get(&opus_fec)) {
|
||||
LOG(LS_INFO) << "Opus FEC is enabled? " << opus_fec;
|
||||
for (std::vector<AudioCodec>::iterator it = codecs_.begin();
|
||||
|
Loading…
x
Reference in New Issue
Block a user