OLD | NEW |
(Empty) | |
| 1 /* |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
| 3 * |
| 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 |
| 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ |
| 10 |
| 11 #include "webrtc/common_video/h264/profile_level_id.h" |
| 12 #include "webrtc/media/base/codec.h" |
| 13 |
| 14 namespace cricket { |
| 15 |
| 16 bool IsSameH264Profile(const CodecParameterMap& params1, |
| 17 const CodecParameterMap& params2) { |
| 18 const rtc::Optional<webrtc::H264::ProfileLevelId> profile_level_id = |
| 19 webrtc::H264::ParseSdpProfileLevelId(params1); |
| 20 const rtc::Optional<webrtc::H264::ProfileLevelId> other_profile_level_id = |
| 21 webrtc::H264::ParseSdpProfileLevelId(params2); |
| 22 // Compare H264 profiles, but not levels. |
| 23 return profile_level_id && other_profile_level_id && |
| 24 profile_level_id->profile == other_profile_level_id->profile; |
| 25 } |
| 26 } // namespace cricket |
OLD | NEW |