Commit graph

45 commits

Author SHA1 Message Date
Tommi
55c3600781 Remove <ostream> dependencies
Some dependencies still exist but are a bit more complex to remove.
This CL removes either unused or easily replaced with ToString()
instances of ostream usage. In one case, moving the operator<<
implementation to the one test file that requires it.

Bug: webrtc:8982
Change-Id: Ia5c840b12a42893494af401317a3daf2fe50ba9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/356240
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42582}
2024-07-03 12:27:55 +00:00
Florent Castelli
99c519b3fd Mass removal of absl_deps in all BUILD.gn files
Bug: webrtc:341803749
Change-Id: Id73844ba8d63b9f2f2c9391d8d8116ad0864c36d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351540
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42372}
2024-05-23 15:09:46 +00:00
philipel
2f3b75d30d Reset prev_unwrapped_timestamp_ in TimestampExtrapolator::Reset
Bug: b/325916306
Change-Id: I7c52ed45d02c8e602670f5e8e345543fed4523f3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342860
Reviewed-by: Stefan Holmer <holmer@google.com>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41897}
2024-03-13 13:19:49 +00:00
Rasmus Brandt
f0820ffd88 Implement video versions of RTCInboundRtpStreamStats.jitterBuffer{Target,Minimum}Delay
* https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-jitterbuffertargetdelay
* https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-jitterbufferminimumdelay

Tested: https://jsfiddle.net/pfgzj0yo/17/

Bug: webrtc:14244
Change-Id: I3d949ba63c8339b3881f5d00356559d5789d283d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304404
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40157}
2023-05-26 13:34:09 +00:00
Rasmus Brandt
24f9a8b398 Document VCMTiming::VideoDelayTimings better.
* Reorder and rename members.
* Add comments.
* Define struct first in the class, as per style guide.
* Update direct callers.

Bug: webrtc:15085
Change-Id: I37d26cae1953dacbba7d0507da48e3829ab84ba5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304403
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40011}
2023-05-08 15:30:02 +00:00
Jared Siskin
c018bae807 Format /modules
git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -e  "^modules/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: I2c3cd28740062794f8c10e39d8406aadb9e9a35a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301620
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Jared Siskin <jtsiskin@meta.com>
Cr-Commit-Position: refs/heads/main@{#39901}
2023-04-20 02:02:45 +00:00
Jeremy Leconte
06e2148889 Deflake simulcast flow tests: prevent negative Timestamp exception.
These tests often fail in 'ExtrapolateLocalTime' because the result gives a negative Timestamp.

Here is the stack from https://chromium-swarm.appspot.com/task?id=6173230e67897b10:
PC: @     0x7f03afdb8e87  (unknown)  raise
    ...
    @     0x55f4a360ba71        352  webrtc::Timestamp::operator+()
    @     0x55f4a47ecaf3        160  webrtc::TimestampExtrapolator::ExtrapolateLocalTime()

Low-Coverage-Reason: coverage isn't that low.
Change-Id: If3e7cbf31d6c4800727b24352ed2c6edc425fc73
Bug: webrtc:15022
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300600
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39853}
2023-04-13 16:35:26 +00:00
Rasmus Brandt
65a6ecab33 Rename InterFrameDelay -> InterFrameDelayVariationCalculator.
This class name better reflects the nomenclature defined by RFC5481: https://datatracker.ietf.org/doc/html/rfc5481#section-1.

Some code style improvements were performed. No functional changes are intended.

Bug: webrtc:14905
Change-Id: I84b9deb7b2ac7f1a07ae00670eaff9656a50c2cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295661
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39466}
2023-03-03 11:49:37 +00:00
Rasmus Brandt
86163248f4 Rename CodecTimer -> DecodeTimePercentileFilter.
The CodecTimer is not a codec timer, it's more like a decoder stopwatch with a percentile filter wrapped around it. Since the purpose of the class is to provide an estimate for how much decode delay to add when determining the render timestamp of a frame, let's rename this class to `DecodeTimePercentileFilter`.

No functional changes are intended.

Bug: webrtc:14905
Change-Id: I48c99e4f500c4f9e1a2a20b0afe72d6e76c5192d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293462
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39332}
2023-02-17 13:52:38 +00:00
Florent Castelli
a6b9924988 Remove all usage of //rtc_base target
Bug: webrtc:9838
Change-Id: If813dbb426b4dc848185b64c0349d03fa9c059f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290986
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39116}
2023-01-16 14:36:06 +00:00
Evan Shrubsole
11dfb42fe9 [Unwrap] Migrate TimestampExtrapolator to use RtpTimestampUnwrapper
Bug: webrtc:13982
Change-Id: I570f2b053e7c77295e9d6a60f005e51022c3759f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288942
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39042}
2023-01-09 18:24:28 +00:00
Evan Shrubsole
1c7602c65d [Unwrap] Migrate InterFrameDelay to RtpTimestampUnwrapper
Bug: webrtc:13982
Change-Id: I0c4fe63f47d842fc5871baeb1137aa225bc10ea4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288960
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39039}
2023-01-09 18:21:05 +00:00
Florent Castelli
a138c6c8a5 Split rtc_base into multiple targets
Keeping the headers to allow compatibility with current users
that expect the headers to be in that target before they are
also updated.

Bug: webrtc:9838
Change-Id: I8b1e88850958e92c043686587a37791f01860220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290569
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39031}
2023-01-09 12:21:25 +00:00
philipel
7446b60823 Only update TimestampExtrapolator on the last frame of the temporal unit.
Bug: webrtc:14526
Change-Id: I3fd7cb286050fc4cbe0008534f05141aa19b7606
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278142
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38310}
2022-10-06 15:02:54 +00:00
Rasmus Brandt
2f650fa822 JitterEstimator: remove unnecessary helper functions
Move functionality to closer where the values are used instead,
as per previous CL comment.

Bug: webrtc:14151
Change-Id: I6b7ca02da197420a1f5da930ba87021e6f557444
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275204
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38148}
2022-09-21 10:42:57 +00:00
Rasmus Brandt
9a6a087f37 Remove forward declares
This was missed in https://webrtc-review.googlesource.com/c/src/+/275482.

Bug: webrtc:14111
Change-Id: Id5efcc6838fc3ce4745074b8888c733939e4478d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275767
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38101}
2022-09-16 13:33:08 +00:00
Rasmus Brandt
e4bc975a8a JitterEstimator: add field trial for not estimating noise for congested frames
The reason for rejecting the congested frames in the first place, is
that they do not obey a Gaussian distribution around the line from the
Kalman filter. It therefore also does not make sense to include them
in the noise (*) estimation.

(*) noise = variation around the line from the Kalman filter.

Bug: webrtc:14151
Change-Id: Id8a44ba5f13bf9787ab54848109430ef7657f67a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275762
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38100}
2022-09-16 12:40:38 +00:00
Rasmus Brandt
bcf24f5bcd Move TimestampExtrapolator closer to its single user
The `TimestampExtrapolator` is only used by the `VCMTiming`
class, despite there being references to it from both
`modules/rtp_rtcp/BUILD.gn` and `modules/video_coding/BUILD.gn`.

Bug: webrtc:14111
Change-Id: If1a02a56a0c83b13d619ca08dc76c884fa829369
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275482
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38093}
2022-09-15 13:49:18 +00:00
Rasmus Brandt
624f2eb1aa JitterEstimator: add field trial for overriding frame delay variation clamping
Bug: webrtc:14151
Change-Id: Ib1f26cfaf92ca56000d5904432901d5db225b05a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275203
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38092}
2022-09-15 12:38:13 +00:00
Rasmus Brandt
7d704739d7 JitterEstimator: add input validation to field trials
This functionality should have been added as part of the original CLs,
but was missed. The purpose of the validation is avoid catastrophic
failures due to misconfiguration (such as RTC_CHECK crashes).
The purpose is not to always provide practically reasonable values.

Bug: webrtc:14151
Change-Id: Icbddade865bd6a868f467a1df7055026935f36f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275560
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38090}
2022-09-15 11:30:37 +00:00
Rasmus Brandt
916648107b Generalize MovingMedianFilter to MovingPercentileFilter
* Make `percentile` configurable and rename class.
* Introduce convenience type `MovingMedianFilter` that
  maintains the behaviour of the old class with that name.
* Move home grown moving 95th percentile filter in
  `JitterEstimator` to this new utility class.

Bug: webrtc:14151
Change-Id: I17d525b6e0bc98c28568c7dfe94b72eeab4a1ca2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275311
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38082}
2022-09-14 15:32:06 +00:00
Rasmus Brandt
0a617882df JitterEstimator: add field trial overrides for avg frame filter
This change adds a median filter that can replace the
IIR filter that is currently used to estimate the
avg frame size (in bytes). It is enabled through a boolean,
and reuses the window length from the max percentile filter.

The median filter is only used by the delay calculation in
`CalculateEstimate()`. It does not replaced the use of the
IIR estimate in the size outlier rejection heuristic.

Bug: webrtc:14151
Change-Id: I519b6b57a8bee3c41a300ed2e92a1981c61cca15
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275121
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38077}
2022-09-14 12:12:27 +00:00
Rasmus Brandt
137f1e681e JitterEstimator: add field trial overrides for max frame filter
This change adds a percentile filter that can replace the
"non-linear IIR" filter that is currently used to estimate the
max frame size (in bytes). The percentile filter is enabled through
the field trial, and it has two tuning parameters: the percentile
that is deemed the "max" frame, and the window length over which
the filter is applied.

Bug: webrtc:14151
Change-Id: I002609edb0a74161aaa6f0934892a1bec2ad8230
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274167
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38047}
2022-09-09 12:48:57 +00:00
Rasmus Brandt
e0dd6cf363 JitterEstimator: add field trial overrides for some constants
Bug: webrtc:14151
Change-Id: Ic7fd87569432810b08f51b65b06279f48db061bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274165
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38035}
2022-09-08 14:33:50 +00:00
Rasmus Brandt
d8479c5b4f JitterEstimator: rename and reorder constants.
The constants are reordered to match the order they are used
when a sample is inserted into the filter. Some of the constants
are renamed to better describe their usage. No functional changes
are intended. Future CLs will add configurability to some of these
constants.

Some basic unit tests are also added.

Bug: webrtc:14151
Change-Id: I731a9cad3d8aeab06ccfa7d212cd160a2d2da27b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274122
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38019}
2022-09-06 13:50:48 +00:00
Rasmus Brandt
8cd8d2292c JitterEstimator: rename some member variables to include unit
This makes it easier to read the code, and to visually verify
that the computations make sense from a dimensional perspective.

No functional changes are intended.

Bug: webrtc:14151
Change-Id: Ic059f3c53618903d63a270b901ac5cec6139d2c4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/274120
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38006}
2022-09-05 08:09:30 +00:00
Rasmus Brandt
665875b0d8 Rename Kalman filter to match RFC3393
This CL updates the file and class naming, based on the naming discussion in
https://webrtc-review.googlesource.com/c/src/+/265877.
Concretely, that means replacing "delta" with "variation" in the name.

Bug: webrtc:14151
Change-Id: I43e74b1d25f9441015445101f3eb6a7b52f3adba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/273960
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37999}
2022-09-02 15:52:28 +00:00
philipel
55a9a3de64 Use doubles instead of api/units for jitter estimation.
For now use doubles as units in api/units have insufficient precision for jitter estimation.

Bug: webrtc:14381
Change-Id: I5a691b6a404b734a5bef11d677b72040bc02ff0f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/272367
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37841}
2022-08-19 11:59:58 +00:00
Rasmus Brandt
94b3b5e341 Improve sanity checks
- Move existing check on `max_frame_size` to the top.
    By doing this early, the filter will not end up in an
    inconsistent state (predicted but not updated) when
    called with a tiny `max_frame_size`.
- Add sanity check on noise variance.
    This will avoid sqrt of a negative number.

Bug: webrtc:14151
Change-Id: I2507a9114655d3c3ae35bf5ed83f3f1154c42ad3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271281
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37798}
2022-08-16 13:37:22 +00:00
Rasmus Brandt
875c9d357b Reorder Kalman filter update steps physically (but not logically)
This CL reorders the update steps physically, to make them
easier to comprehend. It renames variables to be more verbose,
but also adds succinct mathematical descriptions (using Wikipedia
notation) to all steps.

No functional changes are intended with this change.

Bug: webrtc:14151
Change-Id: I6a4642e89e2b73639f0b4c928e07b317c14d5884
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271546
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37784}
2022-08-15 14:56:06 +00:00
Rasmus Brandt
24a8e0d161 Remove unnecessary virtual function specifiers
This class is never overridden.

Bug: webrtc:14151
Change-Id: I3b70e927ee0eafd71ce4bdb8f6e8d6330c1a3f08
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271501
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37781}
2022-08-15 08:58:46 +00:00
Rasmus Brandt
1856b2ce71 Stop adding zeros for the off-diagonal components
Bug: webrtc:14151
Change-Id: I58017cab911e642f457f665c5f4d1ff6d11d8571
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271545
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37768}
2022-08-12 16:04:34 +00:00
Rasmus Brandt
949530e6aa Improve FrameDelayDeltaKalmanFilter members naming.
* Update naming of data members.
* Start reordering code blocks in `PredictAndUpdate`.
  (The "predict" step is done in this C:. The "update"
   step will be improved in another cl.)

Bug: webrtc:14151
Change-Id: Idea1e8e786bd672dadedbcb3cd5598f4a033e81e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271023
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37767}
2022-08-12 14:07:44 +00:00
Rasmus Brandt
ae4a832730 Improve FrameDelayDeltaKalmanFilter interface and add more docs.
This CL simplifies and documents the interface of the Kalman filter better. A simple unit test verifying the filter's convergence is
added. No functional changes to the filter are intended.

Future CLs will improve the data member naming and code organization.

Bug: webrtc:14151
Change-Id: I01e60d4b783cabad3ccbdc711c5d746666dd16ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265877
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37766}
2022-08-12 13:42:23 +00:00
Johannes Kron
ef4a2cfc45 Remove condition that will never be active
Remove check if `prev_estimate_` is less than 10 us since it can never
be less than 1 ms.

Bug: None
Change-Id: If151390d22fa0b6ecdc36af64168d3e2049c7b6b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/271203
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37745}
2022-08-11 09:41:52 +00:00
Rasmus Brandt
39ae69690e Split out the jitter estimator's Kalman filter into its own class.
The intention of this change is to separate the Kalman filter state
(that prior to this change lived in JitterEstimator) from the
other filter's state, making it easier to see how the different
filters interact.

This move does not include any interface, functional, or
documentation changes. Those will follow in later changes.

A very basic unit test is added, which will also be expanded
later on.

Bug: webrtc:14151
Change-Id: Ifb9b8ce2d9418ea52ccf64a77fd46d1ebba30779
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264984
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37721}
2022-08-09 12:45:08 +00:00
Philipp Hancke
a204ad210d clean up misc TimeDelta use
follow-up from https://webrtc-review.googlesource.com/c/src/+/262810

* replace Time::Millis(0) and TimeDelta::Millis(0) with ::Zero()
* drop unnecessary webrtc namespace from some TimeDeltas
* make TimeDelta do the unit conversion for stats

BUG=webrtc:13756

Change-Id: Ic60625ae0fc7959a47a6be9f5051851feaf76373
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/265875
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37664}
2022-08-02 13:52:36 +00:00
Evan Shrubsole
496ad52cb2 UpdateCurrentDelay should update delay with rounding errors
Some of the timestamps input into UpdateCurrentDelay are not truncated
to milliseconds and thus a small negative delay can result. This means
the delay will not update when it should have.

Bug: webrtc:14168
Change-Id: I5293339b6a39201c680854e9596b717025ee8dc1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266370
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37657}
2022-08-02 08:47:54 +00:00
Erik Språng
23370f22c1 Remove unused field trial WebRTC-ReducedJitterDelayKillSwitch.
Bug: None
Change-Id: I8747e63d5c237dce6516b69db95035728ca9965c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269206
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37626}
2022-07-27 13:28:35 +00:00
Erik Språng
93b107d0f0 Remove unused field trial WebRTC-JitterUpperBound
Bug: webrtc:9898
Change-Id: I89f2baca9b96fc00fc73d24086e7c6f5ed8307a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/269401
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Auto-Submit: Erik Språng <sprang@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37620}
2022-07-26 10:21:04 +00:00
philipel
e1c707c40f Remove unused incomplete_frame argument from JitterEstimator.
Bug: webrtc:14151
Change-Id: I6764315f0c10b304f50e4639a3e49e4ed013c41e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/267842
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37443}
2022-07-05 12:53:13 +00:00
Johannes Kron
bbf639e930 Add low-latency stream signaling to VideoFrame and VCMTiming
This is the first CL out of three to make the low-latency stream signaling
explicit. At the moment this is done by setting the render time to 0.
There's a dependency between Chromium and WebRTC which is why this is
split into three CLs to not break any existing functionality.

Bug: chromium:1327251
Change-Id: Ie6b268746d587a99334485db77181fb2c6e9b567
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/264502
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37225}
2022-06-15 14:04:28 +00:00
Rasmus Brandt
c4d253c1ed Move VCMTiming into timing sub-folder
Bug: webrtc:14111
Change-Id: I9785b00012ea84f55789845a7e71fe26006d5067
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263581
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37061}
2022-05-31 13:01:24 +00:00
Rasmus Brandt
10944e61ac Move JitterEstimator into timing sub-folder
Bug: webrtc:14111
Change-Id: Ic5c66f35e3cedac7a328fbb6613e5cdf13a8005e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/263582
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#37000}
2022-05-25 09:15:29 +00:00
Rasmus Brandt
2377226851 Start moving timing helper classes into timing/ sub-folder.
Putting these classes in a sub folder increases
structure and clarifies that they are used as
helper classes. Affected classes in this change:
  * CodecTimer
  * InterFrameDelay
  * RttFilter
VCMTiming will be moved in a separate CL.

Additional changes:
  * Remove VCM prefix from class names.
  * Introduce granular BUILD.gn targets.
  * Update some includes.

Bug: webrtc:14111
Change-Id: Ia75128aa955a819033b97d4784cb61904de7230b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/262960
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36975}
2022-05-23 13:43:40 +00:00