| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RTC_VIDEO_RENDERER_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_RENDERER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_RENDERER_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_RENDERER_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 ~RTCVideoRenderer() override; | 49 ~RTCVideoRenderer() override; |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 enum State { | 52 enum State { |
| 53 STARTED, | 53 STARTED, |
| 54 PAUSED, | 54 PAUSED, |
| 55 STOPPED, | 55 STOPPED, |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame, | 58 void OnVideoFrame(const scoped_refptr<media::VideoFrame>& frame, |
| 59 const base::TimeTicks& estimated_capture_time); | 59 base::TimeTicks estimated_capture_time); |
| 60 | 60 |
| 61 // MediaStreamVideoSink implementation. Called on the main thread. | 61 // MediaStreamVideoSink implementation. Called on the main thread. |
| 62 void OnReadyStateChanged( | 62 void OnReadyStateChanged( |
| 63 blink::WebMediaStreamSource::ReadyState state) override; | 63 blink::WebMediaStreamSource::ReadyState state) override; |
| 64 | 64 |
| 65 void RenderSignalingFrame(); | 65 void RenderSignalingFrame(); |
| 66 | 66 |
| 67 const base::Closure error_cb_; | 67 const base::Closure error_cb_; |
| 68 const RepaintCB repaint_cb_; | 68 const RepaintCB repaint_cb_; |
| 69 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; | 69 const scoped_refptr<base::SingleThreadTaskRunner> task_runner_; |
| 70 State state_; | 70 State state_; |
| 71 gfx::Size frame_size_; | 71 gfx::Size frame_size_; |
| 72 const blink::WebMediaStreamTrack video_track_; | 72 const blink::WebMediaStreamTrack video_track_; |
| 73 base::WeakPtrFactory<RTCVideoRenderer> weak_factory_; | 73 base::WeakPtrFactory<RTCVideoRenderer> weak_factory_; |
| 74 | 74 |
| 75 DISALLOW_COPY_AND_ASSIGN(RTCVideoRenderer); | 75 DISALLOW_COPY_AND_ASSIGN(RTCVideoRenderer); |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 } // namespace content | 78 } // namespace content |
| 79 | 79 |
| 80 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_RENDERER_H_ | 80 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_RENDERER_H_ |
| OLD | NEW |