Commit Graph

1987 Commits

Author SHA1 Message Date
13d163654a Delete support for has_internal_source
Bug: webrtc:12875
Change-Id: I9683e71e1fe5b24802033ffcb32a531ca685fc6f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/179220
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35353}
2021-11-16 11:29:40 +00:00
efe46b6bee Change the type of RTCVideoSourceStats.framesPerSecond
Spec: https://w3c.github.io/webrtc-stats/#dom-rtcvideosourcestats-framespersecond

Bug: webrtc:12905
Change-Id: If53e2e480e2d6f687c3f8bb95a9e1d1e386fe9c2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237420
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Cr-Commit-Position: refs/heads/main@{#35352}
2021-11-16 11:21:41 +00:00
d3251968d1 Prepare to rename RTC_NOTREACHED to RTC_DCHECK_NOTREACHED
Add implementation of RTC_DCHECK_NOTREACHED equal to the RTC_NOTREACHED.
The new macros will replace the old one when old one's usage will be
removed. The idea of the renaming to provide a clear signal that this
is debug build only macros and will be stripped in the production build.

Bug: webrtc:9065
Change-Id: I4c35d8b03e74a4b3fd1ae75dba2f9c05643101db
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237802
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35348}
2021-11-15 21:44:59 +00:00
8718f58868 Correctly set first/last packet of frame bit in VideoRtpDepacketizerVp9.
Bug: none
Change-Id: I72911859b313add520f58e06f0529d082a0291aa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237801
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35345}
2021-11-15 16:22:09 +00:00
528e4898e7 Set correct spatial layer number in FrameEncodeMetadataWriter
This CL set the spatial id in LibaomAv1Encoder and set correct number
of spatial layers for AV1 in FrameEncodeMetadataWriter.

Bug: None
Change-Id: I40092e45be88ec9ab75f228d9ca84c44e3cad326
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237662
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Zhaoliang Ma <zhaoliang.ma@intel.com>
Cr-Commit-Position: refs/heads/main@{#35339}
2021-11-15 03:34:18 +00:00
069539ef45 StatsEndToEndTest.VerifyNackStats: Fix flaky test.
Add PendingTaskSafetyFlag to avoid use after free.

Bug: webrtc:12573,webrtc:12973
Change-Id: Ib782f3bd0fa8ec31b2f29acb8259ff9bfd7880ad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237660
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35338}
2021-11-12 14:25:56 +00:00
c86e1c2e70 StatsEndToEndTest.TestReceivedRtpPacketStats: Fix flaky test.
Add PendingTaskSafetyFlag to avoid use after free.

Bug: webrtc:13379
Change-Id: Ia5e97d3798d2d25fb785944fd18de6775e1d65a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237501
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35335}
2021-11-11 12:51:43 +00:00
28c7180999 VideoStreamEncoder: simplify threading.
VideoStreamEncoder receives frames on an undefined threading
context with the only requirement being that frames are serially
arriving. This CL changes this to post all frames arriving at the
FrameCadenceAdapter to the worker thread before further
processing, transitively leading to frame entry into the
VideoStreamEncoder on the worker thread.

Bug: chromium:1255737
Change-Id: I04d69cb4a5048d671d2dcd3bd6d669fbcda52b3f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237142
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35320}
2021-11-08 10:42:48 +00:00
7aa89cedba Fix use after free in VideoSendStreamTest.MinTransmitBitrateRespectsRemb
https://chromium-swarm.appspot.com/task?id=56dfaf30fa11e510
Due to recent changes, this test sometimes crashes because of
use after free.
Fix this by adding a PendingTaskSafetyFlag to not access `stream_`
after it has been deleted.

Bug: webrtc:13315, webrtc:13351
Change-Id: I7cb180bcab1d79b39737c53704c5fe8a2ca28b7e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236660
Commit-Queue: Byoungchan Lee <daniel.l@hpcnt.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35319}
2021-11-08 10:40:18 +00:00
3da2577038 BandwidthEndToEndTest.RembWithSendSideBwe: fix UAF.
The test has a ModuleRtpRtcpImpl2 which is destroyed long
after test transports are removed, leading to a UAF.
Fix by overriding OnStreamsStopped which is called before
transports are removed.

TESTED=Asan now passes 1000/1000, failed 4/1000 before.

Fixed: chromium:1235251, b:192567426
Change-Id: Ie9135685e81712e38c4b00355debfc67c1f603bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237345
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35318}
2021-11-08 09:10:18 +00:00
b4e96d48a2 VideoStreamEncoder: Introduce frame cadence adapter.
This change introduces a new FrameCadenceAdapter class which takes the
role of being a VideoFrameSinkInterface<> instead of VideoStreamEncoder.
The FrameCadenceAdapter will see its functionality grow in future CLs
and eventually enable screenshare capture sources to have zero hertz as
the minimum capture frequency.

This CL moves logic related to UMA collection and constraints into the
adapter.

The adapter has two major modes. Future functionality is planned to be
added under the WebRTC-ZeroHertzScreenshare field trial. Unit tests are
added that verify passthrough operation when WebRTC-ZeroHertzScreenshare
isn't specified or disabled.

Just specifying the WebRTC-ZeroHertzScreenshare field trial isn't
enough to activate the feature, but the caller has to additionally
configure screen content type, minimum FPS 0, and maximum FPS > 0 for
the new mode.

go/rtc-0hz-present

Bug: chromium:1255737
Change-Id: I1799110ed40843152786ad80df10acfb83a608b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236682
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35315}
2021-11-05 12:37:45 +00:00
97597c0f51 Remove usage of INFO alias for LS_INFO in log messages
Bug: webrtc:13362
Change-Id: Ifda893861a036a85c045cd366f9eab33c62ebde0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237221
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35310}
2021-11-04 13:46:17 +00:00
3677bbaa32 Make internal_source argument to FrameEncodeMetadataWriter::OnEncoderInit optional
Bug: webrtc:12875
Change-Id: I74afff080c4965fe51750c7016abfd2c734dcc65
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/237222
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35308}
2021-11-04 12:11:57 +00:00
2b10c479ce VideoStreamEncoder: clean up threading constraints.
The sequences of threads entering the VideoStreamEncoder has been
unclear. Fix this by renaming the uninformational |main_queue_| to
|worker_queue_|, and introduce a new |network_queue_| which is set
on construction.

Bug: chromium:1255737
Change-Id: Ic4d3a5b8188b8cc98e60b72aee2c09c9afbc7356
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/236523
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35283}
2021-10-29 12:05:11 +00:00
5316a061ca Fix potential deadlock in VideoSendStreamTests.
The synchronously waiting SendTask() helper method should never be
called from within OnSendRtp() as that risks a deadlock with the
shutdown of the test.

This CL reverts an earlier disabling which did not correctly identify
the root cause.

Bug: webrtc:13291
Change-Id: Ia3c3417e0cbfb7011bb2439a52f976b946adad78
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235721
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35244}
2021-10-20 09:15:02 +00:00
8935a7e8eb VideoStreamEncoder: expose screenshare UMA stats.
This change adds a few UMAs to inform on the usage of frame
rate constraints related to screenshare sessions.

go/rtc-0hz-present

Bug: chromium:1255737
Change-Id: Icdd011a8e7df837416d603beeb0866d9eb1918e7
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235368
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35238}
2021-10-19 12:29:43 +00:00
7324f767f9 Remove deprecated ctor from ReceiveStatisticsProxy
Bug: none
Change-Id: I938a8562cb4eb233a1884df998d7a20ff3088c4f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235367
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35233}
2021-10-19 11:03:33 +00:00
011b5d1545 Disable VideoSendStreamTest.MinTransmitBitrateRespectsRemb in Mac.
Test is flaky there, especially with the task queue pacer enabled.

Bug: webrtc:13294
Change-Id: I1b2fdbbf6b760bd0cbeb8992442549c7d50abb09
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235660
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35232}
2021-10-19 10:22:43 +00:00
8a2e375eb7 Set the local capture clock offset on RtpPacketInfo when depacketizing frames.
Bug: b/150859541
Change-Id: I09f871bef8523cdef31ebd88d1cf25307463f380
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235360
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Paul Hallak <phallak@google.com>
Cr-Commit-Position: refs/heads/main@{#35219}
2021-10-15 18:43:54 +00:00
ad22572986 Remove dependency on VideoReceiveStream::Config from ReceiveStatisticsProxy
Bug: none
Change-Id: Ib8238ed6b099c558733496b13bdf37e6b5a2021c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235362
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35218}
2021-10-15 15:13:23 +00:00
6fa9e68da9 Route min/max FPS constraints to VideoStreamEncoder.
This change
- adds new type VideoTrackSourceConstraints expressing min/max FPS
  constraints.
- adds new method VideoTrackSourceInterface::ProcessConstraints.
- adds new method VideoSinkInterface<>::OnConstraintsChanged.
- updates AdaptedVideoTrackSource and VideoBroadcaster to forward
  the constraints to sinks.
- adds several unit tests for the added functionality.
- and finally, implements OnConstraintsChanged in VideoStreamEncoder.

Chromium will be updated in coming CLs to supply constraints set
through the MediaStream module.

go/rtc-0hz-present

Bug: chromium:1255737
No-Try: true
Change-Id: Iffef239217269c332a1aaa902ddeae2440929e22
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/235040
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35197}
2021-10-14 06:49:05 +00:00
2ab7d5b961 Fix bad license header style from CRLF to LF.
Bug: webrtc:13227
Change-Id: I39a83c7ba7ad69ee7dbbd53758d45d0b3c3b5b12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233884
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35189}
2021-10-12 16:59:50 +00:00
1da742b2dc Switch to eshr@webrtc.org in OWNER files
Bug: None
Change-Id: I2457e68302a2afbdf7febbb47fd1531cac38e381
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/234860
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35187}
2021-10-12 10:03:42 +00:00
7e7e805d3b video: Re-configure scalers when encoder info changed.
Encoder info will be modified at runtime. In fact, we should reduce the
number of 'full' ReconfigureEncoder(). If only need subset of it at
runtime, consider handle it in VideoStreamEncoder::EncodeVideoFrame().

Consider two cases:
Re-configure scalers when encoder info changed. Consider two cases:
1. When the status of the scaler changes from enabled to disabled, if we
don't do this CL, scaler will adapt up/down to trigger an unnecessary
full ReconfigureEncoder() when the scaler should be banned.
2. When the status of the scaler changes from disabled to enabled, if we
don't do this CL, scaler will not work until some code trigger
ReconfigureEncoder(). In extreme cases, the scaler doesn't even work for
a long time when we expect that the scaler should work.

This CL aims to make scalers work properly when encoder info changed.

BUG: None
Change-Id: Iec17730b5fac5e642c0fb2d9b11c5b7434f0a220
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233384
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35175}
2021-10-11 11:32:17 +00:00
606d3cb1cf VideoStreamEncoderTest: Use DataRate for some constants.
Use config from FakeEncoder in some tests.

Bug: none
Change-Id: I1d7e01f604f8aabb5d6815bb519ef2532d024d76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233243
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35138}
2021-10-04 10:10:40 +00:00
54c90f2330 [-Wshadow] - Fix some warnings.
First CL to try to understand the extent of the cleanup needed in
order to remove -Wno-shadow and follow Chromium on enabling this
diagnostic.

Bug: webrtc:13219
Change-Id: Ie699762da50fe3dbc08b1fd92220962d4b7da86b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233641
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35134}
2021-10-03 11:53:16 +00:00
f270770679 video: Implement bandwidth based scaler
The |slice_qp_detla| reported by the hardware is not credible, which
causing the quality scaler cannot work properly,the resolution cannot
be adjusted correctly.

To fix this issue, this CL implements a bandwidth scaler which is used
for adjust resolution, this scaler will be used when QP based quality
scaler is not working due to untrusted QP reported by HW AVC encoder.

Bug: webrtc:12942
Change-Id: I2fc5f07a5400ec7e5ead2c2c502faee84d7f2a76
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228860
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35120}
2021-09-29 10:39:27 +00:00
23bfff3383 Change default parameters for the low-latency video pipeline
min_pacing:8ms, to avoid the situation where bursts of frames are sent
to the decoder at once due to network jitter. The bursts of frames
caused the queues further down in the processing to be full and
therefore drop all frames.

max_decode_queue_size:8, in the event that too many frames have piled
up, do as before and send all frames to the decoder to avoid building
up any latency.

These setting only affect the low-latency video pipeline that is enabled
by setting the playout RTP header extension to min=0ms, max>0ms.

Bug: chromium:1138888
Change-Id: I8154bf3efe7450b770da8387f8fb6b23f6be26bd
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/233220
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35119}
2021-09-29 09:53:17 +00:00
8fb41a39e1 Add Direction indicator to TransformableFrames
Currently the implementation of FrameTransformers uses distinct,
incompatible types for recevied vs about-to-be-sent frames. This adds a
flag in the interface so we can at least check that we are being given
the correct type. crbug.com/1250638 tracks removing the need for this.

Chrome will be updated after this to check the direction flag and provide
a javascript error if the wrong type of frame is written into the
encoded insertable streams writable stream, rather than crashing.

Bug: chromium:1247260
Change-Id: I9cbb66962ea0718ed47c5e5dba19a8ff9635b0b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/232301
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Tony Herre <toprice@chromium.org>
Cr-Commit-Position: refs/heads/main@{#35100}
2021-09-27 17:40:36 +00:00
29b4049abc VideoStreamEncoder: Remove check for zero VideoCodec.maxBitrate.
maxBitrate is set to a minimum of kEncoderMinBitrateKbps in VideoCodecInitializer::SetupCodec and cannot be zero at this point.

Bug: none
Change-Id: I4e062b054d99fabc1a9650260db03dd45b033c3c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/230142
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#35094}
2021-09-27 10:44:36 +00:00
10dc1a6d8b New H264PacketBuffer consolidating a bunch of H264 specific hacks into one class.
Bug: webrtc:12579
Change-Id: Idea35983e204e4a3f8628d5b4eb587bbdbff5877
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/227286
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34999}
2021-09-15 09:57:29 +00:00
4d4f62f6e7 VideoSendStreamTest: Add tests for encoder reconfiguration.
Bug: none
Change-Id: I1d976eb77357c7050ed6ca7d0eee9153f9ef0251
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231000
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34978}
2021-09-13 13:14:22 +00:00
a43ffb32f2 Remove unnecessary static_cast in rtp_video_stream_receiver2
Bug: None
Change-Id: I8f7424c877e07ee585d46adc81b777577c43d796
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231697
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Evan Shrubsole <eshr@google.com>
Cr-Commit-Position: refs/heads/main@{#34977}
2021-09-13 08:39:10 +00:00
06defc4320 QualityRampupExperiment: SetMaxBitrate may not be set correctly.
Call SetMaxBitrate when encoder is configured instead of in OnMaybeEncodeFrame (which is called after the initial frame dropping ->
max bitrate is not set for dropped frames).

Added support for single active stream configuration.

Bug: none
Change-Id: I33ff96e7feed70b9ea3c9b3da89f117859108347
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231681
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34973}
2021-09-11 10:28:43 +00:00
66e06055f1 Change kDefaultMaximumPreStreamDecoders to 1
The experiment WebRTC-PreStreamDecoders (aka Lazy decoder creation) has
investigated the benefit of only creating a subset of all decoders
during negotiation and the remaining decoders on demand.

This CL changes the default value to only create one decoder during
negotiation. This frees up hardware resources and reduces the SDP
negotiation time.

Bug: chromium:1202042
Change-Id: I6e2206839162aa857fcc948ccd53d0ff91cbdeaf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231643
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34959}
2021-09-09 10:49:36 +00:00
1f38a38b6f Add ability to set rtp header extensions without recreating streams.
Setting the rtp header extensions on the packet delivery thread
(currently worker, soon to be network), is now possible without
taking the hit of deleting and recreating the receive stream (and
rtp receiver and related state).

Bug: webrtc:11993
Change-Id: I9bbe306844a25d85d79cd216092ead66eaf68960
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/223741
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34953}
2021-09-08 13:39:36 +00:00
2ace42f084 frame transformer: expose payload type
spec PR: https://github.com/w3c/webrtc-encoded-transform/pull/117

Bug: webrtc:13077
Change-Id: I81d79201cea353c26ea840e92c0deec7c7253b8b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229020
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34844}
2021-08-25 08:33:20 +00:00
e9716de2cd Remove config() getter from VideoReceiveStream2.
Instead offer getters for the sync_group and rtp struct. Both are
a part of the config but expose much less of the config, which has
mutable parts.

Bug: none
Change-Id: Icc8007246e9776a5d20f30cda1a2df3fb7252ffc
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229980
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34838}
2021-08-24 13:14:16 +00:00
b2db9890c5 ReceiveStatisticsProxy: Remove dependency on VideoReceiveStream::Config.
The config struct is big and in order to control access to its state,
some of which isn't always const, we need to limit raw unlocked access
to it from other classes.

Bug: none
Change-Id: I4513c41486e79ef6c5cfd6376122ab338ad94642
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229921
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34835}
2021-08-24 07:11:21 +00:00
51238e6c28 Keep transport_queue_safety_ alive until stopped permanently.
After a send stream is stopped, it can still be re-used and implicitly
restarted by activating layers. This change removes marking the flag
we use for async operations as 'not alive' inside Stop() and only doing
so when the send stream is stopped permanently.

The effect this has is that an implicit start via
UpdateActiveSimulcastLayers() will run and correctly update the states.
Before, if a stream had been stopped, the safety flag would prevent
the async operation from running.

Bug: chromium:1241213
Change-Id: Iebdfabba3e1955aafa364760eebd4f66281bcc60
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229304
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34809}
2021-08-19 18:35:19 +00:00
b6f19d7dfd Reland "Update remaining usage of VideoDecoder::InitDecode to Configure"
This reverts commit d6da4c23ccda5733f4d8bad3268b539d0c9fc3b7.

Reason for revert: downstream project adjusted

Original change's description:
> Revert "Update remaining usage of VideoDecoder::InitDecode to Configure"
>
> This reverts commit ca0a08ab600c8d7d00b94492122946ad837b1ef7.
>
> Reason for revert: Breaks downstream project.
>
> Original change's description:
> > Update remaining usage of VideoDecoder::InitDecode to Configure
> >
> > Bug: webrtc:13045
> > Change-Id: I5253fddfd613cf0228fc3cd861b91e56558dd34a
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228947
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#34777}
>
> TBR=danilchap@webrtc.org,sprang@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com
>
> Change-Id: I1868700a43b5aa4b37e9bcba5af233d24526c974
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:13045
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229024
> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34780}

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: webrtc:13045
Change-Id: I5a44e7126f9f2e405f3be6b84698de53b23203a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229183
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34795}
2021-08-18 15:58:40 +00:00
f135800b5c Roll chromium_revision 47dc8e2f50..680b7dae9d (912091:912910)
Change log: 47dc8e2f50..680b7dae9d
Full diff: 47dc8e2f50..680b7dae9d

Changed dependencies
* src/base: 959457e3f3..4bcc0feab1
* src/build: a0d51919fe..02ca29f24d
* src/buildtools: 6810b870e0..6f9b470988
* src/buildtools/third_party/libc++abi/trunk: 671803fd96..8452f0657d
* src/ios: 6a9bd7348f..4bdd6cc72d
* src/testing: c0ea7c3386..e3201c323d
* src/third_party: 56c558ed2e..0f2f057998
* src/third_party/androidx: v5A41FDtUTUgWmjkgJS42X4yMcKx2zbPp8fWod32rhsC..8ehN1uRQQBM3VrBh28TpSvhV4AmGQRMCfN6Fm1L5y9QC
* src/third_party/catapult: https://chromium.googlesource.com/catapult.git/+log/126f6a8996..77a7089299
* src/third_party/depot_tools: 0c42eff6d1..9a0189cd7a
* src/third_party/perfetto: 303b88cfe5..95e9c5e207
* src/tools: b54abb9ed0..bb864a1e83
DEPS diff: 47dc8e2f50..680b7dae9d/DEPS

Clang version changed llvmorg-14-init-1002-gb5e470aa:llvmorg-14-init-1380-gee659383
Details: 47dc8e2f50..680b7dae9d/tools/clang/scripts/update.py

TBR=mbonadei@webrtc.org,
BUG=None


Fix roll

Change-Id: Ie0b20fe417ce893b6905f0b3c02053e09b83de8d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229102
Reviewed-by: Per Åhgren <peah@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Andrey Logvin <landrey@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34792}
2021-08-18 10:22:27 +00:00
fb1959625d Allow setting different number of temporal layers per simulcast layer.
Setting different number of temporal layers is supported by SimulcastEncodeAdapter and LibvpxVp8Encoder will fallback to SimulcastEncoderAdapter if InitEncode fails.

Bug: none
Change-Id: I8a09ee1e6c70a0006317957c0802d019a0d28ca2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228642
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34785}
2021-08-17 13:33:55 +00:00
d6da4c23cc Revert "Update remaining usage of VideoDecoder::InitDecode to Configure"
This reverts commit ca0a08ab600c8d7d00b94492122946ad837b1ef7.

Reason for revert: Breaks downstream project.

Original change's description:
> Update remaining usage of VideoDecoder::InitDecode to Configure
>
> Bug: webrtc:13045
> Change-Id: I5253fddfd613cf0228fc3cd861b91e56558dd34a
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228947
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#34777}

TBR=danilchap@webrtc.org,sprang@webrtc.org,webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com

Change-Id: I1868700a43b5aa4b37e9bcba5af233d24526c974
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:13045
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/229024
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34780}
2021-08-17 09:35:28 +00:00
ca0a08ab60 Update remaining usage of VideoDecoder::InitDecode to Configure
Bug: webrtc:13045
Change-Id: I5253fddfd613cf0228fc3cd861b91e56558dd34a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228947
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34777}
2021-08-17 08:48:30 +00:00
ba0a306585 Move check for number_of_cores parameter validitity
from runtime check in proxy classes that picks decoder (VCMDecoderDataBase)
to a DCHECK in the VideoDecoder::Settings

Bug: None
Change-Id: Ic8c2e971486a3a7eb247f9d03815aba5ca5a7bad
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228644
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34761}
2021-08-14 11:51:53 +00:00
355b8d237c Use VideoDecoder::Configure interface when setting up decoder
Bug: webrtc:13045
Change-Id: I322ff91d96bab8bb7c40f4dea1c9c2b5c7631635
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228420
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34756}
2021-08-13 16:03:32 +00:00
95f6e8bebb Relax video_codec parameter for RtpVideoStreamReceiver::AddReceiveCodec
Instead of requiring huge VideoCodec struct, pass single member from it

Bug: webrtc:13045
Change-Id: I1a4a48abd6c407cb9a878daafda5c8a85beff39e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228641
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34753}
2021-08-13 12:56:00 +00:00
d08930d5fb Migrate test VideoDecoders to new VideoDecoder::Configure
Bug: webrtc:13045
Change-Id: I3b66270de59b441bf8b92bc10f67f59f05e9995e
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228436
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34742}
2021-08-12 15:41:03 +00:00
5653c95ca2 Relax video_codec parameter for RtpVideoStreamReceiver2::AddReceiveCodec
Instead of requiring huge VideoCodec struct, pass single member from it

Bug: webrtc:13045
Change-Id: I46a3c24cd2c9c3a450f897ed014cb95d7dfcc841
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/228382
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#34704}
2021-08-10 17:00:05 +00:00