This is a reland of
https://webrtc-review.googlesource.com/c/src/+/123920
Patch set 1 is identical to the previous CL, additional patch sets fix
the bug that was introduced and adds test coverage.
Since this "data base" only holds a single encoder instance it just
serves to confuse object ownership. Removing it and giving ownership
of generic encoder instance to VideoStreamEncoder.
This CL also removes VideoSender interface from video_coding_impl.h,
which is mostly a leftover from
https://webrtc-review.googlesource.com/c/src/+/123540
Bug: webrtc:10164
Change-Id: Ieaf23457d69af0d6356b70461112892b14760b19
Reviewed-on: https://webrtc-review.googlesource.com/c/124488
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26857}
This reverts commit 715c4765b1.
Reason for revert: Breaks WebRTC roll to Chromium.
https://chromium-review.googlesource.com/c/chromium/src/+/1484629
# Fatal error in: ../../third_party/webrtc/modules/rtp_rtcp/source/rtp_sender.cc, line 796
# last system error: 0
# Check failed: diff_ms >= static_cast<int64_t>(0) (-307 vs. 0)
#
Original change's description:
> Remove VCMEncoderDataBase and put remaining code into VideoStreamEncoder
>
> Since this "data base" only holds a single encoder instance it just
> serves to confuse object ownership. Removing it and giving ownership
> of generic encoder instance to VideoStreamEncoder.
>
> This CL also removes VideoSender interface from video_coding_impl.h,
> which is mostly a leftover from
> https://webrtc-review.googlesource.com/c/src/+/123540
>
> Bug: webrtc:10164
> Change-Id: I9b7fec940dbcbccf3aa1278c2555da3bd5169ae1
> Reviewed-on: https://webrtc-review.googlesource.com/c/123920
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26835}
TBR=brandtr@webrtc.org,nisse@webrtc.org,sprang@webrtc.org
Change-Id: I5432878c4c2e497cd848c4ce1b190e0307df03ca
Bug: webrtc:10164
Reviewed-on: https://webrtc-review.googlesource.com/c/124402
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26841}
Since this "data base" only holds a single encoder instance it just
serves to confuse object ownership. Removing it and giving ownership
of generic encoder instance to VideoStreamEncoder.
This CL also removes VideoSender interface from video_coding_impl.h,
which is mostly a leftover from
https://webrtc-review.googlesource.com/c/src/+/123540
Bug: webrtc:10164
Change-Id: I9b7fec940dbcbccf3aa1278c2555da3bd5169ae1
Reviewed-on: https://webrtc-review.googlesource.com/c/123920
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26835}
This CL moves the functionality in VideoSender into VideoStreamEncoder
and simplifies the code where possible, given what we know of the
encoder state and that we now run on the encoder queue.
The intent here is to make it easier to remove the next parts, the
encoder database and generic encoder wrapper.
Bug: webrtc:10164
Change-Id: I8c108ccbe5db97cd9fd1e84228134709af845ea3
Reviewed-on: https://webrtc-review.googlesource.com/c/123540
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26813}
Reland with fixes for failing chromium tests.
Propagate VideoFrame::UpdateRect to encoder
Accumulate it in all places where frames can be dropped before they reach the encoder.
Reset UpdateRect in VideoBroadcaster if frame the previous frame is dropped.
No accumulation is done here since it's supposed to be a brief occasion then configuration have changed.
Original Reviewed-on: https://webrtc-review.googlesource.com/c/123102
Bug: webrtc:10310
Change-Id: I18be73f47f227d6392bf9cb220b549ced225714f
Reviewed-on: https://webrtc-review.googlesource.com/c/123230
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26738}
Accumulate it in all places where frames can be dropped before they reach
the encoder.
Reset UpdateRect in VideoBroadcaster if frame the previous frame is dropped.
No accumulation is done here since it's supposed to be a brief occusion then
configuration have changed.
Bug: webrtc:10310
Change-Id: I2813ecd009eb730bd99ffa0a02f979091b56bf80
Reviewed-on: https://webrtc-review.googlesource.com/c/123102
Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26711}
The overshoot detector uses a simple pacer model to determine an
estimate of how much the encoder is overusing the target bitrate.
This utilization factor can then be adjuster for when configuring the
actual target bitrate.
Spatial layers (simulcast streams) are adjusted separately.
Temporal layers are measured separately, but are combined into a single
utilization factor per spatial layer.
Bug: webrtc:10155
Change-Id: I8ea58dc6c4871e880553d7c22202f11cb2feb216
Reviewed-on: https://webrtc-review.googlesource.com/c/114886
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26573}
kMaxSimulcastStreams, kMaxSpatialLayers and kMaxTemporalStreams don't
really beling on VideoBitrateAllocation.
common_types.h is going away and it feels dubious to requrie include
of the full VideoEncoder api to use them. Therefore moving them into a
seprate file/target.
Also includes some remaining cleanup of includes.
Bug: webrtc:9271
Change-Id: I7ded3d97a9a835ac756159700774445a2b93a697
Reviewed-on: https://webrtc-review.googlesource.com/c/117305
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26299}
Currently, CPU overuse settings for HW encoders are sometimes being used
even though the actual encoder is a SW encoder, e.g. in case of SW fallback
when the encoder is initialized. Polling is_hardware_accelerated after the
encoder has been created and initialized will improve choosing the correct
CPU overuse settings.
Bug: webrtc:10065
Change-Id: Ic6bd67630a040b5a121c13fa63dd074006973929
Reviewed-on: https://webrtc-review.googlesource.com/c/116688
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26266}
This reverts commit 6613f8e98a.
Reason for revert: This change seemed innocent after all, so undoing speculative revert.
Original change's description:
> Revert "Refactor and remove media_optimization::MediaOptimization."
>
> This reverts commit 07276e4f89.
>
> Reason for revert: Speculative revert due to downstream crashes.
>
> Original change's description:
> > Refactor and remove media_optimization::MediaOptimization.
> >
> > This CL removes MediaOptmization and folds some of its functionality
> > into VideoStreamEncoder.
> >
> > The FPS tracking is now handled by a RateStatistics instance. Frame
> > dropping is still handled by FrameDropper. Both of these now live
> > directly in VideoStreamEncoder.
> > There is no intended change in behavior from this CL, but due to a new
> > way of measuring frame rate, some minor perf changes can be expected.
> >
> > A small change in behavior is that OnBitrateUpdated is now called
> > directly rather than on the next frame. Since both encoding frame and
> > setting rate allocations happen on the encoder worker thread, there's
> > really no reason to cache bitrates and wait until the next frame.
> > An edge case though is that if a new bitrate is set before the first
> > frame, we must remember that bitrate and then apply it after the video
> > bitrate allocator has been first created.
> >
> > In addition to existing unit tests, manual tests have been used to
> > confirm that frame dropping works as expected with misbehaving encoders.
> >
> > Bug: webrtc:10164
> > Change-Id: I7ee9c8d3c4f2bcf23c8c420310b05a4d35d94744
> > Reviewed-on: https://webrtc-review.googlesource.com/c/115620
> > Commit-Queue: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Niels Moller <nisse@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#26147}
>
> TBR=nisse@webrtc.org,sprang@webrtc.org
>
> # Not skipping CQ checks because original CL landed > 1 day ago.
>
> Bug: webrtc:10164
> Change-Id: Ie0dae19dd012bc09e793c9661a45823fd760c20c
> Reviewed-on: https://webrtc-review.googlesource.com/c/116780
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26191}
TBR=nisse@webrtc.org,sprang@webrtc.org
Change-Id: Ieda1fad301de002460bb0bf5a75267ea065176a8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10164
Reviewed-on: https://webrtc-review.googlesource.com/c/116960
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26213}
This reverts commit 07276e4f89.
Reason for revert: Speculative revert due to downstream crashes.
Original change's description:
> Refactor and remove media_optimization::MediaOptimization.
>
> This CL removes MediaOptmization and folds some of its functionality
> into VideoStreamEncoder.
>
> The FPS tracking is now handled by a RateStatistics instance. Frame
> dropping is still handled by FrameDropper. Both of these now live
> directly in VideoStreamEncoder.
> There is no intended change in behavior from this CL, but due to a new
> way of measuring frame rate, some minor perf changes can be expected.
>
> A small change in behavior is that OnBitrateUpdated is now called
> directly rather than on the next frame. Since both encoding frame and
> setting rate allocations happen on the encoder worker thread, there's
> really no reason to cache bitrates and wait until the next frame.
> An edge case though is that if a new bitrate is set before the first
> frame, we must remember that bitrate and then apply it after the video
> bitrate allocator has been first created.
>
> In addition to existing unit tests, manual tests have been used to
> confirm that frame dropping works as expected with misbehaving encoders.
>
> Bug: webrtc:10164
> Change-Id: I7ee9c8d3c4f2bcf23c8c420310b05a4d35d94744
> Reviewed-on: https://webrtc-review.googlesource.com/c/115620
> Commit-Queue: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#26147}
TBR=nisse@webrtc.org,sprang@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:10164
Change-Id: Ie0dae19dd012bc09e793c9661a45823fd760c20c
Reviewed-on: https://webrtc-review.googlesource.com/c/116780
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26191}
This CL removes MediaOptmization and folds some of its functionality
into VideoStreamEncoder.
The FPS tracking is now handled by a RateStatistics instance. Frame
dropping is still handled by FrameDropper. Both of these now live
directly in VideoStreamEncoder.
There is no intended change in behavior from this CL, but due to a new
way of measuring frame rate, some minor perf changes can be expected.
A small change in behavior is that OnBitrateUpdated is now called
directly rather than on the next frame. Since both encoding frame and
setting rate allocations happen on the encoder worker thread, there's
really no reason to cache bitrates and wait until the next frame.
An edge case though is that if a new bitrate is set before the first
frame, we must remember that bitrate and then apply it after the video
bitrate allocator has been first created.
In addition to existing unit tests, manual tests have been used to
confirm that frame dropping works as expected with misbehaving encoders.
Bug: webrtc:10164
Change-Id: I7ee9c8d3c4f2bcf23c8c420310b05a4d35d94744
Reviewed-on: https://webrtc-review.googlesource.com/c/115620
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26147}
This reverts commit cdc5eb0de1.
Reason for revert: Causes wrong CPU adaptation to be used for some HW codecs since GetEncoderInfo() is polled before InitEncode().
Original change's description:
> Replace VideoEncoderFactory::QueryVideoEncoder with VideoEncoder::GetEncoderInfo
>
> Make implementation of VideoEncoderFactory::QueryVideoEncoder optional
> until it is removed downstream and remove all implementations of it.
>
> Bug: webrtc:10065
> Change-Id: Ibb1f9612234e536651ce53f05ee048a5d172a41f
> Reviewed-on: https://webrtc-review.googlesource.com/c/113065
> Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Per Kjellander <perkj@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
> Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#25924}
TBR=brandtr@webrtc.org,sakal@webrtc.org,kthelgason@webrtc.org,sprang@webrtc.org,srte@webrtc.org,perkj@webrtc.org,mirtad@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:10065
Change-Id: Idaa452e1d8c1c58cdb4ec69b88fce9042589cc3c
Reviewed-on: https://webrtc-review.googlesource.com/c/113800
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25943}
Make implementation of VideoEncoderFactory::QueryVideoEncoder optional
until it is removed downstream and remove all implementations of it.
Bug: webrtc:10065
Change-Id: Ibb1f9612234e536651ce53f05ee048a5d172a41f
Reviewed-on: https://webrtc-review.googlesource.com/c/113065
Commit-Queue: Mirta Dvornicic <mirtad@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25924}
Compared the original CL: https://webrtc-review.googlesource.com/c/src/+/94782
This new CL added backward compatible functions to WebRtcMediaEngineFactory so that internal projects will not be broken.
Because of that, now we can revert all the changes to SDK and PeerConnection and do it in following CLs. This makes this CL cleaner.
One temporary disadvantage of this is the media engine now need to take a dependency onto builtin video bitrate factory, but practically it just moved code around and should not result in a large binary size change. We can remove this dependency later if needed.
Bug: webrtc:9513
Change-Id: I38708762ff365e4ca05974b99fac71edc739a756
Reviewed-on: https://webrtc-review.googlesource.com/c/109040
Commit-Queue: Jiawei Ou <ouj@fb.com>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25574}
Also renaming it Vp8TemporalLayers to show that it is codec specific.
Bug: webrtc:9012
Change-Id: I18187538b8142cdd7538f1a4ed1bada09d040f1f
Reviewed-on: https://webrtc-review.googlesource.com/c/104643
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25137}
This CL is a step towards making the TemporalLayers landable in api/ :
* It splits TemporalLayers from TemporalLayersChecker
* It initially renames temporal_layer.h to vp8_temporal_layers.h and
moved it into the include/ folder
* It removes the dependency on VideoCodec, which was essentially only
used to determine if screenshare_layers or default_temporal_layers
should be used, and the number of temporal temporal layers to use.
Subsequent CLs will make further cleanup before attempting a move to api
Bug: webrtc:9012
Change-Id: I87ea7aac66d39284eaebd86aa9d015aba2eaaaea
Reviewed-on: https://webrtc-review.googlesource.com/94156
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24920}
This is a reland of 529d0d9795
Original change's description:
> Replace VideoDecoder with VideoDecoderFactory in VideoReceiveStream config.
>
> Preparation for deleting EnableFrameRecordning, and also a step
> towards landing of the new VideoStreamDecoder.
>
> Bug: webrtc:9106
> Change-Id: I50964ee458b08a702ec69b82a62e4995c57cee82
> Reviewed-on: https://webrtc-review.googlesource.com/97660
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Anders Carlsson <andersc@webrtc.org>
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24861}
Bug: webrtc:9106
Change-Id: I2eb894773b3f33ff6a980e8008e8248607e32668
Reviewed-on: https://webrtc-review.googlesource.com/102480
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24882}
This CL removes some deprecated build targets (and their headers)
from system_wrappers:
- field_trial_api
- field_trial_default
- metrics_api
- metrics_default
It also refreshes all the dependencies on field_trial.h and metrics.h.
A nice side effect is that it is finally possible to remove 'nogncheck'
from the following files (when it was used with field_trial_default
and metrics_default):
- sdk/objc/api/peerconnection/RTCMetricsSampleInfo+Private.h
- sdk/android/src/jni/pc/peerconnectionfactory.cc
- sdk/objc/api/peerconnection/RTCFieldTrials.mm
Bug: webrtc:9631
Change-Id: Ib621f41ef8ad0aba4fe1c1d7e749c044afc956c3
No-Try: True
Reviewed-on: https://webrtc-review.googlesource.com/100524
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24878}
Preparation for deleting EnableFrameRecordning, and also a step
towards landing of the new VideoStreamDecoder.
Bug: webrtc:9106
Change-Id: I50964ee458b08a702ec69b82a62e4995c57cee82
Reviewed-on: https://webrtc-review.googlesource.com/97660
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24861}
Intention is to make the member private, but downstream callers
must be updated to use the accessor methods first.
Bug: webrtc:9378
Change-Id: I3495bd8d545b7234fbea10abfd14f082caa420b6
Reviewed-on: https://webrtc-review.googlesource.com/82160
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24352}
This reverts commit ced5cfdb35.
Reason for revert: Breaks downstream project.
Original change's description:
> Add initial support for RtpEncodingParameters max_framerate.
>
> Add support to set the framerate to the maximum of |max_framerate|.
> Different framerates are currently not supported per stream for video.
>
> Bug: webrtc:9597
> Change-Id: Ie326617b66bd97be387f809a7f82b97b8f3ff5fe
> Reviewed-on: https://webrtc-review.googlesource.com/92392
> Reviewed-by: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Steve Anton <steveanton@webrtc.org>
> Commit-Queue: Åsa Persson <asapersson@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#24270}
TBR=steveanton@webrtc.org,magjed@webrtc.org,asapersson@webrtc.org,sprang@webrtc.org,srte@webrtc.org
Change-Id: I508fe48e0c53996654f657357913ac307dc256bd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:9597
Reviewed-on: https://webrtc-review.googlesource.com/94060
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24277}
Add support to set the framerate to the maximum of |max_framerate|.
Different framerates are currently not supported per stream for video.
Bug: webrtc:9597
Change-Id: Ie326617b66bd97be387f809a7f82b97b8f3ff5fe
Reviewed-on: https://webrtc-review.googlesource.com/92392
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24270}
- Move PayloadRouter to RtpTransportControllerInterface.
- Move RetransmissionLimiter inside RtpTransportControllerSend from
VideoSendStreamImpl.
- Move video RTP specifics into PayloadRouter, in particular ownership
of the RTP modules.
- PayloadRouter now contains all video specific RTP code, and will be
renamed in a follow-up to VideoRtpSender.
- Introduce VideoRtpSenderInterface.
Bug: webrtc:9517
Change-Id: I1c7b293fa6f9c320286c80533b3c584498034a38
Reviewed-on: https://webrtc-review.googlesource.com/88240
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24009}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameters 'audio call video':
#!/bin/bash
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"(../)*api:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: I02c5db956846a88a268a300ba086703a02d62e36
Reviewed-on: https://webrtc-review.googlesource.com/83722
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23628}
This replaces webrtc::VideoSendStream::DegradationPreference with
webrtc::DegradationPreference, and adds "DISABLED".
It's still not wired up from RtpSenderInterface::SetParameters to the
underlying video engine; that would be the next step.
Bug: webrtc:8830
Change-Id: I582ffd04eaef33c73d9892e52e789804c933b864
Reviewed-on: https://webrtc-review.googlesource.com/77024
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23276}
This is a followup to cl https://webrtc-review.googlesource.com/71380,
which reworked the way encoder resilience is done, and made the
nack_enabled flag unused.
Bug: webrtc:8830
Change-Id: I3de2508c97bc71e01c8f2232d16cd1f33e57fe4a
Reviewed-on: https://webrtc-review.googlesource.com/69986
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23080}
This deletes the resilienceOn flag in VideoCodecVP8 and VideoCodecVP9.
Instead, the implementations of VP8 and VP9 set resilience mode
internally, based on the configuration of temporal and spatial layers.
The nack_enabled argument to VideoCodecInitializer::SetupCodec becomes
unused with this cl. In a followup, it will be deleted, together with
the corresponding argument to VideoStreamEncoder methods.
An applications which really wants to configure resilience differently
can do that by injecting an EncoderFactory with encoders behaving
as desired.
Bug: webrtc:8830
Change-Id: I9990faf07d3e95c0fb4a56fcc9a56c2005b4a6fa
Reviewed-on: https://webrtc-review.googlesource.com/71380
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23025}
Since the webrtc_common build target does not have visibility set, we
cannot easily use BitrateAllocation in other parts of Chromium.
This is currently blocking parts of chromium:794608, and I know of other
usage outside webrtc already, so moving it to api/ should be warranted.
Also, since there's some naming confusion and this class is video
specific rename it VideoBitrateAllocation. This also fits with the
standard interface for producing these: VideoBitrateAllocator.
Bug: chromium:794608
Change-Id: I4c0fae40f9365e860c605a76a4f67ecc9b9cf9fe
Reviewed-on: https://webrtc-review.googlesource.com/70783
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22986}
We only support on (formely kResilientStream) and off (formely
kResilienceOff). The third mode, kResilientFrames, was not
implemented.
Bug: None
Change-Id: Ida82f6a33eda9d943ea70bc8ae4e6bddb720b0e8
Reviewed-on: https://webrtc-review.googlesource.com/71481
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22984}
This is a reland of fb82fcc7f9
Original change's description:
> Move creating encoder to VideoStreamEncoder.
>
> This used to be in WebRtcVideoChannel::WebRtcVideoSendStream.
> One implication is that encoder is not created until the first
> frame arrives, and some of the tests needed updates to emit a
> frame or two.
>
> Bug: webrtc:8830
> Change-Id: I78169b2bb4dfa4197b4b4229af9fd69d0f747835
> Reviewed-on: https://webrtc-review.googlesource.com/64885
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22905}
TBR=magjed@webrtc.org,kwiberg@webrtc.org
Bug: webrtc:8830
Change-Id: I9565095ea1880fb49d15111198c08b2fcb84f18c
Reviewed-on: https://webrtc-review.googlesource.com/70740
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22930}
This reverts commit fb82fcc7f9.
Reason for revert: Appears to break Chromium, see https://ci.chromium.org/buildbot/chromium.webrtc.fyi/Linux%20Tester/43756, where remoting_unittests failed.
Original change's description:
> Move creating encoder to VideoStreamEncoder.
>
> This used to be in WebRtcVideoChannel::WebRtcVideoSendStream.
> One implication is that encoder is not created until the first
> frame arrives, and some of the tests needed updates to emit a
> frame or two.
>
> Bug: webrtc:8830
> Change-Id: I78169b2bb4dfa4197b4b4229af9fd69d0f747835
> Reviewed-on: https://webrtc-review.googlesource.com/64885
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22905}
TBR=magjed@webrtc.org,kwiberg@webrtc.org,nisse@webrtc.org,sprang@webrtc.org,stefan@webrtc.org
Change-Id: I47ee3ac42e62472d825a08c98e28f9ae53ec9fff
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8830
Reviewed-on: https://webrtc-review.googlesource.com/70600
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22914}
This used to be in WebRtcVideoChannel::WebRtcVideoSendStream.
One implication is that encoder is not created until the first
frame arrives, and some of the tests needed updates to emit a
frame or two.
Bug: webrtc:8830
Change-Id: I78169b2bb4dfa4197b4b4229af9fd69d0f747835
Reviewed-on: https://webrtc-review.googlesource.com/64885
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22905}
This is a reland of dcc7e88cc7
Original change's description:
> Storing frame if encoder is paused.
>
> Adds a pending frame to VideoStreamEncoder that is used to store frames
> that are not sent because the encoder is paused. If the encoder is
> resumed within 200 ms, the pending frame will be encoded and sent. This
> ensures that resuming a stream instantly starts sending frames if it is
> possible.
>
> This also protects against a race between submitting the first frame
> and enabling the encoder that caused flakiness in end to end tests
> when using the task queue based congestion controller.
>
> Bug: webrtc:8415
> Change-Id: If4bd897187fbfdc4926855f39503230bdad4a93a
> Reviewed-on: https://webrtc-review.googlesource.com/67141
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22781}
Bug: webrtc:8415
Change-Id: I0ea7d4d679e7845907cfbe9a120f128ff2180e4b
Reviewed-on: https://webrtc-review.googlesource.com/68580
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22810}
This reverts commit dcc7e88cc7.
Reason for revert: breaks downstream projects
Original change's description:
> Storing frame if encoder is paused.
>
> Adds a pending frame to VideoStreamEncoder that is used to store frames
> that are not sent because the encoder is paused. If the encoder is
> resumed within 200 ms, the pending frame will be encoded and sent. This
> ensures that resuming a stream instantly starts sending frames if it is
> possible.
>
> This also protects against a race between submitting the first frame
> and enabling the encoder that caused flakiness in end to end tests
> when using the task queue based congestion controller.
>
> Bug: webrtc:8415
> Change-Id: If4bd897187fbfdc4926855f39503230bdad4a93a
> Reviewed-on: https://webrtc-review.googlesource.com/67141
> Commit-Queue: Sebastian Jansson <srte@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22781}
TBR=sprang@webrtc.org,srte@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8415
Change-Id: I4449eca65a64e2bc2fb25d866e5775e9a085cee9
Reviewed-on: https://webrtc-review.googlesource.com/68280
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22788}
Adds a pending frame to VideoStreamEncoder that is used to store frames
that are not sent because the encoder is paused. If the encoder is
resumed within 200 ms, the pending frame will be encoded and sent. This
ensures that resuming a stream instantly starts sending frames if it is
possible.
This also protects against a race between submitting the first frame
and enabling the encoder that caused flakiness in end to end tests
when using the task queue based congestion controller.
Bug: webrtc:8415
Change-Id: If4bd897187fbfdc4926855f39503230bdad4a93a
Reviewed-on: https://webrtc-review.googlesource.com/67141
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22781}
This will enable changing thresholds when switching between hardware
and software encoders. It is also a partial revert of
https://webrtc-review.googlesource.com/33340: construction of the
OveruseFrameDetector is still in VideoSendStream, but configuration is
moved back to VideoStreamEncoder.
Longer term, information about HW vs SW, or generally, about resources
consumed by the encoder, should be passed in the per-frame callbacks
to OveruseFrameDetector, and then the CpuOveruseOptions could move
back to construction time.
Bug: webrtc:8504, webrtc:8830
Change-Id: I44577519d4e05356730cac9bd9ae3c74bfc17ed7
Reviewed-on: https://webrtc-review.googlesource.com/65163
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22761}
This reverts commit 04dd176862.
Reason for revert: Regression in ramp up perf tests.
Original change's description:
> Reland "Move rtp-specific config out of EncoderSettings."
>
> This is a reland of bc900cb1d1
>
> Original change's description:
> > Move rtp-specific config out of EncoderSettings.
> >
> > In VideoSendStream::Config, move payload_name and payload_type from
> > EncoderSettings to Rtp.
> >
> > EncoderSettings now contains configuration for VideoStreamEncoder only,
> > and should perhaps be renamed in a follow up cl. It's no longer
> > passed as an argument to VideoCodecInitializer::SetupCodec.
> >
> > The latter then needs a different way to know the codec type,
> > which is provided by a new codec_type member in VideoEncoderConfig.
> >
> > Bug: webrtc:8830
> > Change-Id: Ifcc691aef1ee6a95e43c0452c5e630d92a511cd6
> > Reviewed-on: https://webrtc-review.googlesource.com/62062
> > Commit-Queue: Niels Moller <nisse@webrtc.org>
> > Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22532}
>
> Bug: webrtc:8830
> Change-Id: If88ef7d57cdaa4fae3c7b2a97ea5a6e1b833e019
> Reviewed-on: https://webrtc-review.googlesource.com/63721
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22595}
TBR=brandtr@webrtc.org,magjed@webrtc.org,nisse@webrtc.org,stefan@webrtc.org
Bug: webrtc:8830,chromium:827080
Change-Id: Iaaf146de91ec5c0d741b8efdf143f7e173084fef
Reviewed-on: https://webrtc-review.googlesource.com/65520
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22677}
The configurator decides number of spatial layers, their resolution
and bitrate thresholds based on given input resolution and maximum
number of spatial layers.
The allocator distributes available bitrate across spatial and
temporal layers. If there is not enough bitrate to provide acceptable
quality for all spatial layers allocator disables enhancement layers
one by one until the condition is met or number of layers is reduced
to one.
VP9 SVC related unit tests have been updated. Input resolution and
bitrate in these tests have been increased to the level enough to
provide desirable number of spatial layers.
Bug: webrtc:8518
Change-Id: I9df790920227c7f7dd4d42a50a856c22f0f4389b
Reviewed-on: https://webrtc-review.googlesource.com/60340
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Michael Horowitz <mhoro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22672}
It would be nice to also delete the fields from CodecSpecificInfo,
but those fields are used on the receive side.
Bug: webrtc:8830
Change-Id: I1a3f13ea2c024cbd73b33fd9dd58e531d3576a55
Reviewed-on: https://webrtc-review.googlesource.com/64780
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22625}
This is a reland of bc900cb1d1
Original change's description:
> Move rtp-specific config out of EncoderSettings.
>
> In VideoSendStream::Config, move payload_name and payload_type from
> EncoderSettings to Rtp.
>
> EncoderSettings now contains configuration for VideoStreamEncoder only,
> and should perhaps be renamed in a follow up cl. It's no longer
> passed as an argument to VideoCodecInitializer::SetupCodec.
>
> The latter then needs a different way to know the codec type,
> which is provided by a new codec_type member in VideoEncoderConfig.
>
> Bug: webrtc:8830
> Change-Id: Ifcc691aef1ee6a95e43c0452c5e630d92a511cd6
> Reviewed-on: https://webrtc-review.googlesource.com/62062
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22532}
Bug: webrtc:8830
Change-Id: If88ef7d57cdaa4fae3c7b2a97ea5a6e1b833e019
Reviewed-on: https://webrtc-review.googlesource.com/63721
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22595}
This reverts commit bc900cb1d1.
Reason for revert: Broke downstream projects.
Original change's description:
> Move rtp-specific config out of EncoderSettings.
>
> In VideoSendStream::Config, move payload_name and payload_type from
> EncoderSettings to Rtp.
>
> EncoderSettings now contains configuration for VideoStreamEncoder only,
> and should perhaps be renamed in a follow up cl. It's no longer
> passed as an argument to VideoCodecInitializer::SetupCodec.
>
> The latter then needs a different way to know the codec type,
> which is provided by a new codec_type member in VideoEncoderConfig.
>
> Bug: webrtc:8830
> Change-Id: Ifcc691aef1ee6a95e43c0452c5e630d92a511cd6
> Reviewed-on: https://webrtc-review.googlesource.com/62062
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22532}
TBR=brandtr@webrtc.org,magjed@webrtc.org,nisse@webrtc.org,stefan@webrtc.org
Change-Id: I01f06c1fcf21eb2cd40dca7d4f268614200ee490
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8830
Reviewed-on: https://webrtc-review.googlesource.com/63720
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22537}
In VideoSendStream::Config, move payload_name and payload_type from
EncoderSettings to Rtp.
EncoderSettings now contains configuration for VideoStreamEncoder only,
and should perhaps be renamed in a follow up cl. It's no longer
passed as an argument to VideoCodecInitializer::SetupCodec.
The latter then needs a different way to know the codec type,
which is provided by a new codec_type member in VideoEncoderConfig.
Bug: webrtc:8830
Change-Id: Ifcc691aef1ee6a95e43c0452c5e630d92a511cd6
Reviewed-on: https://webrtc-review.googlesource.com/62062
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22532}
As the rate allocation has been moved into entirely into
SimulcastRateAllocator, and the listeners are thus no longer needed,
this class doesn't fill any other purpose than to determine if
ScreenshareLayers or TemporalLayers should be created for a given
simulcast stream. This can however be done just from looking at the
VideoCodec instance, so changing this into a static factory method.
Due to dependencies from upstream projects, keep the class name and
field in VideoCodec around for now.
Bug: webrtc:9012
Change-Id: I028fe6b2a19e0d16b35956cc2df01dcf5bfa7979
Reviewed-on: https://webrtc-review.googlesource.com/63264
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22529}
This reverts commit e27e0aca94.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Revert "Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers."
>
> This reverts commit d2ed0a4c9e.
>
> Reason for revert: Breaks downstream projects.
>
> Original change's description:
> > Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
> >
> > temporal_layer_thresholds_bps served only one purpose: its size was used
> > to infer number of temporal layers. I replaced it with num_temporal_layers,
> > which does what is says.
> >
> > The practical reason for this change is the need to have possibility to
> > distinguish between cases when VP9 SVC temporal layering was/not set
> > through field trial. That was not possible with
> > temporal_layer_thresholds_bps[] because empty vector means 1 temporal
> > layer.
> >
> > Bug: webrtc:8518
> > Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
> > Reviewed-on: https://webrtc-review.googlesource.com/58084
> > Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> > Reviewed-by: Erik Språng <sprang@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#22230}
>
> TBR=sprang@webrtc.org,stefan@webrtc.org,ssilkin@webrtc.org
>
> Change-Id: Ic2940f7f78a74312170940d51ad8967cde8ad42f
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:8518
> Reviewed-on: https://webrtc-review.googlesource.com/58902
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Commit-Queue: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22234}
TBR=sprang@webrtc.org,stefan@webrtc.org,philipel@webrtc.org,ssilkin@webrtc.org
Change-Id: I1900c6b845b9baa9430fb72c3f4e7f2a44b3a8b1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8518
Reviewed-on: https://webrtc-review.googlesource.com/59160
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22256}
This reverts commit d2ed0a4c9e.
Reason for revert: Breaks downstream projects.
Original change's description:
> Replaced temporal_layer_thresholds_bps[] field with num_temporal_layers.
>
> temporal_layer_thresholds_bps served only one purpose: its size was used
> to infer number of temporal layers. I replaced it with num_temporal_layers,
> which does what is says.
>
> The practical reason for this change is the need to have possibility to
> distinguish between cases when VP9 SVC temporal layering was/not set
> through field trial. That was not possible with
> temporal_layer_thresholds_bps[] because empty vector means 1 temporal
> layer.
>
> Bug: webrtc:8518
> Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
> Reviewed-on: https://webrtc-review.googlesource.com/58084
> Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22230}
TBR=sprang@webrtc.org,stefan@webrtc.org,ssilkin@webrtc.org
Change-Id: Ic2940f7f78a74312170940d51ad8967cde8ad42f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8518
Reviewed-on: https://webrtc-review.googlesource.com/58902
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22234}
temporal_layer_thresholds_bps served only one purpose: its size was used
to infer number of temporal layers. I replaced it with num_temporal_layers,
which does what is says.
The practical reason for this change is the need to have possibility to
distinguish between cases when VP9 SVC temporal layering was/not set
through field trial. That was not possible with
temporal_layer_thresholds_bps[] because empty vector means 1 temporal
layer.
Bug: webrtc:8518
Change-Id: I275ec3a8c74e8ba409eb049878199f132a20ec51
Reviewed-on: https://webrtc-review.googlesource.com/58084
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22230}
Overriding implementations of VideoEncoder::GetScalingSettings that
want to enable quality scaling must now provide the thresholds.
Bug: webrtc:8830
Change-Id: I75c47cb56ac1b9cf77401684980b3167e485f51c
Reviewed-on: https://webrtc-review.googlesource.com/46622
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22172}
Intended to make it easier to wire up cpu-adaptation experiments.
To setup the circular references between OveruseFrameDetector and
VideoStreamEncoder, let the AdaptationObserverInterface pointer be
an argument to StartCheckForOveruse.
Bug: webrtc:8504
Change-Id: Ifcf7655ec65e637819d77f507552cb22a6aa5f0f
Reviewed-on: https://webrtc-review.googlesource.com/33340
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22006}
And wire it up to methods on RTCConfiguration, via MediaConfig::Video.
Bug: webrtc:8504
Change-Id: I30805ee20c11d1d2fe552eb81f16d514db0ba4a8
Reviewed-on: https://webrtc-review.googlesource.com/39786
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21670}
In balanced adaptation mode, a 1280x720 feed would only ever be reduced in
resolution twice, and would never have its framerate reduced (due to an
interaction with MinFps()).
This change removes the hard limits entirely, instead relying only on
kMinFramerateFps and VideoEncoder::ScalingSettings::min_pixels_per_frame.
Deleted SinkWantsFromOveruseDetector test because it duplicates other tests.
Fixed DoesntAdaptDownPastMinFramerate; it wasn't testing what it claimed to
because it wasn't updating the fake clock correctly, meaning FPS was detected as
0, meaning framerate adaptation was never triggered.
Bug: webrtc:8068, b/38207842
Change-Id: If99d0e74c1334879c1b0c3117eb079f5f2139851
Reviewed-on: https://webrtc-review.googlesource.com/31644
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Jonathan Yu <yujo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#21312}
This callback was used only by the PrintSamplesToFile feature of
video_quality_test, which looks like it has been broken for some time
(due to mixup of capture time and ntp time).
Bug: webrtc:8504
Change-Id: I7d2b55405caeffda582ae0d6fb0e7dfdfce4c5a9
Reviewed-on: https://webrtc-review.googlesource.com/31420
Commit-Queue: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21211}
This reverts commit eee7cedf69.
Reason for revert: Intend to rework with a flag to select between old or new estimator, to be wired up as an origin-trial experiment. And old estimator deleted at a later point.
Original change's description:
> Refactor OverUseFrameDetector to use the timestamps attached to EncodedImage.
>
> Bug: webrtc:8504
> Change-Id: I3f99c3c1e528f59b45724921a91f65b485f5b820
> Reviewed-on: https://webrtc-review.googlesource.com/23720
> Commit-Queue: Niels Moller <nisse@webrtc.org>
> Reviewed-by: Erik Språng <sprang@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20979}
TBR=nisse@webrtc.org,sprang@webrtc.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: webrtc:8504
Change-Id: Ieec4624e1d6dd8472b7e89c7bd19f425d9b54533
Reviewed-on: https://webrtc-review.googlesource.com/30180
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21115}
In https://webrtc-review.googlesource.com/c/src/+/1560 we moved WebRTC
from src/webrtc to src/ (in order to preserve an healthy git history).
This CL takes care of fixing header guards, #include paths, etc...
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iea91618212bee0af16aa3f05071eab8f93706578
Reviewed-on: https://webrtc-review.googlesource.com/1561
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19846}
In order to eliminate the WebRTC Subtree mirror in Chromium,
WebRTC is moving the content of the src/webrtc directory up
to the src/ directory.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
TBR=tommi@webrtc.org
Bug: chromium:611808
Change-Id: Iac59c5b51b950f174119565bac87955a7994bc38
Reviewed-on: https://webrtc-review.googlesource.com/1560
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Henrik Kjellander <kjellander@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19845}