| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // VideoCaptureImpl represents a capture device in renderer process. It provides | 5 // VideoCaptureImpl represents a capture device in renderer process. It provides |
| 6 // interfaces for clients to Start/Stop capture. It also communicates to clients | 6 // interfaces for clients to Start/Stop capture. It also communicates to clients |
| 7 // when buffer is ready, state of capture device is changed. | 7 // when buffer is ready, state of capture device is changed. |
| 8 | 8 |
| 9 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ | 9 #ifndef CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ |
| 10 #define CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ | 10 #define CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 void DoBufferCreated(base::SharedMemoryHandle handle, | 62 void DoBufferCreated(base::SharedMemoryHandle handle, |
| 63 int length, int buffer_id); | 63 int length, int buffer_id); |
| 64 void DoBufferReceived(int buffer_id, base::Time timestamp); | 64 void DoBufferReceived(int buffer_id, base::Time timestamp); |
| 65 void DoStateChanged(const media::VideoCapture::State& state); | 65 void DoStateChanged(const media::VideoCapture::State& state); |
| 66 void DoDeviceInfoReceived(const media::VideoCaptureParams& device_info); | 66 void DoDeviceInfoReceived(const media::VideoCaptureParams& device_info); |
| 67 void DoDelegateAdded(int32 device_id); | 67 void DoDelegateAdded(int32 device_id); |
| 68 | 68 |
| 69 void Init(); | 69 void Init(); |
| 70 void DeInit(base::Closure task); | 70 void DeInit(base::Closure task); |
| 71 void DoDeInit(base::Closure task); |
| 71 void StopDevice(); | 72 void StopDevice(); |
| 72 void RestartCapture(); | 73 void RestartCapture(); |
| 73 void StartCaptureInternal(); | 74 void StartCaptureInternal(); |
| 74 void AddDelegateOnIOThread(); | 75 void AddDelegateOnIOThread(); |
| 75 void RemoveDelegateOnIOThread(base::Closure task); | 76 void RemoveDelegateOnIOThread(base::Closure task); |
| 76 virtual void Send(IPC::Message* message); | 77 virtual void Send(IPC::Message* message); |
| 77 | 78 |
| 78 // Helpers. | 79 // Helpers. |
| 79 bool ClientHasDIB(); | 80 bool ClientHasDIB(); |
| 80 | 81 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 104 bool device_info_available_; | 105 bool device_info_available_; |
| 105 | 106 |
| 106 State state_; | 107 State state_; |
| 107 | 108 |
| 108 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); | 109 DISALLOW_COPY_AND_ASSIGN(VideoCaptureImpl); |
| 109 }; | 110 }; |
| 110 | 111 |
| 111 DISABLE_RUNNABLE_METHOD_REFCOUNT(VideoCaptureImpl); | 112 DISABLE_RUNNABLE_METHOD_REFCOUNT(VideoCaptureImpl); |
| 112 | 113 |
| 113 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ | 114 #endif // CONTENT_RENDERER_MEDIA_VIDEO_CAPTURE_IMPL_H_ |
| OLD | NEW |