Instead, always use VideoSendStream::Start.
VideoSendStream::StartPerRtpStream was used for controlling if
individual rtp stream for a RtpEncodingParameter should be able to send RTP packets. It was not used for controlling the actual encoder layers.
With this change RtpEncodingParameter.active still controls actual encoder layers but it does not control if RTP packets can be sent or not.
The cleanup is done to simplify code and in the future allow sending
probe packet on a RtpTransceiver that allows sending, regardless of the
RtpEncodingParameter.active flag.
Bug: webrtc:14928
Change-Id: I896c055ed4de76db58d76f452147c29783f77ae1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/335042
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41619}
This is a reland of commit 63d03f586b
Original change's description:
> Unify access to SDP codec parameters
>
> which come from the a=fmtp:<pt> lines in the SDP and were used as either
> std::map<std::string, std:string>
> with three aliases,
> cricket::CodecParameterMap
> SdpAudioFormat::Parameters
> SdpVideoFormat::Parameters
>
> Use webrtc::CodecParameterMap in all places.
>
> BUG=None
>
> Change-Id: If47692bde7347834c349c6539b43309d8770e67b
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
> Reviewed-by: Florent Castelli <orphis@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Cr-Commit-Position: refs/heads/main@{#41375}
Bug: None
Change-Id: I5f8f45688df232eb37b12fa3e56a893a1c754e17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/331402
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41467}
which come from the a=fmtp:<pt> lines in the SDP and were used as either
std::map<std::string, std:string>
with three aliases,
cricket::CodecParameterMap
SdpAudioFormat::Parameters
SdpVideoFormat::Parameters
Use webrtc::CodecParameterMap in all places.
BUG=None
Change-Id: If47692bde7347834c349c6539b43309d8770e67b
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/330420
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#41375}
kDefaultQpMax=56 was defined in multiple places. Move it to media_constants and split it into two: VPx/AV1 and H26x values. H26x value is set to 51 which is the max bitstream QP value for H264/5.
This CL is expected to be a no-op because:
1. VideoCodec::qpMax value has not changed for VP8/9 and AV1.
2. VideoCodec::qpMax is currently not used by OpenH264 wrapper (wiring it up is out-of-scope of this CL).
3. Previous default qpMax=56 exceeded the max value for H26x (=51). External HW H26x encoders likely clamped it and used 51.
Bug: webrtc:14852
Change-Id: I1d795e695dac5c78e86ed829b24281e61066f668
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324282
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40997}
In some very high-bandwidth application there have been observations of
packet loss in the socket implementation (not on the network itself) due
to large bursts of packets arriving. Allocating too big buffers can of
course lead to issue as well, so this flag is intended to find a good
tradeoff.
Bug: webrtc:15585
Change-Id: I63eccb1a9f34d852d80c286fc27bffd17818f0ef
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/324021
Auto-Submit: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Per Kjellander <perkj@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40963}
The main goal of this change is to disable the quality scaler when multiple spatial layers are used.
Bug: b/295129711
Change-Id: I25e0b7440a8c2adee3e97720a1e0ee5e0a914334
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/319181
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40709}
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}
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}
This CL adds [[deprecated]] to the old signatures, and uses the new
signatures throughout.
Bug: webrtc:14870
Change-Id: Ic9a8198ac0a2f954e1b2e7d05a55dbe04342f958
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/314962
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40517}
This reverts commit ebf71114a3.
Reason for revert: Breaks downstream project.
Original change's description:
> Clean up WebRTC-FilterAbsSendTimeExtension field trial
>
> which has been enabled by default for a while. Also document the
> expected behavior, see
> https://groups.google.com/g/discuss-webrtc/c/vfrnxWBVcdA/m/ASf7dBJOGAAJ
> for more details.
>
> BUG=webrtc:10234
>
> Change-Id: If793e2b4b6cebb07371bfdf1f94ed8d49bf2bb34
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311281
> Commit-Queue: Philipp Hancke <phancke@microsoft.com>
> Reviewed-by: Konrad Hofbauer <hofbauer@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#40417}
BUG=webrtc:10234
Change-Id: I856991260ff40a24f03f6054a5c2a9e6f37f47da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311803
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Owners-Override: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40438}
which has been enabled by default for a while. Also document the
expected behavior, see
https://groups.google.com/g/discuss-webrtc/c/vfrnxWBVcdA/m/ASf7dBJOGAAJ
for more details.
BUG=webrtc:10234
Change-Id: If793e2b4b6cebb07371bfdf1f94ed8d49bf2bb34
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/311281
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Konrad Hofbauer <hofbauer@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40417}
since this has been shipping receive-only enabled by default since M92.
Sending remains behind a field trial.
BUG=webrtc:8151
Change-Id: Ia44f8b9cf89ee4878074d1469413d847621ce5ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/310040
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Reviewed-by: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40377}
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}
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}
Part 1 of the migration towards merging the types.
Any method that could belong to the Codec type was moved, the others
are deprecated.
Alternatives to the AudioCodec and VideoCodec constructors are introduced
to allow creating objects of an indefinite type without having to
reference the old classes.
Bug: webrtc:15214
Change-Id: I20e1aa32962821cad98e9a92c2ec86f8f75e5dd8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307220
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40213}
This completes the split-channel work for the Video side.
Note: For ease of review, the implementations in the .cc
file have not been sorted between sender and receiver. This
can be done in a later purely-editorial CL.
Bug: webrtc:13931
Change-Id: I36cf015d5facb1eed368070cb204a8763ac19a9c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307180
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40207}
The intent is that this object can be used instead of VideoMediaChannel,
clearing the way for decomposing VideoMediaChannel into send and
receive classes.
This CL uses it for the "both" role of WebRtcVideoEngine::CreateMediaChannel; a later CL will use it for all roles on all engines.
Bug: webrtc:13931
Change-Id: Ibd0ca2c3c45b5e3bfcced8f7e30a1edd63cf7654
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306720
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40173}
There are no common functions between MediaSendChannelInterface
and MediaReceiveChannelInterface except media_type().
This allows us to remove the common superclass for the two interfaces,
making for a simpler class structure.
Bug: webrtc:13931
Change-Id: I82a12ca31f0dc62d7bd97bdda34ca37e59a5fd55
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306660
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40154}
This change allows us to remove one static_cast from tests that
was problematic for another refactoring.
Bug: webrtc:13931
Change-Id: I8e1b5cecadd806b266b6c115b56b18b9613cbe82
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/306500
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40144}
Prior to this CL, the video `jitterBufferDelay` stat was the accumulated current delay, which is a smoothened version of the target delay. This is not correct according to the spec [1]. Rather, the stat should be the accumulated time spent in the jitter buffer, for all emitted frames. This CL fixes this spec compliance problem.
Expect changes to test metrics and product monitoring as this CL rolls out.
[1]: https://www.w3.org/TR/webrtc-stats/#dom-rtcinboundrtpstreamstats-jitterbufferdelay
Tested:
1. Go to https://jsfiddle.net/jib1/0L6duga2/show
2. Apply 2.0 seconds of video delay.
3. Notice that "Video jitter buffer delay" is slightly less than 1990ms. (2000ms playoutdelayhint - 10ms render delay - Xms decode delay).
Bug: webrtc:15085
Change-Id: I42805faafd7dd3bcdcf3ad08e751e08d6de38906
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304521
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40138}
by not starting the receive stream whenever it is creating.
Instead, this is controlled by the direction of the media content.
BUG=webrtc:11013
Change-Id: Iaaa0ac0aa9f90a4be776a1348f53a0f9c2b84d99
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304661
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#40064}
The field trial has been enabled-by-default for several years, I
suspect it was needed during its development but there doesn't seem to
be any reason to maintain it going forward.
Its very existence blocks our long term objective to have our APIs
behave according to the W3C standards and any apps still depending on
it, if there are any, should make sure to use the APIs correctly
instead. I assume they already do any any references to this is us
forgetting to clean things up.
Bug: webrtc:15161
Change-Id: I4a6a44a15219d2e045f3d8d857b5197a064f049c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304660
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Auto-Submit: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#40025}
This reduces dependency on the struct RTCPReportBlock and would allow to
delete it in favor of class ReportBlockData
Bug: None
Change-Id: Ia46a2516e26453724eed2e499f475f65df6cd3fa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/304163
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39990}
* retransmittedBytesReceived
* retransmittedPacketsReceived
added to the specification in
https://github.com/w3c/webrtc-stats/pull/735
BUG=webrtc:15096
Change-Id: I6770e5d8d09ac1c2693c918fd943b0ab257ec7ba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295260
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Philipp Hancke <phancke@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#39959}
This removes all "_WAIT" operations in the tests and all uses
of kTimeout for loop+poll check for values.
On my linux box, this also reduces the time it takes to run all
./rtc_media_unittests (in parallel) from about 3500ms, to ~50ms.
(longest running test was WebRtcVideoChannelBaseTest.GetStats)
Bug: none
Change-Id: If544aa10cb0281cb5e5e51fb654db5f45de871da
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/302343
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39918}
This reverts commit 75990b9a8f.
Reason for revert: Breaks downstream, a use case of having three VP9
encodings, scalability mode only specified on the first layer
(L2T2_KEY) and the other two layers not having a scalability mode but
also being active=false appears to trigger a DCHECK in
call/rtp_video_sender.cc:501. More investigation needed
Original change's description:
> Ship ability to opt-in to VP9/AV1 simulcast.
>
> With this unflagging, an app can opt-in to simulcast when using multiple
> encodings by specifying RTCRtpEncodingParameters.scalabilityMode. This
> ensures backwards-compat with apps relying on 3 encodings to mean SVC
> who traditionally have not specified scalabilityMode.
>
> It fixes the spec/API bug of asking for simulcast and not getting
> simulcast. The field trial exists only as a kill-switch with a TODO to
> remove it.
>
> This ships initial support, however note that the VP9/AV1 simulcast uses
> SimulcastRateAllocator (just like VP8/H264 simulcast). This rate
> allocator uses more kbps than SvcRateAllocator. This should be revisited
> to avoid significant higher bitrates, for example when comparing VP9
> simulcast to VP9 SVC.
>
> Shipping the ability for apps to opt-in makes it easier to exercise
> these new code paths and allows initial feedback from developers, but
> due to the high bitrate (= same bitrate as VP8/H264 simulcast today)
> many apps may find that VP9 SVC is still more beneficial for BW reasons.
>
> Bug: webrtc:14884, webrtc:15005
> Change-Id: I748aae1adb47acc8a6b79b5852cff6aa47a46f5d
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298046
> Commit-Queue: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Evan Shrubsole <eshr@google.com>
> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#39601}
Bug: webrtc:14884, webrtc:15005
Change-Id: Ic8f77e6a2971f493d6cd8c23faecd435058a8847
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298440
Bot-Commit: rubber-stamper@appspot.gserviceaccount.com <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39605}
With this unflagging, an app can opt-in to simulcast when using multiple
encodings by specifying RTCRtpEncodingParameters.scalabilityMode. This
ensures backwards-compat with apps relying on 3 encodings to mean SVC
who traditionally have not specified scalabilityMode.
It fixes the spec/API bug of asking for simulcast and not getting
simulcast. The field trial exists only as a kill-switch with a TODO to
remove it.
This ships initial support, however note that the VP9/AV1 simulcast uses
SimulcastRateAllocator (just like VP8/H264 simulcast). This rate
allocator uses more kbps than SvcRateAllocator. This should be revisited
to avoid significant higher bitrates, for example when comparing VP9
simulcast to VP9 SVC.
Shipping the ability for apps to opt-in makes it easier to exercise
these new code paths and allows initial feedback from developers, but
due to the high bitrate (= same bitrate as VP8/H264 simulcast today)
many apps may find that VP9 SVC is still more beneficial for BW reasons.
Bug: webrtc:14884, webrtc:15005
Change-Id: I748aae1adb47acc8a6b79b5852cff6aa47a46f5d
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298046
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Evan Shrubsole <eshr@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39601}
Under the combined network/worker thread project, tasks
are unnecessarily posted to the same thread. Avoid this
by posting only if invoked on a diffferent sequence.
TESTED=presubmit + local Meet calls.
Bug: webrtc:137439
Change-Id: Ic5dd99e5fbb843ad4c54d4466138135ae81596cf
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/295867
Commit-Queue: Markus Handell <handellm@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#39471}