Commit graph

24 commits

Author SHA1 Message Date
Björn Terelius
77ffbd3099 Include-what-you-use api/rtc_event_log/
Bug: webrtc:42226242
Change-Id: I8802beb672e398c598728fc3bb5173bcdad16efc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/354624
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42490}
2024-06-16 13:53:56 +00:00
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
Danil Chapovalov
c41977d303 Propagate Environment into RtcEventLogImpl
With intention to propagte it futher into RtcEventLogEncoderNewFormat
where it can replace usage of the global field trials

Same environment can be saved in RtcEventLogImpl itself wthere it can
replace usage of the global clock

Bug: webrtc:10335
Change-Id: Ia147d7073af5aab54190fdf192cd5c046c3d40a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330423
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41472}
2024-01-05 11:28:00 +00:00
Danil Chapovalov
151003d341 Deprecate RtcEventLogFactory constructor taking unused parameter
Bug: webrtc:15656
Change-Id: I22ed4cca4c0ce7ebf9c533ed7434617bf0a0f4a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330120
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41338}
2023-12-07 21:46:56 +00:00
Danil Chapovalov
2ca1d0f809 Delete legacy RtcEventLogFactory Create functions
All usage was migrated to the latest variant of the Create function that takes the Environment paramter.

Bug: webrtc:15656
Change-Id: I2fb2bf4bc4a858d69adc64c2804c1bd830011f10
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329440
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41302}
2023-12-03 11:10:35 +00:00
Danil Chapovalov
1a82d31cb5 Add RtcEventLogFactory::Create variant that uses Environment
With intent to delete previous versions of the Create functions.

Bug: webrtc:15656
Change-Id: I972377701becca21b8ecfe15d41a10a4248f87ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328420
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41275}
2023-11-29 13:22:32 +00:00
Lionel Koenig
612872b29d Add RtcEvent to store when MinimumSetDelay is set on NetEq
To be able to simulate offline some scenario in which the javascript
layer set the minimum base buffer size of neteq, it is required to
record those API calls. This change introduces this.

Bug: webrtc:14763
Change-Id: Ic817913eda60978d6fca3f8e12229aeec505ca25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287122
Auto-Submit: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39104}
2023-01-13 17:15:48 +00:00
Markus Handell
f015a12802 RtcEventLogImpl: Add mocked time test.
This change adds mocked time unit tests to RtcEventLogImpl. In
order to simplify test implementation, the Impl ctor was changed
to accept an already created event log encoder. The previous
factory was made public in the Impl interface and relevant
code sites were updated.

Bug: chromium:1288710
Change-Id: Ifbfd899c5a06a3350c7e5fbc3bb7280f67124f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290382
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38987}
2023-01-03 14:08:16 +00:00
Harald Alvestrand
90af4c1b70 Change RTCEventLogFactory to have a const Create function
Conformant with naming rule:
https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/g3doc/implementation_basics.md;l=48?q=factory%20file:md$%20file:webrtc&ss=chromium

Bug: webrtc:14226
Change-Id: Ibec148fada6303e2ebdc5e6405fd527065f69d41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266360
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37364}
2022-06-28 23:48:37 +00:00
Björn Terelius
c15bced118 Prepare for new event log parser.
Minor clean up of BUILD file.
Add explicit events for begin and end of log.
Add a helper function to populate timestamps.
Add a GroupKey method that will be used for grouping events by for example SSRC in additon to event type.

Bug: webrtc:11933
Change-Id: Ie3c5f5a5582c89805a0273f4b27978f47ed0fb4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234260
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35725}
2022-01-18 16:13:13 +00:00
Artem Titov
0e61fdd27c Use backticks not vertical bars to denote variables in comments for /api
Bug: webrtc:12338
Change-Id: Ib97b2c3d64dbd895f261ffa76a2e885bd934a87f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34554}
2021-07-26 18:27:34 +00:00
Björn Terelius
ada810aab2 Reland "Deprecate microsecond timestamps in RTC event log."
This is a reland of e6ee8fab7e

Original change's description:
> Deprecate microsecond timestamps in RTC event log.
>
> (Microsecond timestamps are only used in the legacy wire-format,
> and the clocks only have microsecond resolution on some platforms.)
>
> Also convert structs on the parsing side to use a Timestamp instead
> of a uint64_t to represent the log time.
>
> Bug: webrtc:11933
> Change-Id: Ide5a0217d99f13f2e243115b163f13e0525648c7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219467
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34097}

Bug: webrtc:11933
Change-Id: I295be966ee96b50719ceb4690dad7e7ce958dbac
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/221361
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34321}
2021-06-17 12:08:54 +00:00
Björn Terelius
2fa4774067 Revert "Deprecate microsecond timestamps in RTC event log."
This reverts commit e6ee8fab7e.

Reason for revert: Breaks downstream test

Original change's description:
> Deprecate microsecond timestamps in RTC event log.
>
> (Microsecond timestamps are only used in the legacy wire-format,
> and the clocks only have microsecond resolution on some platforms.)
>
> Also convert structs on the parsing side to use a Timestamp instead
> of a uint64_t to represent the log time.
>
> Bug: webrtc:11933
> Change-Id: Ide5a0217d99f13f2e243115b163f13e0525648c7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219467
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34097}

TBR=terelius@webrtc.org,srte@webrtc.org,crodbro@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I478c9a4a1664b984891c4fcfc78f0ce9a51fe4c0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:11933
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219636
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34100}
2021-05-24 13:11:10 +00:00
Björn Terelius
e6ee8fab7e Deprecate microsecond timestamps in RTC event log.
(Microsecond timestamps are only used in the legacy wire-format,
and the clocks only have microsecond resolution on some platforms.)

Also convert structs on the parsing side to use a Timestamp instead
of a uint64_t to represent the log time.

Bug: webrtc:11933
Change-Id: Ide5a0217d99f13f2e243115b163f13e0525648c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/219467
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34097}
2021-05-24 11:39:02 +00:00
Bjorn Terelius
5481784385 Add kill-switch to RTC event log factory.
Bug: webrtc:12084
Change-Id: Iac2c05b59a20e272fe302a5580357f6f141dc328
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/190983
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32558}
2020-11-05 14:08:02 +00:00
Björn Terelius
00c12f6779 Add logging of decoded video frames.
This CL adds the possibility to log metainformation about
decoded frames in RTC event log, including encoding parsing
and tests. It will be wired up in a followup CL.


Bug: webrtc:8802
Change-Id: Ied598b266513d0f63fce0484d741af1782607e74
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181061
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31873}
2020-08-06 17:33:24 +00:00
Mirko Bonadei
c7a3b08f07 Prefix ENABLE_RTC_EVENT_LOG with WEBRTC_.
Since this macro can be considered public, it makes sense to prefix it
with WEBRTC_ (also to avoid potential conflicts with client code).

This CL also removes some definitions of this macro in order to define
it only where it is strictly needed (it is only used in a .cc file).

Bug: webrtc:11142
Change-Id: Idce7389301e71d8434e238b3cf4ceaa9cf97cd87
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/161008
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29957}
2019-11-29 09:45:50 +00:00
Mirko Bonadei
86d053c2db Use source_sets in component builds and static_library in release builds.
Static libraries don't guarantee that an exported symbol gets linked
into a shared library (and in order to support Chromium's component
build mode, WebRTC needs to be linked as a shared library).

Source sets always pass all the object files to the linker.

On the flip side, source_sets link more object files in release builds
and to avoid this, this CL introduces a the GN template "rtc_library" that
expands to static_library during release builds and to source_set during
component builds.

See: https://gn.googlesource.com/gn/+/master/docs/reference.md#func_source_set

Bug: webrtc:9419
Change-Id: I4667e820c2b3fcec417becbd2034acc13e4f04fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/157168
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#29525}
2019-10-17 21:17:18 +00:00
Mirko Bonadei
35214fcfe2 Add missing RTC_EXPORT for the component build.
Bug: webrtc:9419
Change-Id: I3225259fb4cc55e9820f590928795f4587f1e3cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/153884
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29479}
2019-10-15 09:07:44 +00:00
Sebastian Jansson
0a5ed896e2 Adds remote estimates to rtc event log.
Bug: webrtc:10742
Change-Id: I0db998a05492603fcdeedca780d9ee3d64aa00d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151651
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29233}
2019-09-19 09:22:37 +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
Danil Chapovalov
ed69d41b62 Remove deprecated RtcEventLog Create functions
Bug: webrtc:10206
Change-Id: Iabf3eea20027ae42faadabba572dc68f9b678121
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/139105
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28103}
2019-05-29 12:39:08 +00:00
Sebastian Jansson
58c71db1b3 Fix for crash in event log when using scenario tests.
Scenario tests runs all its activities on task queues. This is not
allowed by the default event log writer, causing a DCHECK failure.
This CL makes it possible to stop the event asynchronously,
thereby avoiding the need for the DCHECK.

Bug: webrtc:10365
Change-Id: I1206982b29fd609ac85b4ce30ae9291cbec52041
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/136685
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28027}
2019-05-22 15:22:49 +00:00
Danil Chapovalov
b32f2c7f57 Publish rtc event log api and default factory for it in api/
Bug: webrtc:10206
Change-Id: I34194ddb6fd2b0a3d7c553fadc9ddc1ea9740da0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/137500
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28023}
2019-05-22 13:38:25 +00:00