Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
Jonathan Metzman | 9f80b97 | 2018-10-05 10:38:13 -0700 | [diff] [blame] | 10 | #include "modules/rtp_rtcp/source/rtcp_packet/tmmb_item.h" |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 11 | #include "modules/rtp_rtcp/source/rtcp_receiver.h" |
| 12 | #include "rtc_base/checks.h" |
| 13 | #include "system_wrappers/include/clock.h" |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 14 | |
| 15 | namespace webrtc { |
Danil Chapovalov | 9708884 | 2016-09-13 12:41:41 +0200 | [diff] [blame] | 16 | namespace { |
| 17 | |
Jiawei Ou | 8b5d9d8 | 2018-11-15 16:44:37 -0800 | [diff] [blame] | 18 | constexpr int kRtcpIntervalMs = 1000; |
| 19 | |
Danil Chapovalov | 9708884 | 2016-09-13 12:41:41 +0200 | [diff] [blame] | 20 | class NullModuleRtpRtcp : public RTCPReceiver::ModuleRtpRtcp { |
| 21 | public: |
| 22 | void SetTmmbn(std::vector<rtcp::TmmbItem>) override {} |
| 23 | void OnRequestSendReport() override {} |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 24 | void OnReceivedNack(const std::vector<uint16_t>&) override{}; |
| 25 | void OnReceivedRtcpReportBlocks(const ReportBlockList&) override{}; |
Danil Chapovalov | 9708884 | 2016-09-13 12:41:41 +0200 | [diff] [blame] | 26 | }; |
| 27 | |
Yves Gerey | 665174f | 2018-06-19 15:03:05 +0200 | [diff] [blame] | 28 | } // namespace |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 29 | |
| 30 | void FuzzOneInput(const uint8_t* data, size_t size) { |
Danil Chapovalov | 9708884 | 2016-09-13 12:41:41 +0200 | [diff] [blame] | 31 | NullModuleRtpRtcp rtp_rtcp_module; |
| 32 | SimulatedClock clock(1234); |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 33 | |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 34 | RTCPReceiver receiver(&clock, false, nullptr, nullptr, nullptr, nullptr, |
Jiawei Ou | 8b5d9d8 | 2018-11-15 16:44:37 -0800 | [diff] [blame] | 35 | nullptr, kRtcpIntervalMs, &rtp_rtcp_module); |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 36 | |
Danil Chapovalov | 9708884 | 2016-09-13 12:41:41 +0200 | [diff] [blame] | 37 | receiver.IncomingPacket(data, size); |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 38 | } |
| 39 | } // namespace webrtc |