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

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

Issue 68503005: Reorganize media::VideoCapture* types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 51b76b9a Rebase, comments. Review this please. Created 7 years 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 | Annotate | Revision Log
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 "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)
22 IPC_STRUCT_TRAITS_MEMBER(requested_format) 26 IPC_STRUCT_TRAITS_MEMBER(requested_format)
27 IPC_STRUCT_TRAITS_MEMBER(allow_resolution_change)
28 IPC_STRUCT_TRAITS_END()
29
30 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureCapability)
31 IPC_STRUCT_TRAITS_MEMBER(supported_format)
23 IPC_STRUCT_TRAITS_END() 32 IPC_STRUCT_TRAITS_END()
24 33
25 // TODO(nick): device_id in these messages is basically just a route_id. We 34 // 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. 35 // should shift to IPC_MESSAGE_ROUTED and use MessageRouter in the filter impls.
27 36
28 // Notify the renderer process about the state update such as 37 // Notify the renderer process about the state update such as
29 // Start/Pause/Stop. 38 // Start/Pause/Stop.
30 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged, 39 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged,
31 int /* device id */, 40 int /* device id */,
32 content::VideoCaptureState /* new state */) 41 content::VideoCaptureState /* new state */)
(...skipping 13 matching lines...) Expand all
46 55
47 // Tell the renderer process that a buffer is available from video capture. 56 // Tell the renderer process that a buffer is available from video capture.
48 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_BufferReady, 57 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_BufferReady,
49 int /* device id */, 58 int /* device id */,
50 int /* buffer_id */, 59 int /* buffer_id */,
51 base::Time /* timestamp */, 60 base::Time /* timestamp */,
52 media::VideoCaptureFormat /* resolution */) 61 media::VideoCaptureFormat /* resolution */)
53 62
54 // Start a video capture as |device_id|, a new id picked by the renderer 63 // Start a video capture as |device_id|, a new id picked by the renderer
55 // process. The session to be started is determined by |params.session_id|. 64 // process. The session to be started is determined by |params.session_id|.
56 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_Start, 65 IPC_MESSAGE_CONTROL3(VideoCaptureHostMsg_Start,
57 int /* device_id */, 66 int /* device_id */,
67 media::VideoCaptureSessionId, /* session_id */
58 media::VideoCaptureParams /* params */) 68 media::VideoCaptureParams /* params */)
59 69
60 // Pause the video capture specified by |device_id|. 70 // Pause the video capture specified by |device_id|.
61 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause, 71 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause,
62 int /* device_id */) 72 int /* device_id */)
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 */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698