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

Unified Diff: webrtc/api/videotrack.h

Issue 1790633002: Propagate MediaStreamSource state to video tracks the same way as audio. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@refactor_track
Patch Set: Rebased and Ios? Created 4 years, 9 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
Index: webrtc/api/videotrack.h
diff --git a/webrtc/api/videotrack.h b/webrtc/api/videotrack.h
index 57bc42fca79b3d22fb10d1af0e1a5088128d3bd8..02546efd6952645f87fde75a9b5bf2c452e38371 100644
--- a/webrtc/api/videotrack.h
+++ b/webrtc/api/videotrack.h
@@ -24,7 +24,8 @@
namespace webrtc {
class VideoTrack : public MediaStreamTrack<VideoTrackInterface>,
- public rtc::VideoSourceBase {
+ public rtc::VideoSourceBase,
+ public ObserverInterface {
public:
static rtc::scoped_refptr<VideoTrack> Create(
const std::string& label,
@@ -45,6 +46,9 @@ class VideoTrack : public MediaStreamTrack<VideoTrackInterface>,
~VideoTrack();
private:
+ // Implements ObserverInterface. Observes |video_source_| state.
+ void OnChanged() override;
+
rtc::ThreadChecker thread_checker_;
rtc::scoped_refptr<VideoTrackSourceInterface> video_source_;
};

Powered by Google App Engine
This is Rietveld 408576698