diff --git a/call/BUILD.gn b/call/BUILD.gn index b4958e4c0b..007c4006d2 100644 --- a/call/BUILD.gn +++ b/call/BUILD.gn @@ -98,6 +98,8 @@ rtc_source_set("rtp_receiver") { rtc_source_set("rtp_sender") { sources = [ + "payload_router.cc", + "payload_router.h", "rtp_transport_controller_send.cc", "rtp_transport_controller_send.h", ] @@ -106,10 +108,16 @@ rtc_source_set("rtp_sender") { ":rtp_interfaces", "..:webrtc_common", "../api/transport:network_control", + "../api/video_codecs:video_codecs_api", "../modules/congestion_controller", "../modules/congestion_controller/rtp:congestion_controller", "../modules/pacing", + "../modules/rtp_rtcp:rtp_rtcp", + "../modules/rtp_rtcp:rtp_rtcp_format", + "../modules/rtp_rtcp:rtp_video_header", "../modules/utility", + "../modules/video_coding:video_codec_interface", + "../rtc_base:checks", "../rtc_base:rtc_base", "../rtc_base:rtc_base_approved", "../rtc_base:rtc_task_queue", @@ -268,6 +276,7 @@ if (rtc_include_tests) { "bitrate_estimator_tests.cc", "call_unittest.cc", "flexfec_receive_stream_unittest.cc", + "payload_router_unittest.cc", "receive_time_calculator_unittest.cc", "rtcp_demuxer_unittest.cc", "rtp_bitrate_configurator_unittest.cc", @@ -304,11 +313,13 @@ if (rtc_include_tests) { "../modules/rtp_rtcp:mock_rtp_rtcp", "../modules/rtp_rtcp:rtp_rtcp_format", "../modules/utility:mock_process_thread", + "../modules/video_coding:video_codec_interface", "../rtc_base:checks", "../rtc_base:rtc_base_approved", "../system_wrappers", "../test:audio_codec_mocks", "../test:direct_transport", + "../test:field_trial", "../test:test_common", "../test:test_support", "../test:video_test_common", diff --git a/video/payload_router.cc b/call/payload_router.cc similarity index 99% rename from video/payload_router.cc rename to call/payload_router.cc index 1ec779bb73..8aaaad7ad4 100644 --- a/video/payload_router.cc +++ b/call/payload_router.cc @@ -8,7 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ -#include "video/payload_router.h" +#include "call/payload_router.h" #include "modules/rtp_rtcp/include/rtp_rtcp.h" #include "modules/rtp_rtcp/include/rtp_rtcp_defines.h" diff --git a/video/payload_router.h b/call/payload_router.h similarity index 95% rename from video/payload_router.h rename to call/payload_router.h index e6d7f440d6..8885458711 100644 --- a/video/payload_router.h +++ b/call/payload_router.h @@ -8,8 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ -#ifndef VIDEO_PAYLOAD_ROUTER_H_ -#define VIDEO_PAYLOAD_ROUTER_H_ +#ifndef CALL_PAYLOAD_ROUTER_H_ +#define CALL_PAYLOAD_ROUTER_H_ #include #include @@ -41,7 +41,7 @@ class PayloadRouter : public EncodedImageCallback { const std::vector& ssrcs, int payload_type, const std::map& states); - ~PayloadRouter(); + ~PayloadRouter() override; // PayloadRouter will only route packets if being active, all packets will be // dropped otherwise. @@ -81,4 +81,4 @@ class PayloadRouter : public EncodedImageCallback { } // namespace webrtc -#endif // VIDEO_PAYLOAD_ROUTER_H_ +#endif // CALL_PAYLOAD_ROUTER_H_ diff --git a/video/payload_router_unittest.cc b/call/payload_router_unittest.cc similarity index 99% rename from video/payload_router_unittest.cc rename to call/payload_router_unittest.cc index 7be0d21575..bd19ad35dd 100644 --- a/video/payload_router_unittest.cc +++ b/call/payload_router_unittest.cc @@ -11,13 +11,13 @@ #include #include +#include "call/payload_router.h" #include "modules/rtp_rtcp/include/rtp_rtcp.h" #include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h" #include "modules/video_coding/include/video_codec_interface.h" #include "test/field_trial.h" #include "test/gmock.h" #include "test/gtest.h" -#include "video/payload_router.h" using ::testing::_; using ::testing::AnyNumber; diff --git a/video/BUILD.gn b/video/BUILD.gn index 5f5f12def2..f60b772416 100644 --- a/video/BUILD.gn +++ b/video/BUILD.gn @@ -16,8 +16,6 @@ rtc_static_library("video") { "encoder_rtcp_feedback.h", "overuse_frame_detector.cc", "overuse_frame_detector.h", - "payload_router.cc", - "payload_router.h", "quality_threshold.cc", "quality_threshold.h", "receive_statistics_proxy.cc", @@ -70,6 +68,7 @@ rtc_static_library("video") { "../call:bitrate_allocator", "../call:call_interfaces", "../call:rtp_interfaces", + "../call:rtp_sender", "../call:video_stream_api", "../modules/rtp_rtcp:rtp_rtcp_format", "../modules/rtp_rtcp:rtp_video_header", @@ -359,7 +358,6 @@ if (rtc_include_tests) { "end_to_end_tests/stats_tests.cc", "end_to_end_tests/transport_feedback_tests.cc", "overuse_frame_detector_unittest.cc", - "payload_router_unittest.cc", "picture_id_tests.cc", "quality_scaling_tests.cc", "quality_threshold_unittest.cc", diff --git a/video/video_send_stream.h b/video/video_send_stream.h index a282853446..fec53ac217 100644 --- a/video/video_send_stream.h +++ b/video/video_send_stream.h @@ -17,13 +17,13 @@ #include "api/fec_controller.h" #include "call/bitrate_allocator.h" +#include "call/payload_router.h" #include "call/video_receive_stream.h" #include "call/video_send_stream.h" #include "common_video/libyuv/include/webrtc_libyuv.h" #include "rtc_base/criticalsection.h" #include "rtc_base/event.h" #include "rtc_base/task_queue.h" -#include "video/payload_router.h" #include "video/send_delay_stats.h" #include "video/send_statistics_proxy.h" #include "video/video_stream_encoder.h" diff --git a/video/video_send_stream_impl.h b/video/video_send_stream_impl.h index ab9f8d185f..a4a9078dc9 100644 --- a/video/video_send_stream_impl.h +++ b/video/video_send_stream_impl.h @@ -16,6 +16,7 @@ #include #include "call/bitrate_allocator.h" +#include "call/payload_router.h" #include "common_types.h" // NOLINT(build/include) #include "common_video/include/video_bitrate_allocator.h" #include "modules/rtp_rtcp/include/flexfec_sender.h" @@ -24,7 +25,6 @@ #include "rtc_base/weak_ptr.h" #include "video/call_stats.h" #include "video/encoder_rtcp_feedback.h" -#include "video/payload_router.h" #include "video/send_delay_stats.h" #include "video/send_statistics_proxy.h" #include "video/video_send_stream.h" diff --git a/video/video_stream_decoder.cc b/video/video_stream_decoder.cc index ce84c75a0e..87ce2ae71d 100644 --- a/video/video_stream_decoder.cc +++ b/video/video_stream_decoder.cc @@ -20,7 +20,6 @@ #include "rtc_base/logging.h" #include "system_wrappers/include/metrics.h" #include "video/call_stats.h" -#include "video/payload_router.h" #include "video/receive_statistics_proxy.h" namespace webrtc {