| 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_CAPTURE_DELEGATE_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_ | 6 #define CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/message_loop_proxy.h" | 9 #include "base/message_loop_proxy.h" |
| 10 #include "content/common/media/video_capture.h" | 10 #include "content/common/media/video_capture.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 const media::VideoCaptureParams& device_info) OVERRIDE; | 56 const media::VideoCaptureParams& device_info) OVERRIDE; |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 friend class base::RefCountedThreadSafe<RtcVideoCaptureDelegate>; | 59 friend class base::RefCountedThreadSafe<RtcVideoCaptureDelegate>; |
| 60 | 60 |
| 61 virtual ~RtcVideoCaptureDelegate(); | 61 virtual ~RtcVideoCaptureDelegate(); |
| 62 | 62 |
| 63 void OnBufferReadyOnCaptureThread( | 63 void OnBufferReadyOnCaptureThread( |
| 64 media::VideoCapture* capture, | 64 media::VideoCapture* capture, |
| 65 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf); | 65 scoped_refptr<media::VideoCapture::VideoFrameBuffer> buf); |
| 66 void OnRemovedOnCaptureThread(media::VideoCapture* capture); |
| 66 void OnErrorOnCaptureThread(media::VideoCapture* capture, int error_code); | 67 void OnErrorOnCaptureThread(media::VideoCapture* capture, int error_code); |
| 67 | 68 |
| 68 // The id identifies which video capture device is used for this video | 69 // The id identifies which video capture device is used for this video |
| 69 // capture session. | 70 // capture session. |
| 70 media::VideoCaptureSessionId session_id_; | 71 media::VideoCaptureSessionId session_id_; |
| 71 // The video capture manager handles open/close of video capture devices. | 72 // The video capture manager handles open/close of video capture devices. |
| 72 scoped_refptr<VideoCaptureImplManager> vc_manager_; | 73 scoped_refptr<VideoCaptureImplManager> vc_manager_; |
| 73 media::VideoCapture* capture_engine_; | 74 media::VideoCapture* capture_engine_; |
| 74 | 75 |
| 75 // Accessed on the thread where StartCapture is called. | 76 // Accessed on the thread where StartCapture is called. |
| 76 bool got_first_frame_; | 77 bool got_first_frame_; |
| 77 | 78 |
| 78 // |captured_callback_| is provided to this class in StartCapture and must be | 79 // |captured_callback_| is provided to this class in StartCapture and must be |
| 79 // valid until StopCapture is called. | 80 // valid until StopCapture is called. |
| 80 FrameCapturedCallback captured_callback_; | 81 FrameCapturedCallback captured_callback_; |
| 81 // |state_callback_| is provided to this class in StartCapture and must be | 82 // |state_callback_| is provided to this class in StartCapture and must be |
| 82 // valid until StopCapture is called. | 83 // valid until StopCapture is called. |
| 83 StateChangeCallback state_callback_; | 84 StateChangeCallback state_callback_; |
| 84 // MessageLoop of the caller of StartCapture. | 85 // MessageLoop of the caller of StartCapture. |
| 85 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; | 86 scoped_refptr<base::MessageLoopProxy> message_loop_proxy_; |
| 86 }; | 87 }; |
| 87 | 88 |
| 88 } // namespace content | 89 } // namespace content |
| 89 | 90 |
| 90 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_ | 91 #endif // CONTENT_RENDERER_MEDIA_RTC_VIDEO_CAPTURE_DELEGATE_H_ |
| OLD | NEW |