| 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 // VideoCaptureHost serves video capture related messages from | 5 // VideoCaptureHost serves video capture related messages from |
| 6 // VideCaptureMessageFilter which lives inside the render process. | 6 // VideoCaptureMessageFilter which lives inside the render process. |
| 7 // | 7 // |
| 8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI | 8 // This class is owned by BrowserRenderProcessHost, and instantiated on UI |
| 9 // thread, but all other operations and method calls happen on IO thread. | 9 // thread, but all other operations and method calls happen on IO thread. |
| 10 // | 10 // |
| 11 // Here's an example of a typical IPC dialog for video capture: | 11 // Here's an example of a typical IPC dialog for video capture: |
| 12 // | 12 // |
| 13 // Renderer VideoCaptureHost | 13 // Renderer VideoCaptureHost |
| 14 // | | | 14 // | | |
| 15 // | VideoCaptureHostMsg_Start > | | 15 // | VideoCaptureHostMsg_Start > | |
| 16 // | < VideoCaptureMsg_DeviceInfo | | 16 // | < VideoCaptureMsg_DeviceInfo | |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 private: | 74 private: |
| 75 friend class content::BrowserThread; | 75 friend class content::BrowserThread; |
| 76 friend class base::DeleteHelper<VideoCaptureHost>; | 76 friend class base::DeleteHelper<VideoCaptureHost>; |
| 77 friend class MockVideoCaptureHost; | 77 friend class MockVideoCaptureHost; |
| 78 friend class VideoCaptureHostTest; | 78 friend class VideoCaptureHostTest; |
| 79 | 79 |
| 80 virtual ~VideoCaptureHost(); | 80 virtual ~VideoCaptureHost(); |
| 81 | 81 |
| 82 // IPC message: Start capture on the VideoCaptureDevice referenced by | 82 // IPC message: Start capture on the VideoCaptureDevice referenced by |
| 83 // VideoCaptureParams::session_id. |device_id| is an id created by | 83 // VideoCaptureParams::session_id. |device_id| is an id created by |
| 84 // VideCaptureMessageFilter to identify a session | 84 // VideoCaptureMessageFilter to identify a session |
| 85 // between a VideCaptureMessageFilter and a VideoCaptureHost. | 85 // between a VideoCaptureMessageFilter and a VideoCaptureHost. |
| 86 void OnStartCapture(int device_id, | 86 void OnStartCapture(int device_id, |
| 87 const media::VideoCaptureParams& params); | 87 const media::VideoCaptureParams& params); |
| 88 void OnControllerAdded( | 88 void OnControllerAdded( |
| 89 int device_id, const media::VideoCaptureParams& params, | 89 int device_id, const media::VideoCaptureParams& params, |
| 90 VideoCaptureController* controller); | 90 VideoCaptureController* controller); |
| 91 void DoControllerAddedOnIOThread( | 91 void DoControllerAddedOnIOThread( |
| 92 int device_id, const media::VideoCaptureParams params, | 92 int device_id, const media::VideoCaptureParams params, |
| 93 VideoCaptureController* controller); | 93 VideoCaptureController* controller); |
| 94 | 94 |
| 95 // IPC message: Stop capture on device referenced by |device_id|. | 95 // IPC message: Stop capture on device referenced by |device_id|. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 struct Entry; | 138 struct Entry; |
| 139 typedef std::map<VideoCaptureControllerID, Entry*> EntryMap; | 139 typedef std::map<VideoCaptureControllerID, Entry*> EntryMap; |
| 140 // A map of VideoCaptureControllerID to its state and VideoCaptureController. | 140 // A map of VideoCaptureControllerID to its state and VideoCaptureController. |
| 141 EntryMap entries_; | 141 EntryMap entries_; |
| 142 | 142 |
| 143 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); | 143 DISALLOW_COPY_AND_ASSIGN(VideoCaptureHost); |
| 144 }; | 144 }; |
| 145 | 145 |
| 146 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ | 146 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_VIDEO_CAPTURE_HOST_H_ |
| OLD | NEW |