Refactor + enable GN check on video_coding_utility

To avoid the cyclic dependency

BUG=webrtc:6828
NOTRY=True
TBR=magjed@webrtc.org

Review-Url: https://codereview.webrtc.org/2717113002
Cr-Commit-Position: refs/heads/master@{#17116}
This commit is contained in:
kjellander
2017-03-08 05:42:26 -08:00
committed by Commit bot
parent e9369a951d
commit a8d8aadba8
14 changed files with 24 additions and 25 deletions

View File

@ -14,10 +14,10 @@
#include "webrtc/api/video/i420_buffer.h" #include "webrtc/api/video/i420_buffer.h"
#include "webrtc/base/checks.h" #include "webrtc/base/checks.h"
#include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
#include "webrtc/modules/video_coding/include/video_codec_interface.h" #include "webrtc/modules/video_coding/include/video_codec_interface.h"
#include "webrtc/modules/video_coding/include/video_error_codes.h" #include "webrtc/modules/video_coding/include/video_error_codes.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h"
#include "webrtc/test/gtest.h" #include "webrtc/test/gtest.h"
namespace webrtc { namespace webrtc {

View File

@ -59,6 +59,8 @@ rtc_static_library("video_coding") {
"packet_buffer.h", "packet_buffer.h",
"protection_bitrate_calculator.cc", "protection_bitrate_calculator.cc",
"protection_bitrate_calculator.h", "protection_bitrate_calculator.h",
"qp_parser.cc",
"qp_parser.h",
"receiver.cc", "receiver.cc",
"receiver.h", "receiver.h",
"rtp_frame_reference_finder.cc", "rtp_frame_reference_finder.cc",
@ -105,10 +107,6 @@ rtc_static_library("video_coding") {
} }
rtc_static_library("video_coding_utility") { rtc_static_library("video_coding_utility") {
# TODO(ehmaldonado): Remove (bugs.webrtc.org/6828)
# Errors on cyclic dependency with :video_coding if enabled.
check_includes = false
sources = [ sources = [
"utility/default_video_bitrate_allocator.cc", "utility/default_video_bitrate_allocator.cc",
"utility/default_video_bitrate_allocator.h", "utility/default_video_bitrate_allocator.h",
@ -118,12 +116,8 @@ rtc_static_library("video_coding_utility") {
"utility/ivf_file_writer.h", "utility/ivf_file_writer.h",
"utility/moving_average.cc", "utility/moving_average.cc",
"utility/moving_average.h", "utility/moving_average.h",
"utility/qp_parser.cc",
"utility/qp_parser.h",
"utility/quality_scaler.cc", "utility/quality_scaler.cc",
"utility/quality_scaler.h", "utility/quality_scaler.h",
"utility/simulcast_rate_allocator.cc",
"utility/simulcast_rate_allocator.h",
"utility/vp8_header_parser.cc", "utility/vp8_header_parser.cc",
"utility/vp8_header_parser.h", "utility/vp8_header_parser.h",
] ]
@ -137,7 +131,9 @@ rtc_static_library("video_coding_utility") {
"../..:webrtc_common", "../..:webrtc_common",
"../../base:rtc_base_approved", "../../base:rtc_base_approved",
"../../base:rtc_numerics", "../../base:rtc_numerics",
"../../base:rtc_task_queue",
"../../common_video", "../../common_video",
"../../modules/rtp_rtcp:rtp_rtcp",
"../../system_wrappers", "../../system_wrappers",
] ]
} }
@ -213,6 +209,8 @@ rtc_static_library("webrtc_vp8") {
"codecs/vp8/screenshare_layers.h", "codecs/vp8/screenshare_layers.h",
"codecs/vp8/simulcast_encoder_adapter.cc", "codecs/vp8/simulcast_encoder_adapter.cc",
"codecs/vp8/simulcast_encoder_adapter.h", "codecs/vp8/simulcast_encoder_adapter.h",
"codecs/vp8/simulcast_rate_allocator.cc",
"codecs/vp8/simulcast_rate_allocator.h",
"codecs/vp8/temporal_layers.h", "codecs/vp8/temporal_layers.h",
"codecs/vp8/vp8_impl.cc", "codecs/vp8/vp8_impl.cc",
"codecs/vp8/vp8_impl.h", "codecs/vp8/vp8_impl.h",
@ -325,6 +323,7 @@ if (rtc_include_tests) {
deps = [ deps = [
":video_coding", ":video_coding",
":video_coding_utility", ":video_coding_utility",
":webrtc_vp8",
"../..:webrtc_common", "../..:webrtc_common",
"../../base:rtc_base_approved", "../../base:rtc_base_approved",
"../../common_video:common_video", "../../common_video:common_video",

View File

@ -22,8 +22,8 @@
#include "webrtc/base/timeutils.h" #include "webrtc/base/timeutils.h"
#include "webrtc/common_types.h" #include "webrtc/common_types.h"
#include "webrtc/modules/video_coding/include/video_codec_initializer.h" #include "webrtc/modules/video_coding/include/video_codec_initializer.h"
#include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include "webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h" #include "webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h"
#include "webrtc/system_wrappers/include/cpu_info.h" #include "webrtc/system_wrappers/include/cpu_info.h"
namespace webrtc { namespace webrtc {

View File

@ -18,7 +18,7 @@
#include "webrtc/api/video/i420_buffer.h" #include "webrtc/api/video/i420_buffer.h"
#include "webrtc/base/checks.h" #include "webrtc/base/checks.h"
#include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h" #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include "webrtc/system_wrappers/include/clock.h" #include "webrtc/system_wrappers/include/clock.h"
namespace { namespace {

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h" #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include <algorithm> #include <algorithm>
#include <memory> #include <memory>

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_SIMULCAST_RATE_ALLOCATOR_H_ #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_RATE_ALLOCATOR_H_
#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_SIMULCAST_RATE_ALLOCATOR_H_ #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_RATE_ALLOCATOR_H_
#include <stdint.h> #include <stdint.h>
@ -48,4 +48,4 @@ class SimulcastRateAllocator : public VideoBitrateAllocator,
} // namespace webrtc } // namespace webrtc
#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_SIMULCAST_RATE_ALLOCATOR_H_ #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_SIMULCAST_RATE_ALLOCATOR_H_

View File

@ -21,9 +21,9 @@
#include "webrtc/base/checks.h" #include "webrtc/base/checks.h"
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
#include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
#include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h" #include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h"
#include "webrtc/test/gtest.h" #include "webrtc/test/gtest.h"
#include "webrtc/video_frame.h" #include "webrtc/video_frame.h"

View File

@ -28,8 +28,8 @@
#include "webrtc/modules/video_coding/include/video_codec_interface.h" #include "webrtc/modules/video_coding/include/video_codec_interface.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h" #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
#include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h"
#include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h"
#include "webrtc/system_wrappers/include/clock.h" #include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/system_wrappers/include/field_trial.h" #include "webrtc/system_wrappers/include/field_trial.h"
#include "webrtc/system_wrappers/include/metrics.h" #include "webrtc/system_wrappers/include/metrics.h"

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "webrtc/modules/video_coding/utility/qp_parser.h" #include "webrtc/modules/video_coding/qp_parser.h"
#include "webrtc/common_types.h" #include "webrtc/common_types.h"
#include "webrtc/modules/video_coding/utility/vp8_header_parser.h" #include "webrtc/modules/video_coding/utility/vp8_header_parser.h"

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#ifndef WEBRTC_MODULES_VIDEO_CODING_UTILITY_QP_PARSER_H_ #ifndef WEBRTC_MODULES_VIDEO_CODING_QP_PARSER_H_
#define WEBRTC_MODULES_VIDEO_CODING_UTILITY_QP_PARSER_H_ #define WEBRTC_MODULES_VIDEO_CODING_QP_PARSER_H_
#include "webrtc/modules/video_coding/encoded_frame.h" #include "webrtc/modules/video_coding/encoded_frame.h"
@ -27,4 +27,4 @@ class QpParser {
} // namespace webrtc } // namespace webrtc
#endif // WEBRTC_MODULES_VIDEO_CODING_UTILITY_QP_PARSER_H_ #endif // WEBRTC_MODULES_VIDEO_CODING_QP_PARSER_H_

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree. * be found in the AUTHORS file in the root of the source tree.
*/ */
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h" #include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include <limits> #include <limits>
#include <memory> #include <memory>

View File

@ -15,8 +15,8 @@
#include "webrtc/common_video/include/video_bitrate_allocator.h" #include "webrtc/common_video/include/video_bitrate_allocator.h"
#include "webrtc/common_types.h" #include "webrtc/common_types.h"
#include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h" #include "webrtc/modules/video_coding/codecs/vp8/screenshare_layers.h"
#include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h"
#include "webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h" #include "webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h"
#include "webrtc/system_wrappers/include/clock.h" #include "webrtc/system_wrappers/include/clock.h"

View File

@ -27,9 +27,9 @@
#include "webrtc/modules/video_coding/generic_encoder.h" #include "webrtc/modules/video_coding/generic_encoder.h"
#include "webrtc/modules/video_coding/jitter_buffer.h" #include "webrtc/modules/video_coding/jitter_buffer.h"
#include "webrtc/modules/video_coding/media_optimization.h" #include "webrtc/modules/video_coding/media_optimization.h"
#include "webrtc/modules/video_coding/qp_parser.h"
#include "webrtc/modules/video_coding/receiver.h" #include "webrtc/modules/video_coding/receiver.h"
#include "webrtc/modules/video_coding/timing.h" #include "webrtc/modules/video_coding/timing.h"
#include "webrtc/modules/video_coding/utility/qp_parser.h"
#include "webrtc/system_wrappers/include/clock.h" #include "webrtc/system_wrappers/include/clock.h"
namespace webrtc { namespace webrtc {

View File

@ -14,6 +14,7 @@
#include "webrtc/api/video/i420_buffer.h" #include "webrtc/api/video/i420_buffer.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h" #include "webrtc/modules/video_coding/codecs/vp8/include/vp8.h"
#include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h" #include "webrtc/modules/video_coding/codecs/vp8/include/vp8_common_types.h"
#include "webrtc/modules/video_coding/codecs/vp8/simulcast_rate_allocator.h"
#include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h" #include "webrtc/modules/video_coding/codecs/vp8/temporal_layers.h"
#include "webrtc/modules/video_coding/include/mock/mock_vcm_callbacks.h" #include "webrtc/modules/video_coding/include/mock/mock_vcm_callbacks.h"
#include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h" #include "webrtc/modules/video_coding/include/mock/mock_video_codec_interface.h"
@ -21,7 +22,6 @@
#include "webrtc/modules/video_coding/test/test_util.h" #include "webrtc/modules/video_coding/test/test_util.h"
#include "webrtc/modules/video_coding/video_coding_impl.h" #include "webrtc/modules/video_coding/video_coding_impl.h"
#include "webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h" #include "webrtc/modules/video_coding/utility/default_video_bitrate_allocator.h"
#include "webrtc/modules/video_coding/utility/simulcast_rate_allocator.h"
#include "webrtc/system_wrappers/include/clock.h" #include "webrtc/system_wrappers/include/clock.h"
#include "webrtc/test/frame_generator.h" #include "webrtc/test/frame_generator.h"
#include "webrtc/test/gtest.h" #include "webrtc/test/gtest.h"