And move related files into api/transport/ and api/transport/media/.
The moved files are unchanged, except that
congestion_control_interface.h and datagram_transport_interface.h
no longer include media_transport_interface.h, instead, they forward
declare the few MediaTransport* types they reference.
Bug: webrtc:8733
Change-Id: I4f4000d0d111f10d15a54c99af27ec26c46ae652
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152482
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Bjorn Mellem <mellem@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29178}
This method used to be wired down to VCMReceiver and to
VCMJitterBuffer::Stop, but has become a nop. Also delete some
obsoleted comments.
Bug: webrtc:7408
Change-Id: I4c1e67272b1ffda786cc0ff358fa38e594aff304
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/152620
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@{#29167}
The stable target rate is used to make smarter choices in the rate
to chose which layers to enable in SVC or simulcast modes.
the addition of hysteresis, we can improve a call quality by reducing
the amount of resolution switch.
Bug: webrtc:10126
Change-Id: I04d0df9e6bbe247e2f2a668207ff74d475e2464c
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150642
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29112}
The vcm::VideoReceiver class is used by both VideoReceiveStream and
the legacy api VideoCodingModule. They have different requirements,
since the latter uses the old jitterbuffer and runs the code on a
ProcessThread.
By making a copy and trimming it down to what's actually used by
VideoReceiveStream, we can drop the dependency on the old
jitterbuffer, without breaking the legacy api. This should also make
it easier to do follow-up refactorings to trim down the class further,
and ultimately remove it.
Bug: webrtc:7408
Change-Id: Iec8a167fe5d0425114b0b67a5b4c2fd5fc4fa150
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151910
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29108}
"WebRTC-VP8-Forced-Fallback-Encoder-v2" affect VP8 only, "WebRTC-Video-MinVideoBitrate" apply to all codec. When both field trial string are set, the bitrate set by "WebRTC-VP8-Forced-Fallback-Encoder-v2" will be used.
Bug: webrtc:10915
Change-Id: I63da5909c04ecfad99e93a535fbf71293890fd11
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151135
Commit-Queue: Ying Wang <yinwa@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29047}
This class doesn't strictly follow rtc::TaskQueue semantics,
which makes it surprising and hard to use correctly.
Please use TaskQueueForTest instead.
This CL follows usual deprecation process:
1/ Rename.
% for i in `git ls-files` ; sed -i "s:SingleThreadedTaskQueueForTesting:DEPRECATED_SingleThreadedTaskQueueForTesting:" $i
2/ Annotate old name for downstream users and accidental new uses.
Bug: webrtc:10933
Change-Id: I80b4ee5a48df1f63f63a43ed0efdb50eb7fb156a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150788
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Tommi <tommi@webrtc.org>
Commit-Queue: Yves Gerey <yvesg@google.com>
Cr-Commit-Position: refs/heads/master@{#29045}
The VideoBitrateAllocator subclasses may actually allocate more than the
target, in order to satisfy the min bitrate constraint. In this case,
make sure the bandwidth allocation we signal to the encoder is at least
this large.
Bug: chromium:995462
Change-Id: I08b89a7c54392330d773e13c1b0a3eff42f81672
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/151125
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29040}
There are a few reasons for making this test only:
* The code is only used by tests and utilities.
* The pure interface has only a single implementation so an interface isn't really needed.
(a followup change could remove it altogether)
* The implementation always incorporates locking regardless of how the class gets used.
See e.g. previous use in the Packet class.
* The implementation is a layer on top of RtpUtility::RtpHeaderParser which is
sufficient for most production cases.
Change-Id: Ide6d50567cf8ae5127a2eb04cceeb10cf317ec36
Bug: none
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150658
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29010}
The ScopedFakeClock contains a lock. Due to declaration order, this is
the first member of VideoStreamEncoderTest to be destroyed. However,
there are cyclic tasks that may still be running at that time, and they
may try to read the time, so if we're unlucky they may trigger a use
after free condition.
This only affects test and is simply solved by moving the declaration
to before the classes that uses it.
Bug: webrtc:10929
Change-Id: I998d5ced877f355e4a45ee5cf75b2eb75faa6113
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150795
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#29008}
The new target does not depend on libjingle_peerconnection_api, and to
do this, the named "audio" and "video" string literals had to be moved from
media_stream_interface.cc to media_types.cc.
In this cl, the dependency on libjingle_peerconnection_api can be
dropped from a few targets.
No-Presubmit: True
Bug: webrtc:8733
Change-Id: Icc675280d5c3c537f2255a9389ff18a482049921
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/53861
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28998}
This reverts commit 87bed4793ff8f463202f442381339626d0b27f0d.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Reland "Preserve min and max playout delay from RTP header extension"
>
> This reverts commit f31cc08ba01ed403e89255b5f3f38d5dbdde855e.
>
> Reason for revert: Reland with fixes
>
> Original change's description:
> > Revert "Preserve min and max playout delay from RTP header extension"
> >
> > This reverts commit 85ba9972c42544c4771e394c9aa1d20bf5d09a91.
> >
> > Reason for revert: Audio might be more out of sync than needed due to jitter in received video stream.
> >
> > Original change's description:
> > > Preserve min and max playout delay from RTP header extension
> > >
> > > Audio and video synchronization can sometimes override the minimum
> > > and maximum playout delay that is set through the RTP header
> > > extension. This CL makes sure that the playout delay always is
> > > within the limits set by the RTP header extension.
> > >
> > > Bug: webrtc:10886
> > > Change-Id: Ie2dd4b901c4ed178759b555a8be04bd8b8f63bda
> > > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150645
> > > Commit-Queue: Johannes Kron <kron@webrtc.org>
> > > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > > Cr-Commit-Position: refs/heads/master@{#28980}
> >
> > TBR=stefan@webrtc.org,kron@webrtc.org
> >
> > Change-Id: I417e440d8a7e04ab3e19faa4454b704d2b971cd7
> > No-Presubmit: true
> > No-Tree-Checks: true
> > No-Try: true
> > Bug: webrtc:10886
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150652
> > Reviewed-by: Johannes Kron <kron@webrtc.org>
> > Commit-Queue: Johannes Kron <kron@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28984}
>
> TBR=stefan@webrtc.org,kron@webrtc.org
>
> Change-Id: I5a3908a8c45f7faedab6f009b22df81d674e13a0
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10886
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150653
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28985}
TBR=stefan@webrtc.org,kron@webrtc.org
Change-Id: Id2e5d1ff804881e956a07fa4ae0f8301895dcc95
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10886
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150654
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28986}
This reverts commit f31cc08ba01ed403e89255b5f3f38d5dbdde855e.
Reason for revert: Reland with fixes
Original change's description:
> Revert "Preserve min and max playout delay from RTP header extension"
>
> This reverts commit 85ba9972c42544c4771e394c9aa1d20bf5d09a91.
>
> Reason for revert: Audio might be more out of sync than needed due to jitter in received video stream.
>
> Original change's description:
> > Preserve min and max playout delay from RTP header extension
> >
> > Audio and video synchronization can sometimes override the minimum
> > and maximum playout delay that is set through the RTP header
> > extension. This CL makes sure that the playout delay always is
> > within the limits set by the RTP header extension.
> >
> > Bug: webrtc:10886
> > Change-Id: Ie2dd4b901c4ed178759b555a8be04bd8b8f63bda
> > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150645
> > Commit-Queue: Johannes Kron <kron@webrtc.org>
> > Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> > Cr-Commit-Position: refs/heads/master@{#28980}
>
> TBR=stefan@webrtc.org,kron@webrtc.org
>
> Change-Id: I417e440d8a7e04ab3e19faa4454b704d2b971cd7
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: webrtc:10886
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150652
> Reviewed-by: Johannes Kron <kron@webrtc.org>
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28984}
TBR=stefan@webrtc.org,kron@webrtc.org
Change-Id: I5a3908a8c45f7faedab6f009b22df81d674e13a0
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10886
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150653
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28985}
This reverts commit 85ba9972c42544c4771e394c9aa1d20bf5d09a91.
Reason for revert: Audio might be more out of sync than needed due to jitter in received video stream.
Original change's description:
> Preserve min and max playout delay from RTP header extension
>
> Audio and video synchronization can sometimes override the minimum
> and maximum playout delay that is set through the RTP header
> extension. This CL makes sure that the playout delay always is
> within the limits set by the RTP header extension.
>
> Bug: webrtc:10886
> Change-Id: Ie2dd4b901c4ed178759b555a8be04bd8b8f63bda
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150645
> Commit-Queue: Johannes Kron <kron@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#28980}
TBR=stefan@webrtc.org,kron@webrtc.org
Change-Id: I417e440d8a7e04ab3e19faa4454b704d2b971cd7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:10886
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150652
Reviewed-by: Johannes Kron <kron@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28984}
Audio and video synchronization can sometimes override the minimum
and maximum playout delay that is set through the RTP header
extension. This CL makes sure that the playout delay always is
within the limits set by the RTP header extension.
Bug: webrtc:10886
Change-Id: Ie2dd4b901c4ed178759b555a8be04bd8b8f63bda
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150645
Commit-Queue: Johannes Kron <kron@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28980}
The packets belonging to a frame were kept in PacketBuffer
until the frame was decoded. This CL clears the dependencies
of an existing RtpFrameObject to PacketBuffer so that we can
free up PacketBuffer as soon as the RtpFrameObject is created.
Bug: none
Change-Id: Ic939be91815519ae1d1c67ada82006417b2d26a3
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149818
Reviewed-by: Erik Språng <sprang@webrtc.org>
Reviewed-by: Philip Eliasson <philipel@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28977}
Number of received FEC bytes is used for the
WebRTC.Video.FecBitrateReceivedInKbps UMA histogram. Before this cl,
that value is based on a FEC packet counter updated by
ReceiveStatistics::FecPacketReceived. This cl deletes that method, and
instead adds a byte count to the FecPacketCounter struct, which is
maintained by the UlpFecReceiver and used for other FEC-related stats.
Bug: webrtc:10917
Change-Id: I24bd494b6909a2fe109d28e2b71ca8f413d05911
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150533
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28976}
Add separate setting for configuring min bitrate that only applies when
adapting up in resolution.
Bug: none
Change-Id: I83d33ac3110a22602065b8d83130e3f619cb1eba
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150329
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Mirta Dvornicic <mirtad@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28970}
The |frames_dropped| statistics contain not only frames that are dropped
but also frames that are in internal queues. This CL changes that so
that |frames_dropped| only contains frames that are dropped.
Bug: chromium:990317
Change-Id: If222568501b277a75bc514661c4f8f861b56aaed
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150111
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Commit-Queue: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28968}
And a corresponding struct RtpReceiveStats. This is intended
to hold the information exposed via GetStats, which is quite
different from the stats reported to the peer via RTCP.
This is a preparation for moving ReceiveStatistics out of the
individual receive stream objects, and instead have a shared instance
owned by RtpStreamReceiverController or maybe Call.
Bug: webrtc:10679,chromium:677543
Change-Id: Ibb52ee769516ddc51da109b7f2319405693be5d5
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148982
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28943}
Deprecated the field BitrateAllocationUpdate::link_capacity since it is only
used by the Opus codec in order to smooth the target bitrate, which is
equivalent to the stable_target_bitrate field.
The unused field trial WebRTC-Bwe-StableBandwidthEstimate is also removed.
Bug: webrtc:10126
Change-Id: Ic4a8a9ca4202136d011b91dc23c3a27cfd00d975
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149839
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28941}
This CL changes the VideoFrameDumpingDecoder API to only expose a
factory function creating the wrapper instead of the full class.
Bug: webrtc:10902
Change-Id: I1e7e3a60accea1a7c48207d4262ed4bacacab4a2
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/150040
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Markus Handell <handellm@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28924}
The name media_send_ssrc makes less sense when used mostly for the
RtcpReceiver functionality.
The old member is still there and used as a fallback. That will be
cleaned away after downstream code is fixed.
Bug: webrtc:10774
Change-Id: I4ec18db76910f31dfe76bc9b137ffe89220d3fa8
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149836
Reviewed-by: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28923}
That method is going away in favor in construction time setting.
Bug: webrtc:10774
Change-Id: I2aba5a2537e5846a3c9438a5b376b230e84c5f32
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149826
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Erik Språng <sprang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28901}
This patch is a follow up to https://webrtc-review.googlesource.com/c/src/+/143177.
That patch modified the updating of CSRCS until "publishing" the frame
to the renderer, however the update was added to just after
calling renderer->OnFrame(video_frame).
This patch reverses the calls of renderer->OnFrame(video_frame)
and source_tracker_.OnFrameDelivered(video_frame.packet_infos())
so that the CSRCS are available when the frame is available.
This fixes the the flakes described in webrtc:10827 that has a
test that checks the CSRCs directly after a frame is available.
Note: an optimal/correct solution would be to update the renderer
and the source tracker in the same critical section so that they
would be available at the same time.
Bug: webrtc:10827
Change-Id: Ibf6efa832d8f2f2bcce0a9b0b946188bb67d48b1
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149171
Reviewed-by: Niels Moller <nisse@webrtc.org>
Reviewed-by: Chen Xing <chxg@google.com>
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28885}
If a framerate reduction (input fps - restricted fps) is less than the
configured diff, shorten interval to next qp check.
Bug: none
Change-Id: Ia0b9e0638e5ba75cdc20a1bb45bfcb7d858c5f89
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149040
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28880}
Add possibility to configure min bitrate based on resolution.
Only adapt up if bw estimate is above the min bitrate for next higher resolution.
Bug: none
Change-Id: Ie38faae07d23336675ec33697ace6f6fed322efa
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148598
Reviewed-by: Magnus Flodman <mflodman@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28863}
Also:
- DCHECK that bitrate limits recommended by encoder are reasonable.
- Restrict target bitrate such that it never exceed the max bitrate.
Bug: webrtc:10853
Change-Id: Ie43d30a7acfc8fa115deffd94165844248ce7945
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148442
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28822}
I've updated all the tests that previously were calling this method on
the wrong thread, so we can enable this check now.
I've also landed some changes that simplify the threading model in this
class and subsequently I've removed some locks and can remove some more
in this CL.
Added some comments about future improvements for GetStats() to reduce
synchronization.
Simplified CallStats::OnRttUpdate() to have one fewer async methods.
Bug: webrtc:10847
Change-Id: I48e6809172142cc4be4385b7d4aa2affb52a963a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148588
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Tommi <tommi@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28821}
There are currently three overloads with different number of arguments,
and one of those return a raw pointer. This cl changes that to unique_ptr.
The transition plan is to update those downstream call sites that
currently require a raw pointer to use one of the other overloads.
Bug: webrtc:10679
Change-Id: I234605e99c04a59fbe6f478581ed8edd96a9b05a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/148447
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28804}