| 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/threading/thread_checker.h" | 8 #include "base/threading/thread_checker.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "content/renderer/media/media_stream_video_source.h" | 10 #include "content/renderer/media/media_stream_video_source.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 | 27 |
| 28 protected: | 28 protected: |
| 29 // Implements MediaStreamVideoSource. | 29 // Implements MediaStreamVideoSource. |
| 30 virtual void GetCurrentSupportedFormats( | 30 virtual void GetCurrentSupportedFormats( |
| 31 int max_requested_width, | 31 int max_requested_width, |
| 32 int max_requested_height, | 32 int max_requested_height, |
| 33 double max_requested_frame_rate, | 33 double max_requested_frame_rate, |
| 34 const VideoCaptureDeviceFormatsCB& callback) OVERRIDE; | 34 const VideoCaptureDeviceFormatsCB& callback) OVERRIDE; |
| 35 | 35 |
| 36 virtual void StartSourceImpl( | 36 virtual void StartSourceImpl( |
| 37 const media::VideoCaptureParams& params, | 37 const media::VideoCaptureFormat& format, |
| 38 const VideoCaptureDeliverFrameCB& frame_callback) OVERRIDE; | 38 const VideoCaptureDeliverFrameCB& frame_callback) OVERRIDE; |
| 39 | 39 |
| 40 virtual void StopSourceImpl() OVERRIDE; | 40 virtual void StopSourceImpl() OVERRIDE; |
| 41 | 41 |
| 42 // Used by tests to test that a frame can be received and that the | 42 // Used by tests to test that a frame can be received and that the |
| 43 // MediaStreamRemoteVideoSource behaves as expected. | 43 // MediaStreamRemoteVideoSource behaves as expected. |
| 44 webrtc::VideoRendererInterface* RenderInterfaceForTest(); | 44 webrtc::VideoRendererInterface* RenderInterfaceForTest(); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 // webrtc::ObserverInterface implementation. | 47 // webrtc::ObserverInterface implementation. |
| 48 virtual void OnChanged() OVERRIDE; | 48 virtual void OnChanged() OVERRIDE; |
| 49 | 49 |
| 50 scoped_refptr<webrtc::VideoTrackInterface> remote_track_; | 50 scoped_refptr<webrtc::VideoTrackInterface> remote_track_; |
| 51 webrtc::MediaStreamTrackInterface::TrackState last_state_; | 51 webrtc::MediaStreamTrackInterface::TrackState last_state_; |
| 52 | 52 |
| 53 // Internal class used for receiving frames from the webrtc track on a | 53 // Internal class used for receiving frames from the webrtc track on a |
| 54 // libjingle thread and forward it to the IO-thread. | 54 // libjingle thread and forward it to the IO-thread. |
| 55 class RemoteVideoSourceDelegate; | 55 class RemoteVideoSourceDelegate; |
| 56 scoped_refptr<RemoteVideoSourceDelegate> delegate_; | 56 scoped_refptr<RemoteVideoSourceDelegate> delegate_; |
| 57 | 57 |
| 58 // Bound to the render thread. | 58 // Bound to the render thread. |
| 59 base::ThreadChecker thread_checker_; | 59 base::ThreadChecker thread_checker_; |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); | 61 DISALLOW_COPY_AND_ASSIGN(MediaStreamRemoteVideoSource); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 } // namespace content | 64 } // namespace content |
| 65 | 65 |
| 66 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ | 66 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_MEDIA_STREAM_REMOTE_VIDEO_SOURCE_H_ |
| OLD | NEW |