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 | */ |
Mirko Bonadei | 92ea95e | 2017-09-15 06:47:31 +0200 | [diff] [blame] | 10 | #include "modules/rtp_rtcp/source/rtcp_receiver.h" |
| 11 | #include "rtc_base/checks.h" |
| 12 | #include "system_wrappers/include/clock.h" |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 13 | |
| 14 | namespace webrtc { |
Danil Chapovalov | 9708884 | 2016-09-13 12:41:41 +0200 | [diff] [blame] | 15 | namespace { |
| 16 | |
| 17 | class NullModuleRtpRtcp : public RTCPReceiver::ModuleRtpRtcp { |
| 18 | public: |
| 19 | void SetTmmbn(std::vector<rtcp::TmmbItem>) override {} |
| 20 | void OnRequestSendReport() override {} |
| 21 | void OnReceivedNack(const std::vector<uint16_t>&) override {}; |
| 22 | void OnReceivedRtcpReportBlocks(const ReportBlockList&) override {}; |
| 23 | }; |
| 24 | |
| 25 | } |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 26 | |
| 27 | void FuzzOneInput(const uint8_t* data, size_t size) { |
Danil Chapovalov | 9708884 | 2016-09-13 12:41:41 +0200 | [diff] [blame] | 28 | NullModuleRtpRtcp rtp_rtcp_module; |
| 29 | SimulatedClock clock(1234); |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 30 | |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 31 | RTCPReceiver receiver(&clock, false, nullptr, nullptr, nullptr, nullptr, |
sprang | a790d83 | 2016-12-02 07:29:44 -0800 | [diff] [blame] | 32 | nullptr, &rtp_rtcp_module); |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 33 | |
Danil Chapovalov | 9708884 | 2016-09-13 12:41:41 +0200 | [diff] [blame] | 34 | receiver.IncomingPacket(data, size); |
Peter Boström | ba3e25e | 2016-02-23 11:35:30 +0100 | [diff] [blame] | 35 | } |
| 36 | } // namespace webrtc |
| 37 | |