Commit graph

2491 commits

Author SHA1 Message Date
Fredrik Hernqvist
828de8036d Populate RTCInboundRtpStreamStats::playoutId when appropriate
Bug: webrtc:14653
Change-Id: I0c59604b218d0839a126c02914626b8ed2bee76c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291040
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39149}
2023-01-19 15:44:36 +00:00
Sergio Garcia Murillo
1389c4b594 Add 444 10 bits support for H264 and VP9
This CL adds support for I410 buffers (444 10 bits) and modify vp9 and h264 for being able to convert input buffer to it when appropiate.

Bug: webrtc:14818
Change-Id: I2fb3dc9d80c5338944c6df74dd6217a0454180d9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290721
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39123}
2023-01-17 12:32:26 +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
Fredrik Hernqvist
efbe753617 Add RTCAudioPlayoutStats to GetStats().
This is done by allowing implementations of AudioDeviceModule to
implement the GetStats() method. The default implementation returns
nullopt, in which case RTCAudioPlayoutStats will not be visible in the
stats.

Bug: webrtc:14653
Change-Id: I8e4aa6f1b8fcfa47a30f633d28a4013191752e20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290563
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Fredrik Hernqvist <fhernqvist@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39115}
2023-01-16 13:19:45 +00:00
Henrik Boström
3dd73ae6f4 Surface the SetMetadata() method so that Chromium can use it.
RTPVideoHeader is changed to non-const to allow modifying it. We want
to do this when implementing setMetadata() in JavaScript or when
refactoring clone() as "construct + set bytes + setMetadata".

Unblocks
https://chromium-review.googlesource.com/c/chromium/src/+/4164979.

Bug: webrtc:14709
Change-Id: I6089df9c03e9aa33feeb0830dd240dd456cb565e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290981
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39113}
2023-01-16 10:54:17 +00:00
Lionel Koenig
612872b29d Add RtcEvent to store when MinimumSetDelay is set on NetEq
To be able to simulate offline some scenario in which the javascript
layer set the minimum base buffer size of neteq, it is required to
record those API calls. This change introduces this.

Bug: webrtc:14763
Change-Id: Ic817913eda60978d6fca3f8e12229aeec505ca25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/287122
Auto-Submit: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Lionel Koenig <lionelk@webrtc.org>
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39104}
2023-01-13 17:15:48 +00:00
Henrik Boström
dc39aebd08 Add GetRTPVideoHeaderCodecSpecifics() to metadata.
This will allow exposing VP8, VP9 and H264-specific RTP header metadata
in JavaScript (behind a flag).

This information appears to be necessary for cloning
(https://github.com/w3c/webrtc-encoded-transform/issues/161), and
cloning should be the same as "new frame + setMetadata + setBytes",
ergo this should be exposed.

Bug: webrtc:14709
Change-Id: Ie71c05f40689bbd529dc4674a07a87c7910b22d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290880
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39101}
2023-01-13 11:33:40 +00:00
Artem Titov
bb25641dd9 [PCLF] Add an API to add extra audio/video RTP header extensions
Bug: None
Change-Id: Ieee29419bc13efe1891c2ceda8a919c031cd4a58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290897
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39100}
2023-01-13 11:14:38 +00:00
Philipp Hancke
e137c4592e stats: deprecate timestamp_us constructor and method
in favor of the Timestamp constructor and method.
The constructor is most likely not used outside libWebRTC,
the call to
  .timestamp_us()
can be replaced with
  .timestamp().us()

BUG=webrtc:14813

Change-Id: Id166b4f85b2425ecec1c7ebb81406f82ff9d95c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290727
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39066}
2023-01-11 11:40:05 +00:00
Sergio Garcia Murillo
bfc26c65e6 Use libyuv rotate methods
Bug: webrtc:13826
Change-Id: I10a3b291a66eae1b867dd2fa1a1781c235feef33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290703
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39060}
2023-01-10 15:26:37 +00:00
Evan Shrubsole
7ef0c1aff5 Implement RTCNonStandardStatsMember using StatExposureCriteria
Adds a new StatExposureCriteria for non-standard stats. This removes the
virtual call to is_standardized() which can simply use the
StatExposureCriteria.

Bug: webrtc:14546
Change-Id: If4174019ff8cc6559ab0dc9a04e0f8a6631b9842
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/279045
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39057}
2023-01-10 14:39:39 +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
Evan Shrubsole
097fc347ec [Unwrap] Prepare SequenceNumberUnwrapper for migrations
This is in prep for the migration of all unwrappers to
SequenceNumberUnwrapper as a standard implementation.

This moves the SeqNumUnwapper to its own header and adds 2 methods to
SeqNumUnwrapper which are defined by other unwrappers:
* PeekUnwrap
* Reset

It also adds two implementations for RtpTimestamps and
RtpSequenceNumbers.

Bug: webrtc:13982
Change-Id: I5baefb2de1db92fe1bb600760bd63b71e9310eb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288742
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39030}
2023-01-09 11:42:20 +00:00
Philipp Hancke
b81823a5f0 stats: use Timestamp instead of uint64_t
making it clear what unit is being used.

BUG=webrtc:13756

Change-Id: I6354d35a8e02bb93a905ccf32cb0b294b4813e41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289460
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39008}
2023-01-05 08:37:31 +00:00
Philipp Hancke
7a5de44455 api: use std::string in stats constructor
instead of const reference or rvalues. This follows the style guide:
  https://google.github.io/styleguide/cppguide.html#Rvalue_references

BUG=webrtc:14807

Change-Id: I936b99146520815ae8105806409d46565fa83546
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289985
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38996}
2023-01-04 10:44:24 +00:00
Åsa Persson
b7f9113b72 Add API for querying codec support.
Implement
- BuiltinVideoEncoderFactory::QueryCodecSupport
- QualityAnalyzingVideoEncoderFactory::QueryCodecSupport
- FakeWebRtcVideoEncoderFactory::QueryCodecSupport

Bug: webrtc:11607
Change-Id: I9a138bbdc809abf5577dd27d84a51d0ed77d62ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290381
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38994}
2023-01-04 10:04:46 +00:00
Markus Handell
f015a12802 RtcEventLogImpl: Add mocked time test.
This change adds mocked time unit tests to RtcEventLogImpl. In
order to simplify test implementation, the Impl ctor was changed
to accept an already created event log encoder. The previous
factory was made public in the Impl interface and relevant
code sites were updated.

Bug: chromium:1288710
Change-Id: Ifbfd899c5a06a3350c7e5fbc3bb7280f67124f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290382
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38987}
2023-01-03 14:08:16 +00:00
philipel
7496ff655a Add --dependency_descriptor flag to video_loopback.
Bug: webrtc:14801
Change-Id: I8151f66ceb118a7abd40bbdc5bff71b5fdf66cb5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289961
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38977}
2023-01-03 08:34:25 +00:00
Jakob Ivarsson
6e1ae443ac Don't use low complexity Opus on all ARM devices.
Bug: none
Change-Id: I4be504ffa271e3a5879cec9efe153b1f895a96c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288401
Reviewed-by: Jesus de Vicente Pena <devicentepena@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38921}
2022-12-20 10:30:30 +00:00
Markus Handell
82da9324bc Ensure task queues delete closures in task queue context.
Bug: webrtc:14449
Change-Id: I90d09d35398c1f8817701662f51cbc6a684a2fe0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/275773
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38917}
2022-12-19 10:41:03 +00:00
Harald Alvestrand
794d599741 Split media_channel and its dependencies from the rtc_media_base target
This helps in figuring out which dependencies exist, and gets closer
to obeying the "one target per .cc file" rule.

Test failures seem unrelated, so using No-Try.

No-Try: true
Bug: webrtc:14775
Change-Id: Id25466c8b8fe628d05c819cf7c69ae6d8421c6cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/288020
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38910}
2022-12-16 12:15:22 +00:00
Sergey Silkin
2e1a9a4ae0 Add video codec tester.
This tester is an improved version of VideoProcessor and VideoCodecTestFixture and will eventually replace them.

The tester provides better separation between codecs and testing logic. Its knowledge about codecs is limited to frame encode/decode calls and frame ready callbacks. Instantiation and configuration of codecs are the test responsibilities.

Other differences:
- Run encoding and decoding in separate threads
- Run quality analysis in a separate thread
- Reference frame buffering is moved into video source (which re-read frames from the file).
- Make it possible to run decode-only tests

This CL is MVP implementation: it adds only 1 test (video_codec_test.cc, ConstantRate/EncodeDecodeTest) and the test is disabled for now.

Bug: b/261160916
Change-Id: Ida24a2fca1b1496237fa695c812084877c76379f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283525
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38901}
2022-12-15 14:32:53 +00:00
Chunbo Hua
46ad25119c Make requested_resolution_alignment of webrtc::EncoderInfo as uint32_t.
At the same time, proper names of some parameters are refactored in SimulcastEncoderAdapter.

Bug: None
Change-Id: Ia036e3f362d1394e90aa26b79953c1ffe75e2fe0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284961
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Chunbo Hua <chunbo.hua@intel.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38870}
2022-12-12 06:02:59 +00:00
Evan Shrubsole
9b235cd93b Add scalability mode to RTCOutboundRtpStreamStats stats
This is in the webrtc-stats spec at
https://www.w3.org/TR/webrtc-stats/#dom-rtcoutboundrtpstreamstats-scalabilitymode.

This adds the scalability mode to CodecSpecificInfo which is used to
plumb the modes for each simulcast layer.

TBR=orphis@webrtc.org

Tested: Compiled into Chrome and confirmed the scalability mode set for AV1, VP9, VP8 and H264 software encoders in chrome://webrtc-internals.
Bug: webrtc:14730
Change-Id: I71ceba8f6485a4f4a73e0856031b8d5f16f913f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285085
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38847}
2022-12-08 11:46:06 +00:00
Philipp Hancke
279b4b7d4f generateKeyframe: pass frame_types in bypass mode
Passes frame_types to the underlying encoder in bypass mode.
For libvpx this has no effect, for H264 this changes the behavior
to allow generating keyframes on a per-layer basis.

BUG=chromium:1354101

Change-Id: I26fc22d9e2ec4681a57ce591e9eafd0b1ec962b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285083
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#38821}
2022-12-06 10:54:59 +00:00
Emil Lundmark
2e3069bf07 Use ScopedFieldTrials in FieldTrialsTest
Resetting the global state between runs was previously handled by a
RAII type, but the semantics of that type changed to remove this
behavior in [1].

[1] https://webrtc-review.googlesource.com/c/src/+/276269

Bug: webrtc:14731, webrtc:14705
Change-Id: I8425cb71f49ea000434d500e0b3978324e4c3195
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285782
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38800}
2022-12-02 15:57:57 +00:00
Emil Lundmark
2d7a3e7ca8 Rename test helper for registering field trial keys
This new name emphasizes that the field trial keys are only allowed
within the current scope. We already have test::ScopedFieldTrials that
can be used to ensure that the global field trials string itself is
isolated.

Bug: webrtc:14705
Change-Id: I8b66bbd9c11d97985292c334d2d3496a047074a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284862
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38796}
2022-12-02 13:21:28 +00:00
Henrik Lundin
8754a3c945 Update some audio modules with new OWNERS
Bug: b/260832909
Change-Id: I3d2ebad978988eabf228475c3fc46708e12cf5d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285780
Auto-Submit: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38788}
2022-12-01 14:55:38 +00:00
Henrik Boström
a445e6a489 Delete deprecated disable_ipv6 flag.
M108 Stable has been released, which does not contain googIPv6 anymore,
and today the last downstream dependency on this flag was removed.

Let's delete!

Bug: webrtc:14608
Change-Id: Ia2d201f0da04b14961f891687b6135fc69b7767e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285720
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38786}
2022-12-01 11:01:02 +00:00
Jack Smith
adf35a359e Extend mocks for public types
Extends the mocks for rtpreceiver rtpsender and videotrack. This change
allows the external HangoutsKit client to remove its own mocks of rtc
types.

Bug: none
Change-Id: I8ba1752fe7633f9e0bba264a1279f74cc1368a2c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282900
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jack Smith <jackdsmith@google.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38782}
2022-11-30 19:01:40 +00:00
Christoffer Jansson
b00f88179e Remove xooglers from WATCHLISTS and OWNERS
Bug: b/260832909
Change-Id: I683c714da35c21c23404d4b1c6500da28d680ed5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285470
Commit-Queue: Christoffer Jansson <jansson@google.com>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38777}
2022-11-30 15:33:25 +00:00
Philipp Hancke
41a8357170 Limit number of TURN servers to 32
Limit the number of TURN servers to 32 in order to allow the
prioritization to assume a fixed offset for (de)prioritizing
candidates. See
  https://github.com/w3c/webrtc-pc/pull/2679
for discussion including some data on current usage.

Guarded by WebRTC-LimitTurnServers which is used as a killswitch.

BUG=webrtc:13195

Change-Id: Ib12726af426ae4238aa7eb6aa062c71af52d495f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285340
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38767}
2022-11-29 17:04:11 +00:00
Henrik Boström
13730e9742 Rename VideoFrameMetadata tests to RTPVideoHeaderTest.
This is a pure move/rename. The reason for wanting the tests in
RTPVideoHeader is that it is the GetAsMetadata() function that we are
testing and in a future CL we'll also want to test SetFromMetadata().

// Bots green, no need to wait for the remaining ones, just a move
NOTRY=True

Bug: webrtc:14709
Change-Id: Iecb938e79e7e8d55e208baea190eef4c6730158e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285460
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38764}
2022-11-29 16:03:20 +00:00
Henrik Boström
bf2f605e03 Add more information to RTPVideoHeader::GetAsMetadata().
Update GetAsMetadata() to include more of the RTPVideoHeader metadata.
The intent is to be able to both get and set all of these from
JavaScript behind a flag.

Planned follow-up CLs:
1. Also get codecs-specifics, starting with VP8.
2. Test refactoring/rename: Move tests to RTPVideoHeaderTest.
3. Add RTPVideoHeader::SetFromMetadata() covering everything gettable.
4. Chrome plumbing.

Bug: webrtc:14709
Change-Id: I78679b9ff4ca749d50f309a1713e71ceabb826dd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285084
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38756}
2022-11-29 12:30:46 +00:00
Henrik Boström
158d5e3078 Add RTPVideoHeader::GetAsMetadata().
In preparation of adding RTPVideoHeader::SetFromMetadata() method, the
VideoFrameMetadata construct-from-RTPVideoHeader is replaced by
RTPVideoHeader::GetAsMetadata(). This serves two purposes:
1. Having "GetAs" and "SetFrom" in the same file reduces the risk of
   these two methods getting out of sync as we expand its usage.
2. This is necessary to avoid a circular dependency that would
   otherwise be introduced by RTPVideoHeader::SetFromMetadata().

Bug: webrtc:14709
Change-Id: I127b3d15f9a8c6af210449a5a50d414c9ba79930
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/285080
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38735}
2022-11-25 14:40:30 +00:00
Harald Alvestrand
5c4509a604 Add a clone method to the video frame transformer API.
This will clone an encoded video frame into a sender frame,
preserving metadata as much as possible.

Bug: webrtc:14708
Change-Id: I6f68d2ee65ef85c32cc3c142a41346b81ba73533
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284701
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Guido Urdaneta <guidou@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38733}
2022-11-25 11:18:22 +00:00
Artem Titov
4440426792 [DVQA] Add QP metric to the video analyzer.
Bug: b/240540204
Change-Id: I43fbb779bac10e27f2607ce1545476b1389d7c69
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283763
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38686}
2022-11-18 20:06:20 +00:00
Ilya Nikolaevskiy
6eb1e709da Reland "[DVQA] Create separate BUILD.gn file for video analyzer"
This reverts commit 76793c300f.

Reason for revert: Can't cleanly revert the old one. A forward fix will be provided.

Original change's description:
> Revert "[DVQA] Create separate BUILD.gn file for video analyzer"
>
> This reverts commit 116c0a53d4.
>
> Reason for revert: Breaks bot: https://ci.chromium.org/ui/p/chromium/builders/try/linux_chromium_compile_dbg_ng/1415352/overview
>
>
> Original change's description:
> > [DVQA] Create separate BUILD.gn file for video analyzer
> >
> > Bug: None
> > Change-Id: I37dd2262bf3f52b2f5abe7934b9c41eaa27ffd17
> > No-try: True
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283141
> > Commit-Queue: Artem Titov <titovartem@webrtc.org>
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#38662}
>
> Bug: None
> Change-Id: Ieeb8c569560cb9d60d0c4d3c1268fa57f56b8157
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284000
> Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38672}

Bug: None
Change-Id: I74506eaa6a1060bf87e651881c86b4f576f447ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284020
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38676}
2022-11-18 11:43:45 +00:00
Ilya Nikolaevskiy
76793c300f Revert "[DVQA] Create separate BUILD.gn file for video analyzer"
This reverts commit 116c0a53d4.

Reason for revert: Breaks bot: https://ci.chromium.org/ui/p/chromium/builders/try/linux_chromium_compile_dbg_ng/1415352/overview


Original change's description:
> [DVQA] Create separate BUILD.gn file for video analyzer
>
> Bug: None
> Change-Id: I37dd2262bf3f52b2f5abe7934b9c41eaa27ffd17
> No-try: True
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283141
> Commit-Queue: Artem Titov <titovartem@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38662}

Bug: None
Change-Id: Ieeb8c569560cb9d60d0c4d3c1268fa57f56b8157
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/284000
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38672}
2022-11-18 09:18:32 +00:00
Alessio Bazzica
17887eb04a Reland "[ACM] iSAC audio codec removed"
This is a reland of commit b46c4bf27b

Original change's description:
> [ACM] iSAC audio codec removed
>
> Note: this CL has to leave behind one part of iSAC, which is its VAD
> currently used by AGC1 in APM. The target visibility has been
> restricted and the VAD will be removed together with AGC1 when the
> time comes.
>
> Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319
>
> Bug: webrtc:14450
> Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38652}

Bug: webrtc:14450
Change-Id: Ia22c4d7724b6022238235fede93e36e570a49376
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283843
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38665}
2022-11-17 12:52:35 +00:00
Artem Titov
116c0a53d4 [DVQA] Create separate BUILD.gn file for video analyzer
Bug: None
Change-Id: I37dd2262bf3f52b2f5abe7934b9c41eaa27ffd17
No-try: True
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283141
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38662}
2022-11-17 11:53:44 +00:00
Jeremy Leconte
c30835c712 Remove deprecated AddPeer method.
Change-Id: Icd15dc4d7d79276734260fb11932d9ede8dbbf23
Bug: webrtc:14627
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283661
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#38659}
2022-11-17 09:00:21 +00:00
Alessio Bazzica
fbeb76ab51 Revert "[ACM] iSAC audio codec removed"
This reverts commit b46c4bf27b.

Reason for revert: breaks a downstream project

Original change's description:
> [ACM] iSAC audio codec removed
>
> Note: this CL has to leave behind one part of iSAC, which is its VAD
> currently used by AGC1 in APM. The target visibility has been
> restricted and the VAD will be removed together with AGC1 when the
> time comes.
>
> Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319
>
> Bug: webrtc:14450
> Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
> Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
> Reviewed-by: Sam Zackrisson <saza@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#38652}

Bug: webrtc:14450
Change-Id: Ice138004e84e8c5f896684e8d01133d4b2a77bb7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283800
Reviewed-by: Alessio Bazzica <alessiob@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Alessio Bazzica <alessiob@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#38655}
2022-11-16 20:40:52 +00:00
Alessio Bazzica
b46c4bf27b [ACM] iSAC audio codec removed
Note: this CL has to leave behind one part of iSAC, which is its VAD
currently used by AGC1 in APM. The target visibility has been
restricted and the VAD will be removed together with AGC1 when the
time comes.

Tested: see https://chromium-review.googlesource.com/c/chromium/src/+/4013319

Bug: webrtc:14450
Change-Id: I69cc518b16280eae62a1f1977cdbfa24c08cf5f9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282421
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Alessio Bazzica <alessiob@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38652}
2022-11-16 16:42:55 +00:00
Florent Castelli
acabb3641b pc: Add asynchronous RtpSender::SetParameters() call
As the synchronous version only posts a task to recreate the encoder
later, it is not possible to catch errors and state changes that
could appear then.
The asynchronous version of SetParameters() aims to solve this by
providing a callback to wait for the completion of the encoder
reconfiguration, allowing any error to be propagate and subsequent
getParameters() call to have up to date information.

Bug: webrtc:11607
Change-Id: I5548e75aa14a97f8d9c0c94df1e72e9cd40887b2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/278420
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38627}
2022-11-15 15:31:40 +00:00
Henrik Boström
cf2856b01c Add parameter to control the pacer's burst outside of field trials.
BurstyPacer is currently controlled via field trials. In order for
Chrome to be able to have burst without relying on a field trial, this
parameter is added.

When all burst experiments have concluded we may be able to have a
hardcoded constant instead, but for now the parameter is added to
RTCConfiguration.

NOTRY=True

Bug: chromium:1354491
Change-Id: I386c1651dbbcbf309c15ea3d3380cf8f632b5429
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283420
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38621}
2022-11-15 08:46:30 +00:00
Artem Titov
5f42cdcb31 Remove deprecated API for emulated network stats
Bug: None
Change-Id: Ib70a117d67002d108474214490ed1a8bb61da463
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283140
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38619}
2022-11-14 17:51:42 +00:00
Henrik Boström
1bef09708a Delete api/stats_types.h in favor of api/legacy_stats_types.h
The file was renamed, see
https://groups.google.com/u/1/g/discuss-webrtc/c/ZQiP4f_bpw4

Bug: webrtc:14180
Change-Id: Ia76c85ba7d9da6b3a93d0a67a4b6a5187e07e230
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283084
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38616}
2022-11-14 12:10:06 +00:00
Artem Titov
b41568b6fd Add infrastructure stats for network emulation layer
Bug: b/240540204
Change-Id: I66dfd25775faa9d1bc7e75a932a36e8aa97c0f57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/282320
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38613}
2022-11-12 00:01:49 +00:00
Henrik Boström
3e6931b183 Rename api/stats_types.h to api/legacy_stats_types.h.
As to not break downstream projects, the old name api/stats_types.h is
kept around to help include api/legacy_stats_types.h. We can delete this
in a follow-up.

NOTRY=True

Bug: webrtc:14180
Change-Id: I270ca5e366ae36e324cbc9f982bbb066ab92d203
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/283081
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38610}
2022-11-11 10:29:25 +00:00