Commit graph

448 commits

Author SHA1 Message Date
Philip Eliasson
1f850a6dc7 Reland "SeqNumUnwrapper::Unwrap now returns int64_t instead of uint64_t."
This reverts commit b5207b488b.

Reason for revert: DecodedFramesHistory has now been updated.

Original change's description:
> Revert "SeqNumUnwrapper::Unwrap now returns int64_t instead of uint64_t."
> 
> This reverts commit b0f968a761.
> 
> Reason for revert: Need to update DecodedFramesHistory to manage negative picture IDs.
> 
> Original change's description:
> > SeqNumUnwrapper::Unwrap now returns int64_t instead of uint64_t.
> > 
> > Bug: webrtc:10263
> > Change-Id: Idaeae6be01bd4eba0691226c958d70e114161ffd
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127295
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Reviewed-by: Johannes Kron <kron@webrtc.org>
> > Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#27129}
> 
> TBR=kwiberg@webrtc.org,eladalon@webrtc.org,terelius@webrtc.org,philipel@webrtc.org,kron@webrtc.org
> 
> Change-Id: I529bb0475bd21a80fa244278aff1fd912a85c169
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10263
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127885
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27135}

TBR=kwiberg@webrtc.org,eladalon@webrtc.org,terelius@webrtc.org,philipel@webrtc.org,kron@webrtc.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:10263
Change-Id: Id59e377010b5070dd37a7ece8df79b23af43835a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128568
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27191}
2019-03-19 17:02:27 +00:00
Philip Eliasson
b5207b488b Revert "SeqNumUnwrapper::Unwrap now returns int64_t instead of uint64_t."
This reverts commit b0f968a761.

Reason for revert: Need to update DecodedFramesHistory to manage negative picture IDs.

Original change's description:
> SeqNumUnwrapper::Unwrap now returns int64_t instead of uint64_t.
> 
> Bug: webrtc:10263
> Change-Id: Idaeae6be01bd4eba0691226c958d70e114161ffd
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127295
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#27129}

TBR=kwiberg@webrtc.org,eladalon@webrtc.org,terelius@webrtc.org,philipel@webrtc.org,kron@webrtc.org

Change-Id: I529bb0475bd21a80fa244278aff1fd912a85c169
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10263
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127885
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27135}
2019-03-14 18:14:33 +00:00
Benjamin Wright
f1c9e21366 ClangTidy fixes for logging/
These are manual edits please verify there are no typos.
Feel free to auto-submit if there are no issues.

Bug: webrtc:10410
Change-Id: I2ea59dc66230182bee6ae7a0925aed0fe9ef823c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127643
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27133}
2019-03-14 14:51:00 +00:00
philipel
b0f968a761 SeqNumUnwrapper::Unwrap now returns int64_t instead of uint64_t.
Bug: webrtc:10263
Change-Id: Idaeae6be01bd4eba0691226c958d70e114161ffd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/127295
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27129}
2019-03-14 13:01:20 +00:00
Sebastian Jansson
1175ae0d80 Add log based GoogCC simulation to visualizer.
This CL adds  a mode to simulate roughly what GoogCC could have been
doing during the recording of an rtc event log by using the logged
events as input to GoogCC and visualizing the resulting target rate.

This is similar to the existing simulated_sendside_bwe mode, but uses
the new NetworkControllerInterface to ensure more reliable GoogCC
simulation.

Bug: None
Change-Id: I57894aa666151efc8405407d928b5257fb9b7d61
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/123924
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27095}
2019-03-13 09:39:14 +00:00
Danil Chapovalov
471783fc87 Remove rtc::QueuedTask alias, use webrtc::QueuedTask directly
Use absl::WrapUnique/absl::make_unique to create the queued tasks.

Bug: webrtc:10191
Change-Id: I8f47a60cb326b0fc361c7f0e338b25373d39937c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/126525
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27063}
2019-03-11 16:49:21 +00:00
Sebastian Jansson
62c7b39c71 Allow suppression of padding check in RtpHeaderParser.
Bug: None
Change-Id: I39574cade2c8c9df539f778fd97cb7a62827e169
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125521
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27039}
2019-03-08 15:54:17 +00:00
Sebastian Jansson
c8eeb18d41 Fixes parsing of logs where receive time info is missing.
Bug: None
Change-Id: I42165d3d9fa218f06013e964065a336e04f9f837
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/125522
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26962}
2019-03-05 08:19:10 +00:00
Mirko Bonadei
fc52b912a3 Implicitly suppress //build/config/clang:find_bad_constructs.
Since there is no way to enable/disable these diagnostics at runtime,
this CL moves the suppression into the rtc_* templates in order to
remove the need to explicitly add the snippet of code needed to
suppress it (currently copy/pasted in 144 locations).

The diagnostic that causes the most problems is the one about "complex
class/struct explicit ctor/dtor" [1] because WebRTC doesn't find
it useful enough.

Other diagnostics are good (for example the one that warns about
using "virtual" instead of "override", but that will be covered by
this clang-tidy check [2]) while others are Chromium related so
they have never triggered.

[1] - https://cs.chromium.org/chromium/src/tools/clang/plugins/FindBadConstructsConsumer.cpp?l=147-167&rcl=b4bebe1aa15dba7ca5fcc6456a81a55665327c3a
[2] - https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-override.html

Bug: webrtc:163
Change-Id: Icbf27efa5b369100a31e6a32df1a0913729b3b34
Reviewed-on: https://webrtc-review.googlesource.com/c/125088
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26918}
2019-03-01 10:18:17 +00:00
Sebastian Jansson
b8a4d688f9 Allow injection of task queue factory in RtcEventLog.
Bug: webrtc:10365
Change-Id: I48dcaaa7cecf8a201a30b81f23056a4d3a72c5a4
Reviewed-on: https://webrtc-review.googlesource.com/c/124825
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26906}
2019-02-28 16:59:54 +00:00
tzik
6b7bf6ab0c Add a presubmit check for absl/memory/memory.h inclusion for WrapUnique
This fixes a build error on C++17 mode due to missing #include, plus
adds a presubmit check to prevent further breakage.

Bug: chromium:752720
Change-Id: I5c7d1dca0079dfe7a042650402e6f7ae28a797ba
Reviewed-on: https://webrtc-review.googlesource.com/c/124940
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26898}
2019-02-28 14:12:48 +00:00
Kimmo Kinnunen
08f6a6c672 Import proto_library.gni when rtc_enable_protobuf is true
Import proto_library.gni when rtc_enable_protobuf is true instead of when
build_with_mozilla is false.

Makes it maybe easier to reason about the intention (e.g. intention is to not
compile any protobuf in, hence flag rtc_enable_protobuf)

The build file could not work if build_with_mozilla = true but
rtc_enable_protobuf = true.

Bug: webrtc:10338
Change-Id: I26e5983bd1519aa46c308b11796d518de5ef7597
Reviewed-on: https://webrtc-review.googlesource.com/c/123763
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26868}
2019-02-27 09:56:42 +00:00
Elad Alon
74f0a51f97 Move kFeedbackMessageType from Remb to Psfb
The FMT 15 is not specific only to REMB or loss notification messages.
Rather, it is the Application Layer FB (AFB) of Psfb (Payload Specific
Feedback Messages).
See https://tools.ietf.org/html/rfc4585#section-6.3

TBR=terelius@webrtc.org

Bug: webrtc:10336
Change-Id: I8cd27ef9ee044bf7b7e7c1bd1a53c1dae2d95006
Reviewed-on: https://webrtc-review.googlesource.com/c/123886
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26827}
2019-02-24 00:11:33 +00:00
tzik
8aa00f0371 Add missing absl/memory/memory.h to rtc_event_generic_ack_received.cc
absl/memory/memory.h needs to be included for absl::WrapUnique on the
C++17 mode build, as absl/types/optional.h has a conditional include of
memory.h.

Tbr: terelius@webrtc.org
Bug: chromium:752720
Change-Id: I7bdfb200f29ac8ec11f0b102304b7788595e7eb9
Reviewed-on: https://webrtc-review.googlesource.com/c/123360
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26815}
2019-02-22 11:14:38 +00:00
tzik
054db54ec4 Remove an absl::WrapUnique usage without absl/memory/memory.h include
absl::WrapUnique requires memory.h include on C++17 mode compile.

Bug: chromium:752720
Change-Id: Iaa958652727c8927831d8eecd223678328c7b3bd
Reviewed-on: https://webrtc-review.googlesource.com/c/122440
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Reviewed-by: Peter Slatala <psla@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26701}
2019-02-15 04:39:06 +00:00
Piotr (Peter) Slatala
cf8405e172 Add generic packet rates to event_log_visualizer.
This change adds incoming & outgoing packet rates to the
event_log_visualizer.

The outgoing packet rate is drawn on the graph with outgoing RTP rate,
because we want to see it together with bandwidth estimate and probe
clusters.

The incoming packet rate is drawn separately.

Bug: webrtc:9719
Change-Id: I32648d016359af110837440ed1a5f9c31c841ea7
Reviewed-on: https://webrtc-review.googlesource.com/c/122941
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Commit-Queue: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26696}
2019-02-14 22:45:37 +00:00
Piotr (Peter) Slatala
aec9794120 Fix DCHECK when encoding GenericPacket* events using the legacy RTC event log format.
Bug: webrtc:10319
Change-Id: I6764072281b8d66a8e4a5b2c0e547af3bfddda37
Reviewed-on: https://webrtc-review.googlesource.com/c/123121
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26693}
2019-02-14 18:11:19 +00:00
Piotr (Peter) Slatala
da825b1b12 Replace NOTREACHED with a break.
The old format is still used.

Bug: None
Change-Id: I2c8c9a8c7b09282ba8c375403cbee7fd7ab2d056
Reviewed-on: https://webrtc-review.googlesource.com/c/122960
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26679}
2019-02-14 09:59:49 +00:00
Piotr (Peter) Slatala
1290fc7086 Remove old accessor in GenericAckReceived
Bug: None
Change-Id: I6bb58f09731e0492e93bb28fd5d9fb541c7c8db1
Reviewed-on: https://webrtc-review.googlesource.com/c/122961
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26678}
2019-02-14 09:57:45 +00:00
Bjorn Terelius
dfd5c4b15e Parse XR, FIR and PLI in rtc_event_log_parser.cc
Bug: webrtc:10312
Change-Id: I1b24e23f8002feef8a2ef928130ac6da19c3cd81
Reviewed-on: https://webrtc-review.googlesource.com/c/122580
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26670}
2019-02-13 19:11:42 +00:00
Piotr (Peter) Slatala
5e2aad1c95 Support GenericPacketReceived/Sent/AckReceived event logs.
This change does not include receive_timestamps for ACKs, because there is 1 problem.
That problem will be resolved in a separate change.

I am getting receive_timestamp errors that have to do with delta compression with optional fields.
Two failure modes that I noticed:
1) the base event does not have the timestamp: it crashes with length validation
# Check failed: base <= MaxUnsignedValueOfBitWidth(params_.value_width_bits()) (1820716 vs. 131071)
2) all events are null, it crashes with assert that X events were expected, but no events were deserialized.


Bug: webrtc:9719
Change-Id: I5d1bbb95dfd15ca7321667aad5e4d89c085e9c06
Reviewed-on: https://webrtc-review.googlesource.com/c/122360
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26668}
2019-02-13 17:06:22 +00:00
Elad Alon
157540ac05 Stop hard-coding default IDs for RTP extensions
Hard-coding default values forces IDs over 14 to be used even
when we offer less than 15 different extensions.

Note that the code relies on MergeRtpHdrExts for making sure
that extension IDs are kept consistent and non-colliding between
different streams (audio/video).

Bug: webrtc:10288
Change-Id: I3e59f7ddc8ca43cea91084a6b7f36df70fb6be4a
Reviewed-on: https://webrtc-review.googlesource.com/c/121646
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26622}
2019-02-09 01:04:35 +00:00
Piotr (Peter) Slatala
f6adac87b4 Add rtc event generic packet sent and received.
Bug: webrtc:9719
Change-Id: I2f692d9c1b33ac390975a9e695c7652cdc1b1e6e
Reviewed-on: https://webrtc-review.googlesource.com/c/121680
Commit-Queue: Peter Slatala <psla@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26616}
2019-02-08 19:13:57 +00:00
Sebastian Jansson
0859142244 Add events processing to GetIceEvents.
Bug: webrtc:10170
Change-Id: I91f58fe67552060ae50eea425637dd50479a9f17
Reviewed-on: https://webrtc-review.googlesource.com/c/121643
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26569}
2019-02-06 14:14:09 +00:00
Mirko Bonadei
1c54605e77 [clang-tidy] Apply performance-move-const-arg fixes (misc).
This CL is a manual spin-off of [1], which tried to apply clang-tidy's
performance-move-const-arg [1] to the WebRTC codebase.

Since there were some wrong fixes to correct, this CL lands a few
different fixes, like adding a constructor overload to take an rvalue
reference or remove 'const' to make std::move effective.

[1] - https://webrtc-review.googlesource.com/c/src/+/120350
[2] - https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html

Bug: webrtc:10252
Change-Id: I42a777247fee2cb788efcd7c2035148330056b7a
Reviewed-on: https://webrtc-review.googlesource.com/c/120928
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26553}
2019-02-05 15:12:20 +00:00
Mirko Bonadei
c84f661b10 Stop using Googletest legacy APIs.
Googletest recently started replacing the term Test Case by Test Suite.
From now on, the preferred API is TestSuite*; the older TestCase* API
will be slowly deprecated.

This CL moves WebRTC to the new set of APIs.

More info in [1].

This CL has been generated with this script:

declare -A items
items[TYPED_TEST_CASE]=TYPED_TEST_SUITE
items[TYPED_TEST_CASE_P]=TYPED_TEST_SUITE_P
items[REGISTER_TYPED_TEST_CASE_P]=REGISTER_TYPED_TEST_SUITE_P
items[INSTANTIATE_TYPED_TEST_CASE_P]=INSTANTIATE_TYPED_TEST_SUITE_P
items[INSTANTIATE_TEST_CASE_P]=INSTANTIATE_TEST_SUITE_P
for i in "${!items[@]}"
do
  git ls-files | xargs sed -i "s/\b$i\b/${items[$i]}/g"
done
git cl format

[1] - https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature

Bug: None
Change-Id: I5ae191e3046caf347aeee01554d5743548ab0e3f
Reviewed-on: https://webrtc-review.googlesource.com/c/118701
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26494}
2019-01-31 13:23:33 +00:00
Bjorn Terelius
733e087e63 Ignore duplicated incoming RTCP packets in RTC event log parser.
Bug: webrtc:8111
Change-Id: I1082ff66cac9c3744811713d686b3d7f85bd7584
Reviewed-on: https://webrtc-review.googlesource.com/c/120200
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Peter Slatala <psla@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26430}
2019-01-28 20:38:38 +00:00
Mirko Bonadei
739baf097b [clang-tidy] Apply performance-for-range-copy fixes.
This CL applies clang-tidy's performance-for-range-copy [1] on the
WebRTC codebase.

All changes in this CL are automatically generated by both clang-tidy
and 'git cl format'.

[1] - https://clang.llvm.org/extra/clang-tidy/checks/performance-for-range-copy.html

Bug: webrtc:10215
Change-Id: I7c83290b8866d76129bbec4e24e6701f5014102e
Reviewed-on: https://webrtc-review.googlesource.com/c/120043
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26420}
2019-01-28 09:53:50 +00:00
Steve Anton
f380284035 (7) Rename files to snake_case: remove forwarding headers
Bug: webrtc:10159
Change-Id: I2ba899e0283b953538c7941c8790213e36d7c70e
Reviewed-on: https://webrtc-review.googlesource.com/c/118561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26417}
2019-01-26 00:33:46 +00:00
Mirko Bonadei
d970807e0c Remove rtc_base/scoped_ref_ptr.h.
The type rtc::scoped_refptr<T> is now part of api/. Please include it from
api/scoped_refptr.h.

More info: See: https://groups.google.com/forum/#!topic/discuss-webrtc/Mme2MSz4z4o.

Bug: webrtc:9887, webrtc:8205
No-Try: True
Change-Id: Ic6c7c81e226e59f12f7933e472f573ae097b55bf
Reviewed-on: https://webrtc-review.googlesource.com/c/119041
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26414}
2019-01-25 20:29:58 +00:00
Bjorn Terelius
18f65dc20a Don't attempt to unwrap RTP timestamps for RTX stream.
This fixes a bug where the event_log_visualizer hits a DCHECK when the RTP timestamp jumps.

TBR = kwiberg

Bug: webrtc:10170
Change-Id: I127a8e6165265d0726892a912f5bcdc33d98ced5
Reviewed-on: https://webrtc-review.googlesource.com/c/119664
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26410}
2019-01-25 15:59:22 +00:00
Sebastian Jansson
3770b99e64 Allow repeated feedback packets in log parser.
Bug: webrtc:10170
Change-Id: I68cf729aa92b1266868f6ebcb211d9d4af031176
Reviewed-on: https://webrtc-review.googlesource.com/c/119300
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26392}
2019-01-24 14:29:15 +00:00
Elad Alon
84ca69ad6e Add RTC event logging of LossNotification RTCP messages
Bug: webrtc:10226
Change-Id: Ib65970a8f13cd64529f3101993d40887168e313e
Reviewed-on: https://webrtc-review.googlesource.com/c/118933
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26391}
2019-01-24 13:33:57 +00:00
Elad Alon
f8e7ccb967 Create new RTCP feedback message - LossIndication
Create a new RTCP feedback message for reporting the loss and/or non-decodability of video frames, to be used by the upcoming injectable VideoFrameBufferController. The new feedback message should report:
1. The sequence number of the last decoded non-discardable video frame. (TBD: If a multi-packet frame, should it be the sequence number of the first, last, or any of the packets?)
2. The sequence number of the last received RTP packet in the stream.
3. A decodability flag, whose specific meaning depends on the last-received
   RTP sequence number. The decodability flag is true if and only if all of
   the frame's dependencies are known to be decodable, and the frame itself
   is not yet known to be unassemblable.
   * Clarification #1: In a multi-packet frame, the first packet's
     dependencies are known, but it is not yet known whether all parts
     of the current frame will be received.
   * Clarification #2: In a multi-packet frame, the dependencies would be
     unknown if the first packet was not received. Then, the packet will
     be known-unassemblable.

Bug: webrtc:10226
Change-Id: I1563c944477e3ed40235e82ab99a439414632aff
Reviewed-on: https://webrtc-review.googlesource.com/c/118931
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26387}
2019-01-24 12:21:00 +00:00
Sebastian Jansson
7e4341db60 Reland "Reland "Adds richer packet and ice processing to ParsedRtcEventLog.""
This is a reland of 6fc6a0cbb1

Original change's description:
> Reland "Adds richer packet and ice processing to ParsedRtcEventLog."
> 
> This is a reland of 4306a25dfc
> 
> Original change's description:
> > Adds richer packet and ice processing to ParsedRtcEventLog.
> > 
> > Bug: webrtc:10170
> > Change-Id: I0f10a8c0b5656917a806cf0f3ad88b7a6baee000
> > Reviewed-on: https://webrtc-review.googlesource.com/c/116069
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26268}
> 
> Bug: webrtc:10170
> Change-Id: Ie523427acba02b554583223b9ef800249d8d8f2b
> Reviewed-on: https://webrtc-review.googlesource.com/c/117724
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26350}

Bug: webrtc:10170
Change-Id: I9b57ca754197822de9966ee4c93526c7f2159dfd
Reviewed-on: https://webrtc-review.googlesource.com/c/118784
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26362}
2019-01-23 10:00:01 +00:00
Sebastian Jansson
71b5a7df77 Revert "Reland "Adds richer packet and ice processing to ParsedRtcEventLog.""
This reverts commit 6fc6a0cbb1.

Reason for revert: Incorrect DCHECK

Original change's description:
> Reland "Adds richer packet and ice processing to ParsedRtcEventLog."
> 
> This is a reland of 4306a25dfc
> 
> Original change's description:
> > Adds richer packet and ice processing to ParsedRtcEventLog.
> > 
> > Bug: webrtc:10170
> > Change-Id: I0f10a8c0b5656917a806cf0f3ad88b7a6baee000
> > Reviewed-on: https://webrtc-review.googlesource.com/c/116069
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26268}
> 
> Bug: webrtc:10170
> Change-Id: Ie523427acba02b554583223b9ef800249d8d8f2b
> Reviewed-on: https://webrtc-review.googlesource.com/c/117724
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26350}

TBR=terelius@webrtc.org,srte@webrtc.org

Change-Id: I5a8ef5cf4d4dab783482ef4968b3a832b805d759
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10170
Reviewed-on: https://webrtc-review.googlesource.com/c/118783
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26351}
2019-01-22 07:39:05 +00:00
Sebastian Jansson
6fc6a0cbb1 Reland "Adds richer packet and ice processing to ParsedRtcEventLog."
This is a reland of 4306a25dfc

Original change's description:
> Adds richer packet and ice processing to ParsedRtcEventLog.
> 
> Bug: webrtc:10170
> Change-Id: I0f10a8c0b5656917a806cf0f3ad88b7a6baee000
> Reviewed-on: https://webrtc-review.googlesource.com/c/116069
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26268}

Bug: webrtc:10170
Change-Id: Ie523427acba02b554583223b9ef800249d8d8f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/117724
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26350}
2019-01-21 19:47:38 +00:00
Sebastian Jansson
05acd2b76f Removes clock from TransportFeedbackAdapter.
Instead timestamps required for processing are provided explicitly.
This makes it easier to ensure correct usage in log processing
and simulation.

Bug: webrtc:10170
Change-Id: I724a6b9b94e83caa22b8e43b63ef4e6b46138e6a
Reviewed-on: https://webrtc-review.googlesource.com/c/118702
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26339}
2019-01-21 12:55:00 +00:00
Bjorn Terelius
5c2f1f053f Add some missing includes and dependencies.
In particular, time_utils.h is currently pulled in via rtc_event.h
This CL is in preparation of moving parts of the RTC event log to api/.

Bug: webrtc:10206
Change-Id: Idd35aa9404afded4d29b1296344996c45b8c2e91
Reviewed-on: https://webrtc-review.googlesource.com/c/117921
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26326}
2019-01-18 15:30:26 +00:00
Zach Stein
85989c4490 Remove unused friend declaration from ParsedRtcEventLog.
Bug: NONE
Change-Id: I987f13807a7aece16e88e9ff1c5b443b0213c488
Reviewed-on: https://webrtc-review.googlesource.com/c/118181
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Zach Stein <zstein@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26310}
2019-01-18 06:57:42 +00:00
Harald Alvestrand
4a7b3acfcf Add DTLSTransport info into sender/receiver state.
This is in preparation for letting Chrome extract DTLSTransport
information after SLD/SRD instead of doing it on-demand.

Bug: chromium:907849
Change-Id: Iac6b174c98d3d14136e1fd25bce4a9292f6c8b41
Reviewed-on: https://webrtc-review.googlesource.com/c/116984
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26289}
2019-01-17 10:21:32 +00:00
Sebastian Jansson
876d1d3fed Revert "Reland "Adds richer packet and ice processing to ParsedRtcEventLog.""
This reverts commit 20aae1de5c.

Reason for revert: Accidental revert.

Original change's description:
> Reland "Adds richer packet and ice processing to ParsedRtcEventLog."
> 
> This reverts commit 5586d7fb57.
> 
> Reason for revert: <INSERT REASONING HERE>
> 
> Original change's description:
> > Revert "Adds richer packet and ice processing to ParsedRtcEventLog."
> > 
> > This reverts commit 4306a25dfc.
> > 
> > Reason for revert: Breaks downstream project
> > 
> > Original change's description:
> > > Adds richer packet and ice processing to ParsedRtcEventLog.
> > > 
> > > Bug: webrtc:10170
> > > Change-Id: I0f10a8c0b5656917a806cf0f3ad88b7a6baee000
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/116069
> > > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#26268}
> > 
> > TBR=terelius@webrtc.org,srte@webrtc.org
> > 
> > Change-Id: Ic50fdfb6b10c26e77728b594f553bc4aac4eb0ab
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:10170
> > Reviewed-on: https://webrtc-review.googlesource.com/c/117780
> > Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
> > Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26270}
> 
> TBR=terelius@webrtc.org,srte@webrtc.org,amithi@webrtc.org
> 
> Change-Id: I5e87fb472b91dd4b6fa177418f03a9031035ec60
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10170
> Reviewed-on: https://webrtc-review.googlesource.com/c/117721
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26274}

TBR=terelius@webrtc.org,srte@webrtc.org,amithi@webrtc.org

Change-Id: Ie020006b02dda628c638ba00ac519f6da2aaa090
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10170
Reviewed-on: https://webrtc-review.googlesource.com/c/117723
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26275}
2019-01-16 08:26:37 +00:00
Sebastian Jansson
20aae1de5c Reland "Adds richer packet and ice processing to ParsedRtcEventLog."
This reverts commit 5586d7fb57.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "Adds richer packet and ice processing to ParsedRtcEventLog."
> 
> This reverts commit 4306a25dfc.
> 
> Reason for revert: Breaks downstream project
> 
> Original change's description:
> > Adds richer packet and ice processing to ParsedRtcEventLog.
> > 
> > Bug: webrtc:10170
> > Change-Id: I0f10a8c0b5656917a806cf0f3ad88b7a6baee000
> > Reviewed-on: https://webrtc-review.googlesource.com/c/116069
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26268}
> 
> TBR=terelius@webrtc.org,srte@webrtc.org
> 
> Change-Id: Ic50fdfb6b10c26e77728b594f553bc4aac4eb0ab
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10170
> Reviewed-on: https://webrtc-review.googlesource.com/c/117780
> Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
> Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26270}

TBR=terelius@webrtc.org,srte@webrtc.org,amithi@webrtc.org

Change-Id: I5e87fb472b91dd4b6fa177418f03a9031035ec60
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10170
Reviewed-on: https://webrtc-review.googlesource.com/c/117721
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26274}
2019-01-16 07:44:23 +00:00
Amit Hilbuch
5586d7fb57 Revert "Adds richer packet and ice processing to ParsedRtcEventLog."
This reverts commit 4306a25dfc.

Reason for revert: Breaks downstream project

Original change's description:
> Adds richer packet and ice processing to ParsedRtcEventLog.
> 
> Bug: webrtc:10170
> Change-Id: I0f10a8c0b5656917a806cf0f3ad88b7a6baee000
> Reviewed-on: https://webrtc-review.googlesource.com/c/116069
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26268}

TBR=terelius@webrtc.org,srte@webrtc.org

Change-Id: Ic50fdfb6b10c26e77728b594f553bc4aac4eb0ab
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10170
Reviewed-on: https://webrtc-review.googlesource.com/c/117780
Reviewed-by: Amit Hilbuch <amithi@webrtc.org>
Commit-Queue: Amit Hilbuch <amithi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26270}
2019-01-15 21:58:02 +00:00
Sebastian Jansson
4306a25dfc Adds richer packet and ice processing to ParsedRtcEventLog.
Bug: webrtc:10170
Change-Id: I0f10a8c0b5656917a806cf0f3ad88b7a6baee000
Reviewed-on: https://webrtc-review.googlesource.com/c/116069
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26268}
2019-01-15 16:30:38 +00:00
Steve Anton
aec15aa810 (5) Rename files to snake_case: install forwarding headers
Mechanically generated with this command:

tools_webrtc/do-renames.sh install all-renames.txt && git cl format

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: Ic8e99f71f2da62e5c99863c6d24a8cfe311466cd
Reviewed-on: https://webrtc-review.googlesource.com/c/115682
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26227}
2019-01-11 17:13:36 +00:00
Steve Anton
10542f21c8 (4) Rename files to snake_case: update BUILD.gn, include paths, header guards, and DEPS entries
Mechanically generated by running this command:

tools_webrtc/do-renames.sh update all-renames.txt && git cl format

Then manually updating:

tools_webrtc/sanitizers/tsan_suppressions_webrtc.cc

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I54824cd91dada8fc3ee3d098f971bc319d477833
Reviewed-on: https://webrtc-review.googlesource.com/c/115653
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26226}
2019-01-11 17:11:39 +00:00
Steve Anton
1c05765831 (3) Rename files to snake_case: move the files
Mechanically generated with this command:

tools_webrtc/do-rename.sh move all-renames.txt

Bug: webrtc:10159
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Change-Id: I8b05b6eab9b9d18b29c2199bbea239e9add1e690
Reviewed-on: https://webrtc-review.googlesource.com/c/115481
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26225}
2019-01-11 17:05:20 +00:00
Bjorn Terelius
b8b3c9918f Clean up visibility and dependencies of RTC event log build targets.
- Remove visibility of encoder target.
- Remove unnecessary dependency on task_queue.
- Remove CreateRtcEventLogFactory() declaration from the rtc_event_log_api target
  since the function is not defined in that target.

Bug: None
Change-Id: Id9edee86f358d08ea063d62bd96e9653c5b06d55
Reviewed-on: https://webrtc-review.googlesource.com/c/116060
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26215}
2019-01-11 11:05:12 +00:00
Bjorn Terelius
1bdce799eb Parse logs without RTX SSRC even if there is an RTX payload type.
Bug: webrtc:10187
Change-Id: I8f446ce5a8960fdaa6e3193c6647b8133b63e9a7
Reviewed-on: https://webrtc-review.googlesource.com/c/116741
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26197}
2019-01-10 14:43:39 +00:00
Sebastian Jansson
03fbf1eb4b Simplifies RtcEventProcessor interface.
Bug: webrtc:10170
Change-Id: Ie643e47c55b8c35ca9b8ef31eda5b1673f19d7b3
Reviewed-on: https://webrtc-review.googlesource.com/c/116066
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26160}
2019-01-08 15:16:19 +00:00
Sebastian Jansson
852fe661b7 Removes deprecated alias ParsedRtcEventLogNew.
Bug: webrtc:10170
Change-Id: I4dca6ff7c84fd1e18348d3c7bbdbbc8b6117bffc
Reviewed-on: https://webrtc-review.googlesource.com/c/116161
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26135}
2019-01-04 13:58:52 +00:00
Sebastian Jansson
b290a6d767 Renames RtcEventLogParseNew to RtcEventLogParser
Bug: webrtc:10170
Change-Id: I9232c276229a64fa4d8321b6c996387fe130f68b
Reviewed-on: https://webrtc-review.googlesource.com/c/116064
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26128}
2019-01-03 19:39:04 +00:00
Sebastian Jansson
3f2b9aad4a Moves logged event structs to separate header.
Bug: webrtc:10170
Change-Id: I2f6f5b9688f5064fc476063e4e64ac3f9a335b3c
Reviewed-on: https://webrtc-review.googlesource.com/c/116061
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26123}
2019-01-03 14:46:06 +00:00
Zach Stein
9e2e6e704b Set LoggedIceCandidatePairEvent.transaction_id to default value if missing.
Bug: webrtc:9972
Change-Id: I559ccb6799b494a9013523d3960a725ea7fd448e
Reviewed-on: https://webrtc-review.googlesource.com/c/114240
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Zach Stein <zstein@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26006}
2018-12-13 20:40:36 +00:00
Bjorn Terelius
ae786b82b6 Print media types for streams using the new event log format.
This CL moves the code that stores SSRCs used by different media types
so that it will be used by the new format too. This is sufficient to
get the correct media types printed in e.g. event_log_visualizer.

Bug: webrtc:8111
Change-Id: Ife11bc49b2af7577c7b5326c0b0fadd2e5b48b94
Reviewed-on: https://webrtc-review.googlesource.com/c/113942
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25965}
2018-12-11 13:20:14 +00:00
Bjorn Terelius
ba661fe11a Remove support for having multiple SSRCs in an RtcEventVideoSendStreamConfig.
This has been deprecated for a long time. Simulcast streams are now logged as
one RtcEventVideoSendStreamConfig per SSRC instead of one RtcEventVideoSendStreamConfig
containing a group of SSRCs

Bug: webrtc:8111
Change-Id: I4da62a4b2151a841413cde222a5154638dbb2e47
Reviewed-on: https://webrtc-review.googlesource.com/c/113811
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25957}
2018-12-10 19:59:12 +00:00
Bjorn Terelius
60aaa03ee1 Fix header extension mapping bug in RTC event log analyzer.
The header extensions for a receive stream should also be used
for the associated RTX stream, but not for the (RTCP) send stream.

Bug: webrtc:10113
Change-Id: Ibeb25a4490d7f628f1b360bf4d6f7edf444ba22a
Reviewed-on: https://webrtc-review.googlesource.com/c/113807
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25955}
2018-12-10 17:26:02 +00:00
Bjorn Terelius
fafae11bfc Allow parsing RTC event logs without a transaction ID.
Bug: webrtc:9972
Change-Id: I01d60671d249adbd55f25c8f49f205b18787cbf4
Reviewed-on: https://webrtc-review.googlesource.com/c/113304
Reviewed-by: Zach Stein <zstein@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25914}
2018-12-06 09:59:45 +00:00
Bjorn Terelius
c60a77731d Process RTP before RTCP in RTC event log analyzer.
This handles an unlikely corner case where you receive a RTCP feedback for a packet the same millisecond that you send it.

Bug: None
Change-Id: I77f460bef4073d4d9c5633c88f4d2dd8470f8577
Reviewed-on: https://webrtc-review.googlesource.com/c/113305
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25911}
2018-12-05 21:04:55 +00:00
Bjorn Terelius
4a817f6e6f Store timestamp of first and last event in RTC event log parser.
This was previously only done for the legacy wire format.

Bug: webrtc:8111
Change-Id: I82767c8eafb35a50967c6ff3d0131c3981957c1f
Reviewed-on: https://webrtc-review.googlesource.com/c/112590
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25909}
2018-12-05 17:05:43 +00:00
Bjorn Terelius
bd2cf71865 Remove functions to inject a TaskQueue in RtcEventLog creation.
The event log implementation will be simpler if it creates its own TaskQueue.
If we really need the "injectable" functionality, it could be achieved via a
TaskQueueFactory that returns a move-constructible TaskQueue.

Bug: webrtc:10085
Change-Id: I538be3dd77c09be2f5bae015227067acd6af8355
Reviewed-on: https://webrtc-review.googlesource.com/c/113140
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25908}
2018-12-05 16:35:04 +00:00
Bjorn Terelius
a713505c18 Preserve timestamp in DTLS writable event.
Bug: webrtc:10088
Change-Id: I63cd8cd3142c466c4ade74caee231a50fee8191e
Reviewed-on: https://webrtc-review.googlesource.com/c/113066
Reviewed-by: Zach Stein <zstein@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25898}
2018-12-04 20:49:11 +00:00
Bjorn Terelius
ebb677773a Allow access to specific RTCP types in new format event log parser.
Bug: webrtc:8111
Change-Id: Ia727c8fd9ddaa9f0c17fea5af8f544ad01e66367
Reviewed-on: https://webrtc-review.googlesource.com/c/112382
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25886}
2018-12-04 10:49:21 +00:00
Elad Alon
e7673cf922 RtcEventLogImpl nits
1. Make |output_period_ms_| optional, so as to clarify where
   it gets assigned a value. (I.e. the value set by the ctor
   is not retained.)
2. Some extra const modifiers.

Bug: webrtc:8111
Change-Id: I9f3ad7ff763cfbc9c9385f7fd4325ba696772765
Reviewed-on: https://webrtc-review.googlesource.com/c/112588
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25877}
2018-12-03 13:50:43 +00:00
Elad Alon
aa3d8ad71b Reland "Fix output period in RtcEventLogImpl"
This is a reland of a4dcb749fb

Original change's description:
> Fix output period in RtcEventLogImpl
> 
> RtcEventLogImpl::StartLogging() was ignoring one of its parameters.
> This CL fixes the issue.
> 
> Bug: webrtc:10082
> Change-Id: Ie1790c1a7299748dabe99909d967384ad9895635
> Reviewed-on: https://webrtc-review.googlesource.com/c/112586
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25858}

Bug: webrtc:10082
Change-Id: I783fba84aa35e489f6235538c624b19f2f98a962
Reviewed-on: https://webrtc-review.googlesource.com/c/112860
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25876}
2018-12-03 12:48:42 +00:00
Elad Alon
ad82a424e4 Fix race over RtcEventLogImpl::task_queue_
RtcEventLogImpl::task_queue_ is a std::unique_ptr<rtc::TaskQueue>.
When a unique_ptr is destroyed, it first sets its internal pointer
to point to null, and only then invokes the destructor of that
object. However, the code in RtcEventLogImpl relies on
rtc::TaskQueue's property, that its destructor blocks on executing
tasks.

We solve by manually invoking the destructor, and only resetting
the internal pointer thereafter. In theory, we could have changed
the unique_ptr to a raw pointer at this point. We avoid that, so
as to keep the ownership clearer to readers of the code.

Bug: webrtc:10085
Change-Id: I54bbf5d6bae019757ca2e31ee960d558058ccc42
Reviewed-on: https://webrtc-review.googlesource.com/c/112598
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25875}
2018-12-03 12:41:21 +00:00
Zach Stein
b3033c448f Add transaction id to candidate pair event log parser and encoder.
Covered by these tests:
RandomSeeds/RtcEventLogEncoderTest.RtcEventIceCandidatePair/*
RtcEventLogTest/RtcEventLogSession.*

Bug: webrtc:9972
Change-Id: I05473176357804e7ad0dedb51a659ab9481a4e4a
Reviewed-on: https://webrtc-review.googlesource.com/c/110103
Commit-Queue: Zach Stein <zstein@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25867}
2018-12-01 01:15:29 +00:00
Zach Stein
846dfdfd01 Log DTLS writable changes to RtcEventLog
Bug: webrtc:9972
Change-Id: I8d29dcbc200bd0aad7f4c2600459c4d344c61bbb
Reviewed-on: https://webrtc-review.googlesource.com/c/111453
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Zach Stein <zstein@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25866}
2018-12-01 01:00:28 +00:00
Qingsi Wang
2bb96682a2 Revert "Fix output period in RtcEventLogImpl"
This reverts commit a4dcb749fb.

Reason for revert: Speculative revert. Tsan failure has been consistently generated after this CL.

Original change's description:
> Fix output period in RtcEventLogImpl
> 
> RtcEventLogImpl::StartLogging() was ignoring one of its parameters.
> This CL fixes the issue.
> 
> Bug: webrtc:10082
> Change-Id: Ie1790c1a7299748dabe99909d967384ad9895635
> Reviewed-on: https://webrtc-review.googlesource.com/c/112586
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25858}

TBR=eladalon@webrtc.org,terelius@webrtc.org

Change-Id: I6b79c207d537ab6ca44bb418958854acebc886ac
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10082
Reviewed-on: https://webrtc-review.googlesource.com/c/112740
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25864}
2018-12-01 00:48:09 +00:00
Zach Stein
92c4289ada Reland "Add transaction id to CandidatePairEvents."
This is a reland of c308bdfa45

Original change's description:
> Add transaction id to CandidatePairEvents.
>
> The transaction id is a randomly generated number used to link stun
> requests and responses (https://tools.ietf.org/html/rfc5389#section-6).
> Logging this will help us debug ICE network issues.
>
> Bug: webrtc:9972
> Change-Id: I93167cb119aad99156e8727b6e4eeeff5198f924
> Reviewed-on: https://webrtc-review.googlesource.com/c/109720
> Commit-Queue: Zach Stein <zstein@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Elad Alon <eladalon@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25848}

TBR=terelius@webrtc.org,qingsi@webrtc.org

Bug: webrtc:9972
Change-Id: I32b55befddfcb8dc98babd0b64e756eaeb9fab09
Reviewed-on: https://webrtc-review.googlesource.com/c/112661
Reviewed-by: Zach Stein <zstein@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25862}
2018-11-30 21:10:51 +00:00
Elad Alon
a4dcb749fb Fix output period in RtcEventLogImpl
RtcEventLogImpl::StartLogging() was ignoring one of its parameters.
This CL fixes the issue.

Bug: webrtc:10082
Change-Id: Ie1790c1a7299748dabe99909d967384ad9895635
Reviewed-on: https://webrtc-review.googlesource.com/c/112586
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25858}
2018-11-30 15:03:23 +00:00
Erik Språng
286ee0123e Revert "Add transaction id to CandidatePairEvents."
This reverts commit c308bdfa45.

Reason for revert: The msan bot has been consistently failing since this commit. See eg https://ci.chromium.org/p/webrtc/builders/luci.webrtc.ci/Linux%20MSan/16989

Original change's description:
> Add transaction id to CandidatePairEvents.
> 
> The transaction id is a randomly generated number used to link stun
> requests and responses (https://tools.ietf.org/html/rfc5389#section-6).
> Logging this will help us debug ICE network issues.
> 
> Bug: webrtc:9972
> Change-Id: I93167cb119aad99156e8727b6e4eeeff5198f924
> Reviewed-on: https://webrtc-review.googlesource.com/c/109720
> Commit-Queue: Zach Stein <zstein@webrtc.org>
> Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
> Reviewed-by: Elad Alon <eladalon@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25848}

TBR=eladalon@webrtc.org,terelius@webrtc.org,zstein@webrtc.org,qingsi@webrtc.org,jeroendb@webrtc.org

Change-Id: Ib3b0a845f2300f4fcba2061650e17522735f08b3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9972
Reviewed-on: https://webrtc-review.googlesource.com/c/112581
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25852}
2018-11-30 09:28:25 +00:00
Zach Stein
c308bdfa45 Add transaction id to CandidatePairEvents.
The transaction id is a randomly generated number used to link stun
requests and responses (https://tools.ietf.org/html/rfc5389#section-6).
Logging this will help us debug ICE network issues.

Bug: webrtc:9972
Change-Id: I93167cb119aad99156e8727b6e4eeeff5198f924
Reviewed-on: https://webrtc-review.googlesource.com/c/109720
Commit-Queue: Zach Stein <zstein@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25848}
2018-11-29 22:52:35 +00:00
Zach Stein
c64078fdc0 Log DTLS state changes to RtcEventLog
Bug: webrtc:9972
Change-Id: Icb2cdda87c1c42607ed06653e053699532f25e84
Reviewed-on: https://webrtc-review.googlesource.com/c/111023
Commit-Queue: Zach Stein <zstein@webrtc.org>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25832}
2018-11-28 19:49:29 +00:00
Yves Gerey
3e70781361 [Cleanup] Add missing #include. Remove useless ones. IWYU part 2.
This is a follow-up to
https://webrtc-review.googlesource.com/c/src/+/106280.
This time the whole code base is covered.
Some files may have not been fixed though, whenever the IWYU tool
was breaking the build.

Bug: webrtc:8311
Change-Id: I2c31f552a87e887d33931d46e87b6208b1e483ef
Reviewed-on: https://webrtc-review.googlesource.com/c/111965
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25830}
2018-11-28 18:25:07 +00:00
Bjorn Terelius
2c977b4cc5 Remove RSID from stream configs in new event log format.
RSID is only useful if we store the RSID header extension.
Since we don't do that at the moment, there is no need to
store RSID in the stream configs.

Bug: webrtc:8111
Change-Id: I978f335d05984346f225c4781a8bfaa228f3f4c8
Reviewed-on: https://webrtc-review.googlesource.com/c/111759
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25763}
2018-11-22 17:54:06 +00:00
Niels Möller
2222a80e79 Delete unneeded includes of common_types.h and gn deps on webrtc_common.
Bug: webrtc:5876
Change-Id: Iae14e5f1679067a5a5e0584ca830aee0870c8807
Reviewed-on: https://webrtc-review.googlesource.com/c/111463
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25715}
2018-11-20 16:28:39 +00:00
Bjorn Terelius
c20b82a4ed Remove unused variables in RtcEventAudioXStreamConfig::Copy()
Bug: None
Change-Id: I186bf14e568bbd3d6cf17731602a75d3ea9e4aed
Reviewed-on: https://webrtc-review.googlesource.com/c/111464
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25711}
2018-11-20 13:18:13 +00:00
Mirko Bonadei
d474672dcd Make rtc_event_log protos publicly visible.
Bug: None
Change-Id: I189f249914e0fa67826b69aacf93288aa54ac0d5
Reviewed-on: https://webrtc-review.googlesource.com/c/111254
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25689}
2018-11-19 12:25:23 +00:00
Sebastian Jansson
8c1e73b024 Don't add empty extension list in event log parser.
This allows the fall back list to be used instead.

Bug: webrtc:9718
Change-Id: Ie17a4b740fef60385c6019ea167c73eff07e8ae2
Reviewed-on: https://webrtc-review.googlesource.com/c/111246
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25676}
2018-11-16 18:10:39 +00:00
Bjorn Terelius
e78b465d45 Add version and UTC time fields to RTC event log.
Bug: webrtc:8111
Change-Id: I843e1f8e50e4d4faf74819e0104aeb4fb869b834
Reviewed-on: https://webrtc-review.googlesource.com/c/110721
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25658}
2018-11-15 14:32:43 +00:00
Bjorn Terelius
fdc635d2a8 Remove deprecated APIs from RTC event log parser.
Bug: webrtc:8111
Change-Id: Ic64f8754c35c2de16d1f74e5d470a501d0a1af52
Reviewed-on: https://webrtc-review.googlesource.com/c/110900
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25637}
2018-11-14 13:49:40 +00:00
Bjorn Terelius
76f9954b17 Remove the old RTC event log parser.
The new parser provides the same functionality (with a slightly
different API) and is backwards compatible with the legacy wire format.
Downstream projects seem to have transitioned to the new parser API.

Bug: webrtc:8111
Change-Id: Icb458f0d55e0a4566c4b7b4a53cab48f0b9d6fd8
Reviewed-on: https://webrtc-review.googlesource.com/c/110782
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25635}
2018-11-14 11:35:28 +00:00
Bjorn Terelius
428a160dd6 Remove rtc_event_log2text
out/Default/protoc --decode=webrtc.rtclog.EventStream logging/rtc_event_log/rtc_event_log.proto < event_log_filename
performs a similar function.

Bug: webrtc:8111
Change-Id: I4aed302857651ec418dbc1bb05c97daf582bc83e
Reviewed-on: https://webrtc-review.googlesource.com/c/110725
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25627}
2018-11-13 18:12:27 +00:00
Bjorn Terelius
c7e3af1ad9 Remove rtc_event_log2stats.
This tool does not seem useful enough to justfy the maintenance cost.
If we want something like this in the future, then the core logic
should be added to the parser.

Bug: webrtc:8111
Change-Id: Ifc3dc9b91e85246d35d7775c68d0f2dc687516aa
Reviewed-on: https://webrtc-review.googlesource.com/c/110724
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25623}
2018-11-13 15:43:15 +00:00
Elad Alon
c42d62495c Event log - Use ToUnsigned() and ToSigned() on timestamp_ms
When delta encoding, use ToUnsigned() and ToSigned() on
timestamp_ms, since it's a signed type. This is only relevant
for delta-encoding/decoding.

Bug: webrtc:8111
Change-Id: I1fabfcb2be64793c281f5bc0d38a2f8035dd0d18
Reviewed-on: https://webrtc-review.googlesource.com/c/110504
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25602}
2018-11-12 14:27:38 +00:00
Elad Alon
19084f89d2 Event logs - encode N channels as N-1
Since the number of channels is always greater than 0, smaller
deltas can be accomplished by encoding a sequence of (1, 2, 1)
as if the sequence were (0, 1, 0). This way, wrap around to the
first value is a delta of 1, rahter than a delta of 3.

For simplicity's sake, though at the cost of consistency, we still
encode the base event's number of channels unshifted. We do so
because there are no bits to be gained by doing it otherwise, and
the value there is more likely to be manually inspected, than are
the deltas, so a simpler scheme has merit.

Bug: webrtc:8111
Change-Id: I2d4def67da85c42802fe13cd0494fdd9f2b38f7a
Reviewed-on: https://webrtc-review.googlesource.com/c/110242
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25601}
2018-11-12 14:05:11 +00:00
Elad Alon
f4a3f9cc25 Add RtcEvent::timestamp_ms()
Bug: webrtc:8111
Change-Id: I0ec7eda2b2afcd945625fb9f5d592e73a97992e3
Reviewed-on: https://webrtc-review.googlesource.com/c/109861
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25597}
2018-11-12 13:18:07 +00:00
Elad Alon
0b1b5c1b2a Hide RtcEvent members behind accessors
Bug: webrtc:8111
Change-Id: I3d350a6e159330aed7362162006860ac86ed7c32
Reviewed-on: https://webrtc-review.googlesource.com/c/109881
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25590}
2018-11-10 23:34:07 +00:00
Elad Alon
eb809f30d1 Event logs - separate audio_level and voice_activity
Bug: webrtc:8111
Change-Id: I44d81c5b4f5b854e8accd84521fbbd7b50228903
Reviewed-on: https://webrtc-review.googlesource.com/c/109571
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25589}
2018-11-10 01:41:28 +00:00
Elad Alon
56a4b32398 Rename fields in rtc_event_log2.proto
1. s/deltas_ms/ms-deltas
2. s/deltas_bps/bps_deltas
3. s/raw_packet_deltas/raw_packet_blobs

Bug: webrtc:8111
Change-Id: Ib2f7457275e0b930a6aa73d628a707676c74a2a4
Reviewed-on: https://webrtc-review.googlesource.com/c/109142
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25587}
2018-11-09 22:29:43 +00:00
Elad Alon
d95b0a2fbd Use delta-encoding in new WebRTC event logs
The new event log format makes use of delta encoding to compress
parts of the log.

Bug: webrtc:8111
Change-Id: I7bec839555323a7537dcec831d4ac1d5eb109932
Reviewed-on: https://webrtc-review.googlesource.com/c/109161
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25584}
2018-11-09 16:39:16 +00:00
Niels Möller
c572ff3c71 Add default constructor for rtc::Event
Bug: webrtc:9962
Change-Id: Icaa91e657e6881fcb1553f354c07866109a0ea68
Reviewed-on: https://webrtc-review.googlesource.com/c/109500
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25535}
2018-11-07 08:57:50 +00:00
Elad Alon
e40186332e Change to RtcEvent::Copy
Until this CL, RtcEvent::Copy() was a virtual function returning
a std::unique_ptr<RtcEvent>, which was used only in unit tests.
Whenever it was used, the exact sub-class was known, so returning
as a std::unique_ptr<RtcEvent> lost information, but the
additional flexibility of calling Copy on an unknown RtcEvent
was never used. This CL changes the function to a non-virtual one.

Bug: webrtc:8111
Change-Id: I30dbea5f4ec84c41282550aa77a855bfae9ffbd1
Reviewed-on: https://webrtc-review.googlesource.com/c/109140
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25487}
2018-11-02 14:44:36 +00:00
Yves Gerey
69807e8871 Depend directly on destination targets.
Makes 'gn check' happy.
Followup to https://webrtc-review.googlesource.com/c/src/+/106820

Bug: webrtc:5876, webrtc:9855
Change-Id: I33fa2c31ba26dc10c9a9c17da0ffed255c1f4d5b
Reviewed-on: https://webrtc-review.googlesource.com/c/108760
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25447}
2018-10-31 10:21:40 +00:00
Bjorn Terelius
b26cf2f130 Add field trial to enable the new RTC event log format.
Bug: webrtc:8111
Change-Id: Iffcd294a8ee9342a5f1e5ad07cb320d19323e37e
Reviewed-on: https://webrtc-review.googlesource.com/c/108161
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25429}
2018-10-30 13:48:38 +00:00
Elad Alon
59ebf23f9f Refactor structs in rtc_event_log_parser_new.h
Add some constructors to the structs in rtc_event_log_parser_new.h,
so that they may be emplaced into containers.

Bug: webrtc:8111
Change-Id: I2ccc3026673eef1237c7de2405e500fe9d7a33d0
Reviewed-on: https://webrtc-review.googlesource.com/c/108121
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25396}
2018-10-26 18:26:30 +00:00
Elad Alon
ff43541927 Delta compression efficiency improvement for non-existent base
Before this CL, when we encoded a sequence with a non-existent
base, we pretended that the delta was 0, and the first delta was
based on that. However, in a sequence where the deltas are small,
but where the first element is big, that would produce
unnecessarily wide deltas. Therefore, we change the behavior in
cases where the base is non-existent, to encode the first existent
value (if any) as a varint; the delta width may then be smaller.

This CL include two piggy-backed changes:
1. Varint encoding/decoding moved to its own file (and an
   additional flavor added).
2. The unit tests for delta encoding are further parameterized
   with a random seed.

Bug: webrtc:8111
Change-Id: I76fff577c86d019c8334bf74b76bd35db06ff68d
Reviewed-on: https://webrtc-review.googlesource.com/c/107860
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25395}
2018-10-26 18:17:40 +00:00
Bjorn Terelius
fdee701fa8 Add parser and unittests for new RTC event log format.
Bug: webrtc:8111
Change-Id: I78db0765449a07fb94caef6b1452024105d7a69b
Reviewed-on: https://webrtc-review.googlesource.com/c/106709
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25390}
2018-10-26 13:21:57 +00:00
Bjorn Terelius
c35096d975 Reland "Encode RTC event logs in new format."
This is a reland of ece3c228a2

Original change's description:
> Encode RTC event logs in new format.
> 
> This CL adds the encoder and wires it up to the event log.
> Parser and unit tests are uploaded in a separate CL.
> 
> Bug: webrtc:8111
> Change-Id: I6470003e55c2c4006cd8349a2c4bdc3f9491d869
> Reviewed-on: https://webrtc-review.googlesource.com/c/106708
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Elad Alon <eladalon@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25333}

Bug: webrtc:8111
Change-Id: I22eeca36d6b1f7cfa1ac65347571ebe33cecc1fc
Reviewed-on: https://webrtc-review.googlesource.com/c/108082
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25382}
2018-10-26 09:20:02 +00:00
Mirko Bonadei
825f83b99e Revert "Encode RTC event logs in new format."
This reverts commit ece3c228a2.

Reason: Breaks downstream project.

Bug: webrtc:8111
Change-Id: Ia264802b35a576d74b8a249ed742a8177e5cbe24
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/107721
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25340}
2018-10-24 13:18:03 +00:00
Elad Alon
257ed437f0 Add support for optional fields in FixedLengthDeltaEncoder
Optional fields are those which only occur sometimes. For example,
the sequence number field in an RTP packet always occurs, but
fields in optional RTP extensions only occur sometimes.

Bug: webrtc:8111
Change-Id: Iff2c35b73530c0a1db68e547b4caf34434aa4ace
Reviewed-on: https://webrtc-review.googlesource.com/c/103362
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25336}
2018-10-24 12:48:44 +00:00
Bjorn Terelius
ece3c228a2 Encode RTC event logs in new format.
This CL adds the encoder and wires it up to the event log.
Parser and unit tests are uploaded in a separate CL.

Bug: webrtc:8111
Change-Id: I6470003e55c2c4006cd8349a2c4bdc3f9491d869
Reviewed-on: https://webrtc-review.googlesource.com/c/106708
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25333}
2018-10-24 12:21:43 +00:00
Elad Alon
73f3917e89 Add support for signed deltas in FixedLengthDeltaEncoder
Signed deltas can yield a more efficient encoding when the encoded
sequence sometimes moves backwards.

Bug: webrtc:8111
Change-Id: Ib1a50192851214ccc3f2bd7eaf88f4be97e4beb0
Reviewed-on: https://webrtc-review.googlesource.com/c/100423
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25324}
2018-10-23 16:52:31 +00:00
Yves Gerey
988cc0870b [Cleanup] Add missing #include. Remove useless ones.
This CL is the result of running include-what-you-use tool on part
of the code base (audio target and dependencies) plus manual fixes.

bug: webrtc:8311
Change-Id: I277d281ce943c3ecc1bd45fd8d83055931743604
Reviewed-on: https://webrtc-review.googlesource.com/c/106280
Commit-Queue: Yves Gerey <yvesg@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25311}
2018-10-23 11:32:56 +00:00
Elad Alon
cb21ffe899 Add blob-encoding support for RTC event logs
A blob is a string of binary information, whose length may not
necessarily be determined by looking into the string, so that
concatenating all blobs without explicitly including their lengths
as part of their encoding is not a viable option.

Bug: webrtc:8111
Change-Id: I89fdca660e89a6a71eff3ecb7b86416312b81f23
Reviewed-on: https://webrtc-review.googlesource.com/c/104201
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Yves Gerey <yvesg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25278}
2018-10-19 17:30:02 +00:00
Mirko Bonadei
2dfa998be2 Reland "Prefix flag macros with WEBRTC_."
This is a reland of 5ccdc1331f

Original change's description:
> Prefix flag macros with WEBRTC_.
>
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
>
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
>
> This CL adds the 'WEBRTC_' prefix to them.
>
> Generated with:
>
> for x in DECLARE DEFINE; do
>   for y in bool int float string FLAG; do
>     git grep -l "\b$x\_$y\b" | \
>     xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
>   done
> done
> git cl format
>
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}

TBR=kwiberg@webrtc.org

Bug: webrtc:9884
Change-Id: I5ba5368a231a334d135ed5e6fd7a279629ced8a3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/107161
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25277}
2018-10-19 15:06:43 +00:00
Mirko Bonadei
c538fc77b0 Revert "Prefix flag macros with WEBRTC_."
This reverts commit 5ccdc1331f.

Reason for revert: Breaks downstream project.

Original change's description:
> Prefix flag macros with WEBRTC_.
> 
> Macros defined in rtc_base/flags.h are intended to be used to define
> flags in WebRTC's binaries (e.g. tests).
> 
> They are currently not prefixed and this could cause problems with
> downstream clients since these names are quite common.
> 
> This CL adds the 'WEBRTC_' prefix to them.
> 
> Generated with:
> 
> for x in DECLARE DEFINE; do
>   for y in bool int float string FLAG; do
>     git grep -l "\b$x\_$y\b" | \
>     xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
>   done
> done
> git cl format
> 
> Bug: webrtc:9884
> Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
> Reviewed-on: https://webrtc-review.googlesource.com/c/106682
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25270}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: Ia79cd6066ecfd1511c34f1b30fd423e560ed6854
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9884
Reviewed-on: https://webrtc-review.googlesource.com/c/107160
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25276}
2018-10-19 15:04:13 +00:00
Mirko Bonadei
5ccdc1331f Prefix flag macros with WEBRTC_.
Macros defined in rtc_base/flags.h are intended to be used to define
flags in WebRTC's binaries (e.g. tests).

They are currently not prefixed and this could cause problems with
downstream clients since these names are quite common.

This CL adds the 'WEBRTC_' prefix to them.

Generated with:

for x in DECLARE DEFINE; do
  for y in bool int float string FLAG; do
    git grep -l "\b$x\_$y\b" | \
    xargs sed -i "s/\b$x\_$y\b/WEBRTC_$x\_$y/g"
  done
done
git cl format

Bug: webrtc:9884
Change-Id: I7b524762b6a3e5aa5b2fc2395edd3e1a0fe72591
Reviewed-on: https://webrtc-review.googlesource.com/c/106682
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25270}
2018-10-19 10:55:20 +00:00
Elad Alon
50b1e6b760 Add fixed-size delta-encoding/decoding code for WebRTC event logs
Add code for delta-encoding and decoding, to be used when producing
WebRTC event logs of the new format.

This CL supports fixed-size encoding only. Also, no support for
signed deltas or optional values yet. These will be added in
subsequent CLs.

Bug: webrtc:8111
Change-Id: I531abd99fd924f4c9e692abe565bc6f66c875ad5
Reviewed-on: https://webrtc-review.googlesource.com/c/100304
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25256}
2018-10-18 13:51:05 +00:00
Danil Chapovalov
608298b6ae Move RtcEventLog::CreateNull implementation near declaration.
having implementation and declaration in same build target helps
setting dependencies

Bug: None
Change-Id: Ibf22e9c8781def9d84ce4562d0f0eaba5abd39cf
Reviewed-on: https://webrtc-review.googlesource.com/c/106900
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25255}
2018-10-18 13:39:58 +00:00
Bjorn Terelius
d932fba3bc Track padding and header size in log event.
Padding size and header size are not part of the header, but we still
want to log them. Add the values as separate fields to the log events.

Bug: webrtc:8111
Change-Id: I8dfa2ccafe679f96b8911b538a8512b0170bc642
Reviewed-on: https://webrtc-review.googlesource.com/c/106321
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25237}
2018-10-17 15:52:17 +00:00
Bjorn Terelius
a240daaae9 Change verification of stream configs in RTC event log unittest.
We're no longer verifying CSRCs or configurations for remb, rtcp mode
and codec since we're planning to drop those fields from the log in an upcoming CL.

Bug: webrtc:8111
Change-Id: I38a7d87b21f8e6d8a791d8e27a0f54c293f3d340
Reviewed-on: https://webrtc-review.googlesource.com/c/106380
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25229}
2018-10-17 11:46:11 +00:00
Bjorn Terelius
a1c9312616 Update proto for new event log format.
Bug: webrtc:8111
Change-Id: I4c62ca56fb93a741361c337ef681da39d504d7ec
Reviewed-on: https://webrtc-review.googlesource.com/c/106342
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25211}
2018-10-16 14:22:31 +00:00
Sebastian Jansson
a39a00737f Reland "Deprecates legacy transport feedback adapter."
This is a reland of a5778e0d56

Original change's description:
> Deprecates legacy transport feedback adapter.
>
> Bug: webrtc:9586
> Change-Id: Ib8c9cec1eb7f3cfa90b18b4b64171fa1b06713cf
> Reviewed-on: https://webrtc-review.googlesource.com/c/105984
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25184}

TBR=terelius@webrtc.org

Bug: webrtc:9586
Change-Id: I4e2b42f71cc13d3ff92c3c11de63bde16c58439b
Reviewed-on: https://webrtc-review.googlesource.com/c/106143
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25190}
2018-10-15 20:43:39 +00:00
Mirko Bonadei
f714ee1f8f Revert "Deprecates legacy transport feedback adapter."
This reverts commit a5778e0d56.

Reason for revert:
../../rtc_tools/event_log_visualizer/analyzer.cc(1084,3):  error: use of undeclared identifier 'webrtc_cc'
    webrtc_cc::TransportFeedbackAdapter transport_feedback(&clock);

Original change's description:
> Deprecates legacy transport feedback adapter.
> 
> Bug: webrtc:9586
> Change-Id: Ib8c9cec1eb7f3cfa90b18b4b64171fa1b06713cf
> Reviewed-on: https://webrtc-review.googlesource.com/c/105984
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25184}

TBR=terelius@webrtc.org,srte@webrtc.org

Change-Id: I768149f9f4c5db740c2d5938cb3df1d54a8283d4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9586
Reviewed-on: https://webrtc-review.googlesource.com/c/106141
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25185}
2018-10-15 18:24:11 +00:00
Sebastian Jansson
a5778e0d56 Deprecates legacy transport feedback adapter.
Bug: webrtc:9586
Change-Id: Ib8c9cec1eb7f3cfa90b18b4b64171fa1b06713cf
Reviewed-on: https://webrtc-review.googlesource.com/c/105984
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25184}
2018-10-15 18:01:08 +00:00
Bjorn Terelius
23e48fb5fd Move expectations from eventlog unittests to helper functions.
Bug: webrtc:8111
Change-Id: I47fd6c1651f2630ebaf2752b471a36b1d4f98769
Reviewed-on: https://webrtc-review.googlesource.com/c/105482
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25147}
2018-10-12 15:12:08 +00:00
Bjorn Terelius
55d1af1475 Remove support for microsecond resolution in RtcEventLogs.
Microsecond resolution is system dependent anyway, so it wasn't reliable.
This CL verifies millisecond timestamps instead of microsecond in tests.

Bug: webrtc:8111
Change-Id: I14aab9a807f747a88b2b84f51becf54f4097931e
Reviewed-on: https://webrtc-review.googlesource.com/c/105561
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25138}
2018-10-12 09:19:21 +00:00
Danil Chapovalov
f7fcaf0885 Use zero octets for rtp packet padding
RFC3550 Section 4 mention
"Octets designated as padding have the value zero."

Bug: None
Change-Id: Ife4c6226143c79ad7d152bc6099ba1d81f5492dd
Reviewed-on: https://webrtc-review.googlesource.com/c/103983
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25109}
2018-10-11 10:22:36 +00:00
Bjorn Terelius
788c51c858 Pass HeaderExtensionMap by reference in rtc_event_log2rtp_dump.
Bug: webrtc:8111
Change-Id: I0a64f92227e54aa1c180375bf406daaeac638fba
Reviewed-on: https://webrtc-review.googlesource.com/c/102640
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25043}
2018-10-08 10:52:27 +00:00
Yves Gerey
2e00abc98e Reland "[cleanup] Remove useless includes."
Reason for reland: Downstream project fixed.

Original change's description:

> [cleanup] Remove useless includes.
>
> Manual cleanup guided by include-what-you-use diagnostic.
>
> Bug: webrtc:8311
> Change-Id: I00be03392cc7ee005101427ea7dc701621ccea68
> Reviewed-on: https://webrtc-review.googlesource.com/c/103320
> Commit-Queue: Yves Gerey <yvesg@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25013}

Bug: webrtc:8311
Change-Id: Id6ec4aeb798886a90ace640a190eaf16497ba31b
Reviewed-on: https://webrtc-review.googlesource.com/c/104120
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25034}
2018-10-08 07:44:19 +00:00
Oleh Prypin
96a0f61917 Revert "[cleanup] Remove useless includes."
This reverts commit be8b5348c7.

Reason for revert: Breaks downstream project

Original change's description:
> [cleanup] Remove useless includes.
> 
> Manual cleanup guided by include-what-you-use diagnostic.
> 
> Bug: webrtc:8311
> Change-Id: I00be03392cc7ee005101427ea7dc701621ccea68
> Reviewed-on: https://webrtc-review.googlesource.com/c/103320
> Commit-Queue: Yves Gerey <yvesg@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25013}

TBR=phoglund@google.com,phoglund@webrtc.org,yvesg@webrtc.org

Change-Id: I7a6e1cdfef685173b76f234ad598083043dcd9a0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8311
Reviewed-on: https://webrtc-review.googlesource.com/c/104022
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25015}
2018-10-05 13:13:45 +00:00
Yves Gerey
be8b5348c7 [cleanup] Remove useless includes.
Manual cleanup guided by include-what-you-use diagnostic.

Bug: webrtc:8311
Change-Id: I00be03392cc7ee005101427ea7dc701621ccea68
Reviewed-on: https://webrtc-review.googlesource.com/c/103320
Commit-Queue: Yves Gerey <yvesg@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25013}
2018-10-05 11:51:06 +00:00
Elad Alon
1ac95546dd Include optional.h in rtc_event_log_parser_new.cc
Bug: None
Change-Id: I5ef8227ca4763232717808aae2f6395ce66a4ed9
Reviewed-on: https://webrtc-review.googlesource.com/103160
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24927}
2018-10-02 11:57:40 +00:00
Bjorn Terelius
17990d52fc Prepare RtcEventLog parser for new wire format.
Bug: webrtc:8111
Change-Id: I5803ed94d770efe7c36a6ecc2e56f4ba03136948
Reviewed-on: https://webrtc-review.googlesource.com/102780
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24908}
2018-10-01 12:23:56 +00:00
Johannes Kron
07ba2b9445 Parse two-byte header extensions.
Bug: webrtc:7990
Change-Id: I967d2065b85d6a2ca938ac0e83035cb92b45a907
Reviewed-on: https://webrtc-review.googlesource.com/98160
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24881}
2018-09-28 08:32:17 +00:00
Christoffer Rodbro
89f64d305e Move network trace calculation from analyzer to rtc_event_log_parser.
Bug: b/116768521
Change-Id: Ibc5643c9c03caa00cc84a5efc628115d414b35f7
Reviewed-on: https://webrtc-review.googlesource.com/102301
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24879}
2018-09-28 08:16:57 +00:00
Mirko Bonadei
17f4878419 Remove deprecated field_trial_default and metrics_default.
This CL removes some deprecated build targets (and their headers)
from system_wrappers:
- field_trial_api
- field_trial_default
- metrics_api
- metrics_default

It also refreshes all the dependencies on field_trial.h and metrics.h.

A nice side effect is that it is finally possible to remove 'nogncheck'
from the following files (when it was used with field_trial_default
and metrics_default):
- sdk/objc/api/peerconnection/RTCMetricsSampleInfo+Private.h
- sdk/android/src/jni/pc/peerconnectionfactory.cc
- sdk/objc/api/peerconnection/RTCFieldTrials.mm

Bug: webrtc:9631
Change-Id: Ib621f41ef8ad0aba4fe1c1d7e749c044afc956c3
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/100524
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24878}
2018-09-28 07:21:07 +00:00
Bjorn Terelius
60d629f3fc Add helper class to process RtcEventLog events in order.
Add helper class to process RtcEventLog events in order.
Use helper class to migrate rtc_event_log2rtp_dump.cc
to new parser API.

Bug: webrtc:8111
Change-Id: I7cbc220dad1f50be3a985ed44de27b38e5f20476
Reviewed-on: https://webrtc-review.googlesource.com/98601
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24806}
2018-09-24 16:20:10 +00:00
Jonas Olsson
941a07cca3 Remove all remaining non-test uses of std::stringstream.
Bug: webrtc:8982
Change-Id: I635a8545c46dc8c89663d64af351e22e65cbcb33
Reviewed-on: https://webrtc-review.googlesource.com/98880
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24715}
2018-09-13 08:52:05 +00:00
Minyue Li
1a80018a3c Avoid wrong parsing of padding length and its use in NetEq simulation.
Bug: b/113648474, webrtc:9730
Change-Id: Ieff7ab8697f5c8742548897a9b452a20b0bd2e7c
Reviewed-on: https://webrtc-review.googlesource.com/98461
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24703}
2018-09-12 11:23:03 +00:00
Johnny Lee
e0c8b230e7 Frame marking RTP header extension (PART 1: implement extension)
Bug: webrtc:7765
Change-Id: I23896d121afd6be4bce5ff4deaf736149efebcdb
Reviewed-on: https://webrtc-review.googlesource.com/85200
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24695}
2018-09-11 22:35:30 +00:00
Mirko Bonadei
55d5ef0048 Remove clang:find_bad_constructs suppression from logging (part 1).
This CL removes //build/config/clang:find_bad_constructs from the
suppressed_configs list, which means that clang:find_bad_constructs
is now enabled on these translation units.

Bug: webrtc:9251, webrtc:163
Change-Id: I443c0c77cef30a3f5712f72ce88db80d1fb29874
Reviewed-on: https://webrtc-review.googlesource.com/96642
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24567}
2018-09-05 08:33:17 +00:00
Bjorn Terelius
d8be107c8b Print timestamp-to-UTC map when event_log starts.
Bug: None
Change-Id: I9ba392e3ace79b5dbc7342200565004ea5cd844e
Reviewed-on: https://webrtc-review.googlesource.com/93300
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24258}
2018-08-10 10:04:12 +00:00
Mirko Bonadei
264bee8bab Remove memcheck.
Since the linux_memcheck trybot is no more, this CL removes all the
code needed to make it work.

Bug: webrtc:7737, webrtc:8356, webrtc:9570
Change-Id: I09a9467b8bf895146a3384c2c915b54662721af6
Reviewed-on: https://webrtc-review.googlesource.com/90863
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24201}
2018-08-07 07:40:08 +00:00
Niels Möller
a12c42a6b2 Delete root header file typedef.h.
Usage replaced with stdint.h, rtc_base/system/arch.h and
rtc_base/system/unused.h, as appropriate.

Bug: webrtc:6854
Change-Id: I97225465d14b969903d92979e2df3c3c05d35f18
Reviewed-on: https://webrtc-review.googlesource.com/90249
Reviewed-by: Niklas Enbom <niklas.enbom@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24100}
2018-07-25 14:59:26 +00:00
Oleh Prypin
da04e06e04 Fix paths that were trying to go above the root by using too many "../.."
This doesn't cause problems because seems like GN just ignores these attempts and confines everything to the root.

Bug: None
Change-Id: Ief50b6e10f3950b319d0bde547f91dcc7f237cda
Reviewed-on: https://webrtc-review.googlesource.com/90041
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24063}
2018-07-23 10:25:03 +00:00
Mirko Bonadei
9d764e8521 Removing clang:find_bad_constructs from logging (part 1).
Bug: webrtc:9251, webrtc:163
Change-Id: I42ce2edd4d5974e89d7d29f242d99d1c721b9bc0
Reviewed-on: https://webrtc-review.googlesource.com/88763
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24017}
2018-07-18 11:23:01 +00:00
Karl Wiberg
918f50c5d1 Use absl::make_unique and absl::WrapUnique directly
Instead of going through our wrappers in ptr_util.h.

This CL was generated by the following script:

  git grep -l ptr_util | xargs perl -pi -e 's,#include "rtc_base/ptr_util.h",#include "absl/memory/memory.h",'
  git grep -l MakeUnique | xargs perl -pi -e 's,\b(rtc::)?MakeUnique\b,absl::make_unique,g'
  git grep -l WrapUnique | xargs perl -pi -e 's,\b(rtc::)?WrapUnique\b,absl::WrapUnique,g'
  git checkout -- rtc_base/ptr_util{.h,_unittest.cc}
  git cl format

Followed by manually adding dependencies on
//third_party/abseil-cpp/absl/memory until `gn check` stopped
complaining.

Bug: webrtc:9473
Change-Id: I89ccd363f070479b8c431eb2c3d404a46eaacc1c
Reviewed-on: https://webrtc-review.googlesource.com/86600
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23850}
2018-07-05 10:59:49 +00:00
Elad Alon
641ddf2915 Make rtc_event_log2text work on stdin if no input file specified
Bug: webrtc:9490
Change-Id: Ie235d156cef842b2333f621ae98e14aa1b4663a5
Reviewed-on: https://webrtc-review.googlesource.com/87101
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23841}
2018-07-04 12:42:01 +00:00
Bjorn Terelius
7750de906a Port RtcEventLog encoder unittests to the new parser API.
The Copy() function previously did not copy the logging timestamp.
To be able to use Copy() in this test, we add private copy
constructors for RtcEvents which the Copy() can use to copy
everything including the timestamp.

Also adds missing test for RtcEventAlrState,
RtcEventIceCandidatePairConfig and RtcEventIceCandidatePair.

Bug: webrtc:8111
Change-Id: I3901231735baa4e671173c921eada0a4be6de7c9
Reviewed-on: https://webrtc-review.googlesource.com/86042
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23774}
2018-06-28 15:31:23 +00:00
Bjorn Terelius
546bdeda77 Add return after NOT_REACHED() in eventlog unittest.
Bug: webrtc:9457
Change-Id: If4728d05d832f72871c25ddce93a72be5089be40
Reviewed-on: https://webrtc-review.googlesource.com/86122
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23763}
2018-06-28 09:48:30 +00:00
Bjorn Terelius
63c82a78d3 Style fixes in event log unittest.
Bug: webrtc:8111
Change-Id: Ib3774429109524ff35b9413d672374d6c99a8614
Reviewed-on: https://webrtc-review.googlesource.com/85373
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23740}
2018-06-26 12:27:55 +00:00
Bjorn Terelius
f4db542a9b Rewrite the RtcEventLog unit test.
Bug: webrtc:8111
Change-Id: I36780940b54bf500244c6755113153c84c997942
Reviewed-on: https://webrtc-review.googlesource.com/80660
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23736}
2018-06-26 10:23:29 +00:00
Danil Chapovalov
196100efa6 Replace rtc::Optional with absl::optional
This is a no-op change because rtc::Optional is an alias to absl::optional

This CL generated by running script passing top level directories except rtc_base and api

find $@ -type f \( -name \*.h -o -name \*.cc -o -name \*.mm \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+

find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;

git cl format

Bug: webrtc:9078
Change-Id: I9465c172e65ba6e6ed4e4fdc35b0b265038d6f71
Reviewed-on: https://webrtc-review.googlesource.com/84584
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23697}
2018-06-21 09:32:56 +00:00
Yves Gerey
665174fdbb Reformat the WebRTC code base
Running clang-format with chromium's style guide.

The goal is n-fold:
 * providing consistency and readability (that's what code guidelines are for)
 * preventing noise with presubmit checks and git cl format
 * building on the previous point: making it easier to automatically fix format issues
 * you name it

Please consider using git-hyper-blame to ignore this commit.

Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
2018-06-19 14:00:39 +00:00
Qingsi Wang
7685e86fa6 Pass the RtcEventLog instance to ICE via JsepTransportController.
This CL fixes a bug that the RtcEventLog owned by PeerConnection was not
passed to P2PTransportChannel after JsepTransportController was
introduced to deprecate the legacy TransportController.

Bug: webrtc:9337
Change-Id: I406cd9c0761dfe67f969aa99c6141e1ab38249d5
Reviewed-on: https://webrtc-review.googlesource.com/79964
Commit-Queue: Qingsi Wang <qingsi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23572}
2018-06-12 05:04:35 +00:00
Qingsi Wang
1ef88aee29 Add kNumValues to IceCandidate* enums and move kUnknown to the front.
Bug: None
Change-Id: Ia20fc06a96d78b4f842a849a64f7c580b6663fd0
Reviewed-on: https://webrtc-review.googlesource.com/82281
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#23556}
2018-06-08 22:15:38 +00:00
Bjorn Terelius
59b4e3ea8c Split IceCandidatePairEventType enum.
Disjoint subsets of the enum values are used for Ice candidate config
events and Ice candidate check events. This CL breaks out the config
part to a separate enum and by extension changes the icelogger interface
for config events.

Bug: webrtc:9336, webrtc:8111
Change-Id: I405b5c3981905c3c504b45afdddb3649469ed141
Reviewed-on: https://webrtc-review.googlesource.com/79943
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23464}
2018-05-31 08:42:10 +00:00
Bjorn Terelius
7a0bb00422 Split LoggedBweProbeResult into -Success and -Failure.
Also change ParsedEventLog::EventType to enum class.

Bug: webrtc:8111
Change-Id: I4747fb9cbcbdb963fa032770078218e5b416b3da
Reviewed-on: https://webrtc-review.googlesource.com/79280
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23432}
2018-05-29 13:41:04 +00:00
Bjorn Terelius
5ceb0d9494 Fix bug that skips postprocessing after parsing a broken event log.
Bug: webrtc:9323
Change-Id: I7bdaf1b37ed172ec519da491369f63065adde413
Reviewed-on: https://webrtc-review.googlesource.com/79520
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23429}
2018-05-29 12:24:04 +00:00
Bjorn Terelius
9fe6df086a Fix confusion between enum types in event log parser.
Bug: webrtc:9314
Change-Id: I923eacb60a951ca76a387f1cc6d5ffd8d0b41f3d
Reviewed-on: https://webrtc-review.googlesource.com/79140
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23401}
2018-05-26 18:10:46 +00:00
Bjorn Terelius
d7a076cc8e Minor type fix in RTC event logging for probing events.
Bug: webrtc:8111
Change-Id: I61cd5917c62c72571f3318411cb03b7ee74ec4cf
Reviewed-on: https://webrtc-review.googlesource.com/78940
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23399}
2018-05-25 14:53:18 +00:00
Niels Möller
c948fe62fd Delete unneeded includes of call/video_config.h.
Bug: webrtc:8830
Change-Id: I6114b47e5524a6d2450108388236478b1ceafb67
Reviewed-on: https://webrtc-review.googlesource.com/77425
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23295}
2018-05-18 09:00:56 +00:00
Minyue Li
27e2b7d177 Plot NetEq stats in RTC event log visualizer.
Bug: webrtc:9147
Change-Id: I61ec7bc5299201e25e1efc503b73b84d5be3ebbf
Reviewed-on: https://webrtc-review.googlesource.com/71740
Commit-Queue: Minyue Li <minyue@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23151}
2018-05-07 17:01:48 +00:00
Bjorn Terelius
25f0c206df Log probing bitrate and cluster id as int32 in event log.
Bug: webrtc:8111
Change-Id: I0eca0b443f27ece6d2473c5287faa84978eee0dd
Reviewed-on: https://webrtc-review.googlesource.com/73800
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23122}
2018-05-04 14:40:44 +00:00
Bjorn Terelius
c4ca1d3f37 Reland "Create new API for RtcEventLogParser."
The new API stores events gathered by event type. For example, it is
possible to ask for a list of all incoming RTCP messages or all audio
playout events.

The new API is experimental and may change over next few weeks. Once
it has stabilized and all unit tests and existing tools have been
ported to the new API, the old one will be removed.

This CL also updates the event_log_visualizer tool to use the new
parser API. This is not a funcional change except for:
- Incoming and outgoing audio level are now drawn in two separate plots.
- Incoming and outgoing timstamps are now drawn in two separate plots.
- RTCP count is no longer split into Video and Audio. It also counts
  all RTCP packets rather than only specific message types.
- Slight timing difference in sendside BWE simulation due to only
  iterating over transport feedbacks and not over all RTCP packets.
  This timing changes are not visible in the plots.


Media type for RTCP messages might not be identified correctly by
rtc_event_log2text anymore. On the other hand, assigning a specific
media type to an RTCP packet was a bit hacky to begin with.

Bug: webrtc:8111
Change-Id: Ib244338c86a2c1a010c668a7aba440482023b512
Reviewed-on: https://webrtc-review.googlesource.com/73140
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Minyue Li <minyue@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23056}
2018-04-27 14:46:51 +00:00
Bjorn Terelius
73df8837db Make rtc_event_log_parser visible to other targets.
TBR=kwiberg@webrtc.org

Bug: webrtc:8111
Change-Id: I1162403c75531bbbb258458319fd6ca7f654ac1d
Reviewed-on: https://webrtc-review.googlesource.com/72820
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23037}
2018-04-26 15:34:57 +00:00
Björn Terelius
ff61273c01 Revert "Create new API for RtcEventLogParser."
This reverts commit 9e336ec0b8.

Reason for revert: Code can accidentally include the deprecated parser but link with the new one, or vice versa. Reverting to fix naming.

Original change's description:
> Create new API for RtcEventLogParser.
> 
> The new API stores events gathered by event type. For example, it is
> possible to ask fo a list of all incoming RTCP messages or all audio
> playout events.
> 
> The new API is experimental and may change over next few weeks. Once
> it has stabilized and all unit tests and existing tools have been
> ported to the new API, the old one will be removed.
> 
> This CL also updates the event_log_visualizer tool to use the new
> parser API. This is not a funcional change except for:
> - Incoming and outgoing audio level are now drawn in two separate plots.
> - Incoming and outgoing timstamps are now drawn in two separate plots.
> - RTCP count is no longer split into Video and Audio. It also counts
>   all RTCP packets rather than only specific message types.
> - Slight timing difference in sendside BWE simulation due to only
>   iterating over transport feedbacks and not over all RTCP packets.
>   This timing changes are not visible in the plots.
> 
> 
> Media type for RTCP messages might not be identified correctly by
> rtc_event_log2text anymore. On the other hand, assigning a specific
> media type to an RTCP packet was a bit hacky to begin with.
> 
> Bug: webrtc:8111
> Change-Id: I8e7168302beb69b2e163a097a2a142b86dd4a26b
> Reviewed-on: https://webrtc-review.googlesource.com/60865
> Reviewed-by: Minyue Li <minyue@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#23015}

TBR=terelius@webrtc.org,srte@webrtc.org,minyue@webrtc.org

Change-Id: Ib4bbcf0563423675a3cc1dce59ebf665e0c5dae9
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8111
Reviewed-on: https://webrtc-review.googlesource.com/72500
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23026}
2018-04-25 14:23:14 +00:00
Elad Alon
89aad9e168 Remove the limit on concurrent RtcEventLogImpl instances
The limit was introduced to avoid spawning too many threads.
It had the downside that the peer connections which have an
associated RtcEventLogImpl instance, are not necessarily those
which we wish to log.
After this CL, it becomes the responsibility of the application
hosting WebRTC to limit the number of peer connections to a
number which it can support, including thread resources.

Bug: webrtc:9046
Change-Id: I7444a6020dd51583c666285655af986def53faa4
Reviewed-on: https://webrtc-review.googlesource.com/70661
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Dino Radaković <dinor@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23019}
2018-04-25 10:33:43 +00:00
Bjorn Terelius
9e336ec0b8 Create new API for RtcEventLogParser.
The new API stores events gathered by event type. For example, it is
possible to ask fo a list of all incoming RTCP messages or all audio
playout events.

The new API is experimental and may change over next few weeks. Once
it has stabilized and all unit tests and existing tools have been
ported to the new API, the old one will be removed.

This CL also updates the event_log_visualizer tool to use the new
parser API. This is not a funcional change except for:
- Incoming and outgoing audio level are now drawn in two separate plots.
- Incoming and outgoing timstamps are now drawn in two separate plots.
- RTCP count is no longer split into Video and Audio. It also counts
  all RTCP packets rather than only specific message types.
- Slight timing difference in sendside BWE simulation due to only
  iterating over transport feedbacks and not over all RTCP packets.
  This timing changes are not visible in the plots.


Media type for RTCP messages might not be identified correctly by
rtc_event_log2text anymore. On the other hand, assigning a specific
media type to an RTCP packet was a bit hacky to begin with.

Bug: webrtc:8111
Change-Id: I8e7168302beb69b2e163a097a2a142b86dd4a26b
Reviewed-on: https://webrtc-review.googlesource.com/60865
Reviewed-by: Minyue Li <minyue@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23015}
2018-04-25 09:37:03 +00:00
Danil Chapovalov
6e9d89588d Add missing includes checks.h/array_view.h
instead of relying on optional.h to included these 2 headers.

Bug: webrtc:9078
Change-Id: I7a4b3facd81690b8f107640487e129986c1f5ff6
Reviewed-on: https://webrtc-review.googlesource.com/68602
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22803}
2018-04-10 10:33:34 +00:00
Danil Chapovalov
4da18e89bd compare Optional<unsigned> only to unsigned integers
more standard optional<T> inlines compares instead of converting second argument to T.
that leads to warnings about comparing unsigned to signed integers.

Bug: webrtc:9078
Change-Id: I43cc729d3b85d789b0c394064dc7e11dc27a37aa
Reviewed-on: https://webrtc-review.googlesource.com/66782
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22779}
2018-04-07 10:07:47 +00:00
Dino Radaković
e9d2e4d3fb Provide the option of injecting rtc::TaskQueue when creating RtcEventLogImpl via factory methods.
Bug: webrtc:9004
Change-Id: Ia7cc96074dbf84f576e5fb0762866b213ec8e69f
Reviewed-on: https://webrtc-review.googlesource.com/63022
Commit-Queue: Dino Radaković <dinor@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22520}
2018-03-20 18:06:18 +00:00
Tommi
8d2c5a810f Detangling target dependencies in rtc_base_approved.
The eventual goal is to allow PlatformThread to use
SequencedTaskChecker, but getting to that point will require
some more detangling.

Here are (roughly) the steps taken in this CL:
* Make constructormagic a separate target.
* Move atomicops and arraysize to separate targets
* Move platform_thread_types to a separate target
* Move criticalsection to a separate target
* Move thread_checker to separate target
* Make sequenced_task_checker not depend on base_approved
* Move ptr_util to a separate target
* Move scoped_ptr to ptr_util
* Make rtc_task_queue_api not depend on base_approved
* Make sequenced_task_checker depend on rtc_task_queue_api
* Move rtc::Event to its own target
* Move basictypes.h to constructormagic
* Move format_macros and stringize_macros into constructormagic
* Rename constructormagic target to... macromagic
* Move stringencode to stringutils
* New target for safe_conversions
* Move timeutils to a new target.
* Move logging to a new target.
* Move platform_thread to a new target.
* Make refcount a new target (refcount, refcountedobject, refcounter).
* Remove rtc_base_approved from deps of TQ
* Remove a circular dependency between event tracer and platform thread.

Further steps will probably be to factor TaskQueue::Current() to not
be a part of the TaskQueue class itself and have it declared+implemented
in a target that's lower level than TQ itself. SequencedTaskChecker can
then depend on that target and avoid the TQ dependency. Once we're there,
PlatformThread will be able to depend on SequencedTaskChecker.

Attempted but eventually removed from this CL:
* Make TQ a part of rtc_base_approved
* Remove direct dependencies on sequenced_task_checker.
* Profit.

A few include-what-you-use updates along the way.
Fix a few targets that were depending on rtc_task_queue_api

Change-Id: Iee79aa2e81d978444c51b3005db9df7dc12d92a9
Bug: webrtc:8957
Reviewed-on: https://webrtc-review.googlesource.com/58480
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22487}
2018-03-19 11:02:01 +00:00
Patrik Höglund
7696bef463 Remove the public_deps to fileutils from test_support.
Bug: webrtc:8946
Change-Id: Ia01d8bb1b42485e29f26792b9266228743d7fd90
No-Presubmit: true
Reviewed-on: https://webrtc-review.googlesource.com/62100
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22465}
2018-03-16 09:06:27 +00:00
Dino Radaković
56f9f0eed1 Make task_queue_ injectable by wrapping it into a std::unique_ptr and adding an optional arg to the constructor of RtcEventLogImpl.
Bug: webrtc:9004
Change-Id: I46336ba4f6464d806f0fb8549f98faea69a5f748
Reviewed-on: https://webrtc-review.googlesource.com/61420
Commit-Queue: Dino Radaković <dinor@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22456}
2018-03-15 15:07:27 +00:00
Danil Chapovalov
dd7e284ce8 Reland "Enable and fix chromium clang warnings in rtp_rtcp test targets"
This reverts commit 01aa210fad.

Reason for revert: downstream project adjusted

Original change's description:
> Revert "Enable and fix chromium clang warnings in rtp_rtcp test targets"
> 
> This reverts commit 9486b117da.
> 
> Reason for revert: Breaks downstream project
> 
> Original change's description:
> > Enable and fix chromium clang warnings in rtp_rtcp test targets
> > 
> > Bug: webrtc:163
> > Change-Id: I4ed3e63296d8bf06536a83196d597c7a906ba11c
> > Reviewed-on: https://webrtc-review.googlesource.com/60802
> > Reviewed-by: Björn Terelius <terelius@webrtc.org>
> > Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22357}
> 
> TBR=danilchap@webrtc.org,phoglund@webrtc.org,terelius@webrtc.org
> 
> Change-Id: I2c3777ea9f26813bdb395e7fd68f6b49443586ea
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:163
> Reviewed-on: https://webrtc-review.googlesource.com/61060
> Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
> Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22365}

TBR=danilchap@webrtc.org,phoglund@webrtc.org,oprypin@webrtc.org,terelius@webrtc.org

Change-Id: I0b4cb6d05b37caeb52cca9abf95417ad3ad6f76b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:163
Reviewed-on: https://webrtc-review.googlesource.com/61080
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22368}
2018-03-09 16:04:35 +00:00
Oleh Prypin
01aa210fad Revert "Enable and fix chromium clang warnings in rtp_rtcp test targets"
This reverts commit 9486b117da.

Reason for revert: Breaks downstream project

Original change's description:
> Enable and fix chromium clang warnings in rtp_rtcp test targets
> 
> Bug: webrtc:163
> Change-Id: I4ed3e63296d8bf06536a83196d597c7a906ba11c
> Reviewed-on: https://webrtc-review.googlesource.com/60802
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22357}

TBR=danilchap@webrtc.org,phoglund@webrtc.org,terelius@webrtc.org

Change-Id: I2c3777ea9f26813bdb395e7fd68f6b49443586ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:163
Reviewed-on: https://webrtc-review.googlesource.com/61060
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22365}
2018-03-09 14:49:15 +00:00
Danil Chapovalov
9486b117da Enable and fix chromium clang warnings in rtp_rtcp test targets
Bug: webrtc:163
Change-Id: I4ed3e63296d8bf06536a83196d597c7a906ba11c
Reviewed-on: https://webrtc-review.googlesource.com/60802
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22357}
2018-03-09 12:27:35 +00:00
Karl Wiberg
12edf4ce34 Separate build target for rtc_base/numerics/safe_minmax.h
So that we can avoid dependency cycles.

Bug: none
Change-Id: I821d9f1319dff01403d6e4e310cbb2d4b2b125e8
Reviewed-on: https://webrtc-review.googlesource.com/60500
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22328}
2018-03-07 14:12:00 +00:00
Bjorn Terelius
cf83ae094a Add extra RTC_CHECKs in RtcEventLog.
Bug: None
Change-Id: I8a7c5c1735f04c44f0ea99ae12cc984e9eb7a6ee
Reviewed-on: https://webrtc-review.googlesource.com/57960
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22202}
2018-02-27 13:23:49 +00:00
Niels Möller
1e06289cdb Delete macro RTC_ACCESS_ON, replaced by RTC_GUARDED_BY.
Both macros do the same thing, as wrappers for
__attribute__((guarded_by)), and more names for the same thing doesn't
add to clarity.

Bug: none
Change-Id: Iaaf7b21dbf3345ee90fee22c39b636823d195eb0
Reviewed-on: https://webrtc-review.googlesource.com/48361
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21929}
2018-02-07 10:07:28 +00:00
Danil Chapovalov
2a5ce2bcf8 Fix clang style errors in rtp_rtcp and dependant targets
Mark functions with override instead of virtual.
Add explicit non-trivial constructors/assign operators/destructors.
Define them in .cc files instead of inlining
use auto* instead of auto when deduced type is raw pointer

Bug: webrtc:163
Change-Id: I4d8a05d6a64fcc2ca16d02c5fcf9488fda832a6d
Reviewed-on: https://webrtc-review.googlesource.com/48781
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21927}
2018-02-07 09:48:28 +00:00
Mirko Bonadei
5c8622fa25 Removing backwards compatible rtc_event_log_impl target.
TBR=phoglund@webrtc.org

Bug: None
Change-Id: I035b54dd0acb390af69ff99dd12a37d0c7af802f
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/47383
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21916}
2018-02-06 13:54:13 +00:00
Qingsi Wang
8eca1ff510 Reland "Structured ICE logging via RtcEventLog."
This is a reland of eed5aa8904
Original change's description:
> Structured ICE logging via RtcEventLog.
>
> This change list contains the structured logging module for ICE using
> the RtcEventLog infrastructure, and also extension to the log parser
> and analyzer.
>
> Bug: None
> Change-Id: I6539cf282155c2cde4d3161c53500c0746671a02
> Reviewed-on: https://webrtc-review.googlesource.com/34622
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21816}

TBR=pthatcher@webrtc.org,terelius@webrtc.org,deadbeef@webrtc.org

Bug: None
Change-Id: I3df585bf636315ceb0273967146111346a83be86
Reviewed-on: https://webrtc-review.googlesource.com/47545
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Qingsi Wang <qingsi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21881}
2018-02-02 22:05:27 +00:00
Mirko Bonadei
f2594a48e6 Removing skvlad@ from logging/OWNERS.
No longer active with WebRTC, last commit 2017-03-21.

Bug: None
Change-Id: Iece5c32bc1ca01e945edcd17f4efe64321d965da
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/47460
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21869}
2018-02-02 13:03:29 +00:00
Qingsi Wang
970b088878 Reland "Break up rtc_event_log_api to solve circular dependencies."
This is a reland of 001546da95
Original change's description:
> Break up rtc_event_log_api to solve circular dependencies.
>
> The original rtc_event_log_api is refactored to a pure API target plus
> multiple targets coupled with WebRTC implementations.
>
> Bug: None
> Change-Id: Iab9eee3f7bf4228c52d94a5f26fc39bb99b5033f
> Reviewed-on: https://webrtc-review.googlesource.com/43247
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Cr-Commit-Position: refs/heads/master@{#21811}

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,terelius@webrtc.org,stefan@webrtc.org

Bug: None
Change-Id: I3e7213733741cbfd5dd0076f32209e6bc42a0647
Reviewed-on: https://webrtc-review.googlesource.com/46900
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21862}
2018-02-01 22:47:52 +00:00
Mirko Bonadei
75df7282eb Revert "Break up rtc_event_log_api to solve circular dependencies."
This reverts commit 001546da95.

Reason for revert: breaks downstream projects.

Original change's description:
> Break up rtc_event_log_api to solve circular dependencies.
> 
> The original rtc_event_log_api is refactored to a pure API target plus
> multiple targets coupled with WebRTC implementations.
> 
> Bug: None
> Change-Id: Iab9eee3f7bf4228c52d94a5f26fc39bb99b5033f
> Reviewed-on: https://webrtc-review.googlesource.com/43247
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Cr-Commit-Position: refs/heads/master@{#21811}

TBR=phoglund@webrtc.org,deadbeef@webrtc.org,terelius@webrtc.org,stefan@webrtc.org,pthatcher@google.com,pthatcher@webrtc.org,qingsi@google.com

Change-Id: I82540eac176c4abfb7e50dc51671585b32a1bace
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/46581
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21823}
2018-01-31 09:39:44 +00:00
Mirko Bonadei
78ac89b82f Revert "Structured ICE logging via RtcEventLog."
This reverts commit eed5aa8904.

Reason for revert: breaks downstream projects.

Original change's description:
> Structured ICE logging via RtcEventLog.
> 
> This change list contains the structured logging module for ICE using
> the RtcEventLog infrastructure, and also extension to the log parser and
> analyzer.
> 
> Bug: None
> Change-Id: I6539cf282155c2cde4d3161c53500c0746671a02
> Reviewed-on: https://webrtc-review.googlesource.com/34622
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21816}

TBR=phoglund@webrtc.org,deadbeef@webrtc.org,terelius@webrtc.org,stefan@webrtc.org,pthatcher@webrtc.org,qingsi@google.com

Change-Id: I62d5807c636e442bec4ad1b1fdc4380102347be3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/46580
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21822}
2018-01-31 09:38:41 +00:00
Qingsi Wang
eed5aa8904 Structured ICE logging via RtcEventLog.
This change list contains the structured logging module for ICE using
the RtcEventLog infrastructure, and also extension to the log parser and
analyzer.

Bug: None
Change-Id: I6539cf282155c2cde4d3161c53500c0746671a02
Reviewed-on: https://webrtc-review.googlesource.com/34622
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21816}
2018-01-31 02:18:39 +00:00
Qingsi Wang
001546da95 Break up rtc_event_log_api to solve circular dependencies.
The original rtc_event_log_api is refactored to a pure API target plus
multiple targets coupled with WebRTC implementations.

Bug: None
Change-Id: Iab9eee3f7bf4228c52d94a5f26fc39bb99b5033f
Reviewed-on: https://webrtc-review.googlesource.com/43247
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#21811}
2018-01-30 17:54:06 +00:00
Mirko Bonadei
65ce31158f Removing useless dependencies on //testing/gmock.
If a WebRTC build target requires gmock it has to include
test/gmock.h and just depend on //test:test_support.

Unfortunately //testtest_support was a leaky abstraction because it
wasn't propagating the correct -I compiler flag. To make everything
work, all the targets that use gmock started also to depend on
//testing/gmock (even if they were not including any gmock header
directly).

This CL makes //testtest_support propagate the include path up in the
dependency chain so it is possible to remove unused dependencies.

Note: all_dependent_configs should probably be used in the original
gmock target. There is an ongoing discussion about it. This CL solves
the problem on WebRTC side and it is forward compatible.

TBR=phoglund@webrtc.org

Bug: webrtc:8603
Change-Id: If08daf2ce9a6431a6e881a236743b4ec33b59ea7
Reviewed-on: https://webrtc-review.googlesource.com/44340
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21776}
2018-01-26 13:34:12 +00:00
Bjorn Terelius
0a6a2b73a1 Remove dependency on system_wrappers from rtc_event_log.
Bug: webrtc:8111
Change-Id: Id9e2503b153bc7172e7a5e92f6becc791da0aadf
Reviewed-on: https://webrtc-review.googlesource.com/41261
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21698}
2018-01-19 18:04:03 +00:00
Bjorn Terelius
07b35bcd55 Remove RtcEventLogEncoder::Encode method.
Use EncodeBatch method in unittest. (Same as in production code.)

Bug: webrtc:8111
Change-Id: Ia194f5138f244da7f348821277f6c712a3ffab0d
Reviewed-on: https://webrtc-review.googlesource.com/34560
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21696}
2018-01-19 16:03:12 +00:00
Dan Minor
9c68613080 Update gn files to support Mozilla build
Bug: webrtc:8670
No-Presubmit: true
Change-Id: I085dc63daa8274b5068540cbf56b6330f40643fa
Reviewed-on: https://webrtc-review.googlesource.com/38920
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21624}
2018-01-16 07:51:23 +00:00
Per Kjellander
a7f2d84ad1 Revert "Revert "GN rtc_* templates: Set default visibility to webrtc_root + "/*"""
This reverts commit c73e1f4378.

Reason for revert: 
The problem with failed deps in chrome content/renderer had already been fixed in https://webrtc-review.googlesource.com/c/src/+/38660

Original change's description:
> Revert "GN rtc_* templates: Set default visibility to webrtc_root + "/*""
> 
> This reverts commit 588c548657.
> 
> Reason for revert: 
> 
> Breaks Chrome FYI:
> 
> /b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
>   -> returned 1
> ERROR at //build/split_static_library.gni:12:5: Dependency not allowed.
>     static_library(target_name) {
>     ^----------------------------
> The item //content/renderer:renderer
> can not depend on //third_party/webrtc/media:rtc_internal_video_codecs
> because it is not in //third_party/webrtc/media:rtc_internal_video_codecs's visibility list: [
>   //third_party/webrtc/*
>   //third_party/webrtc_overrides/*
> ]
> 
>  https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F23560%2F%2B%2Frecipes%2Fsteps%2Fgenerate_build_files%2F0%2Fstdout
> 
> Original change's description:
> > GN rtc_* templates: Set default visibility to webrtc_root + "/*"
> > 
> > This means that by default, targets are visible to everything under
> > the WebRTC root, but not visible to anything else.
> > 
> > API targets are manually tagged with visibility "*", so that targets
> > outside the WebRTC tree can see them.
> > 
> > BUG=webrtc:8254
> > 
> > Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
> > Reviewed-on: https://webrtc-review.googlesource.com/24140
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21548}
> 
> TBR=mbonadei@webrtc.org,kwiberg@webrtc.org
> 
> Change-Id: I06620ce3d6f67482935c22efa231dd6cab91625a
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8254
> Reviewed-on: https://webrtc-review.googlesource.com/38760
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21555}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org,perkj@webrtc.org

Change-Id: I6f720078ce21bd172e0a6471bae8c4c011e4a657
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8254
Reviewed-on: https://webrtc-review.googlesource.com/38860
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21558}
2018-01-10 15:55:04 +00:00
Per Kjellander
c73e1f4378 Revert "GN rtc_* templates: Set default visibility to webrtc_root + "/*""
This reverts commit 588c548657.

Reason for revert: 

Breaks Chrome FYI:

/b/c/b/Linux_Builder/src/buildtools/linux64/gn gen //out/Release --check
  -> returned 1
ERROR at //build/split_static_library.gni:12:5: Dependency not allowed.
    static_library(target_name) {
    ^----------------------------
The item //content/renderer:renderer
can not depend on //third_party/webrtc/media:rtc_internal_video_codecs
because it is not in //third_party/webrtc/media:rtc_internal_video_codecs's visibility list: [
  //third_party/webrtc/*
  //third_party/webrtc_overrides/*
]

 https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2FLinux_Builder%2F23560%2F%2B%2Frecipes%2Fsteps%2Fgenerate_build_files%2F0%2Fstdout

Original change's description:
> GN rtc_* templates: Set default visibility to webrtc_root + "/*"
> 
> This means that by default, targets are visible to everything under
> the WebRTC root, but not visible to anything else.
> 
> API targets are manually tagged with visibility "*", so that targets
> outside the WebRTC tree can see them.
> 
> BUG=webrtc:8254
> 
> Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
> Reviewed-on: https://webrtc-review.googlesource.com/24140
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21548}

TBR=mbonadei@webrtc.org,kwiberg@webrtc.org

Change-Id: I06620ce3d6f67482935c22efa231dd6cab91625a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8254
Reviewed-on: https://webrtc-review.googlesource.com/38760
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21555}
2018-01-10 15:14:54 +00:00
Karl Wiberg
588c548657 GN rtc_* templates: Set default visibility to webrtc_root + "/*"
This means that by default, targets are visible to everything under
the WebRTC root, but not visible to anything else.

API targets are manually tagged with visibility "*", so that targets
outside the WebRTC tree can see them.

BUG=webrtc:8254

Change-Id: Icdbee6e0d22d93240ff2fb530c8f9dc48e351509
Reviewed-on: https://webrtc-review.googlesource.com/24140
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21548}
2018-01-10 13:08:11 +00:00
Bjorn Terelius
8e126fca47 Remove RtcEventLoggingStarted and RtcEventLoggingStopped events.
This prevents the programmer from accidentally adding LOG_START and LOG_END events to the log without actually starting the log. This also makes it easier to ensure that the LOG_START event always ends up first and the LOG_END event always ends up last in the log file.

Bug: webrtc:8111
Change-Id: I4e6c9306f8559ff184b5185f8728409f8dcebfa0
Reviewed-on: https://webrtc-review.googlesource.com/34400
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21486}
2018-01-03 16:48:56 +00:00
Patrik Höglund
731082ce7e Reland: Add mock_rtc_event_log.h.
Bug: webrtc:7642
Change-Id: I3f97a8b603e34819e1563b335c1eeb51f89b11ac
Reviewed-on: https://webrtc-review.googlesource.com/37081
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21480}
2018-01-03 08:37:12 +00:00
Edward Lemur
5a25ab298d Revert "Add mock_rtc_event_log.h."
This reverts commit 63aea46a6e.

Reason for revert: 
Breaks Chromium build:
https://logs.chromium.org/v/?s=chromium%2Fbb%2Fchromium.webrtc.fyi%2Fios-simulator%2F6721%2F%2B%2Frecipes%2Fsteps%2Fgenerate_build_files__mb_%2F0%2Fstdout

ERROR at //third_party/webrtc/logging/BUILD.gn:295:5: Can't load input file.
    "../../test:test_support",
    ^------------------------
Unable to load:
  /b/build/slave/mac64/build/src/third_party/test/BUILD.gn
I also checked in the secondary tree for:
  /b/build/slave/mac64/build/src/build/secondary/third_party/test/BUILD.gn

Maybe this should be guarded by an "if (!build_with_chromium)"?

Original change's description:
> Add mock_rtc_event_log.h.
> 
> Bug: webrtc:7642
> Change-Id: Id3aa84d79e5e1a0520a968117cee550c9dd33c16
> Reviewed-on: https://webrtc-review.googlesource.com/37040
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21475}

TBR=phoglund@webrtc.org,mbonadei@webrtc.org

Change-Id: Ib49c7812261c46226ec0b7b3c99af2c3a8b78add
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7642
Reviewed-on: https://webrtc-review.googlesource.com/36981
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21477}
2018-01-02 18:26:52 +00:00
Patrik Höglund
63aea46a6e Add mock_rtc_event_log.h.
Bug: webrtc:7642
Change-Id: Id3aa84d79e5e1a0520a968117cee550c9dd33c16
Reviewed-on: https://webrtc-review.googlesource.com/37040
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21475}
2018-01-02 18:11:10 +00:00
Mirko Bonadei
b3c210fa56 Reland "New protobuf format for event log.""""
This reverts commit 6cfbc35ad7.

Reason for revert: Fixing downstream projects.

Original change's description:
> Revert "Revert "Revert "New protobuf format for event log."""
> 
> This reverts commit ef8f420403.
> 
> Reason for revert: New problems with downstream project.
> 
> Original change's description:
> > Revert "Revert "New protobuf format for event log.""
> > 
> > This reverts commit 546373fc66.
> > 
> > Reason for revert: Downstream project fixed.
> > 
> > Original change's description:
> > > Revert "New protobuf format for event log."
> > > 
> > > This reverts commit 99463c14db.
> > > 
> > > Reason for revert: Speculative revert for downstream project breakage.
> > > 
> > > Original change's description:
> > > > New protobuf format for event log.
> > > > 
> > > > Bug: webrtc:6295
> > > > Change-Id: Ie20a2808a4f076b05fb6195f4fed73215f6fd3b2
> > > > Reviewed-on: https://webrtc-review.googlesource.com/8880
> > > > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > > > Reviewed-by: Per Kjellander <perkj@webrtc.org>
> > > > Reviewed-by: Dino Radaković <dinor@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/master@{#21291}
> > > 
> > > TBR=terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org
> > > 
> > > Change-Id: Ic319170a7a777002ca29248d102cb4e26966d5ae
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Bug: webrtc:6295
> > > Reviewed-on: https://webrtc-review.googlesource.com/33400
> > > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > > Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#21292}
> > 
> > TBR=brandtr@webrtc.org,terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org
> > 
> > Change-Id: I9e96e5007d0447e63178d47c7330488b2a8f2b6f
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:6295
> > Reviewed-on: https://webrtc-review.googlesource.com/33440
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21296}
> 
> TBR=brandtr@webrtc.org,terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org
> 
> Change-Id: I4eb15c809f67af13ffa7b7df6eb06088af21f63f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:6295
> Reviewed-on: https://webrtc-review.googlesource.com/33480
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21297}

TBR=brandtr@webrtc.org,terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org

Change-Id: I7895575f2b6e4ec2c36296fe81a7596147158601
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6295
Reviewed-on: https://webrtc-review.googlesource.com/33520
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21299}
2017-12-15 16:13:48 +00:00
Rasmus Brandt
6cfbc35ad7 Revert "Revert "Revert "New protobuf format for event log."""
This reverts commit ef8f420403.

Reason for revert: New problems with downstream project.

Original change's description:
> Revert "Revert "New protobuf format for event log.""
> 
> This reverts commit 546373fc66.
> 
> Reason for revert: Downstream project fixed.
> 
> Original change's description:
> > Revert "New protobuf format for event log."
> > 
> > This reverts commit 99463c14db.
> > 
> > Reason for revert: Speculative revert for downstream project breakage.
> > 
> > Original change's description:
> > > New protobuf format for event log.
> > > 
> > > Bug: webrtc:6295
> > > Change-Id: Ie20a2808a4f076b05fb6195f4fed73215f6fd3b2
> > > Reviewed-on: https://webrtc-review.googlesource.com/8880
> > > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > > Reviewed-by: Per Kjellander <perkj@webrtc.org>
> > > Reviewed-by: Dino Radaković <dinor@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#21291}
> > 
> > TBR=terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org
> > 
> > Change-Id: Ic319170a7a777002ca29248d102cb4e26966d5ae
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:6295
> > Reviewed-on: https://webrtc-review.googlesource.com/33400
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21292}
> 
> TBR=brandtr@webrtc.org,terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org
> 
> Change-Id: I9e96e5007d0447e63178d47c7330488b2a8f2b6f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:6295
> Reviewed-on: https://webrtc-review.googlesource.com/33440
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21296}

TBR=brandtr@webrtc.org,terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org

Change-Id: I4eb15c809f67af13ffa7b7df6eb06088af21f63f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6295
Reviewed-on: https://webrtc-review.googlesource.com/33480
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21297}
2017-12-15 15:25:59 +00:00
Rasmus Brandt
ef8f420403 Revert "Revert "New protobuf format for event log.""
This reverts commit 546373fc66.

Reason for revert: Downstream project fixed.

Original change's description:
> Revert "New protobuf format for event log."
> 
> This reverts commit 99463c14db.
> 
> Reason for revert: Speculative revert for downstream project breakage.
> 
> Original change's description:
> > New protobuf format for event log.
> > 
> > Bug: webrtc:6295
> > Change-Id: Ie20a2808a4f076b05fb6195f4fed73215f6fd3b2
> > Reviewed-on: https://webrtc-review.googlesource.com/8880
> > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > Reviewed-by: Per Kjellander <perkj@webrtc.org>
> > Reviewed-by: Dino Radaković <dinor@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#21291}
> 
> TBR=terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org
> 
> Change-Id: Ic319170a7a777002ca29248d102cb4e26966d5ae
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:6295
> Reviewed-on: https://webrtc-review.googlesource.com/33400
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21292}

TBR=brandtr@webrtc.org,terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org

Change-Id: I9e96e5007d0447e63178d47c7330488b2a8f2b6f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6295
Reviewed-on: https://webrtc-review.googlesource.com/33440
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21296}
2017-12-15 14:37:07 +00:00
Patrik Höglund
3e113438b1 Fix circular dependencies in webrtc_common.
One reason for the circular deps is that common_types.h is a
historical dumping ground for various structs and defines that
are believed to be generally useful. I tried moving things out
that did not appear to be used downstream (StreamCounters,
RtpCounters etc) and moved the things that seemed used
(RtpHeader + supporting structs) to a new file api/rtp_headers.h.
This makes their place in the api more clear while moving out
the things that don't belong in the API in the first place.

I had to extract out typedefs.h from webrtc_common to resolve
another circular dependency. I believe checks includes typedefs,
but common depends on checks.

Bug: webrtc:7745
Change-Id: I725d49616b1ec0cdc8b74be7c078f7a4d46f084b
Reviewed-on: https://webrtc-review.googlesource.com/33001
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21295}
2017-12-15 14:33:26 +00:00
Rasmus Brandt
546373fc66 Revert "New protobuf format for event log."
This reverts commit 99463c14db.

Reason for revert: Speculative revert for downstream project breakage.

Original change's description:
> New protobuf format for event log.
> 
> Bug: webrtc:6295
> Change-Id: Ie20a2808a4f076b05fb6195f4fed73215f6fd3b2
> Reviewed-on: https://webrtc-review.googlesource.com/8880
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Dino Radaković <dinor@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21291}

TBR=terelius@webrtc.org,perkj@webrtc.org,dinor@webrtc.org

Change-Id: Ic319170a7a777002ca29248d102cb4e26966d5ae
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6295
Reviewed-on: https://webrtc-review.googlesource.com/33400
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21292}
2017-12-15 13:47:17 +00:00
Bjorn Terelius
99463c14db New protobuf format for event log.
Bug: webrtc:6295
Change-Id: Ie20a2808a4f076b05fb6195f4fed73215f6fd3b2
Reviewed-on: https://webrtc-review.googlesource.com/8880
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Dino Radaković <dinor@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21291}
2017-12-15 12:42:06 +00:00
Bjorn Terelius
5cab6f1dc7 Add method to encode a batch of RtcEvents.
Bug: webrtc:8111
Change-Id: Ieb3ff6b817a6bc068b358d49e6d6df07e3ec8d8b
Reviewed-on: https://webrtc-review.googlesource.com/32720
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21286}
2017-12-14 18:37:53 +00:00
Patrik Höglund
a8005cfd8b Fix circular dependencies between optional, array_view, and rtc_base.
This splits things out of rtc_base and makes dependencies explicit.

Bug: webrtc:6828
Change-Id: Id521896c3c43595349021c857bec216e429a0c8d
Reviewed-on: https://webrtc-review.googlesource.com/32780
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21264}
2017-12-14 06:49:11 +00:00
Patrik Höglund
d37709b659 Revert "Fix circular dependencies between optional, array_view, and rtc_base."
This reverts commit a9e0924fa7.

Reason for revert: Breaks because of RTC_LAST_SYSTEM_ERROR

Original change's description:
> Fix circular dependencies between optional, array_view, and rtc_base.
> 
> This splits things out of rtc_base and makes dependencies explicit.
> 
> Bug: webrtc:6828
> Change-Id: Ib813c7bd9e4de7ab015acb917bc09ee7204ba7bd
> Reviewed-on: https://webrtc-review.googlesource.com/31940
> Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21245}

TBR=phoglund@webrtc.org,kwiberg@webrtc.org

Change-Id: I1a5dcf2223f00ae7c46f9f2a12b990ab3a84397d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:6828
Reviewed-on: https://webrtc-review.googlesource.com/32760
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21251}
2017-12-13 14:56:33 +00:00
Patrik Höglund
a9e0924fa7 Fix circular dependencies between optional, array_view, and rtc_base.
This splits things out of rtc_base and makes dependencies explicit.

Bug: webrtc:6828
Change-Id: Ib813c7bd9e4de7ab015acb917bc09ee7204ba7bd
Reviewed-on: https://webrtc-review.googlesource.com/31940
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21245}
2017-12-13 13:44:21 +00:00
Mirko Bonadei
818d910392 Stop using public_deps in logging/.
Bug: webrtc:8603
Change-Id: Id0df997620a27e47067e4b21e4e8db16aec90640
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/30940
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21228}
2017-12-12 13:40:57 +00:00
Niels Möller
d4d399081b Change RtcEventLogOutputFile to use FILE* for i/o.
Eliminates a dependency on system_wrappers and the FileWrapper class.

Bug: None
Change-Id: I2cbbf4d6c3bf50e9b3b0b6d140da6d5d7e54167e
Reviewed-on: https://webrtc-review.googlesource.com/29821
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21208}
2017-12-11 15:14:06 +00:00
Mirko Bonadei
b5728d9b0f Stop using public_deps in modules/rtp_rtcp.
TBR=phoglund@webrtc.org

Bug: webrtc:8603
Change-Id: I86830df23db3f33a1a26098e639596bd3b86485a
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/29780
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21108}
2017-12-06 07:37:52 +00:00
Ilya Nikolaevskiy
a4259f6b66 Add new event type to RtcEventLog
Alr state is now logged by the pacer. To avoid confusion,
loopback tools will now create two separate rtc event
logs for sender and receiver calls.

Bug: webrtc:8287, webrtc:8588
Change-Id: Ib3e47d109c3a65a7ed069b9a613e6a08fe6a2f30
Reviewed-on: https://webrtc-review.googlesource.com/26880
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21084}
2017-12-05 13:13:07 +00:00
Mirko Bonadei
a0e1a55dc9 Stop using public_deps in the call module.
Bug: webrtc:8603
Change-Id: I048127bc86f213e638e6814ac8a86761cb8a64db
Reviewed-on: https://webrtc-review.googlesource.com/28624
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21072}
2017-12-05 08:29:41 +00:00
Mirko Bonadei
5b86f0a24b Stop using ByteSize (deprecated) to get the size of a proto message.
The method ByteSize has been deprecated [1], this CL switches to
ByteSizeLong.

[1] - https://cs.chromium.org/chromium/src/third_party/protobuf/src/google/protobuf/message_lite.h?l=252&rcl=ac47edd22c481fcfe119769d6b7abf365abea8fa

Bug: None
Change-Id: I1ba622df52f47719a5beda6d230cb603a0163d43
Reviewed-on: https://webrtc-review.googlesource.com/27021
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20952}
2017-11-30 14:27:50 +00:00
Oskar Sundbom
f281853c11 Optional: Use nullopt and implicit construction in /logging
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.

This CL was uploaded by git cl split.

Bug: None
Change-Id: Ibe15d2814074a4cf67de18d6e04540076f1a9dc9
Reviewed-on: https://webrtc-review.googlesource.com/23611
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20862}
2017-11-24 10:41:48 +00:00
Karl Wiberg
e40468ba3d Move some numeric utility code from rtc_base/ to rtc_base/numerics/
Specifically, I'm moving

  safe_compare.h
  safe_conversions.h
  safe_minmax.h

They shouldn't be part of the API, and moving them to an appropriate
subdirectory of rtc_base/ is a good way to keep track of that.

BUG=webrtc:8445

Change-Id: I458531aeb30bcf4291c4bec3bf22a2fffbf054ff
Reviewed-on: https://webrtc-review.googlesource.com/20860
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20829}
2017-11-22 11:21:47 +00:00
Bjorn Terelius
de939432dc Revert "Revert "Encode log events periodically instead of for every event.""
This reverts commit 33c5c7f5e4.

Reason for revert: Fix broken API change.

TBR=sprang@webrtc.org,solenberg@webrtc.org
TBRing because only pc/ and api/ have changed since last LGTMed version.

Original change's description:
> Revert "Encode log events periodically instead of for every event."
>
> This reverts commit b154c27e72.
>
> Reason for revert: Broke the internal project.
>
> Original change's description:
> > Encode log events periodically instead of for every event.
> >
> > Updated unit test to take output_period and random seed as parameters.
> > Updated the peerconnection interface to allow passing in an output_period.
> >
> > This is in preparation of some upcoming CLs that will change the format
> > to store batches of delta-encoded values.
> >
> >
> > Bug: webrtc:8111
> > Change-Id: Id5d9844dfad8d8edad346cd7cbebc7eadaaa5416
> > Reviewed-on: https://webrtc-review.googlesource.com/22600
> > Commit-Queue: Björn Terelius <terelius@webrtc.org>
> > Reviewed-by: Elad Alon <eladalon@webrtc.org>
> > Reviewed-by: Tommi <tommi@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#20736}
>
> Change-Id: I2257c46c014adb8c7c4fb28538635cabed1f2229
> Bug: webrtc:8111
> Reviewed-on: https://webrtc-review.googlesource.com/24160
> Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
> Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20738}

Bug: webrtc:8111
Change-Id: Ie69862cd52d11c1e15adeb6e2caacafe16863c80
Reviewed-on: https://webrtc-review.googlesource.com/24620
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20811}
2017-11-21 10:58:57 +00:00
Zhi Huang
33c5c7f5e4 Revert "Encode log events periodically instead of for every event."
This reverts commit b154c27e72.

Reason for revert: Broke the internal project.

Original change's description:
> Encode log events periodically instead of for every event.
> 
> Updated unit test to take output_period and random seed as parameters.
> Updated the peerconnection interface to allow passing in an output_period.
> 
> This is in preparation of some upcoming CLs that will change the format
> to store batches of delta-encoded values.
> 
> 
> Bug: webrtc:8111
> Change-Id: Id5d9844dfad8d8edad346cd7cbebc7eadaaa5416
> Reviewed-on: https://webrtc-review.googlesource.com/22600
> Commit-Queue: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Elad Alon <eladalon@webrtc.org>
> Reviewed-by: Tommi <tommi@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20736}

TBR=solenberg@webrtc.org,eladalon@webrtc.org,terelius@webrtc.org,tommi@webrtc.org,sprang@webrtc.org,pthatcher@webrtc.org

Change-Id: I2257c46c014adb8c7c4fb28538635cabed1f2229
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8111
Reviewed-on: https://webrtc-review.googlesource.com/24160
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20738}
2017-11-17 21:02:02 +00:00
Bjorn Terelius
b154c27e72 Encode log events periodically instead of for every event.
Updated unit test to take output_period and random seed as parameters.
Updated the peerconnection interface to allow passing in an output_period.

This is in preparation of some upcoming CLs that will change the format
to store batches of delta-encoded values.


Bug: webrtc:8111
Change-Id: Id5d9844dfad8d8edad346cd7cbebc7eadaaa5416
Reviewed-on: https://webrtc-review.googlesource.com/22600
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20736}
2017-11-17 19:15:11 +00:00
Oleh Prypin
6581f21f0e Fix some missed stdlib includes
Ran into these when trying a newer libstdc++

Bug: None
Change-Id: Ie3ce0ae1ae1e6da1a15476fbf942b48b37adc9fa
Reviewed-on: https://webrtc-review.googlesource.com/23501
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20701}
2017-11-16 08:50:44 +00:00
Bjorn Terelius
3d55ed6cd6 Fix bug that applies wrong size limit to RtcEventLog history.
Bug: webrtc:8111
Change-Id: I13dc8c5fcf7c7b897265710e3643666fa7563986
Reviewed-on: https://webrtc-review.googlesource.com/21381
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20618}
2017-11-09 12:30:52 +00:00
Mirko Bonadei
675513b96a Stop using LOG macros in favor of RTC_ prefixed macros.
This CL has been generated with the following script:

for m in PLOG \
  LOG_TAG \
  LOG_GLEM \
  LOG_GLE_EX \
  LOG_GLE \
  LAST_SYSTEM_ERROR \
  LOG_ERRNO_EX \
  LOG_ERRNO \
  LOG_ERR_EX \
  LOG_ERR \
  LOG_V \
  LOG_F \
  LOG_T_F \
  LOG_E \
  LOG_T \
  LOG_CHECK_LEVEL_V \
  LOG_CHECK_LEVEL \
  LOG
do
  git grep -l $m | xargs sed -i "s,\b$m\b,RTC_$m,g"
done
git checkout rtc_base/logging.h
git cl format

Bug: webrtc:8452
Change-Id: I1a53ef3e0a5ef6e244e62b2e012b864914784600
Reviewed-on: https://webrtc-review.googlesource.com/21325
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20617}
2017-11-09 11:56:32 +00:00
Bjorn Terelius
2732bf5f20 Allow printing full packets in rtc_eventlog2text.
Add command line option to print packet contents as hex in rtc_eventlog2text.

Bug: None
Change-Id: I690706cfba883ca2248332622f2c9133b7ddaf6a
Reviewed-on: https://webrtc-review.googlesource.com/20863
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20590}
2017-11-07 16:33:15 +00:00
Bjorn Terelius
449d295d1a Remove redundant unit tests for RtcEventLog.
Bug: webrtc:8111
Change-Id: I53c8729ec9d207bbf64d771469a9b0749c7588bf
Reviewed-on: https://webrtc-review.googlesource.com/17363
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20536}
2017-11-01 16:09:16 +00:00
Elad Alon
2bc93b0d6f Fix AudioLevel print-out in rtc_event_log2text
uint8_t was being printed as a char; a conversion to int was necessary.

Bug: None
Change-Id: I4c6875c693350b95b8742a6a8e17157743db62cb
Reviewed-on: https://webrtc-review.googlesource.com/17400
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20502}
2017-10-31 14:42:03 +00:00
Elad Alon
92a773ddb6 Prevent unbounded memory consumption through RtcEventLogImpl::config_history_
The config-history is (logically) intended to be unlimited, but in practice, it would be good to cap it, even though the cap is never expected to be reached, so as to prevent a possible attack that would cause memory overuse.

Bug: webrtc:8111
Change-Id: I1f60cf10215bf8191a8ab3c9b19345104c585483
Reviewed-on: https://webrtc-review.googlesource.com/8980
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20276}
2017-10-13 10:47:26 +00:00
Elad Alon
15608c6a34 Prevent RtcEventLogTestHelper from crashing
Prevent RtcEventLogTestHelper from crashing; use ASSERT instead (soft-failure in the gtest suite).

Bug: webrtc:8111
Change-Id: Ibaabdaa64d0778af83e9a49485fb880793091d24
Reviewed-on: https://webrtc-review.googlesource.com/8620
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20254}
2017-10-11 18:12:57 +00:00
Bjorn Terelius
fa4c0c768a Print RTCP of unknown RTPFB and PSFB type in rtc_event_log2text.
Bug: None
Change-Id: If51f3d41f0e7b606fc66439b2b7ca4d34a4d206f
Reviewed-on: https://webrtc-review.googlesource.com/7980
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20241}
2017-10-11 11:23:32 +00:00
Elad Alon
03967cd7bf RtcEventLogOutputFile needs to reset file_ whenever the file is not successfully opened
RtcEventLogOutputFile needs to reset file_ whenever the file is not successfully opened. (The destructor DCHECKs that file_ only exists if it's active, so as to help maintain this.)

Bug: webrtc:8111
Change-Id: I9a375a142af821b3c7183032f0b5d4d612dfa6b8
Reviewed-on: https://webrtc-review.googlesource.com/8080
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20229}
2017-10-10 17:19:18 +00:00
Elad Alon
8081073677 Move RtcEventLogOutput to api/
Move RtcEventLogOutput into the API, so that we would be able to change StartRtcEventLog (in PeerConnectionInterface) to use it.

Bug: webrtc:8111
Change-Id: I1d70af792ec584d3f1a8eced1b66c38e4a360642
Reviewed-on: https://webrtc-review.googlesource.com/7220
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20189}
2017-10-06 13:58:14 +00:00
Elad Alon
604c14df58 Reland "Remove deprecated functions from RtcEventLog"
The unified Log() interface replaces the many old LogX() functions. This helps hide dependencies between the modules which log different events.

TBR=stefan@webrtc.org

Bug: webrtc:8111
Change-Id: I36c8b6c4cf03d738c9033af2e98db6dc200eede9
Reviewed-on: https://webrtc-review.googlesource.com/6940
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20170}
2017-10-05 15:07:53 +00:00
Elad Alon
8233bfea27 Reintroduce WritingToInactiveFileForbidden and DisallowUnreasonableFileSizeLimits
Both tests failed the linux_memchecks trybot, and so were removed. This attempts to reintroduce them.

Bug: webrtc:8111
Change-Id: I32c49cb1b2af16d80e6f32258501ab79535700c0
Reviewed-on: https://webrtc-review.googlesource.com/6285
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20169}
2017-10-05 15:00:31 +00:00
Danil Chapovalov
d312a9149f Revert "Remove deprecated functions from RtcEventLog"
This reverts commit 5fd6e5ec1f.

Reason for revert: breaks downstream project
please still keep default arguments for CreateEventLog

Original change's description:
> Remove deprecated functions from RtcEventLog
> 
> The unified Log() interface replaces the many old LogX() functions. This helps hide dependencies between the modules which log different events.
> 
> TBR=stefan@webrtc.org
> 
> Bug: webrtc:8111
> Change-Id: I5ea9fd50ba6da87d5867513c81c5e3bdb0524a32
> Reviewed-on: https://webrtc-review.googlesource.com/2689
> Commit-Queue: Elad Alon <eladalon@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Elad Alon <eladalon@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20159}

TBR=danilchap@webrtc.org,eladalon@webrtc.org,terelius@webrtc.org,stefan@webrtc.org

Change-Id: Iefc195f5804dabc0f76b87f889ff55481f4d285b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8111
Reviewed-on: https://webrtc-review.googlesource.com/6842
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20164}
2017-10-05 12:25:31 +00:00
Elad Alon
5fd6e5ec1f Remove deprecated functions from RtcEventLog
The unified Log() interface replaces the many old LogX() functions. This helps hide dependencies between the modules which log different events.

TBR=stefan@webrtc.org

Bug: webrtc:8111
Change-Id: I5ea9fd50ba6da87d5867513c81c5e3bdb0524a32
Reviewed-on: https://webrtc-review.googlesource.com/2689
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20159}
2017-10-05 10:00:20 +00:00
Bjorn Terelius
28db266c9b Add simulation of receive-side bandwidth estimate to event_log_analyzer.
Previously reviewed at https://codereview.webrtc.org/2986683002/

Bug: webrtc:7726
Change-Id: I9568bd8387d79f313d6c7d53ded7c23460df1598
Reviewed-on: https://webrtc-review.googlesource.com/6360
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20141}
2017-10-04 13:11:54 +00:00
Elad Alon
83ccca1864 Create and use RtcEventLogOutput for output
We need to support two modes of writing to the output:
1. Current way - the application lets lets WebRTC know which file to write to, and WebRTC is then in charge of the writing.
2. New way - the application would receive indications from WebRTC about (encoded) RTC events, and would itself be in charge of processing them (be it writing it to a file, uploading it somewhere, etc.).

We achieve this by creating an interface for output - RtcEventLogOutput. By providing an instance of the subclass, RtcEventLogOutputFile, the old behavior is achieved. The subclass of the new behavior is to be added by a later CL.

TBR=stefan@webrtc.org

Bug: webrtc:8111
Change-Id: I9c50521a7f7144d86d8353a65995795862e19c44
Reviewed-on: https://webrtc-review.googlesource.com/2686
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20135}
2017-10-04 11:18:47 +00:00
Elad Alon
4a87e1c211 Remove encoding code from RtcEventLogImpl and use RtcEventLogEncoder instead
RtcEventLogImpl no longer hard-codes the way encoding is done. It now relies on RtcEventEncoder for it. This gives two benefits:
1. We can decide between the current encoding and the new encoding (which is still WIP) without code duplication (no need for RtcEventLogImplNew).
2. Encoding is done only when the event needs to be written to a file. This both avoids unnecessary encoding of events which don't end up getting written to a file, as well as is useful for the new, delta-based encoding, which is stateful.

BUG=webrtc:8111

Change-Id: I9517132e5f96b8059002a66fde8d42d3a678c3bb
Reviewed-on: https://webrtc-review.googlesource.com/1365
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20118}
2017-10-03 15:26:56 +00:00
Elad Alon
1d87b0e40f Create RtcEventLogEncoderLegacy
We're moving to an RtcEventLog interface that accepts std::unique_ptr<EventLog> and stores the event for encoding when encoding becomes necessary, rather than before. This will be useful while we maintain the legacy (current) encoding alongside the new encoding on which we're working.

This CL introduces RtcEventLogEncoderLegacy, which takes provides the encoding currently done by RtcEventLogImpl. After this, we can modify RtcEventLogImpl to use a dynamically chosen encoding, allowing us to easily choose between the current encoding and the new one on which we're working.

BUG=webrtc:8111
TBR=stefan@webrtc.org

Change-Id: I3dde7e222a40a117549a094a59b04219467f490a
Reviewed-on: https://webrtc-review.googlesource.com/1364
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20116}
2017-10-03 13:51:59 +00:00
Elad Alon
078a78120f Add the internals of RtcEvent's subclasses
We're moving to an RtcEventLog interface that accepts std::unique_ptr<EventLog> and stores the event for encoding when encoding becomes necessary, rather than before. This will be useful while we maintain the legacy (current) encoding alongside the new encoding on which we're working.

This CL adds the internals of RtcEvent's subclasses - the actual data that they keep. (Work on this was broken down into several CLs in order to make reviewing easier.)

BUG=webrtc:8111

Change-Id: I402c9c64bffef6a5a6d227bde5da0fd3152daba1
Reviewed-on: https://webrtc-review.googlesource.com/1362
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20108}
2017-10-03 10:37:01 +00:00
Bjorn Terelius
a31fd0d69a Add back mock for deprecated methods in RTC event log
Bug: webrtc:8111
Change-Id: Ib09927be07073f8e90ab03d7ba8af9cf0683f8d6
Reviewed-on: https://webrtc-review.googlesource.com/5363
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20087}
2017-10-02 15:19:29 +00:00
Elad Alon
652cc84069 Introduce RtcEvent and subclasses
We're moving to an RtcEventLog interface that accepts std::unique_ptr<EventLog> and stores the event for encoding when encoding becomes necessary, rather than before. This will be useful while we maintain the legacy (current) encoding alongside the new encoding on which we're working.

This CL just introduces the new RtcEvent and its sub-classes, without constructors and without use. Upcoming CLs will finish the work.

BUG=webrtc:8111

Change-Id: I782383e861c31670b7cd13ffc6b43ca6a26c98f6
Reviewed-on: https://webrtc-review.googlesource.com/1360
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20068}
2017-10-02 10:16:50 +00:00
Bjorn Terelius
440216fcf3 Split LogRtpHeader and LogRtcpPacket into separate versions for incoming and outgoing packets.
Change LogIncomingRtcpPacket and LogOutgoingRtcpPacket to take ArrayView<uint8_t>.
Split LogSessionAndReadBack into three functions and create class to share state between them.
Split VerifyRtpEvent into one incoming and one outgoing version.

Originally uploaded as https://codereview.webrtc.org/2997973002/

Bug: webrtc:8111
Change-Id: I22bdc35163bef60bc8293679226b19e41e8f49b3
Reviewed-on: https://webrtc-review.googlesource.com/5020
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20063}
2017-10-02 08:44:20 +00:00
Elad Alon
99a81b613d Remove #include of rtc_stream_config.h from rtc_event_log.h
StreamConfig is not integral to RTC-event logging in general, but rather to specific events. Therefore, the dependency on it should not be exported through rtc_event_log.h.

BUG=webrtc:8111
TBR=stefan@webrtc.org

Change-Id: I1ece0830cd05fd12220c8c717490e15942bacec9
Reviewed-on: https://webrtc-review.googlesource.com/1238
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19911}
2017-09-21 09:05:54 +00:00
Elad Alon
2782904c56 RtcEventLog::Create() no longer a friend of RtcEventLogImpl
By making RtcEventLogImpl's ctor public, we remove the necessity to make the function a friend. Visibility of RtcEventLogImpl is still limited to the .cc file.

BUG=webrtc:8111

Change-Id: I774d2e93620a8d9f24299ef2a94f7593b490839d
Reviewed-on: https://webrtc-review.googlesource.com/1237
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19876}
2017-09-17 19:42:45 +00:00
Elad Alon
f491c522cb Move log_count_ out of RtcEventLogImpl
The limit on logs is not specific to the implementation of the logs, but is rather shared between all possible logs.
Also, by making it local to the .cc, not a member, we reduce the necessity of making RtcEventLog::Create a friend of the implementation. This necessity is removed completely by a following CL.

BUG=webrtc:8111
NOPRESUBMIT=True

Change-Id: I03044ed55ceeaf0064d5207b7407926571590699
Reviewed-on: https://webrtc-review.googlesource.com/1236
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19870}
2017-09-15 19:29:27 +00:00
Elad Alon
a96fd7fe6b Make rtc_event_log2text handle all events [2/2]
rtc_event_log2text doesn't currently handle all possible RtcEvent-s.
1. Previous CL - to make sure events are not forgotten in the future, change the succession of if-statements to a switch, so that the compiler would complain if events are ever added, but are not handled here.
2. This CL - add handling of currently-unhandled events.

BUG=webrtc:8111

Change-Id: I5c726c077483b5d85cf8060674c8191a90cb84cc
Reviewed-on: https://webrtc-review.googlesource.com/1244
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19869}
2017-09-15 19:13:09 +00:00
Elad Alon
8b891cecf7 Remove unused function - RtcEventLog::ParseRtcEventLog()
The function is not used; removing.

BUG=webrtc:8111
NOPRESUBMIT=True

Change-Id: Ifd8e4d872e11ffad4bfa178e0ca001470e439043
Reviewed-on: https://webrtc-review.googlesource.com/1234
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19864}
2017-09-15 14:27:00 +00:00
Elad Alon
34f303cf58 Make rtc_event_log2text handle all events [1/2]
rtc_event_log2text doesn't currently handle all possible RtcEvent-s.
1. This CL - to make sure events are not forgotten in the future, change the succession of if-statements to a switch, so that the compiler would complain if events are ever added, but are not handled here.
2. Next CL - add handling of currently-unhandled events.

BUG=webrtc:8111
NOPRESUBMIT=True

Change-Id: Ia4459b4e760eb0208823fdab69996de0e8420703
Reviewed-on: https://webrtc-review.googlesource.com/1242
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19861}
2017-09-15 13:31:20 +00:00
Mirko Bonadei
7120742701 Adding NOLINT for typedefs.h and common_types.h
Now that we have moved WebRTC from src/webrtc to src/, common_types.h
and typedefs.h are triggering a cpplint error.

The cpplint complaint is:
Include the directory when naming .h files  [build/include] [4]

This CL disables the error but we have to remove these two headers
from the root directory.

NOPRESUBMIT=true

Bug: webrtc:5876
Change-Id: I08e1b69aadcc4b28ab83bf25e3819d135d41d333
Reviewed-on: https://webrtc-review.googlesource.com/1577
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@google.com>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19859}
2017-09-15 13:03:51 +00:00
Mirko Bonadei
92ea95e34a Fixing WebRTC after moving from src/webrtc to src/
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org


Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
2017-09-15 05:02:56 +00:00
Mirko Bonadei
bb547203bf Moving src/webrtc into src/.
In order to eliminate the WebRTC Subtree mirror in Chromium, 
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.

NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org

Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}
2017-09-15 04:25:06 +00:00