blob: 5b62d8b1d51a23f2f1b05c01fc8f94a2efb0b3f8 [file] [log] [blame]
Benjamin Wright47dbcab2019-03-14 15:01:30 -07001/*
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
Mirko Bonadei317a1f02019-09-17 17:06:18 +020014#include <memory>
15
Benjamin Wright47dbcab2019-03-14 15:01:30 -070016#include "test/fuzzers/utils/rtp_replayer.h"
17
18namespace webrtc {
19
20void FuzzOneInput(const uint8_t* data, size_t size) {
Mirko Bonadei317a1f02019-09-17 17:06:18 +020021 auto stream_state = std::make_unique<test::RtpReplayer::StreamState>();
Benjamin Wright47dbcab2019-03-14 15:01:30 -070022 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;
Benjamin Wright47dbcab2019-03-14 15:01:30 -070033 vp8_config.rtp.nack.rtp_history_ms = 1000;
Elad Alonfadb1812019-05-24 13:40:02 +020034 vp8_config.rtp.lntf.enabled = true;
Benjamin Wright47dbcab2019-03-14 15:01:30 -070035
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