Move H264::Profile to h264_profile_level_id.h

Eliminates a few dependencies on the top-level common_types.h.

Bug: webrtc:7660
Change-Id: I91218a27e745e7e5e6b64dff9e09f6a6ab32d644
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181480
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31920}
This commit is contained in:
Niels Möller 2020-08-12 12:04:31 +02:00 committed by Commit Bot
parent 9642d3ae12
commit 67615460be
7 changed files with 13 additions and 23 deletions

View File

@ -755,7 +755,7 @@ if (rtc_include_tests) {
"test/videocodec_test_stats.h",
]
deps = [
"..:webrtc_common",
"../media:rtc_h264_profile_id",
"../modules/video_coding:video_codec_interface",
"../rtc_base:stringutils",
"video:video_frame_type",

View File

@ -40,4 +40,7 @@ specific_include_rules = {
"create_frame_generator\.h": [
"+system_wrappers/include/clock.h",
],
"videocodec_test_fixture\.h": [
"+media/base/h264_profile_level_id.h"
],
}

View File

@ -17,6 +17,7 @@
#include "api/test/videocodec_test_stats.h"
#include "api/video_codecs/video_decoder_factory.h"
#include "api/video_codecs/video_encoder_factory.h"
#include "media/base/h264_profile_level_id.h"
#include "modules/video_coding/include/video_codec_interface.h"
namespace webrtc {

View File

@ -35,19 +35,6 @@ class FrameCountObserver {
// Video specific types
// ==================================================================
// TODO(magjed): Move this and other H264 related classes out to their own file.
namespace H264 {
enum Profile {
kProfileConstrainedBaseline,
kProfileBaseline,
kProfileMain,
kProfileConstrainedHigh,
kProfileHigh,
};
} // namespace H264
struct SpatialLayer {
bool operator==(const SpatialLayer& other) const;
bool operator!=(const SpatialLayer& other) const { return !(*this == other); }

View File

@ -31,7 +31,6 @@ rtc_library("rtc_h264_profile_id") {
]
deps = [
"..:webrtc_common",
"../rtc_base",
"../rtc_base:checks",
"../rtc_base:rtc_base_approved",
@ -53,7 +52,6 @@ rtc_library("rtc_vp9_profile") {
]
deps = [
"..:webrtc_common",
"../api/video_codecs:video_codecs_api",
"../rtc_base:rtc_base_approved",
"../rtc_base/system:rtc_export",
@ -83,7 +81,6 @@ rtc_library("rtc_media_base") {
":rtc_h264_profile_id",
":rtc_media_config",
":rtc_vp9_profile",
"..:webrtc_common",
"../api:array_view",
"../api:audio_options_api",
"../api:frame_transformer_interface",
@ -233,7 +230,6 @@ rtc_library("rtc_internal_video_codecs") {
":rtc_h264_profile_id",
":rtc_media_base",
":rtc_simulcast_encoder_adapter",
"../:webrtc_common",
"../api/video:encoded_image",
"../api/video:video_bitrate_allocation",
"../api/video:video_frame",
@ -281,7 +277,6 @@ rtc_library("rtc_audio_video") {
deps = [
":rtc_constants",
":rtc_media_base",
"..:webrtc_common",
"../api:call_api",
"../api:libjingle_peerconnection_api",
"../api:media_stream_interface",
@ -404,7 +399,6 @@ rtc_library("rtc_data") {
]
deps = [
":rtc_media_base",
"..:webrtc_common",
"../api:call_api",
"../api:transport_api",
"../p2p:rtc_p2p",
@ -544,7 +538,6 @@ if (rtc_include_tests) {
":rtc_sdp_fmtp_utils",
":rtc_simulcast_encoder_adapter",
":rtc_vp9_profile",
"../:webrtc_common",
"../api:create_simulcast_test_fixture_api",
"../api:libjingle_peerconnection_api",
"../api:mock_video_bitrate_allocator",

View File

@ -12,7 +12,6 @@
#include <tuple>
#include "common_types.h" // NOLINT(build/include)
#include "media/base/h264_profile_level_id.h"
#include "media/base/vp9_profile.h"
#include "modules/video_coding/codecs/h264/include/h264.h"

View File

@ -15,12 +15,19 @@
#include <string>
#include "absl/types/optional.h"
#include "common_types.h" // NOLINT(build/include)
#include "rtc_base/system/rtc_export.h"
namespace webrtc {
namespace H264 {
enum Profile {
kProfileConstrainedBaseline,
kProfileBaseline,
kProfileMain,
kProfileConstrainedHigh,
kProfileHigh,
};
// Map containting SDP codec parameters.
typedef std::map<std::string, std::string> CodecParameterMap;