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

Unified Diff: webrtc/api/mediastreaminterface.h

Issue 2964863002: Change VideoTrack implementation to invoke VideoTrackSourceInterface::AddOrUpdateSink on wt (Closed)
Patch Set: Changed VideoTrack to invoke changing the sink wants on the worker thread. Created 3 years, 5 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 | webrtc/ortc/ortcfactory.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/mediastreaminterface.h
diff --git a/webrtc/api/mediastreaminterface.h b/webrtc/api/mediastreaminterface.h
index 2acaa000e4898ca1f2c067d1b605b5561d42d406..b1d25f68adfa5e639ab30a556a65af3c69b6b201 100644
--- a/webrtc/api/mediastreaminterface.h
+++ b/webrtc/api/mediastreaminterface.h
@@ -105,6 +105,11 @@ class MediaStreamTrackInterface : public rtc::RefCountInterface,
// VideoTrackSourceInterface is a reference counted source used for
// VideoTracks. The same source can be used by multiple VideoTracks.
+// VideoTrackSourceInterface is designed to be invoked on the signaling thread
+// except for rtc::VideoSourceInterface<VideoFrame> methods that will be invoked
+// on the worker thread via a VideoTrack. A custom implementation of a source
+// can inherit AdaptedVideoTrackSource instead of directly implementing this
+// interface.
class VideoTrackSourceInterface
: public MediaSourceInterface,
public rtc::VideoSourceInterface<VideoFrame> {
@@ -139,6 +144,12 @@ class VideoTrackSourceInterface
virtual ~VideoTrackSourceInterface() {}
};
+// VideoTrackInterface is designed to be invoked on the signaling thread except
+// for rtc::VideoSourceInterface<VideoFrame> methods that must be invoked
+// on the worker thread.
+// PeerConnectionFactory::CreateVideoTrack can be used for creating a VideoTrack
+// that ensures thread safety and that all methods are called on the right
+// thread.
class VideoTrackInterface
: public MediaStreamTrackInterface,
public rtc::VideoSourceInterface<VideoFrame> {
@@ -148,12 +159,6 @@ class VideoTrackInterface
// See https://crbug.com/653531 and https://github.com/WICG/mst-content-hint.
enum class ContentHint { kNone, kFluid, kDetailed };
- // Register a video sink for this track. Used to connect the track to the
- // underlying video engine.
- void AddOrUpdateSink(rtc::VideoSinkInterface<VideoFrame>* sink,
- const rtc::VideoSinkWants& wants) override {}
- void RemoveSink(rtc::VideoSinkInterface<VideoFrame>* sink) override {}
-
virtual VideoTrackSourceInterface* GetSource() const = 0;
virtual ContentHint content_hint() const { return ContentHint::kNone; }
« no previous file with comments | « no previous file | webrtc/ortc/ortcfactory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698