Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(63)

Side by Side Diff: content/common/media/video_capture_messages.h

Issue 1267883002: Pass GpuMemoryBuffer backed VideoFrame from browser to renderer processes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gmbtracker-multiple
Patch Set: Rebase Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "gpu/command_buffer/common/mailbox_holder.h"
10 #include "ipc/ipc_message_macros.h" 10 #include "ipc/ipc_message_macros.h"
11 #include "media/base/video_capture_types.h" 11 #include "media/base/video_capture_types.h"
12 #include "media/base/video_frame.h" 12 #include "media/base/video_frame.h"
13 #include "ui/gfx/gpu_memory_buffer.h"
13 14
14 #undef IPC_MESSAGE_EXPORT 15 #undef IPC_MESSAGE_EXPORT
15 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT 16 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT
16 #define IPC_MESSAGE_START VideoCaptureMsgStart 17 #define IPC_MESSAGE_START VideoCaptureMsgStart
17 18
18 IPC_ENUM_TRAITS_MAX_VALUE(content::VideoCaptureState, 19 IPC_ENUM_TRAITS_MAX_VALUE(content::VideoCaptureState,
19 content::VIDEO_CAPTURE_STATE_LAST) 20 content::VIDEO_CAPTURE_STATE_LAST)
20 IPC_ENUM_TRAITS_MAX_VALUE(media::ResolutionChangePolicy, 21 IPC_ENUM_TRAITS_MAX_VALUE(media::ResolutionChangePolicy,
21 media::RESOLUTION_POLICY_LAST) 22 media::RESOLUTION_POLICY_LAST)
22 IPC_ENUM_TRAITS_MAX_VALUE(media::VideoPixelFormat, media::PIXEL_FORMAT_MAX) 23 IPC_ENUM_TRAITS_MAX_VALUE(media::VideoPixelFormat, media::PIXEL_FORMAT_MAX)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 int /* device id */, 56 int /* device id */,
56 content::VideoCaptureState /* new state */) 57 content::VideoCaptureState /* new state */)
57 58
58 // Tell the renderer process that a new buffer is allocated for video capture. 59 // Tell the renderer process that a new buffer is allocated for video capture.
59 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_NewBuffer, 60 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_NewBuffer,
60 int /* device id */, 61 int /* device id */,
61 base::SharedMemoryHandle /* handle */, 62 base::SharedMemoryHandle /* handle */,
62 int /* length */, 63 int /* length */,
63 int /* buffer_id */) 64 int /* buffer_id */)
64 65
66 // Tell the renderer process that a new GpuMemoryBuffer backed buffer is
67 // allocated for video capture.
68 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_NewBuffer2,
69 int /* device id */,
70 std::vector<gfx::GpuMemoryBufferHandle> /* handles */,
71 gfx::Size /* dimensions */,
72 int /* buffer_id */)
73
65 // Tell the renderer process that it should release a buffer previously 74 // Tell the renderer process that it should release a buffer previously
66 // allocated by VideoCaptureMsg_NewBuffer. 75 // allocated by VideoCaptureMsg_NewBuffer.
67 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_FreeBuffer, 76 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_FreeBuffer,
68 int /* device id */, 77 int /* device id */,
69 int /* buffer_id */) 78 int /* buffer_id */)
70 79
71 // Tell the renderer process that a Buffer is available from video capture, and 80 // Tell the renderer process that a Buffer is available from video capture, and
72 // send the associated VideoFrame constituient parts as IPC parameters. 81 // send the associated VideoFrame constituient parts as IPC parameters.
73 IPC_MESSAGE_CONTROL1(VideoCaptureMsg_BufferReady, 82 IPC_MESSAGE_CONTROL1(VideoCaptureMsg_BufferReady,
74 VideoCaptureMsg_BufferReady_Params) 83 VideoCaptureMsg_BufferReady_Params)
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 126
118 // Get the formats supported by a device referenced by |capture_session_id|. 127 // Get the formats supported by a device referenced by |capture_session_id|.
119 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceSupportedFormats, 128 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceSupportedFormats,
120 int /* device_id */, 129 int /* device_id */,
121 media::VideoCaptureSessionId /* session_id */) 130 media::VideoCaptureSessionId /* session_id */)
122 131
123 // Get the format(s) in use by a device referenced by |capture_session_id|. 132 // Get the format(s) in use by a device referenced by |capture_session_id|.
124 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceFormatsInUse, 133 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_GetDeviceFormatsInUse,
125 int /* device_id */, 134 int /* device_id */,
126 media::VideoCaptureSessionId /* session_id */) 135 media::VideoCaptureSessionId /* session_id */)
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/video_capture_manager_unittest.cc ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698