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

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 comments. 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 bool enabled, 55 bool enabled,
56 MediaStreamDependencyFactory* factory); 56 MediaStreamDependencyFactory* factory);
57 virtual ~MediaStreamVideoTrack(); 57 virtual ~MediaStreamVideoTrack();
58 virtual void AddSink(MediaStreamVideoSink* sink); 58 virtual void AddSink(MediaStreamVideoSink* sink);
59 virtual void RemoveSink(MediaStreamVideoSink* sink); 59 virtual void RemoveSink(MediaStreamVideoSink* sink);
60 60
61 // TODO(perkj): GetVideoAdapter is webrtc specific. Move GetVideoAdapter to 61 // TODO(perkj): GetVideoAdapter is webrtc specific. Move GetVideoAdapter to
62 // where the track is added to a RTCPeerConnection. crbug/323223. 62 // where the track is added to a RTCPeerConnection. crbug/323223.
63 virtual webrtc::VideoTrackInterface* GetVideoAdapter() OVERRIDE; 63 virtual webrtc::VideoTrackInterface* GetVideoAdapter() OVERRIDE;
64 virtual void SetEnabled(bool enabled) OVERRIDE; 64 virtual void SetEnabled(bool enabled) OVERRIDE;
65 virtual void Stop() OVERRIDE;
65 66
66 void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame); 67 void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame);
67 void OnReadyStateChanged(blink::WebMediaStreamSource::ReadyState state); 68 void OnReadyStateChanged(blink::WebMediaStreamSource::ReadyState state);
68 69
69 protected: 70 protected:
70 // Used to DCHECK that we are called on the correct thread. 71 // Used to DCHECK that we are called on the correct thread.
71 base::ThreadChecker thread_checker_; 72 base::ThreadChecker thread_checker_;
72 73
73 private: 74 private:
74 bool enabled_; 75 bool enabled_;
75 std::vector<MediaStreamVideoSink*> sinks_; 76 std::vector<MediaStreamVideoSink*> sinks_;
76 77
77 // Weak ref to the source this tracks is connected to. |source_| is owned 78 // Weak ref to the source this tracks is connected to. |source_| is owned
78 // by the blink::WebMediaStreamSource and is guaranteed to outlive the 79 // by the blink::WebMediaStreamSource and is guaranteed to outlive the
79 // track. 80 // track.
80 MediaStreamVideoSource* source_; 81 MediaStreamVideoSource* source_;
81 82
82 // Weak ref to a MediaStreamDependencyFactory, owned by the RenderThread. 83 // Weak ref to a MediaStreamDependencyFactory, owned by the RenderThread.
83 // It's valid for the lifetime of RenderThread. 84 // It's valid for the lifetime of RenderThread.
84 MediaStreamDependencyFactory* factory_; 85 MediaStreamDependencyFactory* factory_;
85 86
86 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); 87 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack);
87 }; 88 };
88 89
89 } // namespace content 90 } // namespace content
90 91
91 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ 92 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_video_source_unittest.cc ('k') | content/renderer/media/media_stream_video_track.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698