| 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 #include "base/shared_memory.h" | 5 #include "base/shared_memory.h" |
| 6 #include "content/common/content_export.h" | 6 #include "content/common/content_export.h" |
| 7 #include "content/common/media/video_capture.h" | 7 #include "content/common/media/video_capture.h" |
| 8 #include "content/public/common/common_param_traits.h" | 8 #include "content/public/common/common_param_traits.h" |
| 9 #include "ipc/ipc_message_macros.h" | 9 #include "ipc/ipc_message_macros.h" |
| 10 #include "media/video/capture/video_capture_types.h" | 10 #include "media/video/capture/video_capture_types.h" |
| 11 | 11 |
| 12 #undef IPC_MESSAGE_EXPORT | 12 #undef IPC_MESSAGE_EXPORT |
| 13 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 13 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 14 #define IPC_MESSAGE_START VideoCaptureMsgStart | 14 #define IPC_MESSAGE_START VideoCaptureMsgStart |
| 15 | 15 |
| 16 IPC_ENUM_TRAITS(video_capture::State) | 16 IPC_ENUM_TRAITS(content::VideoCaptureState) |
| 17 | 17 |
| 18 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams) | 18 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams) |
| 19 IPC_STRUCT_TRAITS_MEMBER(width) | 19 IPC_STRUCT_TRAITS_MEMBER(width) |
| 20 IPC_STRUCT_TRAITS_MEMBER(height) | 20 IPC_STRUCT_TRAITS_MEMBER(height) |
| 21 IPC_STRUCT_TRAITS_MEMBER(frame_per_second) | 21 IPC_STRUCT_TRAITS_MEMBER(frame_per_second) |
| 22 IPC_STRUCT_TRAITS_MEMBER(session_id) | 22 IPC_STRUCT_TRAITS_MEMBER(session_id) |
| 23 IPC_STRUCT_TRAITS_END() | 23 IPC_STRUCT_TRAITS_END() |
| 24 | 24 |
| 25 // Notify the renderer process about the state update such as | 25 // Notify the renderer process about the state update such as |
| 26 // Start/Pause/Stop. | 26 // Start/Pause/Stop. |
| 27 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged, | 27 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged, |
| 28 int /* device id */, | 28 int /* device id */, |
| 29 video_capture::State /* new state */) | 29 content::VideoCaptureState /* new state */) |
| 30 | 30 |
| 31 // Tell the renderer process that a new buffer is allocated for video capture. | 31 // Tell the renderer process that a new buffer is allocated for video capture. |
| 32 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_NewBuffer, | 32 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_NewBuffer, |
| 33 int /* device id */, | 33 int /* device id */, |
| 34 base::SharedMemoryHandle /* handle */, | 34 base::SharedMemoryHandle /* handle */, |
| 35 int /* length */, | 35 int /* length */, |
| 36 int /* buffer_id */) | 36 int /* buffer_id */) |
| 37 | 37 |
| 38 // Tell the renderer process that a buffer is available from video capture. | 38 // Tell the renderer process that a buffer is available from video capture. |
| 39 IPC_MESSAGE_CONTROL3(VideoCaptureMsg_BufferReady, | 39 IPC_MESSAGE_CONTROL3(VideoCaptureMsg_BufferReady, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 57 | 57 |
| 58 // Close the video capture specified by |device_id|. | 58 // Close the video capture specified by |device_id|. |
| 59 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, | 59 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, |
| 60 int /* device_id */) | 60 int /* device_id */) |
| 61 | 61 |
| 62 // Tell the browser process that the video frame buffer |handle| is ready for | 62 // Tell the browser process that the video frame buffer |handle| is ready for |
| 63 // device |device_id| to fill up. | 63 // device |device_id| to fill up. |
| 64 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady, | 64 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady, |
| 65 int /* device_id */, | 65 int /* device_id */, |
| 66 int /* buffer_id */) | 66 int /* buffer_id */) |
| OLD | NEW |