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

Side by Side Diff: content/renderer/media/media_stream_video_track.h

Issue 218763007: Update MediaStreamTrack::Stop to latest draft. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments and added tests. Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 6 #define CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 bool enabled, 56 bool enabled,
57 MediaStreamDependencyFactory* factory); 57 MediaStreamDependencyFactory* factory);
58 virtual ~MediaStreamVideoTrack(); 58 virtual ~MediaStreamVideoTrack();
59 virtual void AddSink(MediaStreamVideoSink* sink); 59 virtual void AddSink(MediaStreamVideoSink* sink);
60 virtual void RemoveSink(MediaStreamVideoSink* sink); 60 virtual void RemoveSink(MediaStreamVideoSink* sink);
61 61
62 // TODO(perkj): GetVideoAdapter is webrtc specific. Move GetVideoAdapter to 62 // TODO(perkj): GetVideoAdapter is webrtc specific. Move GetVideoAdapter to
63 // where the track is added to a RTCPeerConnection. crbug/323223. 63 // where the track is added to a RTCPeerConnection. crbug/323223.
64 virtual webrtc::VideoTrackInterface* GetVideoAdapter() OVERRIDE; 64 virtual webrtc::VideoTrackInterface* GetVideoAdapter() OVERRIDE;
65 virtual void SetEnabled(bool enabled) OVERRIDE; 65 virtual void SetEnabled(bool enabled) OVERRIDE;
66 virtual void StopTrack() OVERRIDE;
66 67
67 void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame); 68 void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame);
68 void OnReadyStateChanged(blink::WebMediaStreamSource::ReadyState state); 69 void OnReadyStateChanged(blink::WebMediaStreamSource::ReadyState state);
69 70
70 protected: 71 protected:
71 // Used to DCHECK that we are called on the correct thread. 72 // Used to DCHECK that we are called on the correct thread.
72 base::ThreadChecker thread_checker_; 73 base::ThreadChecker thread_checker_;
73 74
74 private: 75 private:
75 bool enabled_; 76 bool enabled_;
(...skipping 27 matching lines...) Expand all
103 104
104 private: 105 private:
105 ScopedVector<WebRtcVideoSinkAdapter> sinks_; 106 ScopedVector<WebRtcVideoSinkAdapter> sinks_;
106 107
107 DISALLOW_COPY_AND_ASSIGN(WebRtcMediaStreamVideoTrack); 108 DISALLOW_COPY_AND_ASSIGN(WebRtcMediaStreamVideoTrack);
108 }; 109 };
109 110
110 } // namespace content 111 } // namespace content
111 112
112 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 113 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698