| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |