Commit graph

2977 commits

Author SHA1 Message Date
Jim Gustafson
3d44a9e3b5 Merge branch m120 2024-01-17 12:11:58 -08:00
Mirko Bonadei
df3b3bd06f Revert "[Stats] Move metric names to Attribute, constructed via AttributeInit."
This reverts commit 84c48ae751.

Reason for revert: Breaks downstream project

Original change's description:
> [Stats] Move metric names to Attribute, constructed via AttributeInit.
>
> As of this CL, Attribute no longer implements RTCStatsMemberInterface
> and a member no longer owns knowing its own name. The attribute knows
> the name because we pass it down at construction time.
>
> To achieve this, the WEBRTC_RTCSTATS_IMPL() macro is updated to take
> AttributeInits instead of raw member pointers, i.e. (name, ptr) pairs.
>
> By constructing RTCStatsMember<T> without a name parameter, it does the
> same thing as the absl::optional<T> constructor. So RTCStatsMember<T>'s
> days are numbered!
>
> Bug: webrtc:15164
> Change-Id: I560c0134bae1c2d7218426a1576425ecc1b677a7
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334203
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Evan Shrubsole <eshr@google.com>
> Cr-Commit-Position: refs/heads/main@{#41540}

Bug: webrtc:15164
Change-Id: I9f416838153b26d4560ae98c37fb18a803d0295d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334901
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41550}
2024-01-17 17:00:22 +00:00
Mirko Bonadei
111e381822 Revert "[Stats] Add value_or() and migrate from ValueOrDefault()."
This reverts commit 9e4a97bb02.

Reason for revert: Breaks downstream project

Original change's description:
> [Stats] Add value_or() and migrate from ValueOrDefault().
>
> Yet another prerequisite for replacing RTCStatsMember<T> with
> absl::optional<T>, but this looks like the last one.
>
> Bug: webrtc:15164
> Change-Id: I2cde51e8c8c951f71b48ccd45e07146091a99616
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334647
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41541}

Bug: webrtc:15164
Change-Id: I89af6470c82d07981d8d064aa6ff8b50fae42b12
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334801
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@{#41548}
2024-01-17 14:38:25 +00:00
Mirko Bonadei
1fee69cfff Revert "[Stats] Attribute::ToString(), to replace member ValueToString/ToJson."
This reverts commit 54be7084e0.

Reason for revert: Breaks downstream project.

Original change's description:
> [Stats] Attribute::ToString(), to replace member ValueToString/ToJson.
>
> Delete RTCStatsMember<T>::ValueToString() and ValueToJson() in favor of
> Attribute::ToString().
>
> The difference between "ToString" and "ToJson" is that the "ToJson"
> version converts 64-bit integers and doubles to floating points with no
> more than ~15 digits of precision as to not exceed JSON's precision
> limitations. So only in edge cases of really large numbers or numbers
> with a silly number of digits will the two methods produce different
> results. Also JSON puts '\"' around map key names, e.g. "{\"foo\":123}"
> as opposed to "{foo:123}".
>
> Going forward we see no reason to maintain two different string
> converted paths that are this similar, so we only implement one
> Attribute::ToString() method which does what "ToJson" did.
>
> In the next CL we can delete RTCStatsMember<T>.
>
> Bug: webrtc:15164
> Change-Id: Iaa8cf3bf14b40dc44664f75989832469603131c5
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334640
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41544}

Bug: webrtc:15164
Change-Id: I187d7dff6f330a4a440279e6c32d88eb6ddefac8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334820
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@{#41546}
2024-01-17 14:06:34 +00:00
Henrik Boström
54be7084e0 [Stats] Attribute::ToString(), to replace member ValueToString/ToJson.
Delete RTCStatsMember<T>::ValueToString() and ValueToJson() in favor of
Attribute::ToString().

The difference between "ToString" and "ToJson" is that the "ToJson"
version converts 64-bit integers and doubles to floating points with no
more than ~15 digits of precision as to not exceed JSON's precision
limitations. So only in edge cases of really large numbers or numbers
with a silly number of digits will the two methods produce different
results. Also JSON puts '\"' around map key names, e.g. "{\"foo\":123}"
as opposed to "{foo:123}".

Going forward we see no reason to maintain two different string
converted paths that are this similar, so we only implement one
Attribute::ToString() method which does what "ToJson" did.

In the next CL we can delete RTCStatsMember<T>.

Bug: webrtc:15164
Change-Id: Iaa8cf3bf14b40dc44664f75989832469603131c5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334640
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41544}
2024-01-17 12:36:46 +00:00
Henrik Boström
9e4a97bb02 [Stats] Add value_or() and migrate from ValueOrDefault().
Yet another prerequisite for replacing RTCStatsMember<T> with
absl::optional<T>, but this looks like the last one.

Bug: webrtc:15164
Change-Id: I2cde51e8c8c951f71b48ccd45e07146091a99616
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334647
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41541}
2024-01-17 10:35:14 +00:00
Henrik Boström
84c48ae751 [Stats] Move metric names to Attribute, constructed via AttributeInit.
As of this CL, Attribute no longer implements RTCStatsMemberInterface
and a member no longer owns knowing its own name. The attribute knows
the name because we pass it down at construction time.

To achieve this, the WEBRTC_RTCSTATS_IMPL() macro is updated to take
AttributeInits instead of raw member pointers, i.e. (name, ptr) pairs.

By constructing RTCStatsMember<T> without a name parameter, it does the
same thing as the absl::optional<T> constructor. So RTCStatsMember<T>'s
days are numbered!

Bug: webrtc:15164
Change-Id: I560c0134bae1c2d7218426a1576425ecc1b677a7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334203
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#41540}
2024-01-17 09:10:10 +00:00
Henrik Boström
1ac0bea35f [Stats] Delete unused method RTCStats::Members().
For iteration of metrics, use RTCStats::Attributes() instead.

In a follow-up CL, RTCStatsMember<T> types will be replaced by
absl::optional<T> and RTCStatsMemberInterface and friends will be
deleted.

Bug: webrtc:15164
Change-Id: Ifca1d36abac3068abd299df49da36cacea1898fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334202
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41534}
2024-01-16 09:28:29 +00:00
Tommi
eb4a3140fd Add ReadStringView() to ByteBufferReader
ReadStringView() is a simple alternative to ReadString() but doesn't
involve a heap allocation for a new std::string.
Using the new methods in one place to start with.

Bug: none
Change-Id: I1100c6d258ffb4c8a31a46ba88a7f8bff9cf35cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332120
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41533}
2024-01-16 09:10:09 +00:00
Henrik Boström
40dcdf7fac [Stats] Migrate integration test to Attributes().
To unblock replacing RTCStatsMember<T> with absl::optional<T>.
RTCStats::GetAttribute() is added to allow obtaining the name of a
metric even after the replacement, the only usage of this AFAIK is this
test file.

Bug: webrtc:15164
Change-Id: I21e8b782ba86d9f864cb90885134c6724ba3398b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334163
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41515}
2024-01-12 11:30:06 +00:00
Henrik Boström
bfee961786 [Stats] Migrate RTCStats/Test to Attributes.
One in series of CLs to migrate from Members() to Attributes() to
unblock code deletion.

Adds and makes use of has_value(), holds_alternative<T>() and get<T>()
convenience methods.

Bug: webrtc:15164
Change-Id: I2ae9869a5d1de3f3875c70494c9781d69da7f936
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334160
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#41510}
2024-01-12 10:27:14 +00:00
Henrik Boström
7978cf1b43 [Stats] Introduce Attribute, implementing RTCStatsMemberInterface.
The plan is to replace Members() with Attributes() instead.
For backwards-compatability during the transition, Attribute implements
RTCStatsMemberInterface but the two classes serve the same purpose
which is to allow iterating all metrics of a stats object.

The reason for moving away from "members" is that we already have a way
to express a variable that maybe has a value: absl::optional<T>. The
only information the member adds is the const char* name(), which we'll
move to Attribute in a future CL.

We don't need to maintain an RTCStatsMemberInterface::Type enum in the
future because absl::variant<T> has absl::holds_alternative<T>.

Step 1: Add Attributes().
Step 2: Migrate to Attributes() and delete Members().
Step 3: Replaces all uses of RTCStatsMember<T> with absl::optional<T>
        and delete RTCStatsMember + RTCStatsMemberInterface.

Bug: webrtc:15164
Change-Id: I3fdd5b24214bb5cc340a54a0171df73b516e1803
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333840
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41507}
2024-01-12 08:19:50 +00:00
Alfred E. Heggestad
b330a79559 video_codecs: fix h265_profile line-endings
Bug: None
Change-Id: I6e1cf7139e0a86ce3690f2480622199e05bc204a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333802
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41499}
2024-01-10 12:46:30 +00:00
Henrik Boström
98b0da181b Move RTCStatsMember+Interface to a separate file.
Pure move CL. Avoids circular dependency in a future CL.

Bug: webrtc:15164
Change-Id: Ide423be95db30b7f3cfaea946e18e12980175f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333920
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41496}
2024-01-10 08:47:30 +00:00
Danil Chapovalov
c95ad5fe9d Delete deprecated FecControllerFactoryInterface::CreateFecController variant
Bug: webrtc:10335
Change-Id: Id113133a9bf73830f16ac889e5e80633b5055279
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333841
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41491}
2024-01-09 16:44:46 +00:00
Philipp Hancke
b9405c4748 Fix list of resiliency mechanisms in setCodecPreferences
Add ulpfec and flexfec to list of resiliency mechanisms taken
into account and in general exclude Comfort Noise (CN) from media
codecs.

Also introduce RtpCodecCapability::IsMediaCodec & ::IsResiliencyCodec
behaving like the MediaCodec methods.

BUG=webrtc:15396

Change-Id: I79041898928190bfdd33a06d8f6975d7556c46b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330424
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41485}
2024-01-09 13:09:59 +00:00
Zhaoliang Ma
f089d7ea54 Reland "FrameCadenceAdapter: align video encoding to metronome"
This is a reland of commit b39c2a8464

Original change's description:
> FrameCadenceAdapter: align video encoding to metronome
>
> This CL aligns the video encoding tasks to metronome tick which
> similar with the metronome decoding.
>
> Design doc: https://docs.google.com/document/d/18PvEgS-DehClK6twCSCATOlX-j9acmXd-3vjb0tR9-Y
>
> Bug: b/304158952
> Change-Id: I262bd4a5097fdaeed559b9d7391a059ae86e2d63
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327460
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Zhaoliang Ma <zhaoliang.ma@intel.com>
> Cr-Commit-Position: refs/heads/main@{#41469}

Bug: b/304158952
Change-Id: Icf4e1ad91f5c98f3c32a88ffe4d6277e907353e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333464
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41479}
2024-01-08 13:54:56 +00:00
Danil Chapovalov
55a61898a8 Pass Environment to custom FecController at construction
To allow custom FecController use propagated rather than global field trials
note that there is one FecControllerFactory per peer connection factory,
but FecController is created per peer connection and may use per peer connection field trials.

Bug: webrtc:10335
Change-Id: Id25bfaf4b49d4f6d551730c8fd55596ddc49ab47
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333400
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41478}
2024-01-08 12:57:48 +00:00
Danil Chapovalov
c41977d303 Propagate Environment into RtcEventLogImpl
With intention to propagte it futher into RtcEventLogEncoderNewFormat
where it can replace usage of the global field trials

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

Bug: webrtc:10335
Change-Id: Ia147d7073af5aab54190fdf192cd5c046c3d40a1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330423
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41472}
2024-01-05 11:28:00 +00:00
Björn Terelius
78a57efb29 Revert "FrameCadenceAdapter: align video encoding to metronome"
This reverts commit b39c2a8464.

Reason for revert: Breaks downstream build

Original change's description:
> FrameCadenceAdapter: align video encoding to metronome
>
> This CL aligns the video encoding tasks to metronome tick which
> similar with the metronome decoding.
>
> Design doc: https://docs.google.com/document/d/18PvEgS-DehClK6twCSCATOlX-j9acmXd-3vjb0tR9-Y
>
> Bug: b/304158952
> Change-Id: I262bd4a5097fdaeed559b9d7391a059ae86e2d63
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327460
> Reviewed-by: Markus Handell <handellm@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Commit-Queue: Zhaoliang Ma <zhaoliang.ma@intel.com>
> Cr-Commit-Position: refs/heads/main@{#41469}

Bug: b/304158952
Change-Id: I6f7a3d45cc24b63bc1fe92a93bf5c8d5058f32a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333482
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41471}
2024-01-04 20:02:49 +00:00
Zhaoliang Ma
b39c2a8464 FrameCadenceAdapter: align video encoding to metronome
This CL aligns the video encoding tasks to metronome tick which
similar with the metronome decoding.

Design doc: https://docs.google.com/document/d/18PvEgS-DehClK6twCSCATOlX-j9acmXd-3vjb0tR9-Y

Bug: b/304158952
Change-Id: I262bd4a5097fdaeed559b9d7391a059ae86e2d63
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/327460
Reviewed-by: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Zhaoliang Ma <zhaoliang.ma@intel.com>
Cr-Commit-Position: refs/heads/main@{#41469}
2024-01-04 04:14:12 +00:00
Philipp Hancke
8e2ab67045 Do not use Windows default task queue when building with Chromium
as this includes the deprecated timeKillEvent symbol which leads
to runtime errors on platforms where this is already removed.

See discussion in
  https://webrtc-review.googlesource.com/c/src/+/328860
for why this causes problems.

BUG=webrtc:15656

Change-Id: I95d07ceed105d35ac76fe97dbd1c454de398f52e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/333260
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41468}
2024-01-03 13:30:39 +00:00
Philipp Hancke
de17252e8e Reland "Unify access to SDP codec parameters"
This is a reland of commit 63d03f586b

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I5f8f45688df232eb37b12fa3e56a893a1c754e17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331402
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@{#41467}
2024-01-03 12:03:11 +00:00
Dor Hen
764ac7ec0a Allowing to set PCF options via peer configurer
Bug: webrtc:15752
Change-Id: I408cf2e118d09504d59a09ef4c2767ab89982db4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/332645
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41462}
2024-01-02 10:59:05 +00:00
Harald Alvestrand
5692649b9b Revert^2 "Remove deprecated ByteBufferReader and ByteBufferWriter functions"
This reverts commit ca58f0eb9d.

Reason for revert: Webkit Linux Leak bot seems flaky

Original change's description:
> Revert "Remove deprecated ByteBufferReader and ByteBufferWriter functions"
>
> This reverts commit e0e03ba73a.
>
> Reason for revert: Speculative rollback (breaks WebKit Linux Leak)
>
> Original change's description:
> > Remove deprecated ByteBufferReader and ByteBufferWriter functions
> >
> > This completes the conversion of ByteBufferReader and ByteBufferWriter
> > to uint8_t.
> >
> > No-Try: True
> > Bug: webrtc:15661
> > Change-Id: I4152a8a4fd2462282d4107b3c2eed19acc8b29b0
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331640
> > Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> > Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#41403}
>
> Bug: webrtc:15661, chromium:1513059
> Change-Id: I3938b8209f5cc1596307deadac157a8f6c2b2253
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331940
> Owners-Override: Mirko Bonadei <mbonadei@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@{#41411}

Bug: webrtc:15661, chromium:1513059
Change-Id: I702c695ba0f83bba5721b18ebd994435a8932c0a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331980
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41419}
2023-12-20 07:48:54 +00:00
Mirko Bonadei
ca58f0eb9d Revert "Remove deprecated ByteBufferReader and ByteBufferWriter functions"
This reverts commit e0e03ba73a.

Reason for revert: Speculative rollback (breaks WebKit Linux Leak)

Original change's description:
> Remove deprecated ByteBufferReader and ByteBufferWriter functions
>
> This completes the conversion of ByteBufferReader and ByteBufferWriter
> to uint8_t.
>
> No-Try: True
> Bug: webrtc:15661
> Change-Id: I4152a8a4fd2462282d4107b3c2eed19acc8b29b0
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331640
> Commit-Queue: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41403}

Bug: webrtc:15661, chromium:1513059
Change-Id: I3938b8209f5cc1596307deadac157a8f6c2b2253
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331940
Owners-Override: Mirko Bonadei <mbonadei@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@{#41411}
2023-12-19 08:20:40 +00:00
Harald Alvestrand
e0e03ba73a Remove deprecated ByteBufferReader and ByteBufferWriter functions
This completes the conversion of ByteBufferReader and ByteBufferWriter
to uint8_t.

No-Try: True
Bug: webrtc:15661
Change-Id: I4152a8a4fd2462282d4107b3c2eed19acc8b29b0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331640
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41403}
2023-12-18 13:41:44 +00:00
Harald Alvestrand
f0ddae8c22 Convert ByteBufferWriter to be type uint8_t
and make follow-on changes.

Bug: webrtc:15665
Change-Id: Ice646f88ba5a09d6a8d9ce70415d8a14d7050d3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329781
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41393}
2023-12-15 12:27:50 +00:00
Mirko Bonadei
6c9c958c69 Revert "Unify access to SDP codec parameters"
This reverts commit 63d03f586b.

Reason for revert: Breaks downstream project (not backwards compatible API change)

Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
>   std::map<std::string, std:string>
> with three aliases,
>   cricket::CodecParameterMap
>   SdpAudioFormat::Parameters
>   SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}

Bug: None
Change-Id: I841735d98533d3b66850b9cfcf7ee0a99ddde078
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331400
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41377}
2023-12-13 16:28:44 +00:00
Philipp Hancke
63d03f586b Unify access to SDP codec parameters
which come from the a=fmtp:<pt> lines in the SDP and were used as either
  std::map<std::string, std:string>
with three aliases,
  cricket::CodecParameterMap
  SdpAudioFormat::Parameters
  SdpVideoFormat::Parameters

Use webrtc::CodecParameterMap in all places.

BUG=None

Change-Id: If47692bde7347834c349c6539b43309d8770e67b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41375}
2023-12-13 14:22:15 +00:00
Qiu Jianlin
b3488d08db Add SDP negotiation support for HEVC.
This adds neccessary checks for SDP negotiation with HEVC.

Test: Manually apply the CL on Chromium and enable HEVC HW encoder,
and add HEVC profiles in rtc video decoder/encoder factory, H265 is
negotiated in SDP with correct FMTP lines added.

Bug: webrtc:13485
Change-Id: I5557b20b646cc96c5acb578521204fe10df0dcf0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330202
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Cr-Commit-Position: refs/heads/main@{#41357}
2023-12-12 02:09:11 +00:00
Per K
86b1cf776e Allow configuring pacer burst through RtcConfiguration
This allow exernal applications to control how many packets can be sent relative current BWE.

This is a partial revert of https://webrtc-review.googlesource.com/c/src/+/311102

Bug: chromium:1354491
Change-Id: Ia236aaacc468ddac12341efa555041bb2dfdde62
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330580
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41343}
2023-12-08 15:35:09 +00:00
Danil Chapovalov
151003d341 Deprecate RtcEventLogFactory constructor taking unused parameter
Bug: webrtc:15656
Change-Id: I22ed4cca4c0ce7ebf9c533ed7434617bf0a0f4a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330120
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41338}
2023-12-07 21:46:56 +00:00
Henrik Boström
65bee96054 Delete old "metronome" name, API users should use "decode_metronome".
Now that Chromium has migrated to the new name[1], "decode_metronome",
we can delete the variable with the old name, "metronome".

[1] https://chromium-review.googlesource.com/c/chromium/src/+/5093942

Bug: webrtc:15704
Change-Id: I50fef88a692d83e37af10956b2e12389fa601662
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330300
Reviewed-by: Markus Handell <handellm@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41331}
2023-12-07 08:04:32 +00:00
Danil Chapovalov
abd7814e47 Pass Clock through Environment when constructing Call
while cleaning up Call factory function,

- pick rtp_transport_controller_send_factory based on presence in the config instead of based on the call site thus removing one extra factory function.

- when Call is created through test helper TimeControllerBasedFactory use original media factory instead of direct factory, thus allow to configure degraded call through field trials in tests, and ensure difference with production code path stay minimal in the future.

Bug: webrtc:15656
Change-Id: If9c2a9fc871e139502db2bec0a241d8d64c53720
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330061
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41329}
2023-12-06 19:13:39 +00:00
Danil Chapovalov
3d9c3687a4 Delete CallFactoryInterface as no longer needed
Replace CallFactory class with a factory function

Bug: webrtc:15574
Change-Id: Ib1d8cff8d7550da3af01693a7bc117a7bd342258
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330000
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41321}
2023-12-05 15:44:43 +00:00
Jeremy Leconte
242ed95fd7 Add a FieldTrialsView argument to the NetworkEmulationManager ctor.
Change-Id: Ic4acd04aef9e9f6185d045bc300d8dbea50759fd
Bug: b/314891512
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330001
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#41320}
2023-12-05 15:23:01 +00:00
Henrik Boström
f887e07234 Rename "metronome" to "decode_metronome".
In preparation for experimentally supporting different types of
metronomes and metronome use cases we'd like to rename for clarity.

This is the first step, which introduces the new name and prefers it if
it is set, but keeps the old name for backwards compat reasons.

Once Chromium has migrated to the new name, we can delete the old name.

Bug: webrtc:15704
Change-Id: I23077bf2415ebb2b2338320c9a14e3bd17d3abb6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330020
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41319}
2023-12-05 15:00:54 +00:00
Rashad Sookram
2bfff4ea6d
Revert changes to enable echo detection 2023-12-04 17:15:35 -05:00
Danil Chapovalov
fe66dda733 Delete deprecated call_factory and media_engine
from PeerConnectionFactoryDependencies

Bug: webrtc:15574
Change-Id: Id0ead8086ddd41f6792e2a3c224d8705cd797d49
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326003
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41309}
2023-12-04 14:42:44 +00:00
Danil Chapovalov
623bcd7daa Delete deprecated CreateTimeControllerBasedCallFactory
Bug: webrtc:15574
Change-Id: Icd7479f1d7cb3db76662b9e3e65e2d87ff249bef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326240
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41305}
2023-12-04 11:28:55 +00:00
Danil Chapovalov
2ca1d0f809 Delete legacy RtcEventLogFactory Create functions
All usage was migrated to the latest variant of the Create function that takes the Environment paramter.

Bug: webrtc:15656
Change-Id: I2fb2bf4bc4a858d69adc64c2804c1bd830011f10
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329440
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41302}
2023-12-03 11:10:35 +00:00
Björn Terelius
c0eac979ca Revert "Add the java proto options in metrics set proto."
This reverts commit f665f7faf4.

Reason for revert: Speculative revert due to downstream breakages

Original change's description:
> Add the java proto options in metrics set proto.
>
> Bug: b/279024829
> Change-Id: Ib1604465dad1cd8b2b1198d53aa5d75191e56e2d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329220
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Manashi Sarkar <manashi@google.com>
> Cr-Commit-Position: refs/heads/main@{#41288}

Bug: b/279024829
Change-Id: I3329081de58f6e42c4bf1cb03c7d706cb3f12e64
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329400
Auto-Submit: Björn Terelius <terelius@webrtc.org>
Owners-Override: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41292}
2023-11-30 19:57:51 +00:00
Harald Alvestrand
24510d43dc Delete deprecated AsyncResolver and related classes
To be submitted after downstream usage has been removed, but no earlier than December 1, 2023.

Bug: webrtc:12598
Change-Id: Id9acbac591c48c0c5883fe8f06cf6a68471b70f0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323004
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41290}
2023-11-30 15:36:55 +00:00
Manashi Sarkar
f665f7faf4 Add the java proto options in metrics set proto.
Bug: b/279024829
Change-Id: Ib1604465dad1cd8b2b1198d53aa5d75191e56e2d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329220
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Manashi Sarkar <manashi@google.com>
Cr-Commit-Position: refs/heads/main@{#41288}
2023-11-30 14:15:41 +00:00
Danil Chapovalov
1a82d31cb5 Add RtcEventLogFactory::Create variant that uses Environment
With intent to delete previous versions of the Create functions.

Bug: webrtc:15656
Change-Id: I972377701becca21b8ecfe15d41a10a4248f87ec
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328420
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41275}
2023-11-29 13:22:32 +00:00
Danil Chapovalov
db329edf40 Document Enviroment is preferred as 1st parameter
No-Try: true
Bug: webrtc:15656
Change-Id: I82a642b8a558bad8c3264ab830ff07aea3584c98
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/329022
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41258}
2023-11-28 10:53:39 +00:00
Danil Chapovalov
680f103baa Use Environemnt in MedaFactory::CreateMediaEngine
to propagate field trials and task queue factory

Bug: webrtc:15656
Change-Id: I2d19e169d2ff1cc871899a0e96b1733333fdc604
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328881
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41257}
2023-11-28 10:30:15 +00:00
Per K
b202bc1db2 Per default set PacingController burst interval to 40ms
PacingController per default use a burst interval of 40ms. The behaviour can still be overriden by  using the method SetSendBurstInterval.

Bug: chromium:1354491
Change-Id: Ie3513109e88e9832dff47380c482ed6d943a2f2b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311102
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41254}
2023-11-28 07:53:50 +00:00
Danil Chapovalov
9fdceb80b5 Add environment_construction poison
This poison guards against accidental use of EnvironmentFactory and thus ensures low level WebRTC class would use utilities from propagated environment instead of accidentally using a default implementation.

This poison extends and thus replaces default task queue poison.

Bug: webrtc:15656
Change-Id: I577bef8af08b9c7dd649ad5a2284eb236e6f4a8f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/328380
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41247}
2023-11-27 11:44:50 +00:00
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