| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "content/renderer/media/media_stream_video_source.h" | 5 #include "content/renderer/media/media_stream_video_source.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "content/public/renderer/media_stream_video_sink.h" | 8 #include "content/public/renderer/media_stream_video_sink.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 MediaStreamVideoSource::MediaStreamVideoSource() { |
| 13 } |
| 14 |
| 15 MediaStreamVideoSource::~MediaStreamVideoSource() { |
| 16 } |
| 17 |
| 12 void MediaStreamVideoSource::AddTrack( | 18 void MediaStreamVideoSource::AddTrack( |
| 13 const blink::WebMediaStreamTrack& track, | 19 const blink::WebMediaStreamTrack& track) { |
| 14 const blink::WebMediaConstraints& constraints) { | |
| 15 // TODO(ronghuawu): Put |track| in the registered tracks list. Will later | 20 // TODO(ronghuawu): Put |track| in the registered tracks list. Will later |
| 16 // deliver frames to it according to |constraints|. | 21 // deliver frames to it according to |constraints|. |
| 17 } | 22 } |
| 18 | 23 |
| 19 void MediaStreamVideoSource::RemoveTrack( | 24 void MediaStreamVideoSource::RemoveTrack( |
| 20 const blink::WebMediaStreamTrack& track) { | 25 const blink::WebMediaStreamTrack& track) { |
| 21 // TODO(ronghuawu): Remove |track| from the list, i.e. will stop delivering | 26 // TODO(ronghuawu): Remove |track| from the list, i.e. will stop delivering |
| 22 // frame to |track|. | 27 // frame to |track|. |
| 23 } | 28 } |
| 24 | 29 |
| 25 void MediaStreamVideoSource::SetReadyState( | 30 void MediaStreamVideoSource::SetReadyState( |
| 26 blink::WebMediaStreamSource::ReadyState state) { | 31 blink::WebMediaStreamSource::ReadyState state) { |
| 27 // TODO(ronghuawu): Sets WebMediaStreamSource's ready state and notifies the | 32 // TODO(ronghuawu): Sets WebMediaStreamSource's ready state and notifies the |
| 28 // ready state to all registered tracks. | 33 // ready state to all registered tracks. |
| 29 } | 34 } |
| 30 | 35 |
| 31 void MediaStreamVideoSource::DeliverVideoFrame( | 36 void MediaStreamVideoSource::DeliverVideoFrame( |
| 32 const scoped_refptr<media::VideoFrame>& frame) { | 37 const scoped_refptr<media::VideoFrame>& frame) { |
| 33 // TODO(ronghuawu): Deliver |frame| to all the registered tracks. | 38 // TODO(ronghuawu): Deliver |frame| to all the registered tracks. |
| 34 } | 39 } |
| 35 | 40 |
| 36 MediaStreamVideoSource::~MediaStreamVideoSource() { | 41 void MediaStreamVideoSource::SetAdapter( |
| 42 const scoped_refptr<webrtc::VideoSourceInterface>& adapter) { |
| 43 DCHECK(!adapter_); |
| 44 adapter_ = adapter; |
| 37 } | 45 } |
| 38 | 46 |
| 39 } // namespace content | 47 } // namespace content |
| OLD | NEW |