Commit graph

2901 commits

Author SHA1 Message Date
philipel
b85b4c0f29 Reland "New video encoder API."
This reverts commit 56e6309749.

Reason for revert: Preparing for reland

Original change's description:
> Revert "New video encoder API."
>
> This reverts commit 42f12d5183.
>
> Reason for revert: tests fails downstream
>
> Original change's description:
> > New video encoder API.
> >
> > Also initial implementation wrapping the libaom AV1 encoder.
> >
> > Note that for now this is intended for prototype purposes.
> >
> > Bug: none
> > Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
> > Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> > Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#42108}
>
> Bug: none
> Change-Id: I927260353afb91df6c7650364baee4f13a098efd
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347883
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Owners-Override: Philip Eliasson <philipel@webrtc.org>
> Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42111}

Bug: none
Change-Id: Ib72ef5359ead697d27301e2ca2408e8b27165931
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/349001
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42172}
2024-04-25 08:19:16 +00:00
Harald Alvestrand
b0e7057e1b Introduce the TransformerHost interface
This is the first step in implementing custom codecs in SDP.

Bug: none
Change-Id: I7789478208a769eaefd58b410ae6f488c604594d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348662
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Tony Herre <herre@google.com>
Cr-Commit-Position: refs/heads/main@{#42171}
2024-04-25 07:54:28 +00:00
Danil Chapovalov
2a66531b28 Delete deprecated CreateVideoEncoderSoftwareFallbackWrapper
Bug: webrtc:15860
Change-Id: I26e6401a4d56f19e059ae8cd69d75d2cdee3db94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347740
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@google.com>
Cr-Commit-Position: refs/heads/main@{#42165}
2024-04-24 19:07:56 +00:00
Markus Handell
fffd489d2e Add VideoFrameBuffer::storage_presentation.
This CL adds tracing support for input video frame representation
which was useful in debugging the linked bug.

Bug: b/328533258
Change-Id: I8a9e533b11d99688a71a24138bf8058b841e55d0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348841
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Stefan Holmer <holmer@google.com>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42155}
2024-04-23 16:24:37 +00:00
Florent Castelli
f4673f97ed Move webrtc::AudioDeviceModule include to api/ folder
Bug: webrtc:15874
Change-Id: I5bdb19d5e710838b41e6ca283d406c9f1f21286b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/348060
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42137}
2024-04-22 08:56:31 +00:00
Tommi
f54e0133d7 Remove deprecated ProxyInfo code
Bug: none
Change-Id: I82d3ee97927031d974e2ef657312101dd910eff4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347620
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42136}
2024-04-22 08:38:36 +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
Danil Chapovalov
56e6309749 Revert "New video encoder API."
This reverts commit 42f12d5183.

Reason for revert: tests fails downstream

Original change's description:
> New video encoder API.
>
> Also initial implementation wrapping the libaom AV1 encoder.
>
> Note that for now this is intended for prototype purposes.
>
> Bug: none
> Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42108}

Bug: none
Change-Id: I927260353afb91df6c7650364baee4f13a098efd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347883
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Owners-Override: Philip Eliasson <philipel@webrtc.org>
Auto-Submit: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42111}
2024-04-18 13:06:36 +00:00
philipel
42f12d5183 New video encoder API.
Also initial implementation wrapping the libaom AV1 encoder.

Note that for now this is intended for prototype purposes.

Bug: none
Change-Id: Iac42ca4aecb6a204601c9f00bfb300e3eda3c4f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306181
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42108}
2024-04-18 08:24:18 +00:00
Joachim Reiersen
a341fe31d4 Remove deprecated accessors for audio_level in RTPHeaderExtension
Bug: webrtc:15788
Change-Id: I0247e19edf89ed2212b93227c05136b87d56d8d3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347760
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Joachim Reiersen <joachimr@meta.com>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42101}
2024-04-17 15:41:59 +00:00
Tommi
db6767dd0c Remove more ProxyInfo references.
This removes many references to the unsupported ProxyInfo struct
but leaves temporary implementations for methods while downstream
code gets updated.

Bug: none
Change-Id: Iab4410b362a8296b2e00cf71080010e515f9f4ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344660
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42096}
2024-04-17 11:55:00 +00:00
Per K
fb61154da1 Reland "Ignore allocated bitrate during initial exponential BWE."
This reverts commit 501c4f37bf.

Patch set 1 contains pure reland.

The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
That is the, initial probe will try to probe up to the max configured bitrate.

Bug: webrtc:14928
Change-Id: I6a8660da20ac54237f04a29461e03b31bd988bb0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347643
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Erik Språng <sprang@google.com>
Owners-Override: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42086}
2024-04-16 15:34:49 +00:00
Harald Alvestrand
3997df3f28 Add an apply-include-cleaner tool
Since iwyu is now deprecated, we need to enable use of include-cleaner.
This approach gives some error messages when running, but does the job.

Bug: webrtc:15874
Change-Id: I431deef0f2e5ce99eb256a4d82aa32769ae58b41
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347642
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42085}
2024-04-16 13:17:03 +00:00
Per Kjellander
501c4f37bf Revert "Ignore allocated bitrate during initial exponential BWE."
This reverts commit 33cc83595a.

Reason for revert: Perf bots showed that this cl cause a change in metrics. It looks like it is for the better, but we want this to be behind a field trial. 

Original change's description:
> Ignore allocated bitrate during initial exponential BWE.
>
> The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
> That is the, initial probe will try to probe up to the max configured bitrate.
>
> ProbeController::SetFirstProbeToMaxBitrate will allow the first probe to
> continue up to the max configured bitrate, regardless of of the max
> allocated bitrate.
>
> Bug: webrtc:14928
> Change-Id: I6e0ae90e21a78466527f3464951e6033dc846470
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346760
> Reviewed-by: Diep Bui <diepbp@webrtc.org>
> Commit-Queue: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#42049}

Bug: webrtc:14928
Change-Id: I56ba58560b6857b6069552c02df822691f7af64d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347622
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Owners-Override: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42081}
2024-04-16 09:50:37 +00:00
Qiu Jianlin
9c95a4f704 Helper API for codec factories to calculate supported H.265 levels.
This expose a new GetSupportedH265Level API for WebRTC external
factories to calculate H.265 levels to be use for SDP negotation.

Bug: webrtc:13485
Change-Id: Ib420da2b9b1b7af00129294be5b3efec172e8faf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345544
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42079}
2024-04-16 09:23:58 +00:00
Danil Chapovalov
3a92ae992e Delete deprecated variants of the GoogCcNetworkControllerFactory
Bug: None
Change-Id: I31a3672300487329e1bb93b6fa1cb1d9aeffcb4b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/347600
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42077}
2024-04-16 08:10:50 +00:00
Wan-Teh Chang
7167c6fec9 Add Type::kI410 to comment for PlanarYuv16BBuffer
Bug: None
Change-Id: I9b72577a0bc33316fbf4789b5509cf09976db77d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346710
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42068}
2024-04-15 14:51:47 +00:00
Danil Chapovalov
bdfcaba85b Propagate field trials to VideoEncoderSoftwareFallbackWrapper with Environment
Bug: webrtc:15860
Change-Id: Ief6a2eeab1713a371bc0350f6bdb5a18fb01945b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345660
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42051}
2024-04-12 12:47:10 +00:00
Per K
33cc83595a Ignore allocated bitrate during initial exponential BWE.
The reason why we want to do this is  because audio can allocate a needed bitrate before video when starting a call, which may lead to a race between the first probe result and updating the allocated bitrate.
That is the, initial probe will try to probe up to the max configured bitrate.

ProbeController::SetFirstProbeToMaxBitrate will allow the first probe to
continue up to the max configured bitrate, regardless of of the max
allocated bitrate.

Bug: webrtc:14928
Change-Id: I6e0ae90e21a78466527f3464951e6033dc846470
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346760
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42049}
2024-04-12 09:13:44 +00:00
Danil Chapovalov
4dfe7ea5af Delete legacy VideoEncoderFactory::CreateVideoEncoder
Bug: webrtc:15860
Change-Id: I892aeba67a4ea3be6d6551ff2dc88faaca0c7bd9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342940
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42033}
2024-04-10 17:11:34 +00:00
Per K
91b1cfbfa0 Fix visiblity of target test_feedback_generator_interface
It is a public interface and must be visible to allow tests to include the header file.

Bug: none
Change-Id: I4e6322c622f62c018b274b751e2c395eed7816e4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/346520
Reviewed-by: Jakob Ivarsson‎ <jakobi@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42027}
2024-04-09 16:21:22 +00:00
Per K
6aa115ffbb Remove unused TransportPacketsFeedback.first_unacked_send_time and prior_in_flight
Bug: none
Change-Id: Iabb5911a91e2d1ccfe7160cdfc83896a8960dab6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345940
Reviewed-by: Diep Bui <diepbp@webrtc.org>
Auto-Submit: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Diep Bui <diepbp@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42006}
2024-04-05 14:01:55 +00:00
Jakob Ivarsson
e0f08a325a Add SSRC filter and NetEq accessor to NetEq simulator.
Bug: None
Change-Id: I6b3f9c564199d75adf5830a7d0f58aeb50674c39
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/345440
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Jakob Ivarsson‎ <jakobi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42002}
2024-04-05 10:02:38 +00:00
Johannes Kron
82598402e0 Use predefined SdpVideoFormats when returning supported formats
The predefined SdpVideoFormats were not used everywhere,
which caused a discrepancy between send/receive capabilities
for AV1. This CL solves the immediate problems by making sure
send/receive capabilities for AV1 are reported the same way.

Fixed: chromium:331565934
Change-Id: I073091b7b5f987c7f434c17276fd84047ec723c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344681
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41991}
2024-04-03 15:13:11 +00:00
Danil Chapovalov
71566bc802 In VideoEncoderFactoryTemplate pass webrtc::Environment to individual traits
Bug: webrtc:15860
Change-Id: I8727491e60247433db4753678c69d16b8a1d5a72
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343781
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41990}
2024-04-03 15:07:42 +00:00
David Benjamin
abf1e0bd40 Replace a memcpy with std::copy_n
memcpy has a bug where it doesn't work with empty slices whose pointer
is null. C++ functions in <algorithm> have this bug fixed and, in a good
STL, will specialize down to memcpy or memmove anyway.

This fixes a bunch of UBSan failures in Chromium, such as
https://luci-milo.appspot.com/ui/inv/build-8752767322372882913/test-results?q=RTCEncodedVideoFrameTest.ConstructorCopiesMetadata&sortby=&groupby=

See https://davidben.net/2024/01/15/empty-slices.html

Bug: chromium:40248746
Change-Id: Ibfb9c4d7b44df53766a16e40fabd0a374140d89c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344260
Auto-Submit: David Benjamin <davidben@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41989}
2024-04-03 12:45:57 +00:00
Tommi
d1e577dd80 Mark cricket port type constants as deprecated
...and remove remaining references to them

Bug: webrtc:15846
Change-Id: Ica41c0d3cf7bc8698749a5ddb4b8f90a0c8c1162
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343784
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41968}
2024-03-26 12:28:42 +00:00
Danil Chapovalov
c230da0f1b In IvfVideoFrameGenerator test helper allow to pass webrtc::Environment at construction
To reuse same environment in video encoder and thus avoid creating duplicated environment.

Bug: webrtc:15860, b/326933307
Change-Id: I1c56966301a9b453d615c45626407fede2a6d8b5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344143
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41956}
2024-03-22 16:39:54 +00:00
Per K
ce2b49552e Set webrtc::PacketOptions.packet_id from
RtpPacketToSend::transport_sequence_number

packed_id is set to be 64 bit to align with rtc::PacketOptions.
packet_id is only set to RtpPacketToSend::transport_sequence_number if
TransportSequenceNumber header extension is not used in order to not
change current behaviour.

Bug: webrtc:15368
Change-Id: Ia532714226421422bdb292f8dd34b175560e9dc6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/344160
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41950}
2024-03-22 11:56:57 +00:00
Joachim Reiersen
5075cb4a60 Expose AudioLevel as an absl::optional struct in api/rtp_headers.h
Start migrating away from `hasAudioLevel`, `voiceActivity`, `audioLevel` fields in RTPHeaderExtension and switch usages to a more modern absl::optional<AudioLevel> accessor instead.

The old fields are preserved for compatibility with downstream projects, but will be removed in the future.

Bug: webrtc:15788
Change-Id: I76599124fd68dd4d449f850df3b9814d6a002f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/336303
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41947}
2024-03-22 10:07:47 +00:00
Victor Boivie
cdecc4e6df Expose bufferedAmountLowThreshold
This code was extracted to make the next following CL easier to review.

This CL simply exposes the getters, setters and callbacks to set the
buffered amount low threshold on a specific SCTP stream. It will be
used in a follow-up CL, but is just boilerplate.

Bug: chromium:40072842
Change-Id: Iccd72208b369ddc252cc5886f6446b9c2ceeb0b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343360
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41943}
2024-03-21 19:59:39 +00:00
Danil Chapovalov
c03827db1b Cleanup SimulcastEncoderAdapter - require webrtc::Environment at construction time
Bug: webrtc:15860
Change-Id: I1a786fb4b04112197e49c883884fc4b30f8d13f4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343182
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41937}
2024-03-21 11:05:32 +00:00
Tommi
8ae894d924 Remove deprecated Candidate methods
Bug: webrtc:15846
Change-Id: Iba39a16f6f2b77599996af39216f41121f9b1c24
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342020
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41925}
2024-03-19 07:29:07 +00:00
Danil Chapovalov
dd28f1364b In VideoEncoderFactoryTemplate pass webrtc::Environment to individual traits when supported
Bug: webrtc:15860
Change-Id: I022887e57855c072ddfb0edaf37cd96e9fc64ea6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342981
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41909}
2024-03-15 15:23:51 +00:00
Victor Boivie
fea41f540c pc: Include SCTP queued bytes in buffered_amount
Before this change, calling buffered_amount only included what was
buffered on top of what was already buffered in the SCTP socket. With
the defaults, the SCTP socket can buffer up to 2MB of data (that is not
put on the wire) before the additional external bufferering in
SctpDataChannel will be used. The buffering that I am working on
removing completely.

Until it's removed completely, to avoid the issue reported in
crbug.com/41221056, include the bytes buffered in the SCTP socket to
what is returned when calling RTCDataChannel::buffered_amount.

This means that when this value is zero, it can be safe to know that all
bytes have been sent, but not necessarily acknowledged. And calling
close will not discard any messages.

This is a stopgap solution, but as functional as the proper solution
that removes all additional buffering. Follow-up CLs will merely improve
this solution.

Bug: chromium:41221056
Change-Id: I06edd52188d3bf13a17827381a15a4730722685a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342520
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41898}
2024-03-13 15:44:17 +00:00
Per K
0fa90887c5 Deprecate VideoFrame::timestamp() and set_timestamp
Instead, add rtp_timestamp and set_rtp_timestamp.

Bug: webrtc:13756
Change-Id: Ic4266394003e0d49e525d71f4d830f5e518299cc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342781
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41894}
2024-03-13 11:08:37 +00:00
Danil Chapovalov
2725317b1f Propagate Environment through SimulcastEncoderAdapter when provided
Bug: webrtc:15860
Change-Id: Iabd7752ada2f8f774de1e2adc02a4157004bf43c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342720
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41893}
2024-03-13 10:32:31 +00:00
Harald Alvestrand
afaae4e38a Remove remaining .cc files from rtc_media_base
Also remove all dependencies on rtc_media_base except for a few
that are suspected of being linker directives.

Bug: webrtc:14775
Change-Id: Ic0daf88b5422047d3ed7079ee6af9e689853310c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341461
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41886}
2024-03-12 14:09:38 +00:00
Danil Chapovalov
329f0ead43 Provide Environment when creating VideoEncoder in test code
Bug: webrtc:15860
Change-Id: I8c79ff58619716842e02f33e78a0529c631494e6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342280
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41884}
2024-03-12 11:09:31 +00:00
Keiichi Enomoto
a70274a82f Remove duplicated parentheses from deprecated attribute
These lines cause an error when building a project with libwebrtc as a dependency in Microsoft Visual Studio.

Bug: webrtc:15864
Change-Id: I1abfe257d0ea1c16c4c5b718594e8085036f7763
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342320
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41881}
2024-03-12 10:58:59 +00:00
Jeremy Leconte
83d29d5988 Remove GetScalabilityMode2.
Change-Id: Ibe3162dbcaca31c3c22df0fdc8fe55b78ad7990b
Bug: b/327381318
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342400
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41878}
2024-03-12 09:20:48 +00:00
Tomas Gunnarsson
0242939296 Reland "Deprecate old constructors and set_type() in Candidate and Port"
This reverts commit ed8390d21a.

Reason for revert: Fix has landed in chrome, ready to reland.

Original change's description:
> Revert "Deprecate old constructors and set_type() in Candidate and Port"
>
> This reverts commit aaa6851d53.
>
> Reason for revert: breaks chromium webrtc import
>
> Original change's description:
> > Deprecate old constructors and set_type() in Candidate and Port
> >
> > * Deprecates constructors that use string based `type`
> > * Deprecates string based type functions in favor of enum based.
> > * Restrict possible values of Candidate::type. Ensure a valid value
> >   is assigned at construction.
> > * Make Port constructors protected to limit their use to subclasses.
> >   - The reason for this is to make sure that use of SharedSocket()
> >     is controlled (it adds a bit of complexity).
> > * Simplify construction of Port (remove Construct() etc)
> >
> > Bug: webrtc:15846
> > Change-Id: If24ed674e175642efa49da37fd2bc847dd14f613
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339860
> > Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> > Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> > Cr-Commit-Position: refs/heads/main@{#41865}
>
> Bug: webrtc:15846
> Change-Id: Ic8b7cba97f8fb207ef51a88900e704658ade28b7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342140
> Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Owners-Override: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
> Cr-Commit-Position: refs/heads/main@{#41867}

Bug: webrtc:15846
Change-Id: I3d52643bbb537d1c072643528828d26eb18fea94
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342200
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41875}
2024-03-08 20:39:59 +00:00
Danil Chapovalov
9a9f6a8441 Add VideoEncoderFactory::Create to pass Environment for VideoEncoder construction
Bug: webrtc:15860
Change-Id: I6197780aaaa9c29717cb94df5790645b674c3bc2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341900
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41873}
2024-03-08 11:46:39 +00:00
Victor Boivie
cd54fd8606 sctp: Pass webrtc::Environment to DcSctpTransport
The DcSctpTransport will soon use field trials to conditionally enable
some options.

And overall, there is a migration project to start using the Environment
and this CL is in that direction, also setting the boundary; The dcSCTP
library should not depend on it. But the transport is allowed to.

Bug: webrtc:14997
Change-Id: I1f3c2c0d8dd7bdc698dd1d58bde7651b682bcba4
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341480
Commit-Queue: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41872}
2024-03-08 09:45:12 +00:00
Jeremy Leconte
51f98ccb5d Prepare the removal of GetScalabilityMode2.
Change-Id: I4b41fd1faee0e27b2b05842d7825b6b0785735ec
Bug: b/327381318
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341600
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#41870}
2024-03-07 17:57:16 +00:00
Bjorn Terelius
b41f07bc51 Explicitly initialize the SctpTransportState to kNew
Bug: webrtc:15814
Change-Id: I94325979777741a2798e1bfac3474bcc364592bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341020
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Victor Boivie <boivie@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41869}
2024-03-07 14:27:35 +00:00
Ilya Nikolaevskiy
ed8390d21a Revert "Deprecate old constructors and set_type() in Candidate and Port"
This reverts commit aaa6851d53.

Reason for revert: breaks chromium webrtc import

Original change's description:
> Deprecate old constructors and set_type() in Candidate and Port
>
> * Deprecates constructors that use string based `type`
> * Deprecates string based type functions in favor of enum based.
> * Restrict possible values of Candidate::type. Ensure a valid value
>   is assigned at construction.
> * Make Port constructors protected to limit their use to subclasses.
>   - The reason for this is to make sure that use of SharedSocket()
>     is controlled (it adds a bit of complexity).
> * Simplify construction of Port (remove Construct() etc)
>
> Bug: webrtc:15846
> Change-Id: If24ed674e175642efa49da37fd2bc847dd14f613
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339860
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#41865}

Bug: webrtc:15846
Change-Id: Ic8b7cba97f8fb207ef51a88900e704658ade28b7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342140
Auto-Submit: Ilya Nikolaevskiy <ilnik@webrtc.org>
Owners-Override: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#41867}
2024-03-07 09:43:38 +00:00
Tommi
aaa6851d53 Deprecate old constructors and set_type() in Candidate and Port
* Deprecates constructors that use string based `type`
* Deprecates string based type functions in favor of enum based.
* Restrict possible values of Candidate::type. Ensure a valid value
  is assigned at construction.
* Make Port constructors protected to limit their use to subclasses.
  - The reason for this is to make sure that use of SharedSocket()
    is controlled (it adds a bit of complexity).
* Simplify construction of Port (remove Construct() etc)

Bug: webrtc:15846
Change-Id: If24ed674e175642efa49da37fd2bc847dd14f613
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/339860
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41865}
2024-03-06 18:36:14 +00:00
philipel
5ace0710bf Remove unused PacketOptions::additional_data.
Bug: none
Change-Id: I642ad5fde070d7c9c708d99ec9a91b28e294d11e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/341960
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41863}
2024-03-06 11:17:52 +00:00
Danil Chapovalov
38c1ab1e6c Delete CreateVideoDecoder from VideoDecoderFactory interface
Instead require Create to be implemented

Bug: webrtc:15791
Change-Id: I17477b5f047d86b6a05bda594c66d20f8f43a2c6
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/340480
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41857}
2024-03-04 16:05:51 +00:00