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/memory/shared_memory.h" | 5 #include "base/memory/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 "gpu/command_buffer/common/mailbox_holder.h" |
9 #include "ipc/ipc_message_macros.h" | 10 #include "ipc/ipc_message_macros.h" |
10 #include "media/video/capture/video_capture_types.h" | 11 #include "media/video/capture/video_capture_types.h" |
11 | 12 |
12 #undef IPC_MESSAGE_EXPORT | 13 #undef IPC_MESSAGE_EXPORT |
13 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 14 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
14 #define IPC_MESSAGE_START VideoCaptureMsgStart | 15 #define IPC_MESSAGE_START VideoCaptureMsgStart |
15 | 16 |
16 IPC_ENUM_TRAITS(content::VideoCaptureState) | 17 IPC_ENUM_TRAITS(content::VideoCaptureState) |
17 | 18 |
18 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams) | 19 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams) |
(...skipping 20 matching lines...) Expand all Loading... |
39 // Tell the renderer process that it should release a buffer previously | 40 // Tell the renderer process that it should release a buffer previously |
40 // allocated by VideoCaptureMsg_NewBuffer. | 41 // allocated by VideoCaptureMsg_NewBuffer. |
41 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_FreeBuffer, | 42 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_FreeBuffer, |
42 int /* device id */, | 43 int /* device id */, |
43 int /* buffer_id */) | 44 int /* buffer_id */) |
44 | 45 |
45 // Tell the renderer process that a buffer is available from video capture. | 46 // Tell the renderer process that a buffer is available from video capture. |
46 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_BufferReady, | 47 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_BufferReady, |
47 int /* device id */, | 48 int /* device id */, |
48 int /* buffer_id */, | 49 int /* buffer_id */, |
49 base::TimeTicks /* timestamp */, | 50 media::VideoCaptureFormat /* format */, |
50 media::VideoCaptureFormat /* resolution */) | 51 base::TimeTicks /* timestamp */) |
| 52 |
| 53 // Tell the renderer process that a texture mailbox buffer is available from |
| 54 // video capture. |
| 55 IPC_MESSAGE_CONTROL5(VideoCaptureMsg_MailboxBufferReady, |
| 56 int /* device_id */, |
| 57 int /* buffer_id */, |
| 58 gpu::MailboxHolder /* mailbox_holder */, |
| 59 media::VideoCaptureFormat /* format */, |
| 60 base::TimeTicks /* timestamp */) |
51 | 61 |
52 // Start a video capture as |device_id|, a new id picked by the renderer | 62 // Start a video capture as |device_id|, a new id picked by the renderer |
53 // process. The session to be started is determined by |params.session_id|. | 63 // process. The session to be started is determined by |params.session_id|. |
54 IPC_MESSAGE_CONTROL3(VideoCaptureHostMsg_Start, | 64 IPC_MESSAGE_CONTROL3(VideoCaptureHostMsg_Start, |
55 int /* device_id */, | 65 int /* device_id */, |
56 media::VideoCaptureSessionId, /* session_id */ | 66 media::VideoCaptureSessionId, /* session_id */ |
57 media::VideoCaptureParams /* params */) | 67 media::VideoCaptureParams /* params */) |
58 | 68 |
59 // Pause the video capture specified by |device_id|. | 69 // Pause the video capture specified by |device_id|. |
60 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause, | 70 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause, |
61 int /* device_id */) | 71 int /* device_id */) |
62 | 72 |
63 // Close the video capture specified by |device_id|. | 73 // Close the video capture specified by |device_id|. |
64 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, | 74 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, |
65 int /* device_id */) | 75 int /* device_id */) |
66 | 76 |
67 // Tell the browser process that the renderer has finished reading from | 77 // Tell the browser process that the renderer has finished reading from |
68 // a buffer previously delivered by VideoCaptureMsg_BufferReady. | 78 // a buffer previously delivered by VideoCaptureMsg_BufferReady. |
69 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady, | 79 IPC_MESSAGE_CONTROL3(VideoCaptureHostMsg_BufferReady, |
70 int /* device_id */, | 80 int /* device_id */, |
71 int /* buffer_id */) | 81 int /* buffer_id */, |
| 82 uint32 /* syncpoint */) |
OLD | NEW |