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

Unified Diff: content/common/media/encoded_video_capture_messages.h

Issue 15906019: Hook up EncodedVideoSource on the browser side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_cl_6
Patch Set: 9a6cfea4 Update due to hshi@ Created 7 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/content_message_generator.h ('k') | content/content_common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/media/encoded_video_capture_messages.h
diff --git a/content/common/media/encoded_video_capture_messages.h b/content/common/media/encoded_video_capture_messages.h
new file mode 100644
index 0000000000000000000000000000000000000000..badabd0e63b0c12aaba6fe1f74155e30607f49ba
--- /dev/null
+++ b/content/common/media/encoded_video_capture_messages.h
@@ -0,0 +1,126 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "ipc/ipc_message_macros.h"
+#include "media/video/capture/video_capture_types.h"
+#include "media/video/video_encode_types.h"
+
+#undef IPC_MESSAGE_EXPORT
+#define IPC_MESSAGE_EXPORT CONTENT_EXPORT
+#define IPC_MESSAGE_START EncodedVideoCaptureMsgStart
+
+#if !defined(OS_ANDROID)
+IPC_ENUM_TRAITS(media::VideoCodec)
+#endif // !defined(OS_ANDROID)
+
+IPC_STRUCT_TRAITS_BEGIN(media::VideoEncodingConfig)
+ IPC_STRUCT_TRAITS_MEMBER(codec_type)
+ IPC_STRUCT_TRAITS_MEMBER(codec_name)
+ IPC_STRUCT_TRAITS_MEMBER(max_resolution)
+ IPC_STRUCT_TRAITS_MEMBER(max_frames_per_second)
+ IPC_STRUCT_TRAITS_MEMBER(max_bitrate)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(media::RuntimeVideoEncodingParameters)
+ IPC_STRUCT_TRAITS_MEMBER(average_bitrate)
+ IPC_STRUCT_TRAITS_MEMBER(max_bitrate)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(media::VideoEncodingParameters)
+ IPC_STRUCT_TRAITS_MEMBER(codec_name)
+ IPC_STRUCT_TRAITS_MEMBER(resolution)
+ IPC_STRUCT_TRAITS_MEMBER(frames_per_second)
hshi1 2013/06/13 00:28:35 Please move frames_per_second to the runtime_param
sheu 2013/06/13 06:08:18 Done.
+ IPC_STRUCT_TRAITS_MEMBER(runtime_params)
+IPC_STRUCT_TRAITS_END()
+
+IPC_STRUCT_TRAITS_BEGIN(media::BufferEncodingMetadata)
+ IPC_STRUCT_TRAITS_MEMBER(timestamp)
+ IPC_STRUCT_TRAITS_MEMBER(key_frame)
+IPC_STRUCT_TRAITS_END()
+
+// Message from Renderer to Browser process to query the encoding capability
+// for the capture session. A successful request results in
+// EncoderVideoCaptureMessage_CapabilityAvailable message.
+IPC_MESSAGE_CONTROL2(EncodedVideoCaptureHostMsg_GetCapability,
+ int /* device_id */,
+ media::VideoCaptureSessionId /* session_id */)
+
+// Message from Renderer to Browser process to create a bitstream with specific
+// parameters. A successful request results in beginning of streaming and
+// EncoderVideoCaptureMsg_BitstreamCreated message to Renderer. A failed request
+// triggers EncodedVideoCaptureMsg_BitstreamDestroyed message. |session_id| is
+// the capture session id returned by the MediaStreamManager. The renderer is
+// responsible for generating unique |device_id| within its context that will be
+// used to identify bitstreams in IPC.
+IPC_MESSAGE_CONTROL3(EncodedVideoCaptureHostMsg_CreateBitstream,
+ int /* device_id */,
+ media::VideoCaptureSessionId /* session_id */,
+ media::VideoEncodingParameters /* params */)
+
+// Message from Renderer to Browser process to stop streaming a bitstream. When
+// Browser has finalized the bitstream it will trigger
+// EncodedVideoCaptureMsg_BitstreamDestroyed message back from Browser to
+// Renderer. Renderer must be prepared to receive
+// EncodedVideoCaptureMsg_BitstreamReady messages until it has received the
+// EncodedVideoCaptureMsg_BitstreamDestroyed message.
+IPC_MESSAGE_CONTROL1(EncodedVideoCaptureHostMsg_DestroyBitstream,
+ int /* device_id */)
+
+// Message from Renderer to Browser process to set a stream's bitstream config.
+// Will always result in EncodedVideoCaptureMsg_BitstreamConfigChanged
+// containing currently active parameters, regardless of whether this call
+// succeeded or not.
+IPC_MESSAGE_CONTROL2(EncodedVideoCaptureHostMsg_TryConfigureBitstream,
+ int /* device_id */,
+ media::RuntimeVideoEncodingParameters /* params */)
+
+// Message from Renderer to Browser process to tell that the data within a
+// buffer has been processed and it can be reused to encode upcoming bitstream.
+IPC_MESSAGE_CONTROL2(EncodedVideoCaptureHostMsg_BitstreamBufferConsumed,
+ int /* device_id */,
+ int /* buffer_id */)
+
+// Message from Browser to Renderer process to report the encoding capability
+// of the device.
+IPC_MESSAGE_CONTROL2(EncodedVideoCaptureMsg_CapabilityAvailable,
+ int /* device_id */,
+ media::VideoEncodingCapability /* capability */)
+
+// Message from Browser to Renderer process to acknowledge a request to create
+// an encoded video bitstream. When this message occurs bitstream can be
+// considered to be streaming and Renderer should be ready to start accepting
+// EncodedVideoCaptureMsg_BitstreamReady messages and buffers contained within
+// them. Shared memory buffers used to deliver the bitstream are assigned with
+// buffer ids as specified by the buffers parameter.
+IPC_MESSAGE_CONTROL4(EncodedVideoCaptureMsg_BitstreamCreated,
+ int /* device id */,
+ media::VideoEncodingParameters /* params */,
+ std::vector<base::SharedMemoryHandle> /* buffers */,
+ size_t /* buffer_size */)
+
+// Message from Browser to Renderer process to acknowledge a request to destroy
+// an encoded video bitstream.
+IPC_MESSAGE_CONTROL1(EncodedVideoCaptureMsg_BitstreamDestroyed,
+ int /* device id */)
+
+// Message from Browser to Renderer process to inform the clients of the current
+// encoding parameters, regardless of whether the previous request to change
+// them has been successful or not. This is called usually as a response to
+// EncodedVideoCaptureHostMsg_TryConfigureBitstream during runtime, but can
+// occur also as a result of config change initiated by encoder or other clients
+// in the system. E.g. if there are multiple clients and bitstream config change
+// is requested from one client, all clients should be prepared to handle the
+// configuration change.
+IPC_MESSAGE_CONTROL2(EncodedVideoCaptureMsg_BitstreamConfigChanged,
+ int /* device id */,
+ media::RuntimeVideoEncodingParameters /* current_params */)
+
+// Message from Browser to Renderer process indicating that a bitstream buffer
+// is available for the stream. The value of |size| indicates the amount of
+// valid bitstream data (in bytes).
+IPC_MESSAGE_CONTROL4(EncodedVideoCaptureMsg_BitstreamReady,
+ int /* device id */,
+ int /* buffer_id */,
+ size_t /* size */,
hshi1 2013/06/13 00:28:35 Per Ami: size_t is verboten in IPC. But I wonder i
sheu 2013/06/13 06:08:18 I'm going to specify it as a uint32.
+ media::BufferEncodingMetadata /* metadata */)
« no previous file with comments | « content/common/content_message_generator.h ('k') | content/content_common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698