New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 700916 link

Starred by 37 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug


Sign in to add a comment

Complete RTCRtpSender in JavaScript

Project Member Reported by hbos@chromium.org, Mar 13 2017

Issue description

Comment 1 by hbos@chromium.org, Mar 14 2017

Blocking: 642712

Comment 2 by hbos@chromium.org, Mar 14 2017

 Issue 627261  has been merged into this issue.

Comment 3 by hbos@chromium.org, Mar 14 2017

Chrome tracking feature: https://www.chromestatus.com/feature/5347809238712320

Comment 4 by hbos@chromium.org, Mar 14 2017

Components: -Blink>WebRTC>Video -Blink>WebRTC>Audio -Blink>WebRTC>PeerConnection

Comment 5 by hbos@chromium.org, Mar 14 2017

Cc: hta@chromium.org
 Issue 651800  has been merged into this issue.

Comment 6 by foolip@chromium.org, Mar 20 2017

Blocking: 699846

Comment 7 by hbos@chromium.org, Mar 28 2017

Blockedon: 705901
Labels: -M-59 M-60
Bumping to M60. Please correct if that's wrong.

Comment 9 by hbos@chromium.org, Apr 25 2017

Summary: Complete RTCRtpSender in JavaScript (was: Expose RTCRtpSender in JavaScript)

Comment 10 by hbos@webrtc.org, May 4 2017

Blockedon: webrtc:7578
Project Member

Comment 11 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3c633b6376623a8d0de8d567a822c6b96d2c8263

commit 3c633b6376623a8d0de8d567a822c6b96d2c8263
Author: hbos <hbos@chromium.org>
Date: Fri May 05 14:35:42 2017

RTCRtpSender with track behind RuntimeEnabled flag ("RTCRtpSender")

Implements getSenders() and RTCRtpSender with a track. The other
members and methods will be added in future CLs.

Layers:
- blink::RTCRtpSender (javascript)
- WebRTCRtpSender (interface)
- content::RTCRtpSender (implementation)
- (webrtc::RtpSenderInterface)

Lookup of sender's track is done by searching local streams for the
track with the correct ID.

Spec:
- https://w3c.github.io/webrtc-pc/#rtcrtpsender-interface
- https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-getsenders

Intent to Implement & Ship:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/GnlJt54O_EY

BUG=700916

Review-Url: https://codereview.chromium.org/2749703005
Cr-Commit-Position: refs/heads/master@{#469645}

[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/chrome/browser/media/webrtc/webrtc_rtp_browsertest.cc
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/chrome/test/data/webrtc/peerconnection_rtp.js
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/content/renderer/BUILD.gn
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/content/renderer/media/rtc_peer_connection_handler.cc
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/content/renderer/media/rtc_peer_connection_handler.h
[add] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/content/renderer/media/webrtc/rtc_rtp_sender.cc
[add] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/content/renderer/media/webrtc/rtc_rtp_sender.h
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/content/renderer/media/webrtc/webrtc_media_stream_adapter.h
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/content/shell/test_runner/mock_webrtc_peer_connection_handler.cc
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/content/shell/test_runner/mock_webrtc_peer_connection_handler.h
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-idl-expected.txt
[add] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-getSenders.html
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/modules/modules_idl_files.gni
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/modules/peerconnection/BUILD.gn
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl
[add] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.cpp
[add] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.h
[add] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.idl
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/platform/BUILD.gn
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/platform/RuntimeEnabledFeatures.json5
[add] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/platform/exported/WebRTCRtpSender.cpp
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/Source/web/tests/ActiveConnectionThrottlingTest.cpp
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/public/BUILD.gn
[modify] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h
[add] https://crrev.com/3c633b6376623a8d0de8d567a822c6b96d2c8263/third_party/WebKit/public/platform/WebRTCRtpSender.h

Project Member

Comment 12 by bugdroid1@chromium.org, May 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/8e3037fb7ebef14980926800a971f590486d21fd

commit 8e3037fb7ebef14980926800a971f590486d21fd
Author: hbos <hbos@chromium.org>
Date: Tue May 30 12:29:50 2017

WebRtcMediaStreamTrackAdapter, maps 1 webrtc and 1 blink track.

RemoteMediaStreamImpl creates and owns
Remote[Audio/Video]TrackAdapter for remote audio and video tracks.
These are moved into its own file so that they can be used
independently of remote streams.

Similarly, WebRtcMediaStreamAdapter creates and owns
WebRtcAudioSink/MediaStreamVideoWebRtcSink for local audio and video
tracks.

By creating a new adapter for all kinds of tracks (local/remote x
audio/video) that can be initialized and uninitialized independently
from streams we achieve:
1) An abstraction, we can reference a track adapter without having
   different code depending on track type.
2) The ability to handle track adapters independently of stream
   adapters. This is important in the decoupling of streams and
   tracks. The RTP Media API[1]'s addTrack, removeTrack and
   replaceTrack will allow tracks to move between streams and belong
   to zero or multiple streams.

In this CL, the new WebRtcMediaStreamTrackAdapter is only used in
unittests. The plan is to update RemoteMediaStreamImpl and
WebRtcMediaStreamAdapter to reference instances of
WebRtcMediaStreamTrackAdapter, having the lifetime of tracks be
independent of their membership of a particular stream.

[1] https://w3c.github.io/webrtc-pc/#rtp-media-api

BUG= 705901 , 700916

Review-Url: https://codereview.chromium.org/2883023002
Cr-Commit-Position: refs/heads/master@{#475499}

[modify] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/renderer/BUILD.gn
[modify] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/renderer/media/remote_media_stream_impl.cc
[add] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/renderer/media/remote_media_stream_track_adapter.cc
[add] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/renderer/media/remote_media_stream_track_adapter.h
[modify] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/renderer/media/webrtc/webrtc_media_stream_adapter.cc
[add] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/renderer/media/webrtc/webrtc_media_stream_track_adapter.cc
[add] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/renderer/media/webrtc/webrtc_media_stream_track_adapter.h
[add] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_unittest.cc
[modify] https://crrev.com/8e3037fb7ebef14980926800a971f590486d21fd/content/test/BUILD.gn

Labels: -M-60 M-61
Project Member

Comment 14 by bugdroid1@chromium.org, Jun 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ebab8e6156335da0a2f87cfaea1ad8da7f5e47e1

commit ebab8e6156335da0a2f87cfaea1ad8da7f5e47e1
Author: hbos <hbos@chromium.org>
Date: Mon Jun 12 10:17:09 2017

WebRtcMediaStreamTrackMap added.

This maps id <-> WebRtcMediaStreamTrackAdapter and handles creating
track adapters if they don't already exist. Reference counting
ensures adapters exists for as long as they are referenced, and that
they are disposed and removed from the map when no longer needed.

This can in a follow-up be used by WebRtcMediaStreamAdapter ("local
streams") and RemoteMediaStreamImpl ("remote streams") to get
references to track adapters "owned" by the map instead of directly
creating and owning the sinks/adapters that a
WebRtcMediaStreamTrackAdapter consists of.

This would allow local and remote streams to reference tracks that
already exist. The map can also be used to create and own tracks that
are not associated with any streams.

BUG= 705901 , 700916

Review-Url: https://codereview.chromium.org/2887403003
Cr-Commit-Position: refs/heads/master@{#478580}

[modify] https://crrev.com/ebab8e6156335da0a2f87cfaea1ad8da7f5e47e1/content/renderer/BUILD.gn
[add] https://crrev.com/ebab8e6156335da0a2f87cfaea1ad8da7f5e47e1/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.cc
[add] https://crrev.com/ebab8e6156335da0a2f87cfaea1ad8da7f5e47e1/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h
[add] https://crrev.com/ebab8e6156335da0a2f87cfaea1ad8da7f5e47e1/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc
[modify] https://crrev.com/ebab8e6156335da0a2f87cfaea1ad8da7f5e47e1/content/test/BUILD.gn

Project Member

Comment 15 by bugdroid1@chromium.org, Jun 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/49effc1da26d29e677a79f49cf20ca85be501ee4

commit 49effc1da26d29e677a79f49cf20ca85be501ee4
Author: hbos <hbos@chromium.org>
Date: Mon Jun 12 11:44:47 2017

WebRtcMediaStreamAdapter using WebRtcMediaStreamTrackMap.

Make the WebRtcMediaStreamAdapter, which represent local streams,
use the WebRtcMediaStreamTrackMap and AdapterRef classes for the
handling of initializing, getting and uninitializing local tracks.

WebRtcMediaStreamTrackAdapter is updated to allow local tracks from
non-local sources (removed DCHECKs) which happens when redirecting
remote sources as local streams.

This is one step closer to decoupling streams and tracks.

The same thing will be done in a follow-up CL for the remote streams
case, RemoteMediaStreamImpl.

BUG= 705901 , 700916

Review-Url: https://codereview.chromium.org/2897603004
Cr-Commit-Position: refs/heads/master@{#478592}

[modify] https://crrev.com/49effc1da26d29e677a79f49cf20ca85be501ee4/content/renderer/media/peer_connection_tracker_unittest.cc
[modify] https://crrev.com/49effc1da26d29e677a79f49cf20ca85be501ee4/content/renderer/media/rtc_peer_connection_handler.cc
[modify] https://crrev.com/49effc1da26d29e677a79f49cf20ca85be501ee4/content/renderer/media/rtc_peer_connection_handler.h
[modify] https://crrev.com/49effc1da26d29e677a79f49cf20ca85be501ee4/content/renderer/media/webrtc/webrtc_media_stream_adapter.cc
[modify] https://crrev.com/49effc1da26d29e677a79f49cf20ca85be501ee4/content/renderer/media/webrtc/webrtc_media_stream_adapter.h
[modify] https://crrev.com/49effc1da26d29e677a79f49cf20ca85be501ee4/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc
[modify] https://crrev.com/49effc1da26d29e677a79f49cf20ca85be501ee4/content/renderer/media/webrtc/webrtc_media_stream_track_adapter.cc

Project Member

Comment 16 by bugdroid1@chromium.org, Jun 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7ff812ea2691302e2307ff0e5c645cce989d420b

commit 7ff812ea2691302e2307ff0e5c645cce989d420b
Author: hbos <hbos@chromium.org>
Date: Tue Jun 13 09:06:57 2017

RemoteMediaStreamImpl using WebRtcMediaStreamTrackMap.

Make the RemoteMediaStreamImpl, which represent remote streams, use
the WebRtcMediaStreamTrackMap and AdapterRef classes for the handling
of initializing, getting and uninitializing remote tracks.

This is one step closer to decoupling streams and tracks.

PeerConnectionDependencyFactory's GetWebRtcSignalingThread is only
callable from the main thread, and during initialization of the map
this thread does not exist yet. Since the webrtc signaling thread was
only used for DCHECKs and getting ahold of the webrtc signaling thread
would require significant refactoring, the DCHECKs are updated to
check that we are not on the main thread instead of checking that we
are on the webrtc signaling thread. This is good enough for our
purposes.

BUG= 705901 , 700916

Review-Url: https://codereview.chromium.org/2902733003
Cr-Commit-Position: refs/heads/master@{#478943}

[modify] https://crrev.com/7ff812ea2691302e2307ff0e5c645cce989d420b/content/renderer/media/remote_media_stream_impl.cc
[modify] https://crrev.com/7ff812ea2691302e2307ff0e5c645cce989d420b/content/renderer/media/remote_media_stream_impl.h
[modify] https://crrev.com/7ff812ea2691302e2307ff0e5c645cce989d420b/content/renderer/media/rtc_peer_connection_handler.cc
[modify] https://crrev.com/7ff812ea2691302e2307ff0e5c645cce989d420b/content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc
[modify] https://crrev.com/7ff812ea2691302e2307ff0e5c645cce989d420b/content/renderer/media/webrtc/webrtc_media_stream_track_adapter.cc
[modify] https://crrev.com/7ff812ea2691302e2307ff0e5c645cce989d420b/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.cc
[modify] https://crrev.com/7ff812ea2691302e2307ff0e5c645cce989d420b/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h
[modify] https://crrev.com/7ff812ea2691302e2307ff0e5c645cce989d420b/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map_unittest.cc

Project Member

Comment 17 by bugdroid1@chromium.org, Jun 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d6144f20a4e3e525bc3e52d097a6c20c90d615ed

commit d6144f20a4e3e525bc3e52d097a6c20c90d615ed
Author: hbos <hbos@chromium.org>
Date: Mon Jun 26 15:04:04 2017

WebRtcMediaStreamAdapterMap added.

This will take care of creating and owning stream adapters, the glue
between blink and webrtc layer media streams, independent of any one
particular component using a stream. A stream adapter exists for as
long as a component is using the stream (as long as it is holding on
to a adapter reference).

This is the stream equivalent of WebRtcMediaStreamTrackAdapterMap.
Initial PS only cares about local streams, a TODO is added to take
care of remote streams in the future.

This will allow an RTCRtpSender to reference streams that are not
part of the local stream set (added with addStream). This will
unblock addTrack. The RTCPeerConnectionHandler will make use of this
map in a small follow-up CL.

BUG=700916,  705901 

Review-Url: https://codereview.chromium.org/2946063003
Cr-Commit-Position: refs/heads/master@{#482276}

[modify] https://crrev.com/d6144f20a4e3e525bc3e52d097a6c20c90d615ed/content/renderer/BUILD.gn
[modify] https://crrev.com/d6144f20a4e3e525bc3e52d097a6c20c90d615ed/content/renderer/media/webrtc/webrtc_media_stream_adapter.cc
[add] https://crrev.com/d6144f20a4e3e525bc3e52d097a6c20c90d615ed/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.cc
[add] https://crrev.com/d6144f20a4e3e525bc3e52d097a6c20c90d615ed/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h
[add] https://crrev.com/d6144f20a4e3e525bc3e52d097a6c20c90d615ed/content/renderer/media/webrtc/webrtc_media_stream_adapter_map_unittest.cc
[modify] https://crrev.com/d6144f20a4e3e525bc3e52d097a6c20c90d615ed/content/test/BUILD.gn

Project Member

Comment 18 by bugdroid1@chromium.org, Jun 26 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/72f065897118a459b71ed840e5b9b22883ddaf5d

commit 72f065897118a459b71ed840e5b9b22883ddaf5d
Author: hbos <hbos@chromium.org>
Date: Mon Jun 26 16:38:05 2017

RTCPeerConnectionHandler using WebRtcMediaStreamAdapterMap.

Instead of local_streams_ owning the adapters, the map owns them and
local_streams_ references stream adapters. This makes it possible for
local stream adapters to exist that are not part of the local_streams_
vector. This unblocks addTrack, which will require senders to reference
streams (stream adapters) that may not necessarily be part of
local_streams_.

BUG=700916,  705901 

Review-Url: https://codereview.chromium.org/2953513003
Cr-Commit-Position: refs/heads/master@{#482292}

[modify] https://crrev.com/72f065897118a459b71ed840e5b9b22883ddaf5d/content/renderer/media/rtc_peer_connection_handler.cc
[modify] https://crrev.com/72f065897118a459b71ed840e5b9b22883ddaf5d/content/renderer/media/rtc_peer_connection_handler.h

Comment 19 by hbos@webrtc.org, Jun 30 2017

Blockedon: webrtc:7916

Comment 20 by hbos@chromium.org, Jul 3 2017

Blockedon: 738918

Comment 21 by hbos@chromium.org, Jul 3 2017

Blocking: 738929

Comment 22 by hbos@chromium.org, Jul 4 2017

Blockedon: 739104

Comment 23 by hbos@webrtc.org, Jul 4 2017

Blockedon: webrtc:7933
Project Member

Comment 24 by bugdroid1@chromium.org, Jul 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/93aa0e383f74ed32072fedd74baf7a486dba5702

commit 93aa0e383f74ed32072fedd74baf7a486dba5702
Author: hbos <hbos@chromium.org>
Date: Mon Jul 10 14:32:27 2017

RTCPeerConnection.addTrack and removeTrack added (behind flag).

This allows a track to be added to a peerconnection with 0 or 1
associated streams. The multiple stream case is not yet supported.
This allows tracks and streams to be attached to a peerconnection
independently of add/removeStream and is a major milestone of the
RTP Media API.

The ontrack and onended events will be added/fire on the remote end in
follow-up CLs.

Spec:
https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtrack
https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-removetrack

BUG=700916,  705901 

Review-Url: https://codereview.chromium.org/2951713002
Cr-Commit-Position: refs/heads/master@{#485264}

[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/chrome/browser/media/webrtc/webrtc_browsertest_base.cc
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/chrome/browser/media/webrtc/webrtc_browsertest_base.h
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/chrome/browser/media/webrtc/webrtc_rtp_browsertest.cc
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/chrome/test/data/webrtc/munge_sdp.js
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/chrome/test/data/webrtc/peerconnection.js
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/chrome/test/data/webrtc/peerconnection_rtp.js
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/content/renderer/media/rtc_peer_connection_handler.cc
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/content/renderer/media/rtc_peer_connection_handler.h
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/content/renderer/media/webrtc/rtc_rtp_sender.cc
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/content/renderer/media/webrtc/rtc_rtp_sender.h
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/content/shell/test_runner/mock_webrtc_peer_connection_handler.cc
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/content/shell/test_runner/mock_webrtc_peer_connection_handler.h
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/LayoutTests/external/wpt/webrtc/RTCPeerConnection-idl-expected.txt
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/LayoutTests/external/wpt/webrtc/interfaces-expected.txt
[add] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-AddRemoveTrack.html
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/LayoutTests/fast/peerconnection/RTCPeerConnection-getSenders.html
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/LayoutTests/virtual/service-worker-navigation-preload-disabled/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.idl
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.cpp
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/Source/modules/peerconnection/RTCRtpSender.h
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.cpp
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/Source/platform/testing/TestingPlatformSupportWithWebRTC.h
[modify] https://crrev.com/93aa0e383f74ed32072fedd74baf7a486dba5702/third_party/WebKit/public/platform/WebRTCPeerConnectionHandler.h

Shall we change the milestone to M62 (assuming it will go on since it's currently blocked on multiple issues)?
Project Member

Comment 26 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a

commit 1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a
Author: Henrik Boström <hbos@chromium.org>
Date: Wed Aug 16 16:44:56 2017

RTCPeerConnectionHandler: Keep track of senders.

Re-upload of https://chromium-review.googlesource.com/c/567184

https://chromium-review.googlesource.com/c/566806 showed that the
WebRtcRtpBrowserTest.AddAndRemoveTracks* tests would reliably crash
if the garbage collector was invoked between addTrack and getSenders.
Tracks that were added using addTrack would have their track adapters
(glue between blink and webrtc) kept alive only by the blink layer
sender holding on to a reference, since these were not kept alive by
any "local streams" holding a reference.

The blink::RTCPeerConnection now holds a strong reference to senders
and receivers to prevent GC while in-use, with TODOs to remove ones
no longer used when addStream/removeStream is implemented using
addTrack/removeTrack.

Furthermore the content::RTCPeerConnectionHandler holds on to the
content layer representation of senders so that their associated set
of streams are not forgotten between addTrack and getSenders.

Having the handler keep track of senders is good practice, this gets
rid of the assumption that blink layer senders have to be kept alive.
A TODO was added to do the same for receivers (not yet required because
blink layer receivers are kept alive).

With this change, the AddAndRemoveTracks* tests pass and are
re-enabled.

TBR=deadbeef@chromium.org,jochen@chromium.org

Bug: 700916,  740650 ,  746971 
Change-Id: I8591b2596cc283c1f1eae6aa6dcfde63f704bd44
Reviewed-on: https://chromium-review.googlesource.com/581207
Reviewed-by: Guido Urdaneta <guidou@chromium.org>
Commit-Queue: Henrik Boström <hbos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494823}
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/chrome/browser/media/webrtc/webrtc_rtp_browsertest.cc
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/content/renderer/media/rtc_peer_connection_handler.cc
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/content/renderer/media/rtc_peer_connection_handler.h
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/content/renderer/media/webrtc/rtc_rtp_sender.cc
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/content/renderer/media/webrtc/rtc_rtp_sender.h
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.cc
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.cc
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
[modify] https://crrev.com/1110d5d63a33b37b6636d5dd95d0dd2992cb7c4a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.h

Comment 27 by hbos@chromium.org, Aug 23 2017

Blockedon: 741619

Comment 28 by hbos@chromium.org, Aug 23 2017

Blockedon: 741618

Comment 29 by hbos@chromium.org, Aug 29 2017

Blockedon: 760107

Comment 30 by hbos@chromium.org, Aug 29 2017

Labels: -M-61 M-64

Comment 31 by hbos@webrtc.org, Aug 30 2017

Blockedon: -webrtc:7933
Cc: zstein@chromium.org

Comment 33 by hbos@chromium.org, Nov 27 2017

Blockedon: 788558

Comment 34 by hbos@webrtc.org, Nov 30 2017

Blockedon: webrtc:8377

Comment 35 by hbos@webrtc.org, Nov 30 2017

Blockedon: webrtc:7932

Comment 36 by hbos@webrtc.org, Nov 30 2017

Blockedon: webrtc:7933

Comment 37 by hbos@chromium.org, Nov 30 2017

Blockedon: 769743

Comment 38 by hbos@chromium.org, Nov 30 2017

Note: addTrack/removeTrack/getSenders/ontrack is shipping:  https://crbug.com/760107 
This bug tracks full RTCRtpSender support.

Comment 39 by hbos@chromium.org, Nov 30 2017

Blockedon: 790007

Comment 40 by hbos@chromium.org, Jan 17 2018

Components: -Blink>WebRTC>Network Blink>WebRTC>PeerConnection

Comment 41 by hbos@chromium.org, Jan 17 2018

Blocking: -699846

Comment 42 by hbos@chromium.org, Jan 17 2018

Blocking: -738929

Comment 43 by hbos@chromium.org, Jan 17 2018

Blocking: -642712

Comment 44 by hbos@chromium.org, Jan 17 2018

Blockedon: 642712
Blockedon: 803494
Cc: orphis@chromium.org hbos@chromium.org
Labels: -M-64
Owner: ----
Work is tracked in other bugs, this bug is just referencing those with blockedons. Actual remaining work like get/setParameters is assigned to orphis@.
Status: Available (was: Started)
This issue has been marked as started, but has no owner. Making available.

Sign in to add a comment