webrtc_m130/media/base/h264_profile_level_id.cc
Johannes Kron c3fcee7c3a Move h264_profile_level_id and vp9_profile to api/video_codecs
This is a refactor to simplify a follow-up CL of adding
SdpVideoFormat::IsSameCodec.

The original files media/base/h264_profile_level_id.* and
media/base/vp9_profile.h must be kept until downstream projects
stop using them.

Bug: chroimium:1187565
Change-Id: Ib39eca095a3d61939a914d9bffaf4b891ddd222f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/215236
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#33782}
2021-04-20 09:42:05 +00:00

44 lines
1.4 KiB
C++

/*
* Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include "media/base/h264_profile_level_id.h"
// TODO(crbug.com/1187565): Remove this file once downstream projects stop
// depend on it.
namespace webrtc {
namespace H264 {
absl::optional<ProfileLevelId> ParseProfileLevelId(const char* str) {
return webrtc::ParseH264ProfileLevelId(str);
}
absl::optional<ProfileLevelId> ParseSdpProfileLevelId(
const SdpVideoFormat::Parameters& params) {
return webrtc::ParseSdpForH264ProfileLevelId(params);
}
absl::optional<Level> SupportedLevel(int max_frame_pixel_count, float max_fps) {
return webrtc::H264SupportedLevel(max_frame_pixel_count, max_fps);
}
absl::optional<std::string> ProfileLevelIdToString(
const ProfileLevelId& profile_level_id) {
return webrtc::H264ProfileLevelIdToString(profile_level_id);
}
bool IsSameH264Profile(const SdpVideoFormat::Parameters& params1,
const SdpVideoFormat::Parameters& params2) {
return webrtc::H264IsSameProfile(params1, params2);
}
} // namespace H264
} // namespace webrtc