Make the RtpHeaderParserImpl available to tests and tools only.
There are a few reasons for making this test only:
* The code is only used by tests and utilities.
* The pure interface has only a single implementation so an interface isn't really needed.
(a followup change could remove it altogether)
* The implementation always incorporates locking regardless of how the class gets used.
See e.g. previous use in the Packet class.
* The implementation is a layer on top of RtpUtility::RtpHeaderParser which is
sufficient for most production cases.
Change-Id: Ide6d50567cf8ae5127a2eb04cceeb10cf317ec36
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150658
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29010}
diff --git a/modules/rtp_rtcp/source/ulpfec_receiver_unittest.cc b/modules/rtp_rtcp/source/ulpfec_receiver_unittest.cc
index cd1798b..32f3bbb 100644
--- a/modules/rtp_rtcp/source/ulpfec_receiver_unittest.cc
+++ b/modules/rtp_rtcp/source/ulpfec_receiver_unittest.cc
@@ -15,7 +15,6 @@
#include <list>
#include <memory>
-#include "modules/rtp_rtcp/include/rtp_header_parser.h"
#include "modules/rtp_rtcp/mocks/mock_recovered_packet_receiver.h"
#include "modules/rtp_rtcp/mocks/mock_rtp_rtcp.h"
#include "modules/rtp_rtcp/source/byte_io.h"
@@ -23,6 +22,7 @@
#include "modules/rtp_rtcp/source/forward_error_correction.h"
#include "test/gmock.h"
#include "test/gtest.h"
+#include "test/rtp_header_parser.h"
namespace webrtc {
@@ -177,7 +177,7 @@
size_t length,
uint8_t ulpfec_payload_type) {
RTPHeader header;
- std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::Create());
+ std::unique_ptr<RtpHeaderParser> parser(RtpHeaderParser::CreateForTest());
ASSERT_TRUE(parser->Parse(data, length, &header));
NullRecoveredPacketReceiver null_callback;