This is to keep the deprecated VideoReceiver separate from the
implementation used by VideoReceiver2 before updating
VCMDecoderDatabase to have ownership of the registered decoders.
Fixing typo (DataBase->Database) in the name of the remaining class.
Bug: webrtc:14486, webrtc:14497
Change-Id: I5ee755921454b0831b3af6d0161f5b48c7c60540
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/276781
Commit-Queue: Tomas Gunnarsson <tommi@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#38247}
This patch takes a stab at modules/video_coding,
but reaches only about half.
Bug: webrtc:10335
Change-Id: I0d47d0468b818145470c51ae4e8e75ff58d499ae
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/256112
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#36335}
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}
They are called only from VideoReceiveStream, which can access
VCMTiming directly.
Bug: webrtc:7408
Change-Id: Ibf5799b1441c00b41143342ca1d99024cb68ba17
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133569
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27700}
VCMReceiveStatisticsCallback originates in the old jitter buffer, and
is no longer used.
VCMFrameTypeCallback originates in VideoReceiver::RequestKeyFrame,
which is called from OncomingPacket, Process, Decode(uint16_t
maxWaitTimeMs), all of which are unused by VideoReceiveStream.
So delete the code to wire them up via VideoStreamDecoder.
Bug: webrtc:7408
Change-Id: I173bc94eb32f2641f943c125083db038c3bcaeb1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/128870
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27277}
This CL takes a few parts of VCMEncodedFrameCallback and
VCMGenericEncoder and folds some aspect directly into
VideoStreamEncoder. Parts related to timing frames are extracted
into a new class FrameEncodeTimer that explicitly handles that.
Bug: webrtc:10164
Change-Id: I9b26f734473b659e4093c84c09fb0ed441290e40
Reviewed-on: https://webrtc-review.googlesource.com/c/124122
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26862}
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 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}
If rate controller is trusted, we disable the frame dropper in the
media optimization module.
This is a re-land of
https://webrtc-review.googlesource.com/c/src/+/105020
Bug: webrtc:9890
Change-Id: I418e47a43a1a98cb2fd5295c03360b954f2288f2
Reviewed-on: https://webrtc-review.googlesource.com/c/109141
Commit-Queue: Erik Språng <sprang@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25570}
Will be deleted as soon as downstream calls of
VideoCodingModule::Create are updated.
Tbr: sprang@webrtc.org # Trivial change in video/
Bug: webrtc:3380
Change-Id: Iaeb6da2fb68991225fe9086ddddd4a553e1620b4
Reviewed-on: https://webrtc-review.googlesource.com/c/107890
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#25554}
Use in VideoQualityTest replaced by creating a wrapper for the decoder,
similarly to https://webrtc-review.googlesource.com/94152 which
deleted the corresponding method on VideoSendStream.
Bug: webrtc:9106
Change-Id: I0a7798bc44704af8b36017655b9ffa34fa1423e6
Reviewed-on: https://webrtc-review.googlesource.com/97580
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24926}
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 reland of c75f1e4509.
Original change's description:
> Reduce locking in VideoReceiver and check the threading model.
>
> Note: This is a subset of code that was previously reviewed here:
> - https://codereview.webrtc.org/2764573002/
>
> * Added two notification methods, DecoderThreadStarting() and DecoderThreadStopped()
> * Allows us to establish a period when the decoder thread is not running and it is
> safe to modify variables such as callbacks, that are only read when the decoder
> thread is running.
> * Allows us to DCHECK thread guarantees/correctness.
> * Allows synchronizing callbacks from the module process thread and have them only
> active while the decoder thread is running.
> * The above, allows us to establish two modes for the thread,
> single-threaded-mutable and multi-threaded-const.
> * Using that knowledge, we can remove |receive_crit_| as well as locking for a
> number of member variables.
> * Removed |VCMFrameBuffer _frameFromFile| (unused).
> * Clean up several of my TODOs
>
> Bug: webrtc:7361, chromium:695438
> Change-Id: Id0048ee9624f76103c088d02825eb5c0d6c8913c
> Reviewed-on: https://webrtc-review.googlesource.com/55000
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22133}
Bug: webrtc:7361, chromium:695438
Change-Id: I32e1dc6c62cb30ad96e6366106f39fe415de49f1
Tbr: philipel@webrtc.org
Reviewed-on: https://webrtc-review.googlesource.com/56803
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22163}
This reverts commit c75f1e4509.
Reason for revert: Breaking internal project
Original change's description:
> Reduce locking in VideoReceiver and check the threading model.
>
> Note: This is a subset of code that was previously reviewed here:
> - https://codereview.webrtc.org/2764573002/
>
> * Added two notification methods, DecoderThreadStarting() and DecoderThreadStopped()
> * Allows us to establish a period when the decoder thread is not running and it is
> safe to modify variables such as callbacks, that are only read when the decoder
> thread is running.
> * Allows us to DCHECK thread guarantees/correctness.
> * Allows synchronizing callbacks from the module process thread and have them only
> active while the decoder thread is running.
> * The above, allows us to establish two modes for the thread,
> single-threaded-mutable and multi-threaded-const.
> * Using that knowledge, we can remove |receive_crit_| as well as locking for a
> number of member variables.
> * Removed |VCMFrameBuffer _frameFromFile| (unused).
> * Clean up several of my TODOs
>
> Bug: webrtc:7361, chromium:695438
> Change-Id: Id0048ee9624f76103c088d02825eb5c0d6c8913c
> Reviewed-on: https://webrtc-review.googlesource.com/55000
> Commit-Queue: Tommi <tommi@webrtc.org>
> Reviewed-by: Philip Eliasson <philipel@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22133}
TBR=tommi@webrtc.org,philipel@webrtc.org
Change-Id: I4d78e8b2c05b36e1a3f64cb38d652579b3a23f22
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7361, chromium:695438
Reviewed-on: https://webrtc-review.googlesource.com/56280
Reviewed-by: Lu Liu <lliuu@webrtc.org>
Commit-Queue: Lu Liu <lliuu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22141}
Note: This is a subset of code that was previously reviewed here:
- https://codereview.webrtc.org/2764573002/
* Added two notification methods, DecoderThreadStarting() and DecoderThreadStopped()
* Allows us to establish a period when the decoder thread is not running and it is
safe to modify variables such as callbacks, that are only read when the decoder
thread is running.
* Allows us to DCHECK thread guarantees/correctness.
* Allows synchronizing callbacks from the module process thread and have them only
active while the decoder thread is running.
* The above, allows us to establish two modes for the thread,
single-threaded-mutable and multi-threaded-const.
* Using that knowledge, we can remove |receive_crit_| as well as locking for a
number of member variables.
* Removed |VCMFrameBuffer _frameFromFile| (unused).
* Clean up several of my TODOs
Bug: webrtc:7361, chromium:695438
Change-Id: Id0048ee9624f76103c088d02825eb5c0d6c8913c
Reviewed-on: https://webrtc-review.googlesource.com/55000
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22133}