Delete remaining usage of RtpHeaderParser test helper.

Bug: None
Change-Id: Ia4f8c5dc212f25b1a507e13955973ce4aa6a7ddc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/225550
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34525}
This commit is contained in:
Danil Chapovalov
2021-07-19 15:43:18 +00:00
committed by WebRTC LUCI CQ
parent 59e3ec2da0
commit 623146cfe1
14 changed files with 1 additions and 97 deletions

View File

@ -548,7 +548,6 @@ if (rtc_include_tests) {
"../test:fileutils",
"../test:null_transport",
"../test:perf_test",
"../test:rtp_test_utils",
"../test:test_common",
"../test:test_support",
"../test:video_test_common",

View File

@ -43,7 +43,6 @@
#include "test/frame_generator_capturer.h"
#include "test/gtest.h"
#include "test/null_transport.h"
#include "test/rtp_header_parser.h"
#include "test/rtp_rtcp_observer.h"
#include "test/testsupport/file_utils.h"
#include "test/testsupport/perf_test.h"

View File

@ -31,7 +31,6 @@
#include "test/gmock.h"
#include "test/gtest.h"
#include "test/rtcp_packet_parser.h"
#include "test/rtp_header_parser.h"
#include "test/run_loop.h"
#include "test/time_controller/simulated_time_controller.h"

View File

@ -24,7 +24,6 @@
#include "test/gmock.h"
#include "test/gtest.h"
#include "test/rtcp_packet_parser.h"
#include "test/rtp_header_parser.h"
using ::testing::ElementsAre;
using ::testing::Eq;

View File

@ -40,7 +40,6 @@
#include "test/gmock.h"
#include "test/gtest.h"
#include "test/mock_transport.h"
#include "test/rtp_header_parser.h"
#include "test/time_controller/simulated_time_controller.h"
namespace webrtc {

View File

@ -196,8 +196,6 @@ rtc_library("rtp_test_utils") {
"rtp_file_reader.h",
"rtp_file_writer.cc",
"rtp_file_writer.h",
"rtp_header_parser.cc",
"rtp_header_parser.h",
]
deps = [
@ -212,7 +210,6 @@ rtc_library("rtp_test_utils") {
"../rtc_base/synchronization:mutex",
"../rtc_base/system:arch",
]
absl_deps = [ "//third_party/abseil-cpp/absl/types:optional" ]
}
rtc_library("field_trial") {

View File

@ -618,11 +618,6 @@ webrtc_fuzzer_test("dcsctp_socket_fuzzer") {
]
}
webrtc_fuzzer_test("rtp_header_parser_fuzzer") {
sources = [ "rtp_header_parser_fuzzer.cc" ]
deps = [ "../:rtp_test_utils" ]
}
webrtc_fuzzer_test("ssl_certificate_fuzzer") {
sources = [ "ssl_certificate_fuzzer.cc" ]
deps = [

View File

@ -1,26 +0,0 @@
/*
* Copyright (c) 2019 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 <stddef.h>
#include <stdint.h>
#include <algorithm>
#include <memory>
#include <string>
#include "test/rtp_header_parser.h"
namespace webrtc {
void FuzzOneInput(const uint8_t* data, size_t size) {
RtpHeaderParser::GetSsrc(data, size);
}
} // namespace webrtc

View File

@ -19,7 +19,6 @@ if (rtc_include_tests) {
deps = [
"..:peer_scenario",
"../../:field_trial",
"../../:rtp_test_utils",
"../../:test_support",
"../../../media:rtc_media_base",
"../../../modules/rtp_rtcp:rtp_rtcp",

View File

@ -17,7 +17,6 @@
#include "test/gmock.h"
#include "test/gtest.h"
#include "test/peer_scenario/peer_scenario.h"
#include "test/rtp_header_parser.h"
namespace webrtc {
namespace test {

View File

@ -1,26 +0,0 @@
/*
* Copyright (c) 2013 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 "test/rtp_header_parser.h"
#include "modules/rtp_rtcp/source/rtp_utility.h"
namespace webrtc {
absl::optional<uint32_t> RtpHeaderParser::GetSsrc(const uint8_t* packet,
size_t length) {
RtpUtility::RtpHeaderParser rtp_parser(packet, length);
RTPHeader header;
if (rtp_parser.Parse(&header, nullptr)) {
return header.ssrc;
}
return absl::nullopt;
}
} // namespace webrtc

View File

@ -1,25 +0,0 @@
/*
* Copyright (c) 2013 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.
*/
#ifndef TEST_RTP_HEADER_PARSER_H_
#define TEST_RTP_HEADER_PARSER_H_
#include <stddef.h>
#include <stdint.h>
#include "absl/types/optional.h"
namespace webrtc {
class RtpHeaderParser {
public:
static absl::optional<uint32_t> GetSsrc(const uint8_t* packet, size_t length);
};
} // namespace webrtc
#endif // TEST_RTP_HEADER_PARSER_H_

View File

@ -71,7 +71,6 @@ if (rtc_include_tests && !build_with_chromium) {
":column_printer",
"../:fake_video_codecs",
"../:fileutils",
"../:rtp_test_utils",
"../:test_common",
"../:test_support",
"../:video_test_common",

View File

@ -18,7 +18,6 @@
#include "api/transport/network_types.h"
#include "modules/audio_mixer/audio_mixer_impl.h"
#include "modules/rtp_rtcp/source/rtp_util.h"
#include "test/rtp_header_parser.h"
namespace webrtc {
namespace test {
@ -295,9 +294,7 @@ void CallClient::UpdateBitrateConstraints(
void CallClient::OnPacketReceived(EmulatedIpPacket packet) {
MediaType media_type = MediaType::ANY;
if (IsRtpPacket(packet.data)) {
auto ssrc = RtpHeaderParser::GetSsrc(packet.cdata(), packet.data.size());
RTC_CHECK(ssrc.has_value());
media_type = ssrc_media_types_[*ssrc];
media_type = ssrc_media_types_[ParseRtpSsrc(packet.data)];
}
task_queue_.PostTask(
[call = call_.get(), media_type, packet = std::move(packet)]() mutable {