Commit graph

19 commits

Author SHA1 Message Date
Tommi
f6f4543304 Rename VideoReceiveStream to VideoReceiveStreamInterface
Bug: webrtc:7484
Change-Id: I653cfe46486e0396897dd333069a894d67e3c07b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262769
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36958}
2022-05-22 10:54:38 +00:00
Björn Terelius
e0ac10db0a Remove use of deprecated Json API
Bug: b/228975498
Change-Id: Ib8fafdd092669f1b430c1f02eeb522fe1b13b654
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/258788
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36542}
2022-04-13 15:15:58 +00:00
Danil Chapovalov
76a35d9ce2 Delete legacy RtpHeaderParser wrapper
Bug: None
Change-Id: I4deec4fab631488ef2d0706848cbbe4e085825bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221617
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34341}
2021-06-21 09:17:52 +00:00
Philip Eliasson
2b068ce1b8 Reland "Moved VideoReceiveStream::Decoder::decoder_factory to VideoReceiveStream::Config::decoder_factory."
This reverts commit a4f23ad0ce.

Reason for revert: Downstream fix landed.

TBR=mflodman@webrtc.org

Original change's description:
> Revert "Moved VideoReceiveStream::Decoder::decoder_factory to VideoReceiveStream::Config::decoder_factory."
>
> This reverts commit acb9d8365a.
>
> Reason for revert: Break downstream stuff.
>
> Original change's description:
> > Moved VideoReceiveStream::Decoder::decoder_factory to VideoReceiveStream::Config::decoder_factory.
> >
> > Bug: webrtc:9106
> > Change-Id: I85712f3ab6a734d3fad7819491d3b8e3388b47e7
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180342
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#31834}
>
> TBR=nisse@webrtc.org,philipel@webrtc.org,mflodman@webrtc.org
>
> Change-Id: I6cfdb85a154a78135839f84edf5f69673d5ab715
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:9106
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180807
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31835}

TBR=nisse@webrtc.org,philipel@webrtc.org,mflodman@webrtc.org

# Not skipping CQ checks because this is a reland.

Bug: webrtc:9106
Change-Id: I03b3e68532107bec37bcc6e47a5489c84fe91ef9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180808
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31866}
2020-08-06 11:50:08 +00:00
Philip Eliasson
a4f23ad0ce Revert "Moved VideoReceiveStream::Decoder::decoder_factory to VideoReceiveStream::Config::decoder_factory."
This reverts commit acb9d8365a.

Reason for revert: Break downstream stuff.

Original change's description:
> Moved VideoReceiveStream::Decoder::decoder_factory to VideoReceiveStream::Config::decoder_factory.
> 
> Bug: webrtc:9106
> Change-Id: I85712f3ab6a734d3fad7819491d3b8e3388b47e7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180342
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#31834}

TBR=nisse@webrtc.org,philipel@webrtc.org,mflodman@webrtc.org

Change-Id: I6cfdb85a154a78135839f84edf5f69673d5ab715
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9106
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180807
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31835}
2020-08-03 15:45:41 +00:00
philipel
acb9d8365a Moved VideoReceiveStream::Decoder::decoder_factory to VideoReceiveStream::Config::decoder_factory.
Bug: webrtc:9106
Change-Id: I85712f3ab6a734d3fad7819491d3b8e3388b47e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180342
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31834}
2020-08-03 14:10:37 +00:00
Tommi
3580706684 Add a RunLoop to RtpReplayer to fix fuzzers
Bug: chromium:1080852
Change-Id: Ia02511cde09994deee222e4f1267d5265d0364ca
Tbr: mbonadei@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/174756
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31196}
2020-05-09 06:45:14 +00:00
Ilya Nikolaevskiy
0360dc490b Fix RtpReplayer so what vp9 fuzzer would work
Replayer isn't triggered in any pre- or post-submit checks
and is built only as a part of fuzzers. Therefore it got out of sync
with the requirement of Call::Config::trials being set.

Bug: chromium:1030755
Change-Id: I467a5fa19137020f6fc748b6adb6f82a8a88f9d1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169847
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30695}
2020-03-05 17:27:01 +00:00
Danil Chapovalov
0c626afcf3 Use newer version of TimeDelta and TimeStamp factories in webrtc
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Micros<\(.*\)>()/TimeDelta::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Millis<\(.*\)>()/TimeDelta::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::Seconds<\(.*\)>()/TimeDelta::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::us/TimeDelta::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::ms/TimeDelta::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/TimeDelta::seconds/TimeDelta::Seconds/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Micros<\(.*\)>()/Timestamp::Micros(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Millis<\(.*\)>()/Timestamp::Millis(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::Seconds<\(.*\)>()/Timestamp::Seconds(\1)/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::us/Timestamp::Micros/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::ms/Timestamp::Millis/g"
find . -type f \( -name "*.h" -o -name "*.cc" \) | xargs sed -i -e "s/Timestamp::seconds/Timestamp::Seconds/g"
git cl format

Bug: None
Change-Id: I87469d2e4a38369654da839ab7c838215a7911e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/168402
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#30491}
2020-02-10 12:21:17 +00:00
Patrik Höglund
4f2783b9fe Speculative Revert: "Use FakeRenderer when fuzzing"
This reverts commit ce9da1636a.
The vp8_replay_fuzzer runs out of memory unders MSAN for the input
in bug 1015797.

Tbr: kcwu@chromium.org
Bug: chromium:1015797, chromium:952606, chromium:1009077, chromium:1009073
Change-Id: Iab03437595b33e56816efe83b74fab6faf2340da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158402
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29609}
2019-10-25 09:09:30 +00:00
Kuang-che Wu
ce9da1636a Use FakeRenderer when fuzzing
Do not fuzz with real renderer because it is merely frame copying and
doesn't exercise different control flows. This CL also improved fuzzing
performance and fixed a memory leak.

Bug: chromium:952606, chromium:1009077, chromium:1009073
Change-Id: I77c6f2581db82bfd95edb18e5f0e541a94c78208
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156620
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29522}
2019-10-17 18:44:03 +00:00
Kuang-che Wu
d62ac3f0b8 Use fake clock for replay fuzzing
This speed up fuzzing because no more SleepMs in real time.

Bug: chromium:959836, chromium:1009073
Change-Id: Ib00a2ff8d6ca2e0bfc706ee7469e0a9c7fb10758
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/156362
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29439}
2019-10-10 19:03:47 +00:00
Mirko Bonadei
317a1f09ed Use std::make_unique instead of absl::make_unique.
WebRTC is now using C++14 so there is no need to use the Abseil version
of std::make_unique.

This CL has been created with the following steps:

git grep -l absl::make_unique | sort | uniq > /tmp/make_unique.txt
git grep -l absl::WrapUnique | sort | uniq > /tmp/wrap_unique.txt
git grep -l "#include <memory>" | sort | uniq > /tmp/memory.txt

diff --new-line-format="" --unchanged-line-format="" \
  /tmp/make_unique.txt /tmp/wrap_unique.txt | sort | \
  uniq > /tmp/only_make_unique.txt
diff --new-line-format="" --unchanged-line-format="" \
  /tmp/only_make_unique.txt /tmp/memory.txt | \
  xargs grep -l "absl/memory" > /tmp/add-memory.txt

git grep -l "\babsl::make_unique\b" | \
  xargs sed -i "s/\babsl::make_unique\b/std::make_unique/g"

git checkout PRESUBMIT.py abseil-in-webrtc.md

cat /tmp/add-memory.txt | \
  xargs sed -i \
  's/#include "absl\/memory\/memory.h"/#include <memory>/g'
git cl format
# Manual fix order of the new inserted #include <memory>

cat /tmp/only_make_unique | xargs grep -l "#include <memory>" | \
  xargs sed -i '/#include "absl\/memory\/memory.h"/d'

git ls-files | grep BUILD.gn | \
  xargs sed -i '/\/\/third_party\/abseil-cpp\/absl\/memory/d'

python tools_webrtc/gn_check_autofix.py \
  -m tryserver.webrtc -b linux_rel

# Repead the gn_check_autofix step for other platforms

git ls-files | grep BUILD.gn | \
  xargs sed -i 's/absl\/memory:memory/absl\/memory/g'
git cl format

Bug: webrtc:10945
Change-Id: I3fe28ea80f4dd3ba3cf28effd151d5e1f19aff89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153221
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29209}
2019-09-17 15:47:29 +00:00
Tommi
25eb47ccf1 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}
2019-08-29 15:56:40 +00:00
Danil Chapovalov
83bbe91398 Delete deprecated rtc_event_log header
Bug: webrtc:10206
Change-Id: I9ed3148843c647372993729b87c0e74741ab540b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/147870
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28791}
2019-08-07 10:58:17 +00:00
Danil Chapovalov
32b183432d Use default task queue factory in fuzzers
Bug: webrtc:10284
Change-Id: I31a7fe08f1ff3c4842ba657586a158bf632501d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/145217
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28549}
2019-07-12 07:56:10 +00:00
Danil Chapovalov
98793e5662 Explicetly set task queue factory in fuzzers/RtpReplayer
Bug: chromium:951552, chromium:951554, webrtc:10284
Change-Id: I52771bc486a6e9e7afbbae0af40a1eddf98ca487
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/132540
Reviewed-by: Alex Loiko <aleloi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27586}
2019-04-12 11:02:03 +00:00
Benjamin Wright
3295c01df2 Prevent fuzzing replayer being stuck forever on malformed packet times.
It is possible for the fuzzer to just never deliver packets if the packet delay
is set long enough in the RtpReplayer. This is simply fixed by setting an upper
bound. This change is in the test code setup.

Bug: webrtc:10493,chromium:943420
Change-Id: I54f56e1aa7700f1151e0b58a5a53bc789d032c18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/130365
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27369}
2019-03-29 23:26:14 +00:00
Benjamin Wright
47dbcabc2e Fuzzing support for RTPDump VP8 and VP9 Streams.
This change integrates fuzzing support for RtpDumps in WebRTC. This allows
LibFuzzer to directly fuzz the RTP code path from packet arrival all the way
to actual decoding and rendering. It does this by replaying each RTP packet
in the RTPDump which can be mutated directly by the fuzzer.

For fuzzing support the RtpFileReader needs to support reading from a
buffer instead of an file. The test class requires FILE* for all its
parsing operations and is deeply coupled this way. I chose to solve this
problem at an OS level by using the tmpfile() option and copying the buffer
to the tmpfile(). fmemopen() is no available on most platforms so couldn't
be used as a generic solution. The additional copy isn't ideal but won't
be a bottleneck for the fuzzing.

In the future I plan for the fuzzers to read from a configuration file. But
given the current packaging strategy for fuzzers in WebRTC this isn't easy.

Bug: webrtc:9860
Change-Id: I2560120e82663f9e9fb5b9640e6a6d16f9c1a360
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126682
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27151}
2019-03-15 18:48:43 +00:00