Commit graph

2977 commits

Author SHA1 Message Date
Henrik Boström
1a5d474825 Delete unsued metronome.cc file.
It's not included in the BUILD.gn file and it defines methods that are
not declared in the header. Delete.

Bug: chromium:1381982
Change-Id: I0d8541e7b0e7d1d2b4f3ad7a4864d317d8799399
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328541
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41243}
2023-11-27 09:28:42 +00:00
Markus Handell
254e23071c VideoStreamEncoder: Clean up drop handling and update rects.
The change adds dropped frame reporting for previously dropped frame
and also cleans up the colon list of the VSE.

Bug: None
Change-Id: Iad1c084739e5392ded4f100d940b45adf9b561ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327800
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41225}
2023-11-23 17:19:33 +00:00
Danil Chapovalov
e7b48a1e80 Implement means to create an Environment
implement EnvironmentFactory class
and CreateEnvironment function.

Bug: webrtc:15656
Change-Id: Ib5ec0e35896be08e6125bcabc6abf2341e613909
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328060
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41220}
2023-11-23 12:19:28 +00:00
Tomas Gunnarsson
3a15ba6fbf Reland^2 "Reland: Remove unsupported configuration value, allow_codec_switching"
This reverts commit 117d847901.

Reason for revert: Downstream error has been corrected.

Original change's description:
> Revert "Reland: Remove unsupported configuration value, `allow_codec_switching`"
>
> This reverts commit 23501a2aa6.
>
> Reason for revert: Breaks downstream features
>
> Original change's description:
> > Reland: Remove unsupported configuration value, `allow_codec_switching`
> >
> > This reverts commit 6b0c5babe0.
> >
> > Reason for revert: Relanding once downstream issues have been addressed
> >
> > Original change's description:
> > > Revert "Remove unsupported configuration value, `allow_codec_switching`"
> > >
> > > This reverts commit 8f7a17f80f.
> > >
> > > Reason for revert: breaks downstream
> > >
> > > Original change's description:
> > > > Remove unsupported configuration value, `allow_codec_switching`
> > > >
> > > > Bug: webrtc:11341
> > > > Change-Id: I8ff598848996bd63ccc572e11f8f69c892a4a459
> > > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324284
> > > > Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> > > > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > > > Cr-Commit-Position: refs/heads/main@{#40995}
> > >
> > > Bug: webrtc:11341
> > > Change-Id: I784fd95062fc71f8dcc139b05121985f60709004
> > > No-Presubmit: true
> > > No-Tree-Checks: true
> > > No-Try: true
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324780
> > > Owners-Override: Philip Eliasson <philipel@webrtc.org>
> > > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> > > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#40998}
> >
> > Bug: webrtc:11341
> > Change-Id: I3cb3e699fd76942c51f0f42a99bcb19ac607632e
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324782
> > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#41032}
>
> Bug: webrtc:11341
> Change-Id: I0eb8e6a464a8a51e6359caf8f43231dc275c4f20
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327382
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41161}

Bug: webrtc:11341
Change-Id: I4a5390a3b8c5e665b742fc564709847ad8853ba9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328160
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41213}
2023-11-22 13:22:08 +00:00
Harald Alvestrand
502afbf510 Change StunByteStringAttribute to have uint8_t* internal type
Also make it more convenient to use uint8_t array view for
interfacing to the class.

Bug: webrtc:15665
Change-Id: Ib671b5add79a48004133a6ecd99429534f7de1de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328140
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41212}
2023-11-22 13:18:26 +00:00
Harald Alvestrand
572502c2ab Deprecate char* functions on ByteBufferReader
Bug: webrtc:15661, webrtc:15665
Change-Id: Ia35b0092c219a89b5eba08d2e1a91be6e47dc746
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328000
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41210}
2023-11-22 11:46:25 +00:00
Danil Chapovalov
7e6315a619 Introduce Environment to webrtc codebase
Bug: webrtc:15656
Change-Id: I6da85b8dbd22627d04a2f2605ce93d578b12bd4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327560
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41192}
2023-11-20 10:12:36 +00:00
Tony Herre
6e956053b7 Support shortcircuiting encoded transforms
Add a StartShortCircuiting() callback to allow clients which have
configured Encoded Transforms when creating a PeerConnection to have
all frames skip the transform. This offers a zero cost path for streams
which don't need transforms.

This is preferable to uninstalling/not installing the transform to allow
implementing the behaviour in
https://w3c.github.io/webrtc-encoded-transform/#stream-creation -
giving web apps a chance to configure transforms within a short window
(before the next JS event loop run, so usually sub-millisecond) after stream creation, without any untransformed frames passing.

Usage in Chromium: crrev.com/c/5040731

Bug: chromium:1502781
Change-Id: I803477db1df51e80bdedf6c84d2d3695b088de83
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41184}
2023-11-17 13:03:27 +00:00
Tomas Gunnarsson
117d847901 Revert "Reland: Remove unsupported configuration value, allow_codec_switching"
This reverts commit 23501a2aa6.

Reason for revert: Breaks downstream features

Original change's description:
> Reland: Remove unsupported configuration value, `allow_codec_switching`
>
> This reverts commit 6b0c5babe0.
>
> Reason for revert: Relanding once downstream issues have been addressed
>
> Original change's description:
> > Revert "Remove unsupported configuration value, `allow_codec_switching`"
> >
> > This reverts commit 8f7a17f80f.
> >
> > Reason for revert: breaks downstream
> >
> > Original change's description:
> > > Remove unsupported configuration value, `allow_codec_switching`
> > >
> > > Bug: webrtc:11341
> > > Change-Id: I8ff598848996bd63ccc572e11f8f69c892a4a459
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324284
> > > Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> > > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > > Cr-Commit-Position: refs/heads/main@{#40995}
> >
> > Bug: webrtc:11341
> > Change-Id: I784fd95062fc71f8dcc139b05121985f60709004
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324780
> > Owners-Override: Philip Eliasson <philipel@webrtc.org>
> > Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40998}
>
> Bug: webrtc:11341
> Change-Id: I3cb3e699fd76942c51f0f42a99bcb19ac607632e
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324782
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41032}

Bug: webrtc:11341
Change-Id: I0eb8e6a464a8a51e6359caf8f43231dc275c4f20
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327382
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41161}
2023-11-15 08:10:28 +00:00
Mirko Bonadei
26e5a82ec7 Create MockTransformableFrame.
Bug: webrtc:9620
Change-Id: I013b25800854ec6e808d00b6717114a4c4e4aa17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327321
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41155}
2023-11-14 15:51:02 +00:00
Sergey Silkin
d431156c0e Move codecs handling from test to tester
* Pass codec factories to the video codec tester instead of creating and wrapping codecs into a tester-specific wrappers in video_codec_test.cc. The motivation for this change is to simplify the tests by moving complexity to the tester.

* Merge codec stats and analysis into the tester and move the tester. The merge fixes circular deps issues. Modularization is not strictly needed for testing framework like the video codec tester. It is still possible to unit test underlaying modules with rather small overhead.

* Move the video codec tester from api/ to test/. test/ is accessible from outside of WebRTC which enables reusing the tester in downstream projects.

Test output ~matches before and after this refactoring. There is a small difference that is caused by changes in qpMax: 63 -> 56 (kDefaultVideoMaxQpVpx). 56 is what WebRTC uses by default for VPx/AV1 encoders.

Bug: webrtc:14852
Change-Id: I762707b7144fcff870119ad741ebe7091ea109ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41144}
2023-11-13 16:48:49 +00:00
Markus Handell
9c69c4625b Revert "Measure wall clock time of capture and encode processing."
This reverts commit 8039cdbe48.

Reason for revert: remove functionality after measurement complete

Original change's description:
> Measure wall clock time of capture and encode processing.
>
> (NOTE: This and dependent CLs will be reverted in a few days after
> data collection from the field is complete.)
>
> This change introduces a new task queue concept, Voucher. They
> are associated with a currently running task tree. Whenever
> tasks are posted, the current voucher is inherited and set as
> current in the new task.
>
> The voucher exists for as long as there are direct and indirect
> tasks running that descend from the task where the voucher was
> created.
>
> Vouchers aggregate application-specific attachments, which perform
> logic unrelated to Voucher progression. This particular change adds
> an attachment that measures time from capture to all encode operations
> complete, and places it into the WebRTC.Video.CaptureToSendTimeMs UMA.
>
> An accompanying Chrome change crrev.com/c/4992282 ensures survival of
> vouchers across certain Mojo IPC.
>
> Bug: chromium:1498378
> Change-Id: I2a27800a4e5504f219d8b9d33c56a48904cf6dde
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325400
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Markus Handell <handellm@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41061}

Bug: chromium:1498378
Change-Id: I9503575fbc52f1946ca26fc3c17b623ea75cd3c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327023
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41135}
2023-11-11 18:03:40 +00:00
Philipp Hancke
3e3881ae3c Reland "Make frame transformer MimeType pure virtual again"
This is a reland of commit 3ea9fc4cd8

Original change's description:
> Make frame transformer MimeType pure virtual again
>
> after both audio and video have been implemented.
>
> BUG=webrtc:15579
>
> Change-Id: Ib52e8f67292259cbf7497a884672de72f3003282
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326162
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tony Herre <herre@google.com>
> Cr-Commit-Position: refs/heads/main@{#41114}

BUG=webrtc:15579

Change-Id: Ia020149cba3045022b539f290565d6c1d0e813ce
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326880
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41121}
2023-11-09 22:30:33 +00:00
Danil Chapovalov
e567d8a112 Remove unused AudioFrameProcessor* parameter from WebRtcVoiceEngine constructor
Bug: webrtc:15111
Change-Id: Ia55e55f98ffeceeb91fb9b4fc2323a4fd7bc1046
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326523
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41118}
2023-11-09 16:13:24 +00:00
Mirko Bonadei
be23ea4bb9 Revert "Make frame transformer MimeType pure virtual again"
This reverts commit 3ea9fc4cd8.

Reason for revert: Breaks downstream project.

Original change's description:
> Make frame transformer MimeType pure virtual again
>
> after both audio and video have been implemented.
>
> BUG=webrtc:15579
>
> Change-Id: Ib52e8f67292259cbf7497a884672de72f3003282
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326162
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tony Herre <herre@google.com>
> Cr-Commit-Position: refs/heads/main@{#41114}

BUG=webrtc:15579
No-Presubmit: true
No-Tree-Checks: true
No-Try: true

Change-Id: I9b4c9753e260aca98d24a40f32ce57d86a181ea2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326525
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41116}
2023-11-09 14:24:53 +00:00
Philipp Hancke
3ea9fc4cd8 Make frame transformer MimeType pure virtual again
after both audio and video have been implemented.

BUG=webrtc:15579

Change-Id: Ib52e8f67292259cbf7497a884672de72f3003282
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326162
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#41114}
2023-11-09 12:28:10 +00:00
inaqui-signal
fa4fd71354 Merge branch 'm118' 2023-11-07 15:00:28 -06:00
Danil Chapovalov
2b58ec2938 Deprecate call_factory and media_engine in PeerConnectionFactoryDependencies
Bug: webrtc:15574
Change-Id: Ia97ad0853196fea5c20fc0c0d58a9305b72c515b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326001
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41088}
2023-11-06 15:53:39 +00:00
Danil Chapovalov
4fd1cc70da Add EnableMediaWithDefaultsAndTimeController
To replace CreateTimeControllerBasedCallFactory

Update webrtc tests to use this new function

Bug: webrtc:15574
Change-Id: I2b74cd930ecc4f72dd1e7aa853764ca298b66ad8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325527
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41076}
2023-11-03 13:26:32 +00:00
Harald Alvestrand
23cecc1d43 Move scoped_refptr from rtc:: to webrtc::
leaving a compatible alias.

Bug: webrtc:15622
Change-Id: Ie25d87fa372cc71eaf52882454f4dd24c7c33789
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325462
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41072}
2023-11-03 07:36:07 +00:00
Danil Chapovalov
779c9dede9 Migrate CreatePeerConnectionFactory implementation to EnableMedia api
Bug: webrtc:15574
Change-Id: I2e109a62a9069f37a580fa64cacdd5a86a293203
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325860
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41069}
2023-11-02 23:01:31 +00:00
Harald Alvestrand
78f905e5cc Move some users to use webrtc::RefCountInterface
Bug: webrtc:15622
Change-Id: I2d4c20c726af1a052e161b7689a73d1e5e3eb191
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325526
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41067}
2023-11-02 14:45:57 +00:00
Danil Chapovalov
9aa115358e Delete CreatePeerConnectionFactory variant that accepts unowned audio frame processor
Bug: webrtc:15111
Change-Id: I44d8262f0e0a96f3b4d9d53641ec291d35a32579
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325263
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Peter Hanspers <peterhanspers@google.com>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41066}
2023-11-02 14:28:47 +00:00
Markus Handell
8039cdbe48 Measure wall clock time of capture and encode processing.
(NOTE: This and dependent CLs will be reverted in a few days after
data collection from the field is complete.)

This change introduces a new task queue concept, Voucher. They
are associated with a currently running task tree. Whenever
tasks are posted, the current voucher is inherited and set as
current in the new task.

The voucher exists for as long as there are direct and indirect
tasks running that descend from the task where the voucher was
created.

Vouchers aggregate application-specific attachments, which perform
logic unrelated to Voucher progression. This particular change adds
an attachment that measures time from capture to all encode operations
complete, and places it into the WebRTC.Video.CaptureToSendTimeMs UMA.

An accompanying Chrome change crrev.com/c/4992282 ensures survival of
vouchers across certain Mojo IPC.

Bug: chromium:1498378
Change-Id: I2a27800a4e5504f219d8b9d33c56a48904cf6dde
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41061}
2023-11-01 16:10:17 +00:00
Danil Chapovalov
554f7db01c Add EnableMediaWithDefaults to replace SetMediaEngineDefaults
Update most of the webrtc tests to use EnableMediaWithDefaults instead of SetMediaEngineDefaults

Bug: webrtc:15574
Change-Id: I489a09e4ea3479dc26829ee0c1235e67bcbca7c7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325485
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41059}
2023-11-01 11:47:59 +00:00
Danil Chapovalov
93214073f1 Mark EnableMedia with RTC_EXPORT
Bug: webrtc:15574
Change-Id: I324f9694bfe41fa9831a24eb4e3c4373b43a9cbb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325523
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41055}
2023-10-31 22:15:21 +00:00
Jim Gustafson
62d543d814
Add low bitrate redundancy support 2023-10-31 13:14:36 -07:00
Harald Alvestrand
e8a2b3c834 Move all api/ files to use webrtc::RefCountInterface
instead of rtc::RefCountInterface

Bug: webrtc:15622
Change-Id: I085660a097a019c7aa58a7e3f0aceeedd9fcc8c0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325460
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41050}
2023-10-31 15:45:12 +00:00
Danil Chapovalov
082cb56ee7 Introduce new way to enable media in PeerConnectionFactory
instead of requiring to pass in call_factory and media_engine
webrtc users should set media_factory member and media dependencies into PeerConnectionFactoryDependencies

Bug: webrtc:15574
Change-Id: I2dc584fe7afa41c9f170bdc51533396155cdcb06
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325320
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41049}
2023-10-31 14:31:28 +00:00
Harald Alvestrand
d6bac61b64 Move RefCountInterface to api/ and webrtc: namespace
This CL just moves the definition and adds a forward.
Actually using the new definition is left for later CLs.

Bug: webrtc:15622
Change-Id: I6d97ef45b98f9eb193c59dd7f8a89c99cfe0ba9a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325381
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41048}
2023-10-31 14:02:50 +00:00
henrika
7b6f996318 Adds reference time to webrt::VideoFrame
The new reference time contains a monotonically increasing clock time and represents the time when the frame was captured. Not all platforms provide the "true" sample capture time in |reference_time| but might instead use a somewhat delayed (by the time it took to capture the frame) version of it.

Bug: webrtc:15539
Change-Id: I95eff8b0f7bff8d3ae65798bf82046e1ac2b0cf2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325261
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Markus Handell <handellm@google.com>
Cr-Commit-Position: refs/heads/main@{#41036}
2023-10-30 12:08:38 +00:00
Tomas Gunnarsson
23501a2aa6 Reland: Remove unsupported configuration value, allow_codec_switching
This reverts commit 6b0c5babe0.

Reason for revert: Relanding once downstream issues have been addressed

Original change's description:
> Revert "Remove unsupported configuration value, `allow_codec_switching`"
>
> This reverts commit 8f7a17f80f.
>
> Reason for revert: breaks downstream
>
> Original change's description:
> > Remove unsupported configuration value, `allow_codec_switching`
> >
> > Bug: webrtc:11341
> > Change-Id: I8ff598848996bd63ccc572e11f8f69c892a4a459
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324284
> > Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40995}
>
> Bug: webrtc:11341
> Change-Id: I784fd95062fc71f8dcc139b05121985f60709004
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324780
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40998}

Bug: webrtc:11341
Change-Id: I3cb3e699fd76942c51f0f42a99bcb19ac607632e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324782
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41032}
2023-10-28 16:07:41 +00:00
Tommi
fd3b346e27 Allow absl::Nonnull and absl::Nullable.
This CL includes follow-up changes from
https://webrtc-review.googlesource.com/c/src/+/324280

Bug: none
Change-Id: I6abad16e05cac7197c51ffa7b1d3fb991843df6e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325243
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41030}
2023-10-27 22:00:50 +00:00
Danil Chapovalov
1d586debab In PCLF remove ability to inject TaskQueueFactory and CallFactory
Instead rely on TaskQueueFactory and Clock provided by the internal TimeController of the PCLF framework.

Bug: webrtc:15574
Change-Id: I473e1f12ead97f866dbd45771ed5a59541c0c47c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325182
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41026}
2023-10-27 13:03:09 +00:00
Sam Zackrisson
2e1f16d55c Make AEC3 json parsing code testonly
Reasons:
- the code is no longer used in Chrome
- it is conceptually weird for WebRTC to have JSON parsing in its API
- there are concerns around the reliability of the underlying JSON library

Additionally, this CL removes the rtc_json "poisonous" attribute: the scheme is incompatible and redundant with testonly.

Bug: webrtc:1493351
Change-Id: I0b621b0e3f183df7315919d9c89242fbe387928f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325062
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41014}
2023-10-26 12:03:02 +00:00
Tommi
8da5953fb2 Support initializing PendingTaskSafetyFlag with a specific TaskQueue.
Bug: none
Change-Id: I0f354708e6275372601adc36da3012259bb57303
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324280
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41008}
2023-10-25 20:39:36 +00:00
Philipp Hancke
0bace22a0b Expose video mimeType for insertable streams
which allows determining what codec (data format) is used.
Chromium CL:
  https://chromium-review.googlesource.com/c/chromium/src/+/4941907

Split from
  https://webrtc-review.googlesource.com/c/src/+/318283
to reduce CL size and avoid audio woes.

BUG=webrtc:15579

Change-Id: I404107af526df3009c16d2a6148784fe87dfa807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323721
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41007}
2023-10-25 16:01:32 +00:00
Philip Eliasson
6b0c5babe0 Revert "Remove unsupported configuration value, allow_codec_switching"
This reverts commit 8f7a17f80f.

Reason for revert: breaks downstream

Original change's description:
> Remove unsupported configuration value, `allow_codec_switching`
>
> Bug: webrtc:11341
> Change-Id: I8ff598848996bd63ccc572e11f8f69c892a4a459
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324284
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40995}

Bug: webrtc:11341
Change-Id: I784fd95062fc71f8dcc139b05121985f60709004
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324780
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40998}
2023-10-24 08:19:46 +00:00
Tommi
8f7a17f80f Remove unsupported configuration value, allow_codec_switching
Bug: webrtc:11341
Change-Id: I8ff598848996bd63ccc572e11f8f69c892a4a459
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324284
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40995}
2023-10-24 05:07:25 +00:00
Tommi
7c1ddb760c Support initializing a SequenceChecker with a provided TaskQueue.
Bug: none
Change-Id: I5106f29ab7f9ed8530626f33f6259eb7aeb9e779
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324260
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40993}
2023-10-23 14:43:04 +00:00
Tommi
5b186e98bc Remove effectively dead code for allow_codec_switching
Bug: webrtc:11341
Change-Id: I88e3c1059f5ebcc9d693c0719534aaacd4b9199b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324283
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40990}
2023-10-23 14:08:11 +00:00
Henrik Boström
8005d5613e Add stats-related TODOs with crbugs.
Someone wondered why framesRendered has not been implemented. I had a
look, and discovered that a) we need to implement it, and b) our entire
inter-frame, pause, and freeze metrics are measured at the wrong time
because what WebRTC considered "OnRenderedFrame()" is not actually when
the frame was rendered.

So that we don't forget this again, I filed two crbugs and added TODOs
in the code for future reference to anyone interested in these metrics.

Bug: webrtc:15600, webrtc:15601
Change-Id: Id38df7874df715e9b9c0410efa4a9bc2af5d6232
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324306
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@{#40987}
2023-10-23 09:53:11 +00:00
Harald Alvestrand
aa653c0d76 Reland "Deprecate all classes related to AsyncResolver"
This reverts commit 08d431ec34.

Reason for revert: Last (hopefully) Chrome blocker removed

Original change's description:
> Revert "Deprecate all classes related to AsyncResolver"
>
> This reverts commit 61a442809c.
>
> Reason for revert: Breaks roll into Chromium
>
> Original change's description:
> > Deprecate all classes related to AsyncResolver
> >
> > and remove internal usage.
> >
> > Bug: webrtc:12598
> > Change-Id: Ie208682bfa0163f6c7a8e805151cfbda76324496
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322860
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Auto-Submit: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40919}
>
> Bug: webrtc:12598
> Change-Id: I8aef5e062e19a51baec75873eddfca2a10467d3c
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322901
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Auto-Submit: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40927}

Bug: webrtc:12598
Change-Id: I3c7b07c831eb9ff808368433d9b9ae8ec4b2afb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323720
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40944}
2023-10-17 07:08:57 +00:00
Jeremy Leconte
49dcb200ab Export FieldTrialBasedConfig in order to use it in Chromium.
Goal is to initialize peerconnections in Chromium using this based
field trial config until a proper config that doesn't rely on the
global field trial string can be used (https://crrev.com/c/4936314).

Change-Id: I3d006e2445ccc4880b73b564c8ad4408242d3696
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323621
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#40941}
2023-10-16 16:13:48 +00:00
Danil Chapovalov
a3ce407023 Cleanup Call construction
Return unique_ptr to clearly communicate ownership is transfered.
Remove Call::Config alias

Bug: None
Change-Id: Ie3aa1da383ad65fae490d218fced443d44961eab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323160
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40934}
2023-10-16 06:34:26 +00:00
Harald Alvestrand
08d431ec34 Revert "Deprecate all classes related to AsyncResolver"
This reverts commit 61a442809c.

Reason for revert: Breaks roll into Chromium

Original change's description:
> Deprecate all classes related to AsyncResolver
>
> and remove internal usage.
>
> Bug: webrtc:12598
> Change-Id: Ie208682bfa0163f6c7a8e805151cfbda76324496
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322860
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Auto-Submit: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40919}

Bug: webrtc:12598
Change-Id: I8aef5e062e19a51baec75873eddfca2a10467d3c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322901
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40927}
2023-10-13 11:20:51 +00:00
Danil Chapovalov
c9880805ed Delete deprecated Timestamp accessor and setter in EncodedImage
Bug: webrtc:9378
Change-Id: I5c67cca733f2fd646e73694524abf6b33438e8a4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321860
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40926}
2023-10-13 10:22:28 +00:00
Harald Alvestrand
61a442809c Deprecate all classes related to AsyncResolver
and remove internal usage.

Bug: webrtc:12598
Change-Id: Ie208682bfa0163f6c7a8e805151cfbda76324496
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322860
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40919}
2023-10-12 14:07:37 +00:00
Shuhai Peng
adb855cf8d Added AsString() function for color space for easier debugging
Change-Id: I517a435769795de26502aea0dd3e01c1ed867616
Bug: chromium:1449570
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320166
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40898}
2023-10-10 09:08:28 +00:00
Markus Handell
a84368c3d3 TaskQueueBase: use C++17.
Fixed: webrtc:15371
Bug: webrtc:15371
Change-Id: I8bdcd733a7f43eb5e91986dfa478ad41e5074afd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320020
Auto-Submit: Markus Handell <handellm@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40869}
2023-10-05 10:04:47 +00:00
Sergey Sukhanov
4b84f01fe2 Change the type of PacedPacketInfo::send_bitrate_bps from int to strongly-typed DataRate.
Bug: webrtc:15532
Change-Id: I84a6b9860d582d68beccdcfde4a12923b2cdbe8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322181
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Sukhanov <sergeysu@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40865}
2023-10-04 14:20:22 +00:00
Jeremy Leconte
532a11ee72 [PCLF] Add an API to configure field trials.
Change-Id: Ic37a4b2f86976b2f2eace225b6eefacd1c3bd046
Bug: b/303192724
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322321
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#40864}
2023-10-04 12:08:37 +00:00
Saúl Ibarra Corretgé
4408575d18 Reland "Enable SRTP GCM ciphers by default"
This is a reland of commit d8633868b3

Original change's description:
> Enable SRTP GCM ciphers by default
>
> Bug: webrtc:15178
> Change-Id: I0216ce8f194fffc820723d82b9c04a76573c2f4f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305381
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Victor Boivie <boivie@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40828}

Bug: webrtc:15178
Change-Id: I5ea939ed6263547ebc177d9dd1763ba888936866
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321961
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40862}
2023-10-03 22:39:48 +00:00
Manashi Sarkar
c2bbe4b952 Revert "Enable SRTP GCM ciphers by default"
This reverts commit d8633868b3.

Reason for revert: Breaks downstream project.

Original change's description:
> Enable SRTP GCM ciphers by default
>
> Bug: webrtc:15178
> Change-Id: I0216ce8f194fffc820723d82b9c04a76573c2f4f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305381
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Victor Boivie <boivie@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40828}

Bug: webrtc:15178
Change-Id: I88433e899cb4b705eafa3fceff3edc520629f603
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321863
Owners-Override: Artem Titov <titovartem@webrtc.org>
Auto-Submit: Manashi Sarkar <manashi@google.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40832}
2023-09-28 14:42:18 +00:00
Saúl Ibarra Corretgé
d8633868b3 Enable SRTP GCM ciphers by default
Bug: webrtc:15178
Change-Id: I0216ce8f194fffc820723d82b9c04a76573c2f4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305381
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40828}
2023-09-28 10:18:56 +00:00
Danil Chapovalov
2d508f10d3 Deprecate old names for EncodedImage::RtpTimestamp accessor and setter
Replace remaining webrtc usage of the deprecated names.

Bug: webrtc:9378
Change-Id: Ie5bd2d3eaf68316e7c827fc35c7c7d8e2eadeb9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321584
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40824}
2023-09-28 07:29:22 +00:00
Rashad Sookram
6504b2a0f9
Add Rust_setIncomingAudioMuted 2023-09-27 12:16:54 -04:00
Palak Agarwal
0505115b5c Pass the correct abs_capture_timestamp while cloning audio frame
This change replaces type of absolute_capture_timestamp_ms_ in
TransformableOutgoingAudioFrame from int to optional uint and makes
the function AbsoluteCaptureTimestamp() inside
TransformableAudioFrameInterface pure virtual.

Bug: webrtc:14949
Change-Id: Id3bdbcba63a5f91105ab198208e4f2b11eb3c7db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319000
Commit-Queue: Palak Agarwal <agpalak@google.com>
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40814}
2023-09-26 15:57:52 +00:00
Tommi
6bf2d31e71 Change PortInterface::Type to string_view and make type_ member const
Bug: none
Change-Id: Id1b0298eede5d2ae5010cc450d7bcb9eadd7b874
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318080
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40801}
2023-09-25 13:48:50 +00:00
Björn Terelius
b4d4bbcebd Revert "Clean up last_packet_received_time_ as it's no longer used."
This reverts commit 2f4bc64166.

Reason for revert: Breaks downstream test

Original change's description:
> Clean up last_packet_received_time_ as it's no longer used.
>
> Bug: webrtc:15377
> Change-Id: I5453b9fd572a04dbea3241a2eb1c8ad8bb8b1186
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320560
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Commit-Queue: Ying Wang <yinwa@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40792}

Bug: webrtc:15377
Change-Id: Ifa57671cc479cdd86f543c4edc236221beb76f90
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321340
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Ying Wang <yinwa@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40797}
2023-09-25 08:49:53 +00:00
Danil Chapovalov
9c58483b5a Rename EncodedImage property Timetamp to RtpTimestamp
To avoid name collision with Timestamp type,
To avoid confusion with capture time represented as Timestamp

Bug: webrtc:9378
Change-Id: I8438a9cf4316e5f81d98c2af9dc9454c21c78e70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40796}
2023-09-24 20:06:48 +00:00
Ying Wang
2f4bc64166 Clean up last_packet_received_time_ as it's no longer used.
Bug: webrtc:15377
Change-Id: I5453b9fd572a04dbea3241a2eb1c8ad8bb8b1186
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320560
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40792}
2023-09-23 00:03:11 +00:00
Rashad Sookram
e667578458
Allow configuration of audio jitter buffer max target delay 2023-09-21 12:01:06 -04:00
qwu16
ae82df718c Add codec name H265 to support H265 in WebRTC
Bug: webrtc:13485
Change-Id: I352b15a65867f0d56fc8e9a9e03081bd3258108e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316283
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40773}
2023-09-20 09:25:32 +00:00
Harald Alvestrand
e14d122a7b Remove deprecated SendRtp and SendRtcp functions
and delete remaining usages.

Bug: webrtc:15410
Change-Id: I912bedca80a5a446a3f770211d164a5eb0af02bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320520
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40766}
2023-09-19 10:59:26 +00:00
Danil Chapovalov
090699a01b Delete deprecated RtpSource timestamp_ms constructor and accessor
Bug: webrtc:13756
Change-Id: Ic43cf82451785b4fbe184fce466e77b16b2c781a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319581
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40765}
2023-09-19 09:00:03 +00:00
philipel
31718d7ce2 Reland "Add option to disable quality scaling for AV1."
This reverts commit 83102d3907.

Reason for revert: reland with fix

Original change's description:
> Revert "Add option to disable quality scaling for AV1."
>
> This reverts commit 446dbc66fd.
>
> Reason for revert: downstream break
>
> Original change's description:
> > Add option to disable quality scaling for AV1.
> >
> > The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
> >
> > Bug: b/295129711
> > Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> > Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#40709}
>
> Bug: b/295129711
> Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40742}

Bug: b/295129711
Change-Id: Iab4846c2cd6074f50a3ebe9551432d449243b5d7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320120
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40743}
2023-09-13 15:19:36 +00:00
Philip Eliasson
83102d3907 Revert "Add option to disable quality scaling for AV1."
This reverts commit 446dbc66fd.

Reason for revert: downstream break

Original change's description:
> Add option to disable quality scaling for AV1.
>
> The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
>
> Bug: b/295129711
> Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40709}

Bug: b/295129711
Change-Id: Iaeb13951d1b839bc0426120436035843bb3ee98f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/320081
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40742}
2023-09-13 12:21:31 +00:00
Jim Gustafson
94ae6702c9 Disable audio and media flow by default 2023-09-12 18:03:28 -07:00
philipel
46bbf7ec48 Add ScalabilityModeStringToEnum helper function.
Bug: none
Change-Id: Iea602c88afbfe1f8f8e94b353eda96d62b651bd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319882
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40732}
2023-09-11 17:04:27 +00:00
Danil Chapovalov
564e8d395d Mark RtpSource timestamp_ms constructor and accessor deprecated
Bug: webrtc:13757
Change-Id: Ica680dfc0b7420e0d168b4854a07bd73e367218e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319281
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40718}
2023-09-08 07:38:27 +00:00
Danil Chapovalov
541756ff6b Discourage structs in api
Structs make api harder to evolve:
deprecated unused properties,
change how data is represented.

Classes with accessors allow more graduated and safer api evolution.

Bug: None
Change-Id: I8ebd5e072d51cf7f5800666cfdac523d0f9a937f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40714}
2023-09-07 10:41:49 +00:00
philipel
446dbc66fd Add option to disable quality scaling for AV1.
The main goal of this change is to disable the quality scaler when multiple spatial layers are used.

Bug: b/295129711
Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40709}
2023-09-06 12:37:22 +00:00
Harald Alvestrand
96e1882860 Convert AsyncDnsResolver to use absl::AnyInvocable
Bug: webrtc:12598
Change-Id: I0950231d6de7cf53116a573dcd97a3cf5514946c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318400
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40670}
2023-08-31 08:50:40 +00:00
Philipp Hancke
df3683e9a7 Remove public GenerateKeyFrame(list-of-rids) API from RtpSender
since the spec and implementation took a different route

BUG=chromium:1354101

Change-Id: I6beda0db89b9e771ad2a7b51ba739bc46e18a331
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/318200
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40665}
2023-08-30 14:54:17 +00:00
Tony Herre
55b593fb6b Remove EncodedFrame::MissingFrame and start removing Decode() param
Remove EncodedFrame::MissingFrame, as it was always false in actual
in-use code anyway, and remove usages of the Decode missing_frames param
within WebRTC. Uses/overrides in other projects will be cleaned up
shortly, allowing that variant to be removed from the interface.

Bug: webrtc:15444
Change-Id: Id299d82e441a351deff81c0f2812707a985d23d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317802
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#40662}
2023-08-30 10:38:35 +00:00
Qiu Jianlin
44943c8064 Add H265 codec name and profile/tier/level utils.
This adds H265 codec name and profile/tier/level handling needed for
H265 SDP negotiation.

Bug: webrtc:13485
Change-Id: I838b910042ce36f8ae3979c41a73ee46935c57d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315900
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Cr-Commit-Position: refs/heads/main@{#40661}
2023-08-30 08:49:09 +00:00
Philipp Hancke
82c56ca794 Request keyframe via setParameters
after the W3C changes in approach documented here:
  https://github.com/w3c/webrtc-extensions/pull/167

chromium CL: https://chromium-review.googlesource.com/c/chromium/src/+/4643591

Note that this does not follow the route taken by the W3C API but
still considers this flag a part of the encodingParameters.

BUG=chromium:1354101

Change-Id: If0f0ec09bebddea1f01dd8afbe4747c21afe6793
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/286741
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@{#40656}
2023-08-29 13:53:33 +00:00
Danil Chapovalov
f53597140f In RtpSource represent time with Timestamp type instead of int64_t
Bug: webrtc:13757
Change-Id: I5d7da9c9aee489e4b57d361de174c59713cb2b14
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317780
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40650}
2023-08-29 10:05:03 +00:00
Tony Herre
5f14f9e6ed Remove VCMEncodedFrame from webrtc::EncodedFrame inheritance
Remove VCMEncodedFrame from the inheritance chain of EncodedFrames by
- moving getters for EncodedImage fields up to EncodedImage
- copying other non-deprecated fields & Methods from VCMEncodedFrame over to EncodedFrame
- Removing EncodedFrame's inheritance of VCMEncodedFrame

We leave VCMEncodedFrame as part of the (near) deprecated
VideoCodingModule code. The only place which needs to accept either is
in the generic decoder.

Bug: webrtc:9378, b:296992877
Change-Id: I60706aebbb6eacc7fd4b35ec90cc903efdbe14c8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317160
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40639}
2023-08-28 11:46:48 +00:00
Harald Alvestrand
4d25a77fd3 Deprecate AsyncResolver config fields and remove internal usage.
Bug: webrtc:12598
Change-Id: Ic43cbcd13e4de44b02351c89da12844606368623
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317604
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40627}
2023-08-25 14:02:27 +00:00
Tommi
66bf3f472c Make PendingTaskSafetyFlag compatible with component builds
Bug: chromium:1470992
Change-Id: I06cec9cda36c9de75b970eaf709f9ed3b9f466b4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/317620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40618}
2023-08-24 14:24:49 +00:00
Florent Castelli
43a5dd86c2 Implement codec selection api
The implementation covers the latest specification, but does not
support mixed-codec simulcast at the moment.
Changing codec for audio and video is supported.

Bug: webrtc:15064
Change-Id: I09082f39e2a7d54dd4a663a8a57bf9df5a851690
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311663
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40616}
2023-08-24 13:18:04 +00:00
Jim Gustafson
7da0a87124
Add more audio control and safe defaults 2023-08-23 10:42:30 -07:00
Rashad Sookram
968d756463
Add accessor for bandwidth estimate 2023-08-23 13:31:53 -04:00
Danil Chapovalov
7084e1b6d9 In VideoPlayoutDelay delete access to integer representation of min/max values
Bug: webrtc:13756
Change-Id: I1a81c25e5e3fab68a44e94a5ab93e8184c824683
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316864
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40612}
2023-08-23 16:14:26 +00:00
Arthur Sonzogni
47faf32287 Add rtc_common_public_deps
When built for chromium, some webrtc implementations are overridden and
are implemented by chrome's "//base". For instance webrtc::Location is
implemented by base::Location. So far so good, the affected targets are
correctly defined in GN to depend on base.

The problem: Most targets in webrtc do not declare correctly their
public_deps. When a public header of a target includes one from its
dependency, the dependency must be a public_deps. The public_deps
instruct GN to forward the capability to use code from the dependency
toward the dependent.

Unfortunately, it is not possible to fix the `public_deps` in webrtc,
because its is disallowed via a presubmit. See:
https://webrtc-review.googlesource.com/c/src/+/30262

WebRTC developers decided not to use `public_deps`, because GN config
are "translated" toward different kind of downstream build system who do
not really support the `public` dependencies concept. Instead WebRTC is
using some "common" configuration applied to all of its targets.

This patch add `rtc_common_public_deps` argument, to let embedders
add the dependencies WebRTC depends on.

Bug: chromium:1467773
Change-Id: I7de43372414a09886fcb07905451e6339c8ecc64
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316660
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40595}
2023-08-22 11:32:06 +00:00
Danil Chapovalov
06717773a5 Move EncodedImage::playout_delay_ to private section of the class
Remove code where integer -1 as delay is used to represent unset value.

Bug: webrtc:13756
Change-Id: I16a01e12c25a09ce21a971c9edabf47af5936662
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316923
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40592}
2023-08-22 08:24:37 +00:00
Tony Herre
960882047d Add mock of GetCaptureTimeIdentifier to MockTransformableVideoFrame
Bug: webrtc:14878
Change-Id: I2dffad0932aee4d2ba37c8d57a3c28330e3cc294
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316880
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40585}
2023-08-21 14:42:25 +00:00
Danil Chapovalov
b0b03a87b7 Mark api video timing classes with RTC_EXPORT
Bug: None
Change-Id: Icf99dcdef7278b6051f040c51583a5e164e8f22e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316921
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40584}
2023-08-21 12:55:08 +00:00
Artem Titov
1997837d16 Add stream label to test video source for better debugablity and testability
Bug: b/294812400
Change-Id: I830515b797100ca2dc0e68dd3b79d5a1bb4068da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/316221
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40581}
2023-08-21 08:25:38 +00:00
Danil Chapovalov
c146b5f77b Represent unset VideoPlayoutDelay with nullopt rather than special value
Remove support for setting one limit without another limit
because related rtp header extension doesn't support such values.

Start morphing VideoPlayouDelay into a class and stricter type: add accessors returning TimeDelta

Bug: webrtc:13756
Change-Id: If0dd02620528dc870b015beeff3a8103e04022ee
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315921
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40570}
2023-08-18 13:17:50 +00:00
Tony Herre
392e4714e7 Remove deprecated TransformableAudioFrameInterface::getHeader() method
Fixed: chromium:1456628
Change-Id: I12ea08070578de846f042c64f2808b55de1603a8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/315960
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40555}
2023-08-15 16:31:02 +00:00
inaqui-signal
c570368abc Merge branch 'm116' into 5845 2023-08-09 14:40:20 -05:00
Sergey Silkin
8efd93dd76 Encoder type agnostic resolution based fallback
WebRTC-Video-EncoderFallbackSettings/resolution_threshold_px:X sets resolution threshold to switch from primary to fallback encoder. When the field trial is present, VP8-specific resolution based fallback settings, provided by WebRTC-VP8-Forced-Fallback-Encoder-v2, are ignored.

Bug: none
Change-Id: I8f2e28438547f3896c7fc288ed6634720328f3a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314760
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40526}
2023-08-08 14:18:31 +00:00
Harald Alvestrand
34d82df2ba Use ArrayView versions of SendRtp and SendRtcp
This CL adds [[deprecated]] to the old signatures, and uses the new
signatures throughout.

Bug: webrtc:14870
Change-Id: Ic9a8198ac0a2f954e1b2e7d05a55dbe04342f958
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314962
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40517}
2023-08-07 08:28:48 +00:00
Philipp Hancke
e2e04513e7 stats: implement fecSsrc on inbound-rtp
which is present if a fec mechanism like FlexFEC is negotiated

spec change:
  https://github.com/w3c/webrtc-stats/pull/765

BUG=webrtc:15250

Change-Id: I7d71d49fab0153d734f22831e6684d2acfc647fb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314981
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40514}
2023-08-04 12:54:48 +00:00
Jonas Oreland
b17806a4cf Add StunDictionary
This patch adds a StunDictionary.
The dictionary has a reader and a writer.
A writer can update a reader by creating a delta.
The delta is applied by the reader, and the ack is applied by the
writer.

Using this mechanism, two ice agents can (in the future) communicate
properties w/o manually needing to add new code.

The delta and delta-ack attributes has been allocated at IANA.

Bug: webrtc:15392
Change-Id: Icdbaf157004258b26ffa0c1f922e083b1ed23899
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314901
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40513}
2023-08-04 12:08:44 +00:00
Harald Alvestrand
b38d9d2b6f Add ArrayView versions of SendRtp and SendRtcp
This is part of the long term plan to stop using pointer + length
to pass around buffers.

Bug: webrtc:14870
Change-Id: Ibaf5258fd326b56132b9b5a8a6b1563a763ef2f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314960
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40512}
2023-08-04 11:20:53 +00:00
Mirko Bonadei
cad3aed5fc Add setters to NetworkEmulationManager::SimulatedNetworkNode::Builder.
Bug: b/294494713
Change-Id: I89130a4742da5f04680aa38721afcd7f91fb30ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314980
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40511}
2023-08-04 10:38:59 +00:00
Philipp Hancke
9b82b2f8d6 stats: implement RTX ssrc on inbound-rtp/outbound-rtp
spec change:
  https://github.com/w3c/webrtc-stats/pull/765

BUG=webrtc:15096

Change-Id: I7c72193c23460330b6bb612a9568641d187ee638
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312362
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40510}
2023-08-04 08:41:52 +00:00
Philipp Hancke
55b89a8068 Rename cipher_suite to crypto_suite
and replace "cs" in the appropriate places.

This is the terminology used by
https://www.rfc-editor.org/rfc/rfc4568#section-10.3.2.1
and
https://www.iana.org/assignments/sdp-security-descriptions/sdp-security-descriptions.xhtml

BUG=None

Change-Id: I45f2c52eb266c0f94bdd710a9b941142b9411827
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314483
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40502}
2023-08-02 11:45:24 +00:00
Chunbo Hua
5eb521955a Correct typo from valee to value for color space definitions
Bug: None
Change-Id: I7854669de1216385e188bc53ee0cbd26c002c680
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312741
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40489}
2023-07-31 06:28:45 +00:00
Philipp Hancke
ea06be2682 candidate: do not log full IP addresses for related address
since this may contain sensitive data, just like the address.

BUG=None

Change-Id: I3faa1512a15467cd5cc4bcbcaebadb736f1bae07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/313040
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40473}
2023-07-25 17:19:25 +00:00
Harald Alvestrand
00f11224fd Remove extra usage of video-content-type header extension
This extension is documented to carry one bit: Screenshare.
It's been used for carrying simulcast layers and experiment IDs.
This CL removes that usage.

Bug: webrtc:15383
Change-Id: I048b283cde59bf1f607d8abdd53ced07a7add6f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312420
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40457}
2023-07-22 21:47:08 +00:00
Danil Chapovalov
630c40d716 Update RtpSenderVideo::SendVideo/SendEncodedImage to take Timestamp/TimeDelta types
Bug: webrtc:13757
Change-Id: I2f21b14ecf003c5cb0c4c92d0c6b9b6f11c35f71
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311945
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40450}
2023-07-21 10:36:49 +00:00
Joachim Reiersen
e9e03a9160 Fix inaccurate contentType in RTCInbound/OutboundRtpStreamStats
The existing equality check did not always work since content_type
is sometimes overloaded with extra internal information such as simulcast layer index. Fix by using the videocontenttypehelpers::IsScreenshare helper method.

Bug: webrtc:15381
Change-Id: I2fe84e7f036ea2c223e4fa6dd58af1c4c0bcfbdb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/312261
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40448}
2023-07-19 21:57:10 +00:00
Angelo Tadres
775470214a Removing enum used for removed UMA metrics WebRTC.PeerConnection.Simulcast.ApplyLocalDescription and WebRTC.PeerConnection.Simulcast.ApplyRemoteDescription
This is pending work from this CL already merged: https://webrtc-review.googlesource.com/c/src/+/311640

Bug: chromium:1447193
Change-Id: I9b2ffb60d65f87f0497b099b6253bf122ff1d873
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311740
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40428}
2023-07-13 09:00:52 +00:00
Jianhui Dai
32a8169a65 Use common VideoFrameTypeToString helper
This CL cleans up all local conversions, in favor of the common helper
function.

Bug: webrtc:15210
Change-Id: Id77e1c6b1151a2542d92e220e91d5b11285479b8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311060
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Jianhui J Dai <jianhui.j.dai@intel.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40420}
2023-07-12 00:28:47 +00:00
Henrik Boström
a6c4f12fad Set noparent in api/stats/OWNERS.
This avoids the risk of a higher level owner approving something getting
added to the getStats() API without +1s from stats owners.

Bug: None
Change-Id: Iedd7133d0e943d1db6977dc0e1d406e5b545e31a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311543
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40412}
2023-07-10 12:25:04 +00:00
Tony Herre
b4062e5611 Add a setter for RTPTimestamp on TransformableFrameInterface
Move the SetRTPTimestamp method from TransformableAudioFrameInterface
to the base class, so that RTPTimestamps can also be modified on encoded
video frames.

Bug: webrtc:14709
Change-Id: I355be527c2be201c9201e04c431394c962237140
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310781
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40378}
2023-06-29 13:42:15 +00:00
Tony Herre
58ee9dff08 Deprecate encoded audio frame GetHeader
Bug: chromium:1456628
Change-Id: Ifc7d1aa1153c0593c673381f153e5793b94c98c3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310420
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40359}
2023-06-27 13:13:34 +00:00
Tony Herre
fc68f1f7d9 Stop using TransformableAudioFrameInterface::GetHeader() within webrtc
Instead switch to specific getters, or methods only defined on specific implementations rather than part of the public API.

Once uses are removed from Chromium, I'll mark GetHeader() deprecated
and eventually remove it.

Bug: chromium:1456628
Change-Id: I19b80489b3a0322c201e24994494cfbb742ee13e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309780
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40344}
2023-06-26 10:07:50 +00:00
Philipp Hancke
17e8a5cc7d stats: implement flexfec fecBytesReceived stats for FlexFEC
specified in https://github.com/w3c/webrtc-stats/pull/762
and take FlexFEC into account for receive statistics.

BUG=webrtc:15250

Change-Id: Id85775ab1f29487d5b8bf478da6e22071005901a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294881
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40325}
2023-06-21 13:04:31 +00:00
Hans Wennborg
d1780836f4 Fix incorrect use of scoped enumerations in format strings
Scoped enums do not get automatically promoted to their underlying type,
so these uses have undefined behavior and Clang recently started warning
about it.

Bug: chromium:1456289
Change-Id: I9cf4e5a68378930a3bf7d8ac7b0a21eaf0d12670
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309520
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40321}
2023-06-21 09:16:11 +00:00
Philipp Hancke
17ec0569c6 ICE: adjust priority of non-relay candidates
Introduces a field trial
  WebRTC-IncreaseIceCandidatePriorityHostSrflx
that adjusts the priority of non-relay candidates such that the STUN priority attribute calculated as
  (prflx-type-preference << 24) | (priority & 0x00FFFFFF)
as described in
  https://www.rfc-editor.org/rfc/rfc5245#section-7.1.2.1
will satisfy the condition that the STUN priority of server-reflexive candidates will always be higher than the STUN priority of relay candidates.

Previously this was not the case because the TURN relay preference was added to the local_preference for relay candidates, making it higher than the local_preference of srflx candidates gathered from the same interface.
This led to cases where the resulting candidate pair priority of a srflx-relay pair was higher than the candidate pair priority of a srflx-srflx pair, i.e. using a TURN server in cases that work using a direct P2P connection.

Whether the field trial is active can be observed by checking that
  priority-of-srflx-candidate&0x00FFFFFF
is greater than
  priority-of-relay-candidate&0x00FFFFFF

BUG=webrtc:13195,webrtc:5813,webrtc:15020

Change-Id: Ib91708fbe7310b6454f93158a45c9d77da009091
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292700
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40311}
2023-06-20 08:02:27 +00:00
Tony Herre
097a4decc2 Make all encodedaudioframes inherit from TransformableAudioFrameI'face
Make outgoing encoded audio frames inherit from the same Audio interface
that incoming frames inherit from, to align them and make it possible to
eg clone frames regardless of their direction.

Also begin removing GetHeader() from the Audio interface, replacing it
with getters for the specific values we actually need to propagate in
the API: sequence number and CSRCs. This makes it much easier to treat
incoming and outgoing frames the same, even if they don't have full
RtpHeaders prepared at the point of the transform.

Bug: chromium:1453226
Change-Id: Ib5b39b30dea8a378b3b26efb1589dfd64741d201
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308141
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40309}
2023-06-19 18:54:47 +00:00
Sameer Vijaykar
9919841e4a Remove preprocessor definition for StatsReport::Value::id_val()
This is no longer needed after downstream redefinitions are deleted.

Bug: webrtc:15241
Change-Id: Iea6839bff781fe7d0c56b4739f3d43398c70f2b3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308681
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#40306}
2023-06-19 08:26:42 +00:00
Henrik Boström
c929ab49b9 Reland "[Stats] Remove enum-like structs in favor of strings."
This is a reland of commit ccc87ea3c6

Downstream project has been updated.

Original change's description:
> [Stats] Remove enum-like structs in favor of strings.
>
> Due to a limitation of RTCStatsMember<T> not supporting enums, as well
> as the fact that in JavaScript enums are represented as basic strings,
> the stats enums have always been represented by T=std::string.
>
> Now that we have WebIDL-ified[1] all RTCStats dictionaries and enum
> values are simply string-copied (example: [2]) it seems safe to assume
> that "stats enums are just strings" is here to stay.
>
> Therefore there is little value in having C++ structs that look like
> enums so I'm deleting those in favor of std::string operator==()
> comparisons, e.g. `if (rtp_stream.kind == "audio")`. This removes some
> lines of code from our code base.
>
> I mostly want to get rid of these because they were taking up about 20%
> of the rtcstats_objects.h real estate...
>
> [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/peerconnection/rtc_stats_report.idl
> [2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/peerconnection/rtc_stats_report.cc;l=667;drc=cf34e84c9df94256abfb1716ba075ed203975755
>
> Bug: webrtc:15245
> Change-Id: Iaf0827d7aecebc1cc02976a61663d5298d684f07
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308680
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40295}

Bug: webrtc:15245
Change-Id: Ibc7aeb518ed0bd7f1d725f140132c99e5a89bcf3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308880
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40305}
2023-06-17 15:41:44 +00:00
Per K
18aba66271 Add test to ensure task deleted on TQ
Bug: webrtc:14449
Change-Id: I85757af9c1ad6ad630d9ffe7b2528ca7c7161883
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308900
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40301}
2023-06-16 14:33:13 +00:00
Christoffer Jansson
45666d4b01 Revert "[Stats] Remove enum-like structs in favor of strings."
This reverts commit ccc87ea3c6.

Reason for revert: Breaks downstream project

Original change's description:
> [Stats] Remove enum-like structs in favor of strings.
>
> Due to a limitation of RTCStatsMember<T> not supporting enums, as well
> as the fact that in JavaScript enums are represented as basic strings,
> the stats enums have always been represented by T=std::string.
>
> Now that we have WebIDL-ified[1] all RTCStats dictionaries and enum
> values are simply string-copied (example: [2]) it seems safe to assume
> that "stats enums are just strings" is here to stay.
>
> Therefore there is little value in having C++ structs that look like
> enums so I'm deleting those in favor of std::string operator==()
> comparisons, e.g. `if (rtp_stream.kind == "audio")`. This removes some
> lines of code from our code base.
>
> I mostly want to get rid of these because they were taking up about 20%
> of the rtcstats_objects.h real estate...
>
> [1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/peerconnection/rtc_stats_report.idl
> [2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/peerconnection/rtc_stats_report.cc;l=667;drc=cf34e84c9df94256abfb1716ba075ed203975755
>
> Bug: webrtc:15245
> Change-Id: Iaf0827d7aecebc1cc02976a61663d5298d684f07
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308680
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40295}

Bug: webrtc:15245
Change-Id: I05db80ba9f29460239de82cea9d95136e4c708e4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308860
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Christoffer Jansson <jansson@webrtc.org>
Owners-Override: Christoffer Jansson <jansson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40298}
2023-06-16 06:29:26 +00:00
Henrik Boström
ccc87ea3c6 [Stats] Remove enum-like structs in favor of strings.
Due to a limitation of RTCStatsMember<T> not supporting enums, as well
as the fact that in JavaScript enums are represented as basic strings,
the stats enums have always been represented by T=std::string.

Now that we have WebIDL-ified[1] all RTCStats dictionaries and enum
values are simply string-copied (example: [2]) it seems safe to assume
that "stats enums are just strings" is here to stay.

Therefore there is little value in having C++ structs that look like
enums so I'm deleting those in favor of std::string operator==()
comparisons, e.g. `if (rtp_stream.kind == "audio")`. This removes some
lines of code from our code base.

I mostly want to get rid of these because they were taking up about 20%
of the rtcstats_objects.h real estate...

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/peerconnection/rtc_stats_report.idl
[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/peerconnection/rtc_stats_report.cc;l=667;drc=cf34e84c9df94256abfb1716ba075ed203975755

Bug: webrtc:15245
Change-Id: Iaf0827d7aecebc1cc02976a61663d5298d684f07
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308680
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40295}
2023-06-15 16:11:27 +00:00
Sameer Vijaykar
51b82067ca Add missing method definition for StatsReport::Value::id_val()
Also add a preprocessor definition to avoid redefinition in downstream projects.

Bug: webrtc:15241
Change-Id: Ic55d98c3d3a69b9b19195ee78f03af6e38fdd0e2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308601
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Jonas Oreland <jonaso@webrtc.org>
Commit-Queue: Sameer Vijaykar <samvi@google.com>
Cr-Commit-Position: refs/heads/main@{#40289}
2023-06-15 13:53:37 +00:00
Henrik Boström
2fec64484f Fix L1Tx target bitrate bug when the standard API is used.
There are now multiple ways to configure VP9 L1Tx:
- Legacy API: configure legacy SVC and disable encodings, this gets
  interpreted as disabling spatial layers (non-standard API hack).
- Standard API: configure scalability_mode. This can be done either
  with a single encoding or multiple encodings. As long as only one
  encoding is active we get a single L1Tx ssrc, same as legacy API.

Due to a bug, the ApplySpatialLayerBitrateLimits() logic which tweaks
bitrates was only applied in the legacy API code path, not the standard
API code path, despite both code paths configuring L1Tx.

The issue is that IsSimulcastOrMultipleSpatialLayers() was checking if
`number_of_streams == 1`. This is true in legacy code path but not
standard code path. The fix is to look at
`numberOfSimulcastStreams == 1` instead, which is set to the correct
value regardless of code path used.

This CL adds comments documenting the difference between
`number_of_streams` and `numberOfSimulcastStreams` to reduce the risk
of more mistakes like this in the future.

Bug: chromium:1455039, b:279161263
Change-Id: I69789b68cc5d45ef1b3becd310687c8dec8e7c87
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308722
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40287}
2023-06-15 12:48:48 +00:00
Palak Agarwal
ee58849235 Make SetRTPTimestamp pure virtual in TransformableAudioFrameInterface
This can be done now as the function SetRTPTimestamp is now overriden
in blink MockTransformableAudioFrame.

Change-Id: I4fa4cb81d0282fea864818f0f2d9a5ed881a5d30
Bug: webrtc:14709
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308361
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40257}
2023-06-12 13:41:27 +00:00
Rasmus Brandt
cde5354729 Implement DelayVariationCalculator for events analysis.
This CL implements {,Logging}DelayVariationCalculator, whose purpose is to calculate simple inter-arrival metrics for a sequence of RTP frames. Uses could include RtcEventLog analysis and ad hoc testing.

Want lgtm: asapersson

Bug: webrtc:15213
Change-Id: I3f9d13a2c4fa66b6f1229c1b6fcd66a6911070de
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306741
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40247}
2023-06-08 17:42:53 +00:00
Palak Agarwal
fc260a1878 Add method SetTimestamp in TransformableAudioFrameInterface
This change will make it possible to let us modify timestamp in
RTCEncodedAudioFrame.

Change-Id: I97e9571c258fd718d6c211014f1476ca46c78097
Bug: webrtc:14709
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307501
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40238}
2023-06-07 15:35:12 +00:00
Florent Castelli
8c4b9ea535 Remove references to AudioCodec and VideoCodec constructors
The preferred method to create codecs is to use the function
cricket::CreateAudioCodec or cricketCreateVideoCodec.
Empty codec objects are deprecated and should be replaced
with alternatives such as methods returning an
absl::optional object instead.

Bug: webrtc:15214
Change-Id: I7fe40f64673cd407830dbbb0e541b85a3aee93aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307521
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40226}
2023-06-05 23:23:40 +00:00
Florent Castelli
be316dab88 Ensure that RTCErrorOr<T, E> doesn't require T to be default constructible
Bug: webrtc:15214
Change-Id: Ic2d61c64d770943472374f61ad71249e88c3f6f6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307520
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40223}
2023-06-05 16:55:00 +00:00
Philipp Hancke
3488726163 sdp: reject spec simulcast answers without the rid extension
which is mandatory to implement per
  https://datatracker.ietf.org/doc/html/rfc8853#section-5.5

BUG=chromium:1422258

Change-Id: I3639b15453aaa074fbe9f26b722f5997b439224a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306661
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40208}
2023-06-02 12:44:32 +00:00
Ying Wang
2d598535aa Add SetRetransmissionMode() to FecController, this will be used to control RTX settings in FecController.
Currently FecController knows about network conditions, these information can be used to control RTX settings in-call.

Change-Id: I8f84164aeac48ea13b7f1cf82fd7424431f98ada
Bug: webrtc:15167
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304800
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40192}
2023-06-01 07:51:56 +00:00
Peter Hanspers
a9bba047b7 Updating AsyncAudioProcessing API, part 1.
Add an API to pass AudioFrameProcessor as a unique_ptr.

Bug: webrtc:15111
Change-Id: I4cefa35399c05c6e81c496e0b0387b95809bd8f8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301984
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Peter Hanspers <peterhanspers@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40187}
2023-05-31 14:40:35 +00:00
Yury Yarashevich
87e74f9fb7 Remove unused combined_audio_video_bwe.
Bug: None
Change-Id: Ie539351f98b7a0ebb5f08e0df5c5759a2bcb5588
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Yury Yarashevich <yura.yaroshevich@gmail.com>
Cr-Commit-Position: refs/heads/main@{#40160}
2023-05-26 15:56:00 +00:00
Henrik Boström
0f1376529a Delete RTC[NonStandard/Restricted]StatsMember.
Whether a metric is to be exposed to JavaScript or not is a blink
implementation detail that the WebRTC repository does not need to be
concerned with.

This CL removes unused code and paves the way for the possibility of
making the one and only RTCStatsMember class be absl::optional<>-based
in the future.

Bug: webrtc:15162
Change-Id: I578715f48b8fcc3534b72b4c700fd6567f8d553e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304722
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40139}
2023-05-25 08:39:48 +00:00
Henrik Boström
979b0479a1 Revert "Temporarily add dummy trackId to unblock roll."
This reverts commit 3df4178d59.

Reason for revert: This dummy variable is no longer needed to make
importer happy

Original change's description:
> Temporarily add dummy trackId to unblock roll.
>
> NOTRY=True
>
> Bug: webrtc:15198
> Change-Id: I3090b90c549da3f2368001f2049bbf1d66042af4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306400
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40130}

Bug: webrtc:15198
Change-Id: Ib47471259de72771292887050d1576707a473eec
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306401
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40135}
2023-05-24 15:50:44 +00:00
Henrik Boström
2057d71775 [Stats] Delete unused NonStandardGroupId.
NonStandardGroupId is no longer wired up to Chrome, but if we did want
to only expose certain metrics if a field trial was enabled then the
right place to do that would be in blink, where WebIDL lives.

This was only used prior to the WebRtcStatsReportIdl launch and
experiments haven't been active in several years so its dead code.

Blocked on:
- https://chromium-review.googlesource.com/c/chromium/src/+/4514754

Bug: webrtc:15162
Change-Id: Ia41a4d21d7e5f029ddb121183fbd69ae7f98fac4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304720
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40132}
2023-05-24 14:08:32 +00:00
Henrik Boström
3df4178d59 Temporarily add dummy trackId to unblock roll.
NOTRY=True

Bug: webrtc:15198
Change-Id: I3090b90c549da3f2368001f2049bbf1d66042af4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306400
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40130}
2023-05-24 12:54:43 +00:00
Henrik Boström
4e231eedbd Delete deprecated 'track' and 'stream' metrics from WebRTC.
Track stats are roughly equal in size as the RTP stream stats which
are the largest objects making up the majority of the RTCStatsReport
size and scales with meeting size. Deleting track/stream reduces the
size in approximately half which should reduce performance overhead
and unblock code simplifications.

Blocked on:
- https://chromium-review.googlesource.com/c/chromium/src/+/4517530

# Relevant bots already passed
NOTRY=True

Bug: webrtc:14175, webrtc:14419
Change-Id: Ib7bdb84c10459b42b829228d11876498e5227312
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/289043
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40129}
2023-05-24 12:26:56 +00:00
Jonas Oreland
1d3452f31b RequestedResolution - Bug fix
Change default value of is_active to false,
this means that VideoRenderer or other VideoSinks
added with default rtc::VideoSinkWants() does not
block usage of RequestedResolution, e.g JNI_VideoTrack_AddSink.

This problem occurs when attaching a VideoRenderer directly to
the sending VideoTrack (which is a great solution!). But the
VideoRenderer is "passive" and should not block adaptations
from RequestedResolution.

Bug: webrtc:14451
Change-Id: I2ab02596245c7b82bf94fe86f8788f458c7ea286
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/305024
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40105}
2023-05-22 13:58:50 +00:00
Henrik Boström
36fd351562 [Stats] Align RTCStatsMember<T> closer to absl::optional<T>.
Step 1: Make reading RTCStatsMember look the same as reading
        absl::optional (this CL).
Step 2: Migrate uses of "is_defined()" to "has_value()".
Step 3: Delete "is_defined()".
Step 4: Make RTCStatsMember+Interface an implementation detail of
        RTCStats::Members(), only used for abstract iteration ("for
        each metric"). Lazy instantiate it upon Members().
Step 5: Replace RTCStatsMember with absl::optional for use in RTCStats
        dictionaries (rtcstats_objects.h/cc).

Bug: webrtc:15164
Change-Id: I5a2c9fe56707e3c7d89e8ea62fb37171ae806a7c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304840
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40048}
2023-05-11 07:33:54 +00:00
Philipp Hancke
e0034a800e stats: remove media_type which was an alias for kind
The web compat requirement that was the reason for keeping
is now solved in Chromium and its stats bindings.

BUG=webrtc:9674

Change-Id: Ifb722769414b2bcc5f4d36d7dff87a875336e039
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303860
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40024}
2023-05-09 11:46:52 +00:00
Tommi
301e546a68 Remove SequenceCheckerImpl::valid_system_queue_
As pointed out in issue webrtc:15146 this Mac/iOS specific variable,
makes the SequenceChecker behave incorrectly on those platforms.

The variable was introduced in a CL that merged the previous checker
classes, ThreadChecker and SequencedTaskChecker, but curiously neither
one of them had such a variable. So I'm not exactly sure what problem
was being solved. Hence I'm wondering if we actually need it.

Reference: https://webrtc-review.googlesource.com/c/src/+/129721

Bug: webrtc:15146
Change-Id: Ia7a9eb17b993c4f8a1e8204c658bf0b3dbdaa1e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304401
Reviewed-by: Peter Hanspers <peterhanspers@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40019}
2023-05-09 09:40:51 +00:00
Markus Handell
c8c4a282a6 Introduce support for video packet batching.
This CL introduces a new feature enabling video packet send batches.
The feature is enabled via
PeerConnectionInterface
::RTCConfiguration
::MediaConfig
::enable_send_packet_batching.

PacketOptions have been augmented with attribute "batchable" (set for
all video packets) and attribute "last_packet_in_batch" which gives
injected AsyncPacketSockets a chance to understand when a batch begins
and ends.

When the feature is on, packets are collected in RtpSenderEgress. On
reception of OnBatchComplete from PacingController, RtpSenderEgress
sends the collected batch, setting "last_packet_in_batch" to true
in the last packet.

Bug: chromium:1439830
Change-Id: I1846b9d4a8a0efd227d617691213a2e048bdc8a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303720
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40012}
2023-05-08 16:24:03 +00:00
Jared Siskin
bceec84aee Format ^(api|call|common_audio|examples|media|net|p2p|pc)/
half of the remaining folders

git ls-files | grep -e  "\(\.h\|\.cc\)$" | grep -E "^(api|call|common_audio|examples|media|net|p2p|pc)/" | xargs clang-format -i ; git cl format
after landing: add to .git-blame-ignore-revs

Bug: webrtc:15082
Change-Id: I8b2cac13f4587d3ce9b2fccc7362967283f57ea2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302062
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39977}
2023-05-03 11:09:26 +00:00
Rashad Sookram
147fdb9f46 Merge branch 'm112' into 5615 2023-04-27 12:45:13 -04:00
Philipp Hancke
f78d1f211a stats: Implement receive RTX stats
* retransmittedBytesReceived
* retransmittedPacketsReceived
added to the specification in
  https://github.com/w3c/webrtc-stats/pull/735

BUG=webrtc:15096

Change-Id: I6770e5d8d09ac1c2693c918fd943b0ab257ec7ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295260
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39959}
2023-04-27 09:53:00 +00:00
Philipp Hancke
2b72d84733 stats: fix type of inbound-rtp frames_received
which gets assigned from a uint32_t VideoReceiverInfo::frames_received so should remain an unsigned type

BUG=None

Change-Id: I1db6a3f96c4ff49eee72dcce54eb6fff346c128c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302342
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39958}
2023-04-26 15:57:46 +00:00
Jakob Ivarsson
2bd878180a Add delayed packet outage event metric.
Can be used to calculate the average delayed packet outage duration and
number of packet loss events by subtracting from concealment events.

Only used in simulations currently.

Bug: None
Change-Id: I03740a2bcb781af09e28a4d13d9e41c0f84bc506
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303600
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39957}
2023-04-26 13:40:17 +00:00
Artem Titov
17d7eb4d52 Do not compile some test targets with chromium
Move copy_to_file_audio_capturer, copy_to_file_audio_capturer_unittest
and test_common under "!build_with_chromium"

Bug: b/272350185, webrtc:15081
Change-Id: Ie3f08e4ce5bec91647e802cc34040df2e01103d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/303680
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39954}
2023-04-26 10:07:49 +00:00
Jeremy Leconte
4730201454 [DVQA] Add a GetSenderPeerName method.
Change-Id: I2b30510911865150881c116abc2f86be7821f34a
Bug: b/277851637
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301280
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39875}
2023-04-17 13:05:33 +00:00
Florent Castelli
0a4a9846fc Extract common codec fields into RtpCodec
This creates the RtpCodec structure for the common fields
used in RtpCodecParameters and RtpCodecCapability.
Remove the unused fields from both that were defined from ORTC
and never implemented as well.

Bug: webrtc:15064
Change-Id: I37b4c83e2051a888fc99cc0d9f7aeb8d74f0421d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301182
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39862}
2023-04-14 12:15:24 +00:00
Tony Herre
c381c33767 Make TransformableVideoFrameInterface::SetMetadata pure virtual
Bug: webrtc:14709
Change-Id: I9e131a041e80c1774b982f61197a0499b97c6ae7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/301162
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Stefan Holmer <holmer@google.com>
Cr-Commit-Position: refs/heads/main@{#39845}
2023-04-13 11:23:16 +00:00
Sergey Silkin
26d1b26277 Log metrics even if test failed
Set of codecs for testing is hardcoded to AV1, VP8, VP9, H264, H265. Some codecs may not be available due to lack of support on the platform or due to some issue in our code which would be a regression. Reporting zero metrics for failed tests would allow the perf tool to detect such a regression.

This also enables codec tests by default. The tests should not run on bots since video_codec_perf_tests binary is not included in any test suits yet.

Bug: webrtc:14852
Change-Id: I967160069055036f93e595d328c4d5f1ca483be9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300868
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39840}
2023-04-13 08:49:37 +00:00
Sergey Silkin
b4a45546b7 Dedicated build target for video codec perf tests
Bug: webrtc:14852
Change-Id: Ib56ef931b58058a7d09b97b7013ba39ee1767629
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300740
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39823}
2023-04-12 11:24:48 +00:00
Tommi
a50a81a150 [DataChannelInterface] Introduce DataChannelInterface::SendAsync()
One problem with the existing Send() method is that it has a return
value that is problematic for a fully async implementation.

A second problem with Send() is that the return value is bool and not
RTCError (webrtc:13289), which is why OnSendComplete() uses RTCError.

Also, start deprecating `bool Send()` in favor of `void SendAsync()` and
adding `network_safety_` flag for posting async operations to the
network thread. This flag also takes over from the
`connected_to_transport_` which can now be removed.

Bug: webrtc:11547, webrtc:13289
Change-Id: I87bbc7e9b964a52684bdfe0e6ebc5230be254e8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299760
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39817}
2023-04-11 19:46:36 +00:00
Tommi
a13b4d1d30 Partial reland: DataChannelObserver interface change.
This is a partial reland of:
https://webrtc-review.googlesource.com/c/src/+/299142

This CL includes the interface change in DataChannelObserver but
not the code behind it. The point of landing this change first is
to be able to override this method in downstream implementations in
preparation for relanding the rest of the changes.

Bug: webrtc:11547
Change-Id: Ic3fe4fb8084908ef12bd4916b763df5a75604113
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300362
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39776}
2023-04-06 08:47:53 +00:00
Daniel Cheng
0e1d3c5675 Add reference, pointer, and co type aliases for rtc::ArrayView.
Many STL containers define these type aliases, and they are easier to
work with than add_const_t<add_lvalue_reference_t<value_type>>.

In a followup, `WTF::Vector` in Blink's conversion constructor from
other containers will be SFINAE-guarded using these type aliases.

Bug: chromium:1408442
Change-Id: I7790e6f462a32e7e49bc6468afeda6b2e6d4b631
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300180
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39771}
2023-04-05 20:18:57 +00:00
philipel
7ceb49c7b8 Fuzzy match the SdpVideoFormat in VideoEncoderFactoryTemplate::CreateVideoEncoder.
Bug: webrtc:13573
Change-Id: I1223f5f989d5298d3a6f7f6d06fd752e650adfd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300342
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39766}
2023-04-05 11:48:26 +00:00
Andrey Logvin
7f16fcda0f Revert "[DataChannel] Send and receive packets on the network thread."
This reverts commit fe53fec24e.

Reason for revert: Speculative revert, may be breaking downstream project

Original change's description:
> [DataChannel] Send and receive packets on the network thread.
>
> This updates sctp channels, including work that happens between the
> data channel controller and the transport, to run on the network
> thread. Previously all network traffic related to data channels was
> routed through the signaling thread before going to either the network
> thread or the caller's thread (e.g. js thread in chrome). Now the
> calls can go straight from the network thread to the JS thread with
> enabling a special flag on the observer (see below) and similarly
> calls to send data, involve 2 threads instead of 3.
>
> * Custom data channel observer adapter implementation that
>   maintains compatibility with existing observer implementations in
>   that notifications are delivered on the signaling thread.
>   The adapter can be explicitly disabled for implementations that
>   want to optimize the callback path and promise to not block the
>   network thread.
> * Remove the signaling thread copy of data channels in the controller.
> * Remove several PostTask operations that were needed to keep things
>   in sync (but the need has gone away).
> * Update tests for the controller to consistently call
>   TeardownDataChannelTransport_n to match with production.
> * Update stats collectors (current and legacy) to fetch the data
>   channel stats on the network thread where they're maintained.
> * Remove the AsyncChannelCloseTeardown test since the async teardown
>   step has gone away.
> * Remove `sid_s` in the channel code since we only need the network
>   state now.
> * For the custom observer support (with and without data adapter) and
>   maintain compatibility with existing implementations, added a new
>   proxy macro that allows an implementation to selectively provide
>   its own implementation without being proxied. This is used for
>   registering/unregistering a data channel observer.
> * Update the data channel proxy to map most methods to the network
>   thread, avoiding the interim jump to the signaling thread.
> * Update a plethora of thread checkers from signaling to network.
>
> Bug: webrtc:11547
> Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39760}

Bug: webrtc:11547
Change-Id: Id0d65594bf727ccea5c49093c942b09714d101ad
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/300341
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Owners-Override: Andrey Logvin <landrey@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@{#39764}
2023-04-05 09:34:23 +00:00
Tommi
fe53fec24e [DataChannel] Send and receive packets on the network thread.
This updates sctp channels, including work that happens between the
data channel controller and the transport, to run on the network
thread. Previously all network traffic related to data channels was
routed through the signaling thread before going to either the network
thread or the caller's thread (e.g. js thread in chrome). Now the
calls can go straight from the network thread to the JS thread with
enabling a special flag on the observer (see below) and similarly
calls to send data, involve 2 threads instead of 3.

* Custom data channel observer adapter implementation that
  maintains compatibility with existing observer implementations in
  that notifications are delivered on the signaling thread.
  The adapter can be explicitly disabled for implementations that
  want to optimize the callback path and promise to not block the
  network thread.
* Remove the signaling thread copy of data channels in the controller.
* Remove several PostTask operations that were needed to keep things
  in sync (but the need has gone away).
* Update tests for the controller to consistently call
  TeardownDataChannelTransport_n to match with production.
* Update stats collectors (current and legacy) to fetch the data
  channel stats on the network thread where they're maintained.
* Remove the AsyncChannelCloseTeardown test since the async teardown
  step has gone away.
* Remove `sid_s` in the channel code since we only need the network
  state now.
* For the custom observer support (with and without data adapter) and
  maintain compatibility with existing implementations, added a new
  proxy macro that allows an implementation to selectively provide
  its own implementation without being proxied. This is used for
  registering/unregistering a data channel observer.
* Update the data channel proxy to map most methods to the network
  thread, avoiding the interim jump to the signaling thread.
* Update a plethora of thread checkers from signaling to network.

Bug: webrtc:11547
Change-Id: Ib4cff1482e31c46008e187189a79e967389bc518
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299142
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39760}
2023-04-04 16:49:17 +00:00
Henrik Boström
8481f6358e Remove IsSinglecastOrAllNonFirstLayersInactive() helper.
As of recent changes, we can simply look at numberOfSimulcastStreams
because in the {active,inactive,inactive} case we get a single
webrtc::VideoStream here[1] which results in numberOfSimulcastStreams
being 1 here[2].

Looking at numberOfSimulcastStreams instead of using a helper is
preferred because it is more descriptive and in the future, when
{inactive,active,inactive} or {inactive,inactive,active} cases of VP9
simulcast is also supported (webrtc:15046) then this gating will work
even when the first layer is not the active one.

[1] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/video/config/encoder_stream_factory.cc;l=146;drc=c99753ac8f051e379ae68e281aaef04b0a5ca8f2

[2] https://source.chromium.org/chromium/chromium/src/+/main:third_party/webrtc/modules/video_coding/video_codec_initializer.cc;l=77;drc=4baea5b07f2fd309892845cf2d1c0f4ca77862d3

# No need to wait for win chrome bot, everything else green
NOTRY=True

Bug: webrtc:15046
Change-Id: I8aaea2e8cc350bd01fb00cc7fd85032b7fdfe24d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299942
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39759}
2023-04-04 13:59:07 +00:00
philipel
31af34ba8c Update Dav1dDecoderTemplateAdapater to include AV1 profile1 support.
Bug: webrtc:13573
Change-Id: Ibc81b6400eb8e22ce28ae434c83a22013ef96c79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299946
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39757}
2023-04-04 12:40:17 +00:00
Jeremy Leconte
40a0e3191a Remove AudioConfig::Mode.
The Mode is currently redundant with the optional input_file_name.

Change-Id: Ib4f0a363e86d925107d61867a7f743d6663e7071
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298743
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39754}
2023-04-04 08:44:23 +00:00
Tommi
0fe65102cc Add support for detaching and merging of StatsCollection contents.
This is needed in order to be able to update the legacy stats
collector to fetch data channel stats from the network thread, which
is part of an upcoming change to data channels.

Bug: webrtc:11547
Change-Id: Ic205b0314b9f11a024d36d714c223cbddd0f3df3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299462
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39732}
2023-03-31 15:46:07 +00:00
Tony Herre
e7482b403d Remove deprecated TransformableVideoFrameInterface::GetMetadata
Bug: chromium:1420245
Change-Id: I4cc008bf8a4af2404f33589aededa8a16b774764
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299263
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39712}
2023-03-29 08:33:46 +00:00
Artem Titov
089758dbc5 Allow creation of TestVideoTrackSource not on the signaling thread
Bug: b/272350185
Change-Id: I1bc18f35e2d0b36791966a5954eb28886c569a9b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299261
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39704}
2023-03-28 13:33:35 +00:00
Harald Alvestrand
d32e5b3078 Deprecate non-refcount CreateVideoTrack
Bug: webrtc:15017
Change-Id: I978a14dcb2fac7777a12c3f89b1a7207dd896b37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299075
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39700}
2023-03-28 11:58:36 +00:00
Danil Chapovalov
e14abcb20b Cleanup FieldTrialView
Delete alias WebRtcKeyValueConfig as unused
Replace .find() == 0 with absl::StartsWith per clang-tidy recommendation
https://clang.llvm.org/extra/clang-tidy/checks/abseil/string-find-startswith.html

Bug: webrtc:10335
Change-Id: I1f09c262844c0678a8d8c0d0d3274df3d947737c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299181
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39690}
2023-03-27 17:06:33 +00:00
Jeremy Leconte
a3f7b54518 [DVQA] Don't check if peer exists on Pause/Resume.
Change-Id: I0f26444c6a420017caaa4c27520e75e4146ecfd4
Bug: webrtc:14995
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299077
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39689}
2023-03-27 16:23:52 +00:00
Artem Titov
6fd5f33d45 Extend TestVideoTrackSource API
Bug: b/272350185
Change-Id: Ibc53e7a9ee8f572475d86fc78de1c1ed71078910
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299140
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39678}
2023-03-25 21:35:23 +00:00
Jakob Ivarsson
94b51210f8 Include packet waiting time in concealment decision.
This is to be more robust to packet loss during DTX and paused streams.

Without it, we can wait to decode an available packet when in CNG or
PLC mode until more packets arrive, which for DTX and paused streams
can take a long time.

We already include the waiting time if the last packet in the buffer
is a DTX packet.

Bug: webrtc:13322
Change-Id: Iaf5b3894500140d6f83377ba2cd65b44e0cdac05
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299009
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39667}
2023-03-24 13:18:58 +00:00
Tommi
c848268ab1 Use SequenceChecker(SequenceChecker::kDetached) in a few places.
This CL is partly a test to see if there's an impact on binary size:
- Not a big difference for binaries (decrease): -776b to -4Kb
- For libraries (libwebrtc.a) it actually increases the size: +40Kb

Secondarily this CL is basically to introduce this pattern to the
code base. In terms of LOC, this makes things slightly more compact.

From:

  class Foo {
   public:
     Foo() {
       checker_.Detach();
     }
   private:
    SequenceChecker checker_;
  };

To:

  class Foo {
   public:
     Foo() = default;
   private:
    SequenceChecker checker_{SequenceChecker::kDetached};
  };

Bug: none
Change-Id: I59fc34ccea10847e13455a349851ce9a0af458e3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/299020
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39664}
2023-03-24 07:44:18 +00:00
Henrik Boström
4baea5b07f Make VP9 simulcast behave like singlecast for single active layer cases.
Various "if streams == 1" cases are updated to "if
IsSinglecastOrAllNonFirstLayersInactive()" in order not to cause subtle
differences between VP9 {active} and VP9 {active,inactive,inactive}.

This CL also affects a line that conditionally sets
`simulcastStream[0].active = codec_active` so it seemed fitting to
improve the test coverage of "if all streams are inactive, don't send".

Bug: webrtc:15028
Change-Id: I8872dc8be0f2dfc1d8914bdba5e6433f9ba8cbfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298881
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39656}
2023-03-23 14:49:22 +00:00
Per K
7effd7657b Change visibility on target mock_network_control
This is to allow external tests to depend on it.

Bug: none
Change-Id: Ic8e2f864041d959f673e7f2c18eb563a13274dcc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298745
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39646}
2023-03-22 19:53:04 +00:00
Per K
452d94047b Add mock for NetworkControllerInterface
Bug: none
Change-Id: Ibdd72011932a36348a4382caa5d0bf0ab2c02dd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298742
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39641}
2023-03-22 15:49:32 +00:00
Harald Alvestrand
041ecb87f5 New PeerConnectionFactory::CreateVideoTrack with refcounted source
Bug: webrtc:15017
Change-Id: I04c794d8959583bb4cc5c3898f4175783ec49f16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/249363
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39635}
2023-03-22 09:10:27 +00:00
Philipp Hancke
f0f435e983 Remove deprecated RTCStatsReport(int64) and timestamp_us
BUG=webrtc:14813

Change-Id: I80c2ba8f57354ef63cf2cc7b767d1f64dd0dd766
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298444
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@{#39633}
2023-03-22 08:00:53 +00:00
Sergey Silkin
ebb5383fd8 Dump codec input
Add functionality for dumping encoder and decoder input to file in video codec test.

Bug: b/261160916, webrtc:14852
Change-Id: I49a84a886d87903c601cf5c35bd723b6393c2a75
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298051
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39626}
2023-03-21 16:54:19 +00:00
Henrik Boström
62dc65b537 Add test that attempting HW is still possible after SW fallback.
Based on previous discussions I would have thought that this test would
fail, but it turns out that it passes. See referenced bug for context.

Bug: webrtc:15021
Change-Id: I845b48f688fb25942e3b770d50cafbf8a0bafe94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298562
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39625}
2023-03-21 15:02:34 +00:00
Artem Titov
6a78e93346 [PCLF] Introduce test video source and make it more controllable
Bug: b/272350185
Change-Id: I15572b7e4d0cb0ce41da676a4eedbc1e138510fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298047
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39621}
2023-03-21 14:15:24 +00:00
Jeremy Leconte
2148f8ed71 [DVQA] Change API to pause and resume all streams from a sender.
Also make it possible to pause an already paused stream by making it a no-op.

Change-Id: Id10f74a4c6464067ae63208162194f020c6470eb
Bug: b/271542055
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298202
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39620}
2023-03-21 14:05:03 +00:00
Jonas Oreland
122d777943 Add new stun attribute GOOG_DELTA_SYNC_REQ
Assigned by IANA: https://www.iana.org/assignments/stun-parameters/stun-parameters.xhtml

Bug: webrtc:0
Change-Id: Ie910e112afe33f3dbf7f2a221edc96af5ac7b139
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298560
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39617}
2023-03-21 13:28:43 +00:00
Tommi
3da04a93cd Allow SequenceChecker to be initialized detached.
The motivation for this is to not have to implement this pattern:

foo.h:

class Foo {
 public:
  Foo();
 private:
  SequenceChecker checker_;
};

foo.cc:

Foo::Foo() {
  checker_.Detach();
}

And instead be able to do this inline in the .h file:

class Foo {
 public:
  Foo();
 private:
  SequenceChecker checker_{SequenceChecker::kDetached};
};

Bug: none
Change-Id: Idd7ca82d15c2f77f3aaccf26f1943a49f4b40661
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298445
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39616}
2023-03-21 12:34:15 +00:00
Sergey Silkin
aa17f2f0a9 Add Initialize() to Encoder/Decoder API in video codec tester
Initialization of Android HW codecs takes hundreds milliseconds. Exclude this time from frame processing time of first frame by initializing codecs before starting encoding/decoding.

Bug: b/261160916, webrtc:14852
Change-Id: I9ec84c6b12c1d9821b59965cf521170224066563
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298304
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39613}
2023-03-21 08:04:48 +00:00
Danil Chapovalov
a2d85e4565 Use absl::string_view type as parameter for RTCError message
Bug: webrtc:13579
Change-Id: Ia9f90e6c3b008fc614d378cae4c407becfc597c9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298447
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39610}
2023-03-20 18:16:10 +00:00
Jakob Ivarsson
63643357b4 Remove CNG state tracking from NetEq decision logic.
It seems like this is legacy and not useful. A comment mentions
transitioning between CNG and DTMF modes, but there is no way this can
happen currently.

Bug: webrtc:13322
Change-Id: I9e4706cb6ee145ee37a9e11e7cab6ea4ff697dc4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297980
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39590}
2023-03-17 15:00:17 +00:00
Henrik Boström
f6eae959bf Delete EncoderSimulcastProxy in favor of SimulcastEncoderAdapter.
Because the adapter has a passthrough mode, it can already handle both
singlecast and simulcast cases, meaning the proxy is no longer providing
value. Let's delete.

Bug: webrtc:15001
Change-Id: I480eaba599448e9b82b8cf7f829dc35ad6ce0434
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297740
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39579}
2023-03-16 13:25:44 +00:00
Philipp Hancke
b3e5969658 stats: use uint64_t for RTCSentRtpStreamStats.packetsSent
spec update from https://github.com/w3c/webrtc-stats/pull/744

BUG=webrtc:14989

Change-Id: I9d0adcf951501bc281054c77bb6bc03e47192523
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295505
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39575}
2023-03-16 06:46:19 +00:00
Artem Titov
ebce84a502 [DVQA] Add support for DVQA to pause/resume receiving of stream by peer
Bug: b/271542055, webrtc:14995
Change-Id: Ic02451347160f512588b6fef5d6ac4ad904b5e18
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297440
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39568}
2023-03-15 18:16:49 +00:00
Rashad Sookram
19492d2279
Set inactive timeout to 30s 2023-03-14 14:52:37 -04:00
Henrik Boström
9a5de95af9 Add a flag to control legacy vs spec-compliant scalability mode.
The goal of the VP9 simulcast project is that when `scalability_mode`
is set, multiple encodings are always interpreted as simulcast, even
if VP9 or AV1 is used. This CL makes this so, but only if the flag
"WebRTC-AllowDisablingLegacyScalability" is "/Enabled/". This allows us
to make "SendingThreeEncodings_VP9_Simulcast" EXPECT VP9 simulcast.

When we are ready to ship we will remove the need to use the field
trial, but before we ship this we'll want to revisit if
SvcRateAllocator can be updated to support simulcast. (Today if we use
SvcRateAllocator when VP9 simulcast is used, all encodings except the
first one get bitrate=0, causing the test to fail because media is not
flowing on all layers.) For now, a TODO is added.

Bug: webrtc:14884
Change-Id: Ie20ae748b0c0405162f3a1b015ab94956ef83dae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297340
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39552}
2023-03-14 12:05:24 +00:00
Philipp Hancke
22005ab39b Remove obsolete header extension API names
and update spec link.

BUG=chromium:1051821

Change-Id: I42dbe36b2299f01cb4eb8010c893623fde7472fe
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296702
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@{#39548}
2023-03-13 14:49:05 +00:00
Philipp Hancke
d3289d2ec0 Reland "stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases"
This is a reland of commit 9671d60925
after fixing more downstream dependencies

Original change's description:
> stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases
>
> after upgrading downstream projects
>
> BUG=webrtc:14973
>
> Change-Id: I5df8e95a1c70b1d6078e255166c36ed01f868b6a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296820
> Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#39526}

No-Try: True
Bug: webrtc:14973
Change-Id: I33bd99ca211a82ed77e3e8676e00256915fde168
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296881
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39533}
2023-03-10 15:22:01 +00:00
Henrik Boström
4463ff0296 Revert "stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases"
This reverts commit 9671d60925.

Reason for revert: Breaks dependencies, will re-land after fixes

Original change's description:
> stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases
>
> after upgrading downstream projects
>
> BUG=webrtc:14973
>
> Change-Id: I5df8e95a1c70b1d6078e255166c36ed01f868b6a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296820
> Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#39526}

Bug: webrtc:14973
Change-Id: I50878526566660d9772f7c8664970eec8bd86341
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296940
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39530}
2023-03-10 13:24:32 +00:00
Philipp Hancke
9671d60925 stats: remove RTCRtpInboundRTPStream and RTCRtpoutboundRTPStream aliases
after upgrading downstream projects

BUG=webrtc:14973

Change-Id: I5df8e95a1c70b1d6078e255166c36ed01f868b6a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296820
Reviewed-by: Christoffer Jansson <jansson@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39526}
2023-03-10 12:12:41 +00:00
Artem Titov
d877589e16 Make frame_generator_api not testonly
Bug: None
Change-Id: Id51f819df350f24b12ead698e4f75dcb760d18f7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296821
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39519}
2023-03-09 21:54:34 +00:00
Danil Chapovalov
b40aedf911 Delete RTPHeader::payload_type_frequency as unused
payload type frequency is not communicated inside an RTP packet and
thus do not belong to the RTPHeader

Bug: None
Change-Id: Ic3e48f1b0507a96ddc697503145f7c8785962926
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296763
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39515}
2023-03-09 16:32:22 +00:00
Philipp Hancke
1f98b466b8 stats: rename RTCInboundRTPStreamStats and RTCOutboundRTPStreamStats
to RTCInboundRtpStreamStats and RTCOutboundRtpStreamStats respectively
which follows the camel-casing convention used elsewhere.

The old name is kept around as an alias for a limited amount of time
to allow upgrading dependencies.

BUG=webrtc:14973

Change-Id: Ibf4e65933fd6cc2e7e89955042f6f8fb0f6c7853
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296261
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39497}
2023-03-07 14:27:47 +00:00
Philipp Hancke
9f6ae375e3 Rename header extension API methods
following spec updates from
  https://github.com/w3c/webrtc-extensions/pull/142

BUG=chromium:1051821

Change-Id: I1fd991a5024d38ac59ebe510ea1a48fd6f42d23b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296321
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39491}
2023-03-07 10:55:58 +00:00
Sergey Silkin
1c1382be0f Dump codec output to ivf/y4m
Bug: b/261160916, webrtc:14852
Change-Id: I19de2210aa03b56752db5ce8b6fd94498123d6f5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/296260
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39490}
2023-03-07 08:33:39 +00:00
Sergey Silkin
9259b5f72c Add rate adaptation tests
Bug: b/261160916, webrtc:14852
Change-Id: I58b3647218c961dcf0305c3902f79adb448b73e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295866
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39489}
2023-03-06 18:33:16 +00:00
Markus Handell
eb277527f0 Stop Posting tasks when we don't need to.
Under the combined network/worker thread project, tasks
are unnecessarily posted to the same thread.

This CL reaps 90% overhead savings in sent packet feedback
as measured with Perfetto under a 49p Meet call.

The identity of the posted calls was uncovered with WebRTC/Chrome's
new location-aware tracing.

TESTED=presubmit + local Meet calls.

Bug: chromium:1373439
Change-Id: I0c43aa4de884831838747d52b21c45fd360106e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295780
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39484}
2023-03-06 15:13:39 +00:00
Philipp Hancke
1f80451932 Fix stats inheritance and rename RTP to Rtp
making RTCOutboundRtpStreamStats inherit from RTCSentRtpStreamStats
as defined in
  https://www.w3.org/TR/webrtc-stats/#outboundrtpstats-dict*

This removes the duplicated definitions of packetsSent and bytesSent.

BUG=webrtc:14948

Change-Id: I184998b65d59dbd0d1288733d55d8a884e6de970
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295660
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39481}
2023-03-06 13:43:27 +00:00
Tove Petersson
1e2d951762 Add a clone method to the audio frame transformer API.
This will clone an encoded audio frame into a sender frame.

Bug: webrtc:14949
Change-Id: Ie62d9f5ec457541b335bde8f2f6e9b6d24704cf6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294560
Commit-Queue: Tove Petersson <tovep@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39480}
2023-03-06 08:22:25 +00:00
Danil Chapovalov
a76487ffd2 Relax string parameters in pclf api to absl::string_view
Bug: webrtc:13579
Change-Id: I53c133bcbba6a074f3be6b996a3991a71190b1fc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295865
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39459}
2023-03-02 16:17:41 +00:00
Danil Chapovalov
298975aa89 Cleanup legacy name for VideoPlayoutDelay
Bug: webrtc:7660
Change-Id: Icdeaca06224def0effb304c8492ecdd64cc82e52
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295861
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39458}
2023-03-02 15:27:02 +00:00
Tony Herre
2311f93909 Remove uses of TransformableVideoFrame::GetMetadata and deprecate it
Chromium uses have been migrated to Metadata(), so we should be clear.
Other projects can easily migrate similarly.

Bug: chromium:1420245
Change-Id: I150654812676dabd5c957cff00d40d4c95eaf5d6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295481
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39455}
2023-03-02 13:38:48 +00:00
Philipp Hancke
7f4270d160 Remove JsepSessionDescription::kDefaultVideoCodecName
which is only used in tests.

BUG=None

Change-Id: If215ad84e6756af2ee90777a27376400f8f4d8e0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294721
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39450}
2023-03-02 12:28:29 +00:00
Alan Zhao
6cf8b486eb Fix missing libc++ includes in webrtc
Several files refer to symbols declared in headers not explicitly
included. This compiles now because libc++ tranitively includes these
headers via other libc++ headers; however, these transitive includes are
not guaranteed to exist and in Chrome, will no longer exist once libc++
is compiled with modules.

Bug: chromium:543704
Change-Id: I638bb02df3d050a48345248e80aebd2dd60956c1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295762
Auto-Submit: Alan Zhao <ayzhao@google.com>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39448}
2023-03-02 10:14:51 +00:00
Emil Lundmark
4e86aa0870 Remove mentions of already deleted field trials
- WebRTC-Audio-Agc2ForceExtraSaturationMargin
- WebRTC-Audio-Agc2ForceInitialSaturationMargin
- WebRTC-Audio-BitrateAdaptation
- WebRTC-Audio-TransientSuppressorVadMode
- WebRTC-FrameBuffer3
- WebRTC-IntelVP8
- WebRTC-UseActiveIceController

Bug: None
Change-Id: I3545727c09f761867f2f4c2bb5c400012ce146d2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295723
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39444}
2023-03-01 15:53:37 +00:00
Markus Handell
ae61aca9b1 Implement support for Chrome task origin tracing. #3.7/4
This CL completes migration to the new TaskQueueBase interface
permitting location tracing in Chrome.

Bug: chromium:1416199
Change-Id: Iff7ff5796752a1520384a3db0135a1d4b9438988
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294540
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39439}
2023-03-01 14:20:03 +00:00
Markus Handell
a1ceae206b Implement support for Chrome task origin tracing. #3.5/4
This CL migrates unit tests to the new TaskQueueBase interface.

Bug: chromium:1416199
Change-Id: Ic15c694b28eb67450ac99fdd56754de1246a4d95
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295621
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39434}
2023-03-01 11:11:37 +00:00
Sergey Silkin
fddc9131a5 Aggregate and log video codec metrics
Bug: b/261160916, webrtc:14852
Change-Id: Idcb7e96b12ca38af49b9b1f10d1e23cc7faac92b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293945
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39427}
2023-03-01 08:27:54 +00:00
Tony Herre
a6135bcd43 Remove deprecated TransformableVideoFrame::GetAdditionalData
It was marked deprecated on Feb 9th, ~3 weeks ago.

Bug: chromium:1414370
Change-Id: I251b91984ca9a958e221f6eaf01c63b05c5a7a48
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295506
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#39422}
2023-02-28 16:23:52 +00:00
Tove Petersson
1fccaa4485 Reland "operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test"
This reverts commit 8bf3210629.

Reason for revert: Initialized an uninitialized member in GofInfoVP9 (+ removed some redundant initialization of members already initialized by SetGofInfoVP9())

Original change's description:
> Revert "operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test"
>
> This reverts commit 437bf78ed9.
>
> Reason for revert: Breaks upstream project
>
> Original change's description:
> > operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test
> >
> > Added equality and inequality operators for VideoFrameMetadata and used the equality operator to check that the cloned metadata property is equal to the original metadata in RtpSenderVideoFrameTransformerDelegateTest.CloneSenderVideoFrame.
> >
> > Also default-initialized VideoFrameMetadata::ssrc_ to 0.
> >
> > Bug: webrtc:14708
> > Change-Id: If1f5153069bc986061ff9f0a6abaa2a4a5a98dd1
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293560
> > Commit-Queue: Tove Petersson <tovep@google.com>
> > Reviewed-by: Tony Herre <herre@google.com>
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#39411}
>
> Bug: webrtc:14708
> Change-Id: Icbec1b65ed22b89766606cb9514dde6f4e9124be
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295500
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Auto-Submit: Andrey Logvin <landrey@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39413}

Bug: webrtc:14708
Change-Id: I843d29f7dd0da2c7f16968a7fc08dc02cd359fc1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Tove Petersson <tovep@google.com>
Cr-Commit-Position: refs/heads/main@{#39418}
2023-02-28 15:44:21 +00:00
Emil Lundmark
9109e856d5 Add option to log a warning for unregistered field trials
Until now you only had the option to RTC_DCHECK for unregistered field
trials. This makes it possible to log a warning instead.

Bug: webrtc:14154
Change-Id: I8628054e3c9b5d690f241a93e61299126b732ed0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295300
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Emil Lundmark <lndmrk@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39417}
2023-02-28 15:43:18 +00:00
Andrey Logvin
8bf3210629 Revert "operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test"
This reverts commit 437bf78ed9.

Reason for revert: Breaks upstream project

Original change's description:
> operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test
>
> Added equality and inequality operators for VideoFrameMetadata and used the equality operator to check that the cloned metadata property is equal to the original metadata in RtpSenderVideoFrameTransformerDelegateTest.CloneSenderVideoFrame.
>
> Also default-initialized VideoFrameMetadata::ssrc_ to 0.
>
> Bug: webrtc:14708
> Change-Id: If1f5153069bc986061ff9f0a6abaa2a4a5a98dd1
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293560
> Commit-Queue: Tove Petersson <tovep@google.com>
> Reviewed-by: Tony Herre <herre@google.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39411}

Bug: webrtc:14708
Change-Id: Icbec1b65ed22b89766606cb9514dde6f4e9124be
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295500
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Andrey Logvin <landrey@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39413}
2023-02-28 11:50:42 +00:00
Tove Petersson
437bf78ed9 operator== for VideoFrameMetadata + used in CloneSenderVideoFrame test
Added equality and inequality operators for VideoFrameMetadata and used the equality operator to check that the cloned metadata property is equal to the original metadata in RtpSenderVideoFrameTransformerDelegateTest.CloneSenderVideoFrame.

Also default-initialized VideoFrameMetadata::ssrc_ to 0.

Bug: webrtc:14708
Change-Id: If1f5153069bc986061ff9f0a6abaa2a4a5a98dd1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293560
Commit-Queue: Tove Petersson <tovep@google.com>
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39411}
2023-02-28 08:32:09 +00:00
Mirko Bonadei
832ce5eae6 Make FrameGeneratorInterface::fps() pure virtual.
Bug: b/269577953
Change-Id: I418d241fe966fa3a38b851aaa70aaf59ee03ca57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295261
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39407}
2023-02-27 17:39:27 +00:00
Tony Herre
6d262c504a Add TransformableVideoFrameInterface::Metadata()
Add a method to TransformableVideoFrameInterface which returns a new
instance of VideoFrameMetadata which the caller can move and use as
they like.
This will replace the existing GetMetadata which returns a dangerous const ref to a field which might change if someone calls SetMetadata
etc. That method will be deprecated as soon as we've migrated Chromium
usages.

Bug: webrtc:14708
Change-Id: Id7c15f33d6ec28c4a975ce250cdc791d7a3087bc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292940
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Reviewed-by: Tove Petersson <tovep@google.com>
Cr-Commit-Position: refs/heads/main@{#39403}
2023-02-27 15:38:32 +00:00
Mirko Bonadei
b5f2c7edda Make Y4mFrameGenerator read FPS from file format.
Bug: b/269577953
Change-Id: Ied0072e1fdfbfb4d2b11e74a814c0718cad01d66
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294862
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39401}
2023-02-27 14:19:04 +00:00
Markus Handell
2a256c82ec Implement support for Chrome task origin tracing. #2/4
This prepares TaskQueueBase sub classes to be able to migrate to
the location and traits-based API. It re-introduces a Location class
into the webrtc namespace, which is meant to be overridden by Chromium.

Bug: chromium:1416199
Change-Id: I712c7806a71b3b99b2a2bf95e555b357c21c15ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294381
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39400}
2023-02-27 13:17:38 +00:00
Sergey Silkin
8566e779e3 Add samples sum calculation
Bug: b/261160916, webrtc:14852
Change-Id: I88e464fce4673dd9b9683219b8d2837206579ba5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293942
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39386}
2023-02-24 11:48:39 +00:00
Palak Agarwal
a09f21b207 Introduce capture_time_identifier in webrtc::EncodedImage
This CL propagates capture_time_identifier introduced in
webrtc::VideoFrame and propagates it to EncodedImage. For use cases
involving EncodedTransforms, this identifier is further propagated to
TransformableVideoSenderFrame.

VideoEncoder::Encode function is overriden by each encoder. Each of
these overriden functions needs to be changed so that they can handle
this new identifier and propagate its value in the created EncodedImage.

Change-Id: I5bea4c5a3fe714f1198e497a4bcb5fd059afe516
Bug: webrtc:14878
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291800
Reviewed-by: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#39374}
2023-02-22 17:08:53 +00:00
Philipp Hancke
b660b7a89c Enable multithreaded OpenH264 encoding behind field trial
This uses the field trial introduced is crbug.com/1406331 and
extends the usage to OpenH264. This simplifies experimentation
whether this change improves performance without requiring
multi-slice encoding.

BUG=webrtc:14368

Change-Id: I0031e59059f7113dd5453234869c957d46f311bb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294340
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39371}
2023-02-22 14:26:33 +00:00
Palak Agarwal
b57053ec21 Use type webrtc::Timestamp as capture_time_identifier in VideoFrame
Replace the existing variable capture_time_identifier_ms_ with
capture_time_identifier_ in webrtc::VideoFrame and
webrtc::VideoFrame::Builder. This variable uses webrtc::Timestamp as its
type versus using int64_t which creates confusion about whether it is
being recorded in milliseconds/microseconds.

Change-Id: I0b83a6235fb1d5732f7afe2c14d7d6121f1e985b
Bug: webrtc:14878
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293520
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#39369}
2023-02-22 13:50:07 +00:00
Philipp Hancke
fe1b39a648 stats: Deprecate RTCStatsReport(int64 timestamp_us)
in favor of the variant with (or returning) a Timestamp object.

BUG=webrtc:14813,webrtc:13756

Change-Id: I7b40f48f640a8be40a134b380a7a1b99cc99913b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294287
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@{#39366}
2023-02-22 12:32:02 +00:00
Henrik Boström
c5a4c938bb Reland "Make SimulcastIndex() and SpatialIndex() distinct (remove fallback)."
This is a reland of commit 8ad4924936

See diff between latest Patch Set and PS1. Fixes include:
- VideoStreamEncoder's call to bitrate_adjuster_->OnEncodedFrame()
  is updated to take stream index (spatial or simulcast index) instead
  of only looking at SpatialIndex().
- Migrate test-only helpers to use Spatial/SimulcastIndex correctly.

The fixes are to migrate
some test-only helpers that we had forgot to fix that are used by
external tests.

Original change's description:
> Make SimulcastIndex() and SpatialIndex() distinct (remove fallback).
>
> This CL removes the fallback logic to return the other index when the
> one requested has not been set. This means we can remove the codec gates
> that was previously needed because SpatialIndex() had multiple meanings,
> resolving the TODOs previously added in
> https://webrtc-review.googlesource.com/c/src/+/293343.
>
> We have already migrated all known external dependencies from
> SpatialIndex() to SimulcastIndex() where necessary, unblocking this CL.
>
> PSA: https://groups.google.com/g/discuss-webrtc/c/SDAVg6xJ3gY
>
> Bug: webrtc:14884
> Change-Id: I82787505ab10be151e5f64965b270c45465d63a9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293740
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39343}

Bug: webrtc:14884
Change-Id: Ib966924efca1a040dae881599f0789a7f2ab24a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294284
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39358}
2023-02-21 18:30:35 +00:00
Henrik Boström
fbd0ddb32e Introduce WebRTC-VideoEncoderSettings/encoder_thread_limit:X.
As requested by a CEF hosted application (https://crbug.com/1406331)
who want to be able to limit the number of threads in a controlled
environment, this CL adds a flag to control the max limit per encoder.

For plumbing-reasons, this is placed in VideoEncoder::Settings but
with a note that this is considered an experimental API with limited
support. For now only LibvpxVp8Encoder uses it and there are no plans
to roll this out.

I have manually confirmed this is working with printf debugging,
--force-fieldtrials=WebRTC-VideoEncoderSettings/encoder_thread_limit:2
and https://jsfiddle.net/henbos/2bd6m7Lt/

Bug: chromium:1406331
Change-Id: Ib02bd83e2071034874843d3aaa0d3b0adc5bbf46
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293960
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39349}
2023-02-20 14:01:32 +00:00
Henrik Boström
79a6f87648 Revert "Make SimulcastIndex() and SpatialIndex() distinct (remove fallback)."
This reverts commit 8ad4924936.

Reason for revert: Breaks downstream projects

Original change's description:
> Make SimulcastIndex() and SpatialIndex() distinct (remove fallback).
>
> This CL removes the fallback logic to return the other index when the
> one requested has not been set. This means we can remove the codec gates
> that was previously needed because SpatialIndex() had multiple meanings,
> resolving the TODOs previously added in
> https://webrtc-review.googlesource.com/c/src/+/293343.
>
> We have already migrated all known external dependencies from
> SpatialIndex() to SimulcastIndex() where necessary, unblocking this CL.
>
> PSA: https://groups.google.com/g/discuss-webrtc/c/SDAVg6xJ3gY
>
> Bug: webrtc:14884
> Change-Id: I82787505ab10be151e5f64965b270c45465d63a9
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293740
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39343}

Bug: webrtc:14884
Change-Id: Ibcb834a1519930336fa50e8e9d8d0137972e28e6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/294282
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39347}
2023-02-20 12:47:37 +00:00
Philipp Hancke
e5ab6c3bb0 stats: remove deprecated timestamp_us constructor variant
BUG=webrtc:14813

Change-Id: I56d28385f679b399cb2059f4c4c3d43e84a89b8e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293580
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39346}
2023-02-20 12:18:42 +00:00
Henrik Boström
8ad4924936 Make SimulcastIndex() and SpatialIndex() distinct (remove fallback).
This CL removes the fallback logic to return the other index when the
one requested has not been set. This means we can remove the codec gates
that was previously needed because SpatialIndex() had multiple meanings,
resolving the TODOs previously added in
https://webrtc-review.googlesource.com/c/src/+/293343.

We have already migrated all known external dependencies from
SpatialIndex() to SimulcastIndex() where necessary, unblocking this CL.

PSA: https://groups.google.com/g/discuss-webrtc/c/SDAVg6xJ3gY

Bug: webrtc:14884
Change-Id: I82787505ab10be151e5f64965b270c45465d63a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293740
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39343}
2023-02-20 10:48:24 +00:00
Mirko Bonadei
3ea7162c3c Make FrameGeneratorInterface::GetResolution pure virtual.
Bug: b/269577953
Change-Id: Ia8d370b9741fe3ed19ce276265ff7de7dcd061d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293961
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39335}
2023-02-17 17:03:24 +00:00
Rashad Sookram
03ddb5df82 Merge branch 'm110' into 5481 2023-02-17 11:35:29 -05:00
Mirko Bonadei
f1e392214d Make frame generators return the target resolution.
Bug: b/269577953
Change-Id: Ib3db0017becb8a6a680997f59e0f9050a42a3a79
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293940
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39331}
2023-02-17 13:20:32 +00:00
Tony Herre
0277f2b4a7 Add GetDirection method to MockTransformableVideoFrame
Allow mocking of GetDirection in tests.
Required for Chromium adoption of this mock:
https://chromium-review.googlesource.com/c/chromium/src/+/4236916

Bug: chromium:1414370
Change-Id: I2e7443a1bf24966cfcfaeadf47c5b29375e84f99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293745
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39329}
2023-02-16 18:55:56 +00:00
Dor Hen
99e002fdc4 Add APIs audio encoder/decoder factories in PeerConfigurer
In Meta we have our own audio encoder/decoder factories and we would like to exercise those in the peer connection e2e test framework.
Also, looks cleaner to have the APIs for both video and audio :)

Bug: webrtc:14910
Change-Id: Ibd1e0f39fc809882ef17b3de3154fdf4b567013b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293782
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39328}
2023-02-16 15:53:01 +00:00
Sergey Silkin
72b99a1128 Test Android HW codecs
Bug: b/261160916, webrtc:14852
Change-Id: Iebeab244a9ca6ae196735016064ccd056b7c888e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293401
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39326}
2023-02-16 14:01:52 +00:00
Wan-Teh Chang
bd86684bf3 Make VideoEncoder::GetEncoderInfo() pure virtual
Bug: webrtc:9722
Change-Id: I831a9c460425be86e5da2761769b8eecf231462f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293386
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Cr-Commit-Position: refs/heads/main@{#39319}
2023-02-15 17:26:07 +00:00
Henrik Boström
2e540a28c0 Introduce EncodedImage.SimulcastIndex().
As part of go/unblocking-vp9-simulcast (Step 1), EncodedImage is being
upgraded to be able to differentiate between what is a simulcast index
and what is a spatial index.

In order not to break existing code assuming that "if codec != VP9,
SpatialIndex() is the simulcast index", SimulcastIndex() has fallback
logic to return the value of spatial_index_ in the event that
SetSimulcastIndex() has not been called. This allows migrating external
code from (Set)SpatialIndex() to (Set)SimulcastIndex(). During this
intermediate time, codec gates are still necessary in some places of
the code, see TODOs added.

In a follow-up CL, after having fixed dependencies, we'll be able to
remove the fallback logic and rely on SimulcastIndex() and
SpatialIndex() actually being the advertised index and "if codec..."
hacks will be a thing of the past!

Bug: webrtc:14884
Change-Id: I70095c091d0ce2336640451150888a3c3841df80
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/293343
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39318}
2023-02-15 15:02:57 +00:00
philipel
04e9354557 Remove deprecated VideoStreamDecoderInterface and FrameBuffer2.
Bug: webrtc:14875
Change-Id: I46ea21d9ed46283ad3f6c9005ad05ec116d841f2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291701
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39304}
2023-02-13 16:25:00 +00:00
Tony Herre
fd877d996f Consolidate TransformableVideoFrame mocks used inside webrtc
Also move the frame_transformer_factory_unittest build target into the
if(rtc_include_tests) block, so it's not compiled without the mock.

Bug: chromium:1414370
Change-Id: I12653b173b419ec20bfad904e24a4d965e7e7830
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292863
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39288}
2023-02-09 16:06:29 +00:00
Tony Herre
168d11cba9 Deprecate TransformableVideoFrame GetAdditionalData
It's unused in Chromium and internally - GetMetadata() provides
sufficient information.

Bug: chromium:1414370
Change-Id: Id93bdccbda85090c1aa2fabf5d6b7b79f2b1e2e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292862
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Tony Herre <herre@google.com>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#39287}
2023-02-09 16:04:10 +00:00
Wan-Teh Chang
0c4c9be436 video_encoder.h: update kFullFramerate in comment
During code review, kFullFramerate was renamed kMaxFramerateFraction but
the uses of kFullFramerate in a comment were not updated. See
https://webrtc-review.googlesource.com/c/src/+/117900/3..4

Change-Id: I6b3c06b4c5b302e8ba40bde4ba722b94aab191eb
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292801
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Wan-Teh Chang <wtc@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39285}
2023-02-09 15:17:50 +00:00
Palak Agarwal
617d89a385 Add capture time as identifier in webrtc::VideoFrame
This will be used by third_party/blink/renderer/platform/peerconnection/webrtc_video_track_source.cc to provide capture_time_identifier_ms_ from
media::VideoFrame.

This identifier would then be passed to webrtc::EncodedFrame and
webrtc::TransformableVideoSenderFrame (in the future CLs) to be used as
an identifier for encoded frames.


Bug: webrtc:14878
Change-Id: I1d8a27891323d86fdc2f014988a8da572df84119
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291805
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#39270}
2023-02-08 11:05:47 +00:00
Tony Herre
b459deaf38 Add ssrc to VideoFrameMetadata used in encoded transforms
This allows callers to modify an encoded video frame's SSRC via the
setMetadata() call, which we'd like to do from Chrome, to allow using
an encoded frame from one PC on a different one.

Bug: webrtc:14709
Change-Id: Ia6b33761a3f63038f6eabbcd848916877e24454b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/292380
Auto-Submit: Tony Herre <herre@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39266}
2023-02-08 06:34:27 +00:00
Sergey Silkin
c6ff4bc793 Do not transfer ownership of codecs to tester
Passing of ownership of codecs to tester is not strictly needed. We may need to continue using a codec after test. For example, to check codec state or to use the same codec instance in next test.

Bug: b/261160916, webrtc:14852
Change-Id: I179b262116d7de76b8171f0409f943ad6d87433e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291802
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39256}
2023-02-03 14:29:43 +00:00
Tony Herre
be9b576188 Move video video receiver transformable frame to modules/rtc_rtcp/source
Step 1 of combining the sender and receiver types

Also moved the RtpFrameObject to rtp_rtcp/source, as it's heavily used
by the transformable receiver frame, I couldn't work out a better way
of managing the dependencies, and everything else seemed to work fine.

Bug: chromium:1412687
Change-Id: I55e816a0d7aa2962560ff9ebaf30ad63ab0b9810
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291710
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#39255}
2023-02-03 12:59:19 +00:00
Sergey Silkin
6c60f72a6b Refactor video codec testing stats
This CL introduces VideoCodecStats and VideoCodecStatsImpl which provide baseline functionalities for storing, slicing and aggregation of encoded and/or decoded video frame statistics. To facilitate metrics logging (not implemented yet), SamplesStatsCounter is used for stream parameters.

VideoCodecStats/VideoCodecStatsImpl will replace existing VideoCodecTestStats/VideoCodecTestStatsImpl.

Bug: b/261160916, webrtc:14852
Change-Id: I0f96ce1ed9be3aee2a702804612524676c9882fd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291323
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@{#39248}
2023-02-02 15:56:40 +00:00
Mirko Bonadei
0b7184ce06 Add possibility to set MetricsSet metadata.
Bug: b/266997275
Change-Id: I2c4fadcff7044a8c72ef7e46caf4eff398e29f91
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/291700
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39237}
2023-01-31 12:41:47 +00:00