230 Commits

Author SHA1 Message Date
Philipp Hancke
7233df9751 Filter fmtp parameters from RED capabilities
and ensure there is only one, similar to what is done with RTX.
This avoids exposing a payload type there.

See also
  https://github.com/w3c/webrtc-pc/issues/2696

BUG=webrtc:42221750,webrtc:360058654

Change-Id: Id7c2ddeaf47a3169db9be43c9c5b8e59346f1d57
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376760
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43929}
2025-02-19 09:43:31 -08:00
Evan Shrubsole
418a8c2c83 Move string_format.h to webrtc namespace
Bug: webrtc:42232595
Change-Id: I208257358150eeb97304946929649414af5eb2ca
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/377542
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43915}
2025-02-18 06:34:45 -08:00
Henrik Boström
fe25b0e928 Report 'outbound-rtp.targetBitrate' correctly and per-RTP stream.
This CL fixes two issues with the old way targetBitrate was reported:
1. The target is per encoder, i.e. per SSRC, but the old way to report
   it was per sender and was approximately the sum of all encodings'
   targetBitrate in most cases.
2. The old value did not come directly from the VideoBitrateAllocation
   and tended to be greater than the sum of all targets (don't know
   why).

We know the old value was wrong and the new value correct because
the actual bytes produced by the encoder closely matches the configured
target, which wasn't always the case with the old metric implementation.

Tested with unit tests and manually in Chrome by going to
https://henbos.github.io/codec-quality/src/index.html and ensuring
target ~= actual bytes produced. It also matches the debug logging of
video_stream_encoder.cc.

Bug: webrtc:42225524, chromium:392424845
Change-Id: I7a6f69e053ebc3fd972c2c4b7712750e721c0acc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/376460
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43854}
2025-02-06 09:55:11 -08:00
Philipp Hancke
e828c6dba3 red: remove hardcoded parameters in favor of taking them from the codec
and make it less opus-specific.

BUG=None

Change-Id: I6fe2975ba6e45a3758fedc5b950de90e8d9df362
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375436
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43846}
2025-02-04 10:28:30 -08:00
Boris Tsirkin
256d828aac Format /media folder
Formatting done via:

git ls-files | grep -E '^media\/.*\.(h|cc|mm)' | xargs clang-format -i

No-Iwyu: Includes didn't change and it isn't related to formatting
Bug: webrtc:42225392
Change-Id: I7c79f10d8ac2c2e3a9f796d2ca3c542b9826683c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/373701
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43685}
2025-01-08 09:51:41 -08:00
Pete Makeev
45f58d7fcc Fixed counting of index 'send_codec_position'
For-loop has a 'continue' statement that skips increment of the index.
Added such an increment before 'continue' for the index to keep up with
the for-loop.

I guess current implementation will bug on codecs sequence like:
'red, unknown, opus'
since the subsequent for-loop (the 'red_codec' one) will not be able to
find 'opus'.
Seems like adding second increment statement is the easiest way to fix it.

Bug: None
Change-Id: Iab9cc66cf569458af9fd9ba5b938d83186c78c73
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/369700
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43488}
2024-12-03 18:17:25 +00:00
Harald Alvestrand
ad63489c58 Remove orphis from OWNERS files
also fix a few TODOs

Bug: None
Change-Id: I2d287ed1a58f71ef32d5dc5624879ae8c63348b5
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370122
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43485}
2024-12-03 15:00:21 +00:00
Tomas Lundqvist
b40c559858 Set voice RTCP mode based on the RemoteContent and not based on the LocalContent.
The RTCP mode is a send property for both send and receive channels. Send properties should be configured based on what peers support/prefer, which is described by the remote description (content).


Bug: webrtc:340041654
Change-Id: I18cd59e98aecfbbd8f4919b98381836184c10d77
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368980
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Lundqvist <tomasl@google.com>
Cr-Commit-Position: refs/heads/main@{#43449}
2024-11-25 14:06:39 +00:00
Harald Alvestrand
752235261e Remove all references to codec-level transport-cc functions and flags.
This seems to have no effect on tests, so it appears that these were
not used after all.
The goal is to make transport-cc a media-section-level attribute.

Bug: webrtc:378698658
Change-Id: Ia20ca5b91472b02db30f911ad1a1892cf36cd682
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/368440
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43411}
2024-11-18 10:20:01 +00:00
Dor Hen
a154b73097 Comment unused variables in implemented functions 11\n
Bug: webrtc:370878648
Change-Id: Ic31d7744cc8516e4c014bc044fbe2dba9e4d835b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/366525
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Dor Hen <dorhen@meta.com>
Cr-Commit-Position: refs/heads/main@{#43328}
2024-10-29 17:25:36 +00:00
Olov Brändström
558c2dc539 Change timestamps type from int64 to Timestamp in MediaReceiverInfo.
We should use the Timestamp type, rather then int64, to store timestamps. In https://webrtc-review.googlesource.com/c/src/+/365001/ an additional int64 timestamp was added (last_sender_report_timestamp_ms).

This CL fixes the new timestamp, as well as other similar timestamps in MediaReceiverInfo (last_sender_report_utc_timestamp_ms and last_sender_report_remote_utc_timestamp_ms).

Bug: webrtc:372393493
Change-Id: I0e473730e85a69ec595b421e2c3db920364008eb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365641
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43248}
2024-10-16 11:02:37 +00:00
Olov Brändström
51b682648e Add an environment clock timestamp to SenderReportStats.
Add an environment clock timestamp to SenderReportStats and make it visible in rtc_stats_collector.cc. This make it possible to use the pc->GetConfiguration().stats_timestamp_with_environment_clock() flag to decide which timestamp to use when creating a RTCRemoteOutboundRtpStreamStats object.

This CL is the third (and possible the last) of a series of CLs that aim to replace the UTC timestamps in RTCStats objects to Environment clock timestamps. The other CLs where https://webrtc-review.googlesource.com/c/src/+/363946 and https://webrtc-review.googlesource.com/c/src/+/364782.

When Chromium and Google internal uses of RTCStats are updated to set the stats_timestamp_with_environment_clock configuration, the flag can be deleted.

Bug: chromium:369369568
Change-Id: Ic0b07d7b012505267bd6516f19a9ba90df4cafab
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/365001
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43206}
2024-10-09 12:59:08 +00:00
Olov Brändström
b9c4c242d4 rename timestamps to show epoch
I missed one timestamp in https://webrtc-review.googlesource.com/c/src/+/363946, meaning that the config flag that was added do not yet work for all timestamps in RTCStats objects. The RTCRemoteOutboundRtpStreamStats still has UTC timestamps even if the config flag is set.

I will solve this by saving both an UTC (existing) and env (to be added) timestamp, and then let rtc_stats_collector choose timestamp based on the value of the config flag (just like RTCRemoteInboundRtpStreamStats is done in the 363946 commit).

Before adding the new env_ timestamp I want to make this change. I rename the existing timestamp to show what epoch it uses (NTP or UTC). This will later make it clear which timestamp is which.

So this CL will make no logical change, just renaming members.

I only need to rename the last_sender_report_timestamp_ms, but opted to rename the remote timestamp as well, to be consistent with the naming convention I add in this CL.

Bug: chromium:369369568
Change-Id: Icfe7cf274995b39799e1478a1bb8cdf5134f0b16
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364782
Commit-Queue: Olov Brändström <brandstrom@google.com>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43194}
2024-10-08 16:27:58 +00:00
Harald Alvestrand
e2952a058e Eliminate a pointless IsEnabled helper
Makes code easier to read.

Bug: None
Change-Id: I736f1a152101264184c3d7b1c7a72d1a3b022147
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362962
Reviewed-by: Emil Lundmark <lndmrk@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43051}
2024-09-19 13:38:35 +00:00
Harald Alvestrand
97c594fafe Add field trial for late PT allocation
Note: Does not include code for the actual late allocation
of PTs.

Bug: webrtc:360058654
Change-Id: Iaa6bd2db2f974aad84fe1ae9c1aca5aea5d1d25e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/362320
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43014}
2024-09-12 14:42:27 +00:00
Harald Alvestrand
dc56a36ff8 Use PayloadTypePicker in WebRtcVoiceEngine
This entails passing in a PayloadTypeSuggester as a dependency. PT suggesting is still done according to the old method, but with new code.

Bug: webrtc:360058654
Change-Id: I12a7d2aa6aa482fb62ff3dfb34b9761ebb7dddef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361200
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42989}
2024-09-09 18:44:21 +00:00
Harald Alvestrand
927244db7e Set MID in AudioReceiveChannel
This variable was present but unset.

Bug: webrtc:360058654
Change-Id: I492069a1e87208c6fbb5ad5f0a00fcc2ccc0bc25
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361824
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42988}
2024-09-09 17:58:33 +00:00
Florent Castelli
c5b9a609ea Propagate environment to RtpSenders
Will be later used to conditionally enable mixed codec simulcast
with a field trial.

Bug: webrtc:42220378
Change-Id: I527a488c04cd2b5a9f4ec703504b67943e966ab0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361403
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42929}
2024-09-03 11:56:22 +00:00
Florent Castelli
8037fc6ffa Migrate absl::optional to std::optional
Bug: webrtc:342905193
No-Try: True
Change-Id: Icc968be43b8830038ea9a1f5f604307220457807
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361021
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42911}
2024-09-02 12:16:47 +00:00
Jesús de Vicente Peña
fc6df056b6 Computing and propagating the audio stats totalprocessingdelay.
Bug: webrtc:344347965
Change-Id: Id7dd74ef085338d14582dcc0db98508d365301e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/352680
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42507}
2024-06-18 08:05:28 +00:00
Philipp Hancke
bad99ab253 RTCP: implement reduced size RTCP for audio
reduced-size RTCP, i.e. not prefixing RTCP packets with either a sender report or receiver report has been implemented for a long time but only for video.

This CL adds it for audio as well. This reduces the size of audio NACKs (16 bytes, typically one NACK per packet) sent by not prefixing it with a receiver report (32 bytes).
Other packets are not affected as e.g. transport-cc feedback does not add a RR even though that is technically required.

The effect on NACK can be tested by running Chromium with
  --disable-webrtc-encryption --force-fieldtrials=WebRTC-FakeNetworkReceiveConfig/loss_percent:5/
against this fiddle negotiating audio nack:
https://jsfiddle.net/fippo/8ubtLnfx/1/

BUG=webrtc:340041654

Change-Id: I06fb94742ff1b6f9a464c404bfc53913f23498d8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350269
Commit-Queue: Philipp Hancke <phancke@meta.com>
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42330}
2024-05-16 18:24:10 +00:00
Harald Alvestrand
d78e30e00b Deprecate cricket::VideoCodec and cricket::AudioCodec
These are aliases for cricket::Codec.
Also remove internal usage

Bug: b/42225532
Change-Id: I220b95260dc942368cb6280432a058159eec8700
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349321
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42194}
2024-04-29 16:24:51 +00:00
Florent Castelli
0afde7614d Move webrtc::AudioProcessing include to api/ folder
Bug: webrtc:15874
Change-Id: Ie8a6e031c0f0505cfe238f7d252c47e9c34408d4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347983
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42128}
2024-04-20 07:02:50 +00:00
Philipp Hancke
cea1c0b9a9 Dynamically assign ids to header extensions not enabled by default
by creating an id collision and letting UsedIds resolve it.

Also avoid id=15 which is forbidden by
  https://www.rfc-editor.org/rfc/rfc8285#section-4.2
so might cause interop issues in offers to implementations
not supporting two-byte extensions.

BUG=webrtc:15378

Change-Id: I27926f065f8e396257294da7acf2be9802169805
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319280
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41696}
2024-02-08 12:52:58 +00:00
Danil Chapovalov
e052eee7a3 Deprecate rtc::TaskQueue variant of AudioProcessing::CreateAndAttachAecDump
Bug: webrtc:14169
Change-Id: I63f40ec18b72cba89eb0b9b298f448ce7f7c4634
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/334201
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41528}
2024-01-15 13:36:35 +00:00
Philipp Hancke
601ac2eea8 Reject offer content with no common codecs
instead of throwing an error when trying to pick a send codec.

BUG=webrtc:15145,webrtc:4957

Change-Id: I056b145c093348576e1aeaf5def50d5414f2de70
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330122
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sam Zackrisson <saza@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41360}
2023-12-12 10:04:59 +00:00
Emil Lundmark
f268afd791 Remove unused propagation of field trials in Codec::Matches
Bug: None
Change-Id: I7e56bae37a7fd9f8ca9c3bb8c8f55631a19a1a00
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/326521
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41152}
2023-11-14 08:14:14 +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
Björn Terelius
efeeba0864 Try removing RTC_PUSH_IGNORING_WUNDEF() around proto includes
Bug: webrtc:15623
Change-Id: Ia184993769f74d51e68a5a536d5fdde26890bcfd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/325481
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41058}
2023-11-01 08:21:05 +00:00
Florent Castelli
1adea9806d Return error when requested codec is preferred but not negotiated
Because of our asymmetrical codec situation, it's possible to have
send only codecs that we cannot negotiate even with ourselves.
This means that we should not have a DCHECK, but just a plain error.

Bug: webrtc:15064
Change-Id: I0c170e5c7f356197bcb04bcecb8259c344423ccb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/323183
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40939}
2023-10-16 13:59:13 +00:00
Palak Agarwal
af74dff19e Allow streams to be sent without |source_| being initially set
This makes it consistent with how things are done in webrtc_video_engine.cc

This will improve the JS code by not having to initialize an audio
track every time frames need to be sent over, especially from another
peer connection in case of encoded transforms.

Bug: chromium:1477192
Change-Id: I3f938ad812ff377599a3799d4c2d2cd85149189e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/322702
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tony Herre <herre@google.com>
Commit-Queue: Palak Agarwal <agpalak@google.com>
Cr-Commit-Position: refs/heads/main@{#40917}
2023-10-12 10:08:26 +00:00
Florent Castelli
bbc7711878 Reduce log verbosity in codec selection implementation
Bug: webrtc:15064
Change-Id: I42a68987842d970437a0e00f318e2a97a80829e8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/321700
Auto-Submit: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40825}
2023-09-28 07:57:06 +00:00
Philipp Hancke
5866e1a0ed Rename Set(Send|Recv)Parameters Set(Sender|Receiver)Parameters
following the previous change to rename the classes derived from
  cricket::RtpParameters

Also rename ChangedRecvParameters to ChangedReceiveParameters.

BUG=webrtc:13931

Change-Id: Ia51dd39905a5cbb98162c3948930e43ccaf3786d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314500
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@{#40677}
2023-09-01 08:12:55 +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
Philipp Hancke
a9d5141367 Rename cricket::RtpParameters and derived classes
Renames
  cricket::RtpParameters
to
  cricket::MediaChannelParameters
in order to distinguish it better from webrtc::RtpParameters.
This involves renaming
  RtpSendParameters -> SenderParameters
  AudioSendParameters -> AudioSenderParameters
  AudioRecvParameters -> AudioReceiverParameters
  VideoSendParameters -> VideoSenderParameters
  VideoRecvParameters -> VideoReceiverParameters

BUG=webrtc:13931

Change-Id: I664595ee3863418c0c6ca092ca77127be0f9498f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314360
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@{#40497}
2023-08-01 08:55:02 +00:00
Florent Castelli
d797cb6ca7 Remove all split channels related code
Bug: webrtc:13931
Change-Id: I93b8ca0ba1ec15bf260236bbc914b41fbb30aa58
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310680
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40376}
2023-06-29 09:32:04 +00:00
Harald Alvestrand
84fdf990e8 Convert Media*Channel to contain a webrtc::Transport
Media*Channel objects used to subclass webrtc::Transport.
This was not an optimal design. This CL makes the transport
a member variable of MediaChannelUtil.

Bug: None
Change-Id: I85d33cc1b32b931e563b7bb2d277f1c512600831
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309800
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40328}
2023-06-21 16:13:55 +00:00
Florent Castelli
ee97e6ad88 Move GetSendCodec() to MediaSendChannelInterface
This allows the voice send channels to share the method definition.

Bug: webrtc:15214
Change-Id: Ie0cc23f3694eeb8322a9ea7328a8d56fa7571c95
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/309600
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40322}
2023-06-21 10:00:56 +00:00
Florent Castelli
213090bf4b Add AbsoluteCaptureTime RTP extension to supported list in engines.
Added as stopped by default as it should be requested by the application,
but it should be listed as available.

Bug: webrtc:14631
Change-Id: I301cfd29c79083c97b4a43b8fdafee2dbe4887a5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308824
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40300}
2023-06-16 11:08:48 +00:00
Harald Alvestrand
c0e2418df0 Sort WebRtcAudio{Send,Receive}Channel implementation
into separate sections for each implemented class.

Bug: webrtc:13931
Change-Id: I600f49f3fb195761d13d304f112f36c7c62689df
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/308120
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40260}
2023-06-12 16:04:30 +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
Harald Alvestrand
77c6230ef5 Add create functions for voice media send and receive channels.
Bug: webrtc:13931
Change-Id: I1aa0cd1651a50bde1c8d1ceccc69b2a124c81294
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307840
Reviewed-by: Tony Herre <herre@google.com>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40224}
2023-06-05 17:39:53 +00:00
Harald Alvestrand
2f0c0787b9 Split WebRtcVoiceChannel into Send and Receive classes
No-Try: true
Bug: webrtc:13931
Change-Id: I947879aeef244e721546f765b64b9a8f1544409a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307740
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40220}
2023-06-05 12:16:10 +00:00
Danil Chapovalov
54e95bc562 Propagate time of the last received packet with Timestamp type
Bug: webrtc:13757
Change-Id: I446fc10ad6a90ab9ecaac337b9f2ad4ccad37cbd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307020
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40211}
2023-06-02 14:29:19 +00:00
Harald Alvestrand
9a34d80fc4 Apply the "shim" pattern for WebRtcVoiceEngine
This ensures that the MediaChannel interface is only implemented
through a send/receive shim, splitting channels also when kBoth is
used.

Bug: webrtc:13931
Change-Id: Ie97809597eaae7b4f504939339795432c34e56cb
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307461
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40210}
2023-06-02 13:56:43 +00:00
Harald Alvestrand
4ad141e69b Add callback for send codec in audio too
It turns out there's a similar linkage as the one for video.
Tests are coming in https://webrtc-review.googlesource.com/c/src/+/307461

Bug: webrtc:13931
Change-Id: I638d1a1907116a71481aa88dce932492323ae5b7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307463
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40206}
2023-06-02 11:31:00 +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
Harald Alvestrand
4858a0d9d8 Add test for split-mode SSRC callback
And fix bug that prevented it from passing.

Bug: webrtc:13931
Change-Id: I6cbc8e3aad704f6f7e33362efb7ec589ca6e6568
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306184
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40112}
2023-05-23 07:56:57 +00:00
Harald Alvestrand
13897e67c8 Change SSRC-passing for MediaChannel from external to callback
This makes the handling somewhat more uniform, and is the same
for both video and audio channels.

Bug: webrtc:13931
Change-Id: I26605c56e069e8a34e03708d45eb27a6b7492130
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306100
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40107}
2023-05-22 14:33:59 +00:00
Philipp Hancke
6a7bf10d60 Replace "rcvd" with "received" for readability
following guidance in
  https://google.github.io/styleguide/cppguide.html#General_Naming_Rules

BUG=None

Change-Id: I105591a7f709d65a3d3320f7f44137d432cf7ce0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302282
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39937}
2023-04-24 15:30:07 +00:00