Revert "Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8."
This reverts commit 07efe436c9002e139845f62486e3ee4e29f0d85b.
Reason for revert: Breaks downstream project.
cricket::GetSimulcastConfig method signature has been updated.
I think you can get away with a default value for temporal_layers_supported (and then you can remove it after a few days when projects will be updated).
Original change's description:
> Implement H264 simulcast support and generalize SimulcastEncoderAdapter use for H264 & VP8.
>
> * Move SimulcastEncoderAdapter out under modules/video_coding
> * Move SimulcastRateAllocator back out to modules/video_coding/utility
> * Move TemporalLayers and ScreenshareLayers to modules/video_coding/utility
> * Move any VP8 specific code - such as temporal layer bitrate budgeting -
> under codec type dependent conditionals.
> * Plumb the simulcast index for H264 in the codec specific and RTP format data structures.
>
> Bug: webrtc:5840
> Change-Id: Ieced8a00e38f273c1a6cfd0f5431a87d07b8f44e
> Reviewed-on: https://webrtc-review.googlesource.com/64100
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23705}
TBR=sprang@webrtc.org,stefan@webrtc.org,mflodman@webrtc.org,hta@webrtc.org,sergio.garcia.murillo@gmail.com,titovartem@webrtc.org,agouaillard@gmail.com
Change-Id: Ic9d3b1eeaf195bb5ec2063954421f5e77866d663
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:5840
Reviewed-on: https://webrtc-review.googlesource.com/84760
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23710}
diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn
index 0ed9da2..f247ac9 100644
--- a/modules/video_coding/BUILD.gn
+++ b/modules/video_coding/BUILD.gn
@@ -152,6 +152,7 @@
":packet",
":video_codec_interface",
":video_coding_utility",
+ ":webrtc_vp8_helpers",
":webrtc_vp9_helpers",
"..:module_api",
"..:module_api_public",
@@ -236,10 +237,6 @@
"utility/moving_average.h",
"utility/quality_scaler.cc",
"utility/quality_scaler.h",
- "utility/simulcast_rate_allocator.cc",
- "utility/simulcast_rate_allocator.h",
- "utility/simulcast_utility.cc",
- "utility/simulcast_utility.h",
"utility/vp8_header_parser.cc",
"utility/vp8_header_parser.h",
"utility/vp9_uncompressed_header_parser.cc",
@@ -266,8 +263,6 @@
"../../rtc_base:sequenced_task_checker",
"../../rtc_base/experiments:quality_scaling_experiment",
"../../system_wrappers",
- "../../system_wrappers:field_trial_api",
- "../../system_wrappers:metrics_api",
"../rtp_rtcp:rtp_rtcp_format",
"//third_party/abseil-cpp/absl/types:optional",
]
@@ -296,7 +291,6 @@
"../../rtc_base:checks",
"../../rtc_base:rtc_base",
"../../system_wrappers:metrics_api",
- "//third_party/libyuv",
]
if (rtc_use_h264) {
@@ -383,20 +377,18 @@
]
}
-# This target includes the internal SW codec.
-rtc_static_library("webrtc_vp8") {
+# This target includes VP8 files that may be used for any VP8 codec, internal SW or external HW.
+rtc_static_library("webrtc_vp8_helpers") {
visibility = [ "*" ]
- poisonous = [ "software_video_codecs" ]
sources = [
"codecs/vp8/default_temporal_layers.cc",
"codecs/vp8/default_temporal_layers.h",
"codecs/vp8/include/vp8.h",
- "codecs/vp8/libvpx_vp8_decoder.cc",
- "codecs/vp8/libvpx_vp8_decoder.h",
- "codecs/vp8/libvpx_vp8_encoder.cc",
- "codecs/vp8/libvpx_vp8_encoder.h",
+ "codecs/vp8/include/vp8_common_types.h",
"codecs/vp8/screenshare_layers.cc",
"codecs/vp8/screenshare_layers.h",
+ "codecs/vp8/simulcast_rate_allocator.cc",
+ "codecs/vp8/simulcast_rate_allocator.h",
"codecs/vp8/temporal_layers.cc",
"codecs/vp8/temporal_layers.h",
]
@@ -424,6 +416,45 @@
"//third_party/abseil-cpp/absl/types:optional",
"//third_party/libyuv",
]
+}
+
+# This target includes the internal SW codec.
+rtc_static_library("webrtc_vp8") {
+ visibility = [ "*" ]
+ poisonous = [ "software_video_codecs" ]
+ sources = [
+ "codecs/vp8/include/vp8.h",
+ "codecs/vp8/include/vp8_common_types.h",
+ "codecs/vp8/libvpx_vp8_decoder.cc",
+ "codecs/vp8/libvpx_vp8_decoder.h",
+ "codecs/vp8/libvpx_vp8_encoder.cc",
+ "codecs/vp8/libvpx_vp8_encoder.h",
+ ]
+
+ if (!build_with_chromium && is_clang) {
+ # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
+ suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
+ }
+
+ deps = [
+ ":video_codec_interface",
+ ":video_coding_utility",
+ ":webrtc_vp8_helpers",
+ "..:module_api",
+ "../..:webrtc_common",
+ "../../:typedefs",
+ "../../api/video:video_frame",
+ "../../api/video_codecs:video_codecs_api",
+ "../../common_video",
+ "../../rtc_base:checks",
+ "../../rtc_base:rtc_base_approved",
+ "../../rtc_base:rtc_numerics",
+ "../../system_wrappers",
+ "../../system_wrappers:field_trial_api",
+ "../../system_wrappers:metrics_api",
+ "//third_party/abseil-cpp/absl/types:optional",
+ "//third_party/libyuv",
+ ]
if (rtc_build_libvpx) {
deps += [ rtc_libvpx_dir ]
}
@@ -543,8 +574,8 @@
rtc_source_set("simulcast_test_fixture_impl") {
testonly = true
sources = [
- "utility/simulcast_test_fixture_impl.cc",
- "utility/simulcast_test_fixture_impl.h",
+ "codecs/vp8/simulcast_test_fixture_impl.cc",
+ "codecs/vp8/simulcast_test_fixture_impl.h",
]
if (!build_with_chromium && is_clang) {
@@ -556,7 +587,7 @@
":mock_headers",
":video_codec_interface",
":video_coding",
- ":video_coding_utility",
+ ":webrtc_vp8_helpers",
"../../:webrtc_common",
"../../api:simulcast_test_fixture_api",
"../../api/video:video_frame",
@@ -587,6 +618,7 @@
":video_codec_interface",
":video_coding",
":video_coding_utility",
+ ":webrtc_vp8_helpers",
":webrtc_vp9_helpers",
"../..:webrtc_common",
"../../:typedefs",
@@ -706,7 +738,7 @@
":videocodec_test_impl",
":webrtc_h264",
":webrtc_multiplex",
- ":webrtc_vp8",
+ ":webrtc_vp8_helpers",
":webrtc_vp9",
":webrtc_vp9_helpers",
"../..:webrtc_common",
@@ -796,10 +828,7 @@
"video_sender_unittest.cc",
]
if (rtc_use_h264) {
- sources += [
- "codecs/h264/h264_encoder_impl_unittest.cc",
- "codecs/h264/h264_simulcast_unittest.cc",
- ]
+ sources += [ "codecs/h264/h264_encoder_impl_unittest.cc" ]
}
deps = [
@@ -808,7 +837,6 @@
":mock_headers",
":nack_module",
":packet",
- ":simulcast_test_fixture_impl",
":video_codec_interface",
":video_codecs_test_framework",
":video_coding",
@@ -816,6 +844,7 @@
":videocodec_test_impl",
":webrtc_h264",
":webrtc_vp8",
+ ":webrtc_vp8_helpers",
":webrtc_vp9",
":webrtc_vp9_helpers",
"..:module_api",