| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include "webrtc/media/base/codec.h" | 11 #include "webrtc/media/base/codec.h" |
| 12 | 12 |
| 13 #include <algorithm> | 13 #include <algorithm> |
| 14 #include <sstream> | 14 #include <sstream> |
| 15 | 15 |
| 16 #include "webrtc/base/checks.h" | 16 #include "webrtc/base/checks.h" |
| 17 #include "webrtc/base/logging.h" | 17 #include "webrtc/base/logging.h" |
| 18 #include "webrtc/base/stringencode.h" | 18 #include "webrtc/base/stringencode.h" |
| 19 #include "webrtc/base/stringutils.h" | 19 #include "webrtc/base/stringutils.h" |
| 20 #include "webrtc/common_video/h264/profile_level_id.h" | 20 #include "webrtc/media/base/h264_profile_level_id.h" |
| 21 | 21 |
| 22 namespace cricket { | 22 namespace cricket { |
| 23 | 23 |
| 24 static bool IsSameH264Profile(const CodecParameterMap& params1, | 24 static bool IsSameH264Profile(const CodecParameterMap& params1, |
| 25 const CodecParameterMap& params2) { | 25 const CodecParameterMap& params2) { |
| 26 const rtc::Optional<webrtc::H264::ProfileLevelId> profile_level_id = | 26 const rtc::Optional<webrtc::H264::ProfileLevelId> profile_level_id = |
| 27 webrtc::H264::ParseSdpProfileLevelId(params1); | 27 webrtc::H264::ParseSdpProfileLevelId(params1); |
| 28 const rtc::Optional<webrtc::H264::ProfileLevelId> other_profile_level_id = | 28 const rtc::Optional<webrtc::H264::ProfileLevelId> other_profile_level_id = |
| 29 webrtc::H264::ParseSdpProfileLevelId(params2); | 29 webrtc::H264::ParseSdpProfileLevelId(params2); |
| 30 // Compare H264 profiles, but not levels. | 30 // Compare H264 profiles, but not levels. |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 if (CodecNamesEq(codec.name.c_str(), kH264CodecName) && | 353 if (CodecNamesEq(codec.name.c_str(), kH264CodecName) && |
| 354 !IsSameH264Profile(codec.params, supported_codec.params)) { | 354 !IsSameH264Profile(codec.params, supported_codec.params)) { |
| 355 continue; | 355 continue; |
| 356 } | 356 } |
| 357 return &supported_codec; | 357 return &supported_codec; |
| 358 } | 358 } |
| 359 return nullptr; | 359 return nullptr; |
| 360 } | 360 } |
| 361 | 361 |
| 362 } // namespace cricket | 362 } // namespace cricket |
| OLD | NEW |