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"); |
+ } |
sprang_webrtc
2016/12/01 16:58:56
Why was this moved here?
hta-webrtc
2016/12/01 18:26:27
Because it was the simplest way to set a default v
magjed_webrtc
2016/12/02 12:34:25
This is a step in the wrong direction. Why can't y
hta-webrtc
2016/12/02 12:48:47
Why is it a step in the wrong direction?
Previous
|
+} |
+ |
bool Codec::GetParam(const std::string& name, std::string* out) const { |
CodecParameterMap::const_iterator iter = params.find(name); |
if (iter == params.end()) |