Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(529)

Unified Diff: content/renderer/media/rtc_peer_connection_handler.h

Issue 2953513003: RTCPeerConnectionHandler using WebRtcMediaStreamAdapterMap. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/rtc_peer_connection_handler.h
diff --git a/content/renderer/media/rtc_peer_connection_handler.h b/content/renderer/media/rtc_peer_connection_handler.h
index bd58e2df54dd4ef4f36cefc9e4466efcf8ac8508..d66086e92c0b8c73976dee5a8b605d09d6fa2ca0 100644
--- a/content/renderer/media/rtc_peer_connection_handler.h
+++ b/content/renderer/media/rtc_peer_connection_handler.h
@@ -21,6 +21,7 @@
#include "base/threading/thread_checker.h"
#include "content/common/content_export.h"
#include "content/renderer/media/webrtc/media_stream_track_metrics.h"
+#include "content/renderer/media/webrtc/webrtc_media_stream_adapter_map.h"
#include "content/renderer/media/webrtc/webrtc_media_stream_track_adapter_map.h"
#include "ipc/ipc_platform_file.h"
#include "third_party/WebKit/public/platform/WebMediaStreamSource.h"
@@ -43,7 +44,6 @@ class PeerConnectionDependencyFactory;
class PeerConnectionTracker;
class RemoteMediaStreamImpl;
class RtcDataChannelHandler;
-class WebRtcMediaStreamAdapter;
// Mockable wrapper for blink::WebRTCStatsResponse
class CONTENT_EXPORT LocalRTCStatsResponse
@@ -262,12 +262,23 @@ class CONTENT_EXPORT RTCPeerConnectionHandler
// needs to reference it, and automatically disposed when there are no longer
// any components referencing it.
scoped_refptr<WebRtcMediaStreamTrackAdapterMap> track_adapter_map_;
+ // Map and owners of stream adapters. Every stream that is in use by the peer
+ // connection has an associated blink and webrtc layer representation of it.
+ // The map keeps track of the relationship between |blink::WebMediaStream|s
+ // and |webrtc::MediaStreamInterface|s. Stream adapters are created on the fly
+ // when a component (such as |local_streams_| or a sender) needs to reference
+ // it, and automatically disposed when there are no longer any components
+ // referencing it.
+ // TODO(hbos): Update and use the map for the |remote_streams_| case too.
+ // crbug.com/705901
+ scoped_refptr<WebRtcMediaStreamAdapterMap> stream_adapter_map_;
// Local stream adapters. Every stream that is in use by the peer connection
// has an associated blink and webrtc layer representation of it. This vector
// keeps track of the relationship between |blink::WebMediaStream|s and
// |webrtc::MediaStreamInterface|s. Streams are added and removed from the
// peer connection using |AddStream| and |RemoveStream|.
- std::vector<std::unique_ptr<WebRtcMediaStreamAdapter>> local_streams_;
+ std::vector<std::unique_ptr<WebRtcMediaStreamAdapterMap::AdapterRef>>
+ local_streams_;
base::WeakPtr<PeerConnectionTracker> peer_connection_tracker_;
« no previous file with comments | « no previous file | content/renderer/media/rtc_peer_connection_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698