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 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ |
6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ | 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 | 42 |
43 void StartSourceImpl( | 43 void StartSourceImpl( |
44 const media::VideoCaptureFormat& format, | 44 const media::VideoCaptureFormat& format, |
45 const blink::WebMediaConstraints& constraints, | 45 const blink::WebMediaConstraints& constraints, |
46 const VideoCaptureDeliverFrameCB& frame_callback) override; | 46 const VideoCaptureDeliverFrameCB& frame_callback) override; |
47 | 47 |
48 void StopSourceImpl() override; | 48 void StopSourceImpl() override; |
49 | 49 |
50 // Used by tests to test that a frame can be received and that the | 50 // Used by tests to test that a frame can be received and that the |
51 // MediaStreamRemoteVideoSource behaves as expected. | 51 // MediaStreamRemoteVideoSource behaves as expected. |
52 webrtc::VideoRendererInterface* RenderInterfaceForTest(); | 52 rtc::VideoSinkInterface<cricket::VideoFrame>* SinkInterfaceForTest(); |
53 | 53 |
54 private: | 54 private: |
55 void OnChanged(webrtc::MediaStreamTrackInterface::TrackState state); | 55 void OnChanged(webrtc::MediaStreamTrackInterface::TrackState state); |
56 | 56 |
57 // Internal class used for receiving frames from the webrtc track on a | 57 // Internal class used for receiving frames from the webrtc track on a |
58 // libjingle thread and forward it to the IO-thread. | 58 // libjingle thread and forward it to the IO-thread. |
59 class RemoteVideoSourceDelegate; | 59 class RemoteVideoSourceDelegate; |
60 scoped_refptr<RemoteVideoSourceDelegate> delegate_; | 60 scoped_refptr<RemoteVideoSourceDelegate> delegate_; |
61 scoped_ptr<TrackObserver> observer_; | 61 scoped_ptr<TrackObserver> observer_; |
62 | 62 |
63 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); | 63 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); |
64 }; | 64 }; |
65 | 65 |
66 } // namespace content | 66 } // namespace content |
67 | 67 |
68 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ | 68 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ |
OLD | NEW |