| Index: webrtc/media/base/codec.cc
|
| diff --git a/webrtc/media/base/codec.cc b/webrtc/media/base/codec.cc
|
| index 835cf77b3e77a87e3e31e7df747e09300cbd363b..76441a2c5c9ffb29543ea0250e8802fc3ed0ce15 100644
|
| --- a/webrtc/media/base/codec.cc
|
| +++ b/webrtc/media/base/codec.cc
|
| @@ -82,7 +82,9 @@ bool FeedbackParams::HasDuplicateEntries() const {
|
| }
|
|
|
| Codec::Codec(int id, const std::string& name, int clockrate)
|
| - : id(id), name(name), clockrate(clockrate) {}
|
| + : id(id), name(name), clockrate(clockrate) {
|
| + SetDefaultParameters();
|
| +}
|
|
|
| Codec::Codec() : id(0), clockrate(0) {}
|
|
|
| @@ -107,6 +109,16 @@ bool Codec::Matches(const Codec& codec) const {
|
| : (_stricmp(name.c_str(), codec.name.c_str()) == 0);
|
| }
|
|
|
| +void Codec::SetDefaultParameters() {
|
| + if (_stricmp(kH264CodecName, name.c_str()) == 0) {
|
| + // TODO(magjed): Move setting these parameters into webrtc::H264Encoder
|
| + // instead.
|
| + SetParam(kH264FmtpProfileLevelId, kH264ProfileLevelConstrainedBaseline);
|
| + SetParam(kH264FmtpLevelAsymmetryAllowed, "1");
|
| + SetParam(kH264FmtpPacketizationMode, "1");
|
| + }
|
| +}
|
| +
|
| bool Codec::GetParam(const std::string& name, std::string* out) const {
|
| CodecParameterMap::const_iterator iter = params.find(name);
|
| if (iter == params.end())
|
|
|