This is the first step to removing streams from third_party/webrtc.
RtpReceiverInterface::streams() will have to be removed separately.
See https://crbug.com/webrtc/9480 for more information.
Bug: webrtc:9480
Change-Id: I6f9e6ddcda5e2245cc601d2cc6205b7b363f73ef
Reviewed-on: https://webrtc-review.googlesource.com/86840
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23929}
Those are static functions in the spec, so implemented as member functions
of the PeerConnectionFactory instead.
Bug: webrtc:7577, webrtc:9441
Change-Id: Iccb24180e096e713d24e7e25ecfd5d7bbd7638f9
Reviewed-on: https://webrtc-review.googlesource.com/85341
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23768}
This change also standardizes the RtpSender to a single constructor
and moves the |track| and |stream_ids| arguments to setter methods.
Bug: webrtc:8734
Change-Id: I227a84868a80797f6cc2a1af6eec6d76da8ea159
Reviewed-on: https://webrtc-review.googlesource.com/84248
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23730}
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 'media ortc p2p':
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: I19167714af7cc1436d34cfcba6c8b3718d8e677b
Reviewed-on: https://webrtc-review.googlesource.com/83731
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23638}
Previous code had a FakePeriodicVideoSource and a
VideoTrackSource, where the latter is reference counted and
outlives the former. That results in potential races when
RemoveSink is called on the VideoTrackSource after the
FakePeriodicVideoSource is destroyed, with a complicated sequence
to do correct shutdown.
The new class, FakePeriodicVideoTrackSource, owns a
FakePeriodicVideoSource, and they get the same lifetime.
Bug: webrtc:6353
Change-Id: Ic33b393e00a31fa28893dce2018948d3f90e0a9e
Reviewed-on: https://webrtc-review.googlesource.com/76961
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23320}
The previous effort of building WebRTC without SW codecs stopped when
libjingle_peerconnection was possible to build. In order to make the
group("default") target build, this basically updates a bunch of
tests to explicitly depend on the built-in software video codecs.
Bug: webrtc:7925
Change-Id: I2715414770c197fca01cb8dbde173a21f4434500
Reviewed-on: https://webrtc-review.googlesource.com/70503
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23216}
Switches to MAYBE_ pattern for conditional inclusion of the tests on
most platforms. Disables OneSideSrtpSenderAndReceiver and
FullTwoWayAudioVideoSrtpSendersAndReceivers. Re-enables
SrtpSendersAndReceiversWithMismatchingKeys on other platforms.
Bug: webrtc:9184
Change-Id: Ibbc23d9217c4d8140b9221e47ddffe06a522136a
Reviewed-on: https://webrtc-review.googlesource.com/72005
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Sami Kalliomäki <sakal@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23002}
BundleFilter is replaced by RtpDemuxer in RtpTransport for payload
type-based demuxing. RtpTransport will support MID-based demuxing later.
Each BaseChannel has its own RTP demuxing criteria and when connecting
to the RtpTransport, BaseChannel will register itself as a demuxer sink.
The inheritance model is changed. New inheritance chain:
DtlsSrtpTransport->SrtpTransport->RtpTranpsort
The JsepTransport2 is renamed to JsepTransport.
NOTE:
When RTCP packets are received, Call::DeliverRtcp will be called for
multiple times (webrtc:9035) which is an existing issue. With this CL,
it will become more of a problem and should be fixed.
Bug: webrtc:8587
Change-Id: Ibd880e7b744bd912336a691309950bc18e42cf62
Reviewed-on: https://webrtc-review.googlesource.com/65786
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Benjamin Wright <benwright@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22867}
The TransportController will be replaced by the JsepTransportController
and JsepTransport will be replace be JsepTransport2.
The JsepTransportController will take the entire SessionDescription
and handle the RtcpMux, Sdes and BUNDLE internally.
The ownership model is also changed. The P2P layer transports are not
ref-counted and will be owned by the JsepTransport2.
In ORTC aspect, RtpTransportAdapter is now a wrapper over RtpTransport
or SrtpTransport and it implements the public and internal interface
by calling the transport underneath.
Bug: webrtc:8587
Change-Id: Ia7fa61288a566f211f8560072ea0eecaf19e48df
Reviewed-on: https://webrtc-review.googlesource.com/59586
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22693}
This function is not present in std::optional
The only use of MoveValue doesn't need move since
copying underneath struct is as correct and as fast as moving
Bug: webrtc:9078
Change-Id: Ic0c87e50ffd8f6c024759b14ceeb8922b5d3a6fd
Reviewed-on: https://webrtc-review.googlesource.com/64986
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22646}
new is an unsafe construct, while these specific cases were properly
handled it is a code smell and using unique_ptr from the start makes the
code more obviously correct.
Bug: None
Change-Id: I2554cef8d3a8432a3ced1623292fae0adff9421d
Reviewed-on: https://webrtc-review.googlesource.com/56620
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22147}
Since rtp transport controller send owns the congestion controller it
also should own the bitrate configuration logic, this way it can
initialize the send side congestion controller with the bitrate
configuration.
Bug: webrtc:8415
Change-Id: Ifaa16139ca477cb1c80bf4aa24f17652af997553
Reviewed-on: https://webrtc-review.googlesource.com/54303
Commit-Queue: Sebastian Jansson <srte@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22127}
Original change's description:
> Update RTCStatsCollector to work with RtpTransceivers
>
> Bug: webrtc:8764
> Change-Id: I8b442345869eb6d8b65fd12241ed7cb6e7d7ce3d
> Reviewed-on: https://webrtc-review.googlesource.com/49580
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22026}
Bug: webrtc:8764
Change-Id: I6a682824febf3f4f41397fc1a8dd7396c4ffa8e3
Reviewed-on: https://webrtc-review.googlesource.com/54160
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22064}
Bug: webrtc:8764
Change-Id: I8b442345869eb6d8b65fd12241ed7cb6e7d7ce3d
Reviewed-on: https://webrtc-review.googlesource.com/49580
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22026}
This changes callbacks to OnFrame methods to occur on a task queue which
is in line with how it's called in production.
The change is essentially around inheriting from FakeVideoCapturerWithTaskQueue
instead of FakeVideoCapturer, but also removes the dependency on rtc::MessageHandler.
Along the way I'm also updating an ortc test that uses FakePeriodicVideoCapturer
and had a bug that was masked by the fact that FakePeriodicVideoCapturer
previously used rtc::Thread::Current internally, but was being called
by the wrong thread (and there were no checks for it).
As a result, I'm also adding a bunch of checks to help with correct usage.
Bug: webrtc:8841, webrtc:8848
Change-Id: I21b710873b508ebc55f8d2e4545d862766656871
Reviewed-on: https://webrtc-review.googlesource.com/49400
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21951}
This can be helpful when debugging or analyzing logcats.
Bug: webrtc:8841
Change-Id: Ic3a18ee68321edbffd92e57ccb84a7b2710e16bd
Reviewed-on: https://webrtc-review.googlesource.com/47881
Commit-Queue: Tommi <tommi@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21897}
This is a reland of 001546da95
Original change's description:
> Break up rtc_event_log_api to solve circular dependencies.
>
> The original rtc_event_log_api is refactored to a pure API target plus
> multiple targets coupled with WebRTC implementations.
>
> Bug: None
> Change-Id: Iab9eee3f7bf4228c52d94a5f26fc39bb99b5033f
> Reviewed-on: https://webrtc-review.googlesource.com/43247
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Reviewed-by: Björn Terelius <terelius@webrtc.org>
> Reviewed-by: Stefan Holmer <stefan@webrtc.org>
> Commit-Queue: Qingsi Wang <qingsi@google.com>
> Cr-Commit-Position: refs/heads/master@{#21811}
TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,terelius@webrtc.org,stefan@webrtc.org
Bug: None
Change-Id: I3e7213733741cbfd5dd0076f32209e6bc42a0647
Reviewed-on: https://webrtc-review.googlesource.com/46900
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21862}
The original rtc_event_log_api is refactored to a pure API target plus
multiple targets coupled with WebRTC implementations.
Bug: None
Change-Id: Iab9eee3f7bf4228c52d94a5f26fc39bb99b5033f
Reviewed-on: https://webrtc-review.googlesource.com/43247
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Björn Terelius <terelius@webrtc.org>
Reviewed-by: Stefan Holmer <stefan@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#21811}
This also changes RtpReceiver and RemoteAudioSource to have two-step
initialization, since in Unified Plan RtpReceivers are created much
earlier than in Plan B.
Bug: webrtc:7600
Change-Id: Ia135d25eb8bcab22969007b3a825a5a43ce62bf4
Reviewed-on: https://webrtc-review.googlesource.com/39382
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21681}
Similar to the change for RtpReceivers, this removes the BaseChannel
methods that would just proxy calls to the MediaChannel and instead
gives the MediaChannel directly to the RtpSenders to make the calls
directly.
Bug: webrtc:8587
Change-Id: Ibab98d75ff1641e902281ad9e31ffdad36caff35
Reviewed-on: https://webrtc-review.googlesource.com/38983
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21608}
This change corrects PeerConnection behavior under Unified
Plan semantics to:
- Set the RtpSender id to be the track ID if created with AddTrack.
- Put the RtpSender id in the SDP as part of the MSID.
- Set the RtpReceiver id to be the track part of the MSID
when created via SetRemoteDescription.
Also, the RtpSender constructors have been simplified to defer
mutable state (in this case, setting BaseChannels) to method calls.
Bug: webrtc:8721
Change-Id: Idc80965e2df7a803b8bbeec1d96de9ad95391cce
Reviewed-on: https://webrtc-review.googlesource.com/38480
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21563}
Currently, the RtpReceivers take a BaseChannel which is (mostly)
just used for proxying calls to the MediaChannel. This change
removes the extra layer and moves the proxying logic to RtpReceiver.
Bug: webrtc:8587
Change-Id: I01b0e3d57b4629e43d9d148cc94d6dd2941d320e
Reviewed-on: https://webrtc-review.googlesource.com/38120
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21562}
The AudioProcessingBuilder was recently introduced in https://webrtc-review.googlesource.com/c/src/+/34651 to make it easier to create APM instances. This CL replaces all calls to the old Create methods with the new AudioProcessingBuilder.
Bug: webrtc:8668
Change-Id: Ibb5f0fc0dbcc85fcf3355b01bec916f20fe0eb67
Reviewed-on: https://webrtc-review.googlesource.com/36082
Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21534}
This splits things out of rtc_base and makes dependencies explicit.
Bug: webrtc:6828
Change-Id: Id521896c3c43595349021c857bec216e429a0c8d
Reviewed-on: https://webrtc-review.googlesource.com/32780
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21264}
This splits things out of rtc_base and makes dependencies explicit.
Bug: webrtc:6828
Change-Id: Ib813c7bd9e4de7ab015acb917bc09ee7204ba7bd
Reviewed-on: https://webrtc-review.googlesource.com/31940
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21245}
Replaces cricket::RtpTransceiverDirection with
webrtc::RtpTransceiverDirection, which is part of the public API.
Bug: webrtc:8558
Change-Id: Ibfc9373e25187e98fb969e7ac937a1371c8fa4c7
Reviewed-on: https://webrtc-review.googlesource.com/24129
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Zhi Huang <zhihuang@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20899}
Changes places where we explicitly construct an Optional to instead use
nullopt or the requisite value type only.
This CL was uploaded by git cl split.
TBR=pthatcher@webrtc.org
Bug: None
Change-Id: Idb0e5e038ad59a6021cb53ef10e8f6733b1da05b
Reviewed-on: https://webrtc-review.googlesource.com/23618
Commit-Queue: Oskar Sundbom <ossu@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20864}
This makes the receiver know about its associated set of streams, the
equivalent of the [[AssociatedRemoteMediaStreams]] slot in the spec,
https://w3c.github.io/webrtc-pc/#dfn-x%5B%5Bassociatedremotemediastreams%5D%5D
This does not change layers below peerconnection.cc. The streams are set
upon the receiver's construction and is not modified for the duration of
its lifetime.
When we support modifying the associated set of streams of a receiver
the receiver needs to know about it. The receiver's streams() should be
used in all places where a receiver's streams need to be known.
Bug: webrtc:8473
Change-Id: I31202973aed98e61fa9b6a78b52e815227b6c17d
Reviewed-on: https://webrtc-review.googlesource.com/22922
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20825}
This will help keep ortc dependencies clean in the future, since
gn --check forces us to depend on components from which we include
headers.
cryptoparams.h moves into api/, but ortc appears to think it
should be there anyway. We could consider moving it into the ortc/ api,
but it doesn't appear to be specific to ortc.
Bug: webrtc:6828
Change-Id: Iddae438d10b5e84b2fbc52565364319e20f90613
Reviewed-on: https://webrtc-review.googlesource.com/22660
Commit-Queue: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20686}