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

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

Issue 23551011: From Video Capture, abolish OnFrameInfo and enable resolution changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes from bbudge Created 7 years, 2 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 | 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,
18 media::MaxVideoCaptureResolutionType - 1)
19
20 IPC_STRUCT_TRAITS_BEGIN(media::VideoCaptureParams)
21 IPC_STRUCT_TRAITS_MEMBER(session_id)
22 IPC_STRUCT_TRAITS_MEMBER(requested_format)
23 IPC_STRUCT_TRAITS_END()
24
25 // 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.
17 27
18 // Notify the renderer process about the state update such as 28 // Notify the renderer process about the state update such as
19 // Start/Pause/Stop. 29 // Start/Pause/Stop.
20 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged, 30 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_StateChanged,
21 int /* device id */, 31 int /* device id */,
22 content::VideoCaptureState /* new state */) 32 content::VideoCaptureState /* new state */)
23 33
24 // Tell the renderer process that a new buffer is allocated for video capture. 34 // Tell the renderer process that a new buffer is allocated for video capture.
25 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_NewBuffer, 35 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_NewBuffer,
26 int /* device id */, 36 int /* device id */,
27 base::SharedMemoryHandle /* handle */, 37 base::SharedMemoryHandle /* handle */,
28 int /* length */, 38 int /* length */,
29 int /* buffer_id */) 39 int /* buffer_id */)
30 40
41 // Tell the renderer process that it should release a buffer previously
42 // allocated by VideoCaptureMsg_NewBuffer.
43 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_FreeBuffer,
44 int /* device id */,
45 int /* buffer_id */)
46
31 // 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.
32 IPC_MESSAGE_CONTROL3(VideoCaptureMsg_BufferReady, 48 IPC_MESSAGE_CONTROL4(VideoCaptureMsg_BufferReady,
33 int /* device id */, 49 int /* device id */,
34 int /* buffer_id */, 50 int /* buffer_id */,
35 base::Time /* timestamp */) 51 base::Time /* timestamp */,
52 media::VideoCaptureFormat /* resolution */)
36 53
37 // Tell the renderer process the width, height and frame rate the camera use. 54 // Start a video capture as |device_id|, a new id picked by the renderer
38 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceInfo, 55 // process. The session to be started is determined by |params.session_id|.
39 int /* device_id */,
40 media::VideoCaptureParams)
41
42 // Tell the renderer process the newly changed width, height and frame rate
43 // the video capture device will use.
44 IPC_MESSAGE_CONTROL2(VideoCaptureMsg_DeviceInfoChanged,
45 int /* device_id */,
46 media::VideoCaptureParams)
47
48 // Start the video capture specified by |device_id|.
49 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_Start, 56 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_Start,
50 int /* device_id */, 57 int /* device_id */,
51 media::VideoCaptureParams) 58 media::VideoCaptureParams /* params */)
52 59
53 // Pause the video capture specified by |device_id|. 60 // Pause the video capture specified by |device_id|.
54 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause, 61 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Pause,
55 int /* device_id */) 62 int /* device_id */)
56 63
57 // Close the video capture specified by |device_id|. 64 // Close the video capture specified by |device_id|.
58 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop, 65 IPC_MESSAGE_CONTROL1(VideoCaptureHostMsg_Stop,
59 int /* device_id */) 66 int /* device_id */)
60 67
61 // Tell the browser process that the video frame buffer |handle| is ready for 68 // Tell the browser process that the renderer has finished reading from
62 // device |device_id| to fill up. 69 // a buffer previously delivered by VideoCaptureMsg_BufferReady.
63 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady, 70 IPC_MESSAGE_CONTROL2(VideoCaptureHostMsg_BufferReady,
64 int /* device_id */, 71 int /* device_id */,
65 int /* buffer_id */) 72 int /* buffer_id */)
OLDNEW
« no previous file with comments | « content/common/media/media_param_traits.cc ('k') | content/renderer/media/rtc_video_capture_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698