1 /* 2 * Copyright (c) 2019 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 */ 10 11 #include <stddef.h> 12 #include <stdint.h> 13 14 #include <memory> 15 16 #include "test/fuzzers/utils/rtp_replayer.h" 17 18 namespace webrtc { 19 FuzzOneInput(const uint8_t * data,size_t size)20void FuzzOneInput(const uint8_t* data, size_t size) { 21 auto stream_state = std::make_unique<test::RtpReplayer::StreamState>(); 22 VideoReceiveStream::Config vp8_config(&(stream_state->transport)); 23 24 VideoReceiveStream::Decoder vp8_decoder; 25 vp8_decoder.video_format = SdpVideoFormat("VP8"); 26 vp8_decoder.payload_type = 125; 27 vp8_config.decoders.push_back(std::move(vp8_decoder)); 28 29 vp8_config.rtp.local_ssrc = 7731; 30 vp8_config.rtp.remote_ssrc = 1337; 31 vp8_config.rtp.rtx_ssrc = 100; 32 vp8_config.rtp.transport_cc = true; 33 vp8_config.rtp.nack.rtp_history_ms = 1000; 34 vp8_config.rtp.lntf.enabled = true; 35 36 std::vector<VideoReceiveStream::Config> replay_configs; 37 replay_configs.push_back(std::move(vp8_config)); 38 39 test::RtpReplayer::Replay(std::move(stream_state), std::move(replay_configs), 40 data, size); 41 } 42 43 } // namespace webrtc 44