| 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 "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(content::VideoCaptureState) | 16 IPC_ENUM_TRAITS(content::VideoCaptureState) |
| 17 IPC_ENUM_TRAITS_MAX_VALUE(media::VideoCaptureResolutionType, | 17 IPC_ENUM_TRAITS_MAX_VALUE(media::VideoPixelFormat, media::PIXEL_FORMAT_MAX - 1) |
| 18 media::MaxVideoCaptureResolutionType - 1) | 18 |
| 19 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureFormat) |
| 20 IPC_STRUCT_TRAITS_MEMBER(frame_size) |
| 21 IPC_STRUCT_TRAITS_MEMBER(frame_rate) |
| 22 IPC_STRUCT_TRAITS_MEMBER(pixel_format) |
| 23 IPC_STRUCT_TRAITS_END() |
| 19 | 24 |
| 20 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams) | 25 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams) |
| 21 IPC_STRUCT_TRAITS_MEMBER(session_id) | 26 IPC_STRUCT_TRAITS_MEMBER(session_id) |
| 22 IPC_STRUCT_TRAITS_MEMBER(requested_format) | 27 IPC_STRUCT_TRAITS_MEMBER(requested_format) |
| 28 IPC_STRUCT_TRAITS_MEMBER(allow_resolution_change) |
| 29 IPC_STRUCT_TRAITS_END() |
| 30 |
| 31 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureCapability) |
| 32 IPC_STRUCT_TRAITS_MEMBER(supported_format) |
| 23 IPC_STRUCT_TRAITS_END() | 33 IPC_STRUCT_TRAITS_END() |
| 24 | 34 |
| 25 // TODO(nick): device_id in these messages is basically just a route_id. We | 35 // TODO(nick): device_id in these messages is basically just a route_id. We |
| 26 // should shift to IPC_MESSAGE_ROUTED and use MessageRouter in the filter impls. | 36 // should shift to IPC_MESSAGE_ROUTED and use MessageRouter in the filter impls. |
| 27 | 37 |
| 28 // Notify the renderer process about the state update such as | 38 // Notify the renderer process about the state update such as |
| 29 // Start/Pause/Stop. | 39 // Start/Pause/Stop. |
| 30 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged, | 40 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged, |
| 31 int /* device id */, | 41 int /* device id */, |
| 32 content::VideoCaptureState /* new state */) | 42 content::VideoCaptureState /* new state */) |
| (...skipping 30 matching lines...) Expand all Loading... |
| 63 | 73 |
| 64 // Close the video capture specified by |device_id|. | 74 // Close the video capture specified by |device_id|. |
| 65 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, | 75 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, |
| 66 int /* device_id */) | 76 int /* device_id */) |
| 67 | 77 |
| 68 // Tell the browser process that the renderer has finished reading from | 78 // Tell the browser process that the renderer has finished reading from |
| 69 // a buffer previously delivered by VideoCaptureMsg_BufferReady. | 79 // a buffer previously delivered by VideoCaptureMsg_BufferReady. |
| 70 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady, | 80 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady, |
| 71 int /* device_id */, | 81 int /* device_id */, |
| 72 int /* buffer_id */) | 82 int /* buffer_id */) |
| OLD | NEW |