| 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 30 matching lines...) Expand all Loading... |
| 41 const blink::WebMediaStreamTrack& track); | 41 const blink::WebMediaStreamTrack& track); |
| 42 | 42 |
| 43 // Constructor for local video tracks. | 43 // Constructor for local video tracks. |
| 44 MediaStreamVideoTrack( | 44 MediaStreamVideoTrack( |
| 45 MediaStreamVideoSource* source, | 45 MediaStreamVideoSource* source, |
| 46 const blink::WebMediaConstraints& constraints, | 46 const blink::WebMediaConstraints& constraints, |
| 47 const MediaStreamVideoSource::ConstraintsCallback& callback, | 47 const MediaStreamVideoSource::ConstraintsCallback& callback, |
| 48 bool enabled); | 48 bool enabled); |
| 49 virtual ~MediaStreamVideoTrack(); | 49 virtual ~MediaStreamVideoTrack(); |
| 50 | 50 |
| 51 // Add |sink| to receive state changes and video frames on the main render | |
| 52 // thread. | |
| 53 virtual void AddSink(MediaStreamVideoSink* sink); | |
| 54 virtual void RemoveSink(MediaStreamVideoSink* sink); | |
| 55 | |
| 56 // Add |sink| to receive state changes on the main render thread and video | 51 // Add |sink| to receive state changes on the main render thread and video |
| 57 // frames in the |callback| method on the IO-thread. | 52 // frames in the |callback| method on the IO-thread. |
| 58 virtual void AddSink(MediaStreamSink* sink, | 53 virtual void AddSink(MediaStreamVideoSink* sink, |
| 59 const VideoCaptureDeliverFrameCB& callback); | 54 const VideoCaptureDeliverFrameCB& callback); |
| 60 virtual void RemoveSink(MediaStreamSink* sink); | 55 virtual void RemoveSink(MediaStreamVideoSink* sink); |
| 61 | 56 |
| 62 virtual void SetEnabled(bool enabled) OVERRIDE; | 57 virtual void SetEnabled(bool enabled) OVERRIDE; |
| 63 virtual void Stop() OVERRIDE; | 58 virtual void Stop() OVERRIDE; |
| 64 | 59 |
| 65 void OnReadyStateChanged(blink::WebMediaStreamSource::ReadyState state); | 60 void OnReadyStateChanged(blink::WebMediaStreamSource::ReadyState state); |
| 66 | 61 |
| 67 const blink::WebMediaConstraints& constraints() const { | 62 const blink::WebMediaConstraints& constraints() const { |
| 68 return constraints_; | 63 return constraints_; |
| 69 } | 64 } |
| 70 | 65 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 84 // by the blink::WebMediaStreamSource and is guaranteed to outlive the | 79 // by the blink::WebMediaStreamSource and is guaranteed to outlive the |
| 85 // track. | 80 // track. |
| 86 MediaStreamVideoSource* source_; | 81 MediaStreamVideoSource* source_; |
| 87 | 82 |
| 88 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); | 83 DISALLOW_COPY_AND_ASSIGN(MediaStreamVideoTrack); |
| 89 }; | 84 }; |
| 90 | 85 |
| 91 } // namespace content | 86 } // namespace content |
| 92 | 87 |
| 93 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ | 88 #endif // CONTENT_RENDERER_MEDIA_MEDIA_STREAM_VIDEO_TRACK_H_ |
| OLD | NEW |