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_MAX_VALUE(content::VideoCaptureState, | 17 IPC_ENUM_TRAITS_MAX_VALUE(content::VideoCaptureState, |
17 content::VIDEO_CAPTURE_STATE_LAST) | 18 content::VIDEO_CAPTURE_STATE_LAST) |
18 | 19 |
(...skipping 21 matching lines...) Expand all Loading... |
40 // Tell the renderer process that it should release a buffer previously | 41 // Tell the renderer process that it should release a buffer previously |
41 // allocated by VideoCaptureMsg_NewBuffer. | 42 // allocated by VideoCaptureMsg_NewBuffer. |
42 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_FreeBuffer, | 43 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_FreeBuffer, |
43 int /* device id */, | 44 int /* device id */, |
44 int /* buffer_id */) | 45 int /* buffer_id */) |
45 | 46 |
46 // Tell the renderer process that a buffer is available from video capture. | 47 // Tell the renderer process that a buffer is available from video capture. |
47 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_BufferReady, | 48 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_BufferReady, |
48 int /* device id */, | 49 int /* device id */, |
49 int /* buffer_id */, | 50 int /* buffer_id */, |
50 base::TimeTicks /* timestamp */, | 51 media::VideoCaptureFormat /* format */, |
51 media::VideoCaptureFormat /* resolution */) | 52 base::TimeTicks /* timestamp */) |
| 53 |
| 54 // Tell the renderer process that a texture mailbox buffer is available from |
| 55 // video capture. |
| 56 IPC_MESSAGE_CONTROL5(VideoCaptureMsg_MailboxBufferReady, |
| 57 int /* device_id */, |
| 58 int /* buffer_id */, |
| 59 gpu::MailboxHolder /* mailbox_holder */, |
| 60 media::VideoCaptureFormat /* format */, |
| 61 base::TimeTicks /* timestamp */) |
52 | 62 |
53 // Notify the renderer about a device's supported formats; this is a response | 63 // Notify the renderer about a device's supported formats; this is a response |
54 // to a VideoCaptureHostMsg_GetDeviceSupportedFormats request. | 64 // to a VideoCaptureHostMsg_GetDeviceSupportedFormats request. |
55 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceSupportedFormatsEnumerated, | 65 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceSupportedFormatsEnumerated, |
56 int /* device_id */, | 66 int /* device_id */, |
57 media::VideoCaptureFormats /* supported_formats */) | 67 media::VideoCaptureFormats /* supported_formats */) |
58 | 68 |
59 // Notify the renderer about a device's format(s) in use; this is a response | 69 // Notify the renderer about a device's format(s) in use; this is a response |
60 // to a VideoCaptureHostMsg_GetDeviceFormatInUse request. | 70 // to a VideoCaptureHostMsg_GetDeviceFormatInUse request. |
61 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceFormatsInUseReceived, | 71 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceFormatsInUseReceived, |
(...skipping 10 matching lines...) Expand all Loading... |
72 // Pause the video capture specified by |device_id|. | 82 // Pause the video capture specified by |device_id|. |
73 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause, | 83 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause, |
74 int /* device_id */) | 84 int /* device_id */) |
75 | 85 |
76 // Close the video capture specified by |device_id|. | 86 // Close the video capture specified by |device_id|. |
77 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, | 87 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, |
78 int /* device_id */) | 88 int /* device_id */) |
79 | 89 |
80 // Tell the browser process that the renderer has finished reading from | 90 // Tell the browser process that the renderer has finished reading from |
81 // a buffer previously delivered by VideoCaptureMsg_BufferReady. | 91 // a buffer previously delivered by VideoCaptureMsg_BufferReady. |
82 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady, | 92 IPC_MESSAGE_CONTROL3(VideoCaptureHostMsg_BufferReady, |
83 int /* device_id */, | 93 int /* device_id */, |
84 int /* buffer_id */) | 94 int /* buffer_id */, |
| 95 uint32 /* syncpoint */) |
85 | 96 |
86 // Get the formats supported by a device referenced by |capture_session_id|. | 97 // Get the formats supported by a device referenced by |capture_session_id|. |
87 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceSupportedFormats, | 98 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceSupportedFormats, |
88 int /* device_id */, | 99 int /* device_id */, |
89 media::VideoCaptureSessionId /* session_id */) | 100 media::VideoCaptureSessionId /* session_id */) |
90 | 101 |
91 // Get the format(s) in use by a device referenced by |capture_session_id|. | 102 // Get the format(s) in use by a device referenced by |capture_session_id|. |
92 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceFormatsInUse, | 103 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceFormatsInUse, |
93 int /* device_id */, | 104 int /* device_id */, |
94 media::VideoCaptureSessionId /* session_id */) | 105 media::VideoCaptureSessionId /* session_id */) |
OLD | NEW |