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

Unified Diff: content/common/gpu/gpu_messages.h

Issue 20632002: Add media::VideoEncodeAccelerator with WebRTC integration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@git-svn
Patch Set: 9e8f21a0 Comments addressed. Created 7 years, 5 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
Index: content/common/gpu/gpu_messages.h
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index 5749c371c1b7cfe1c492ffbe3f1548e65f395903..e9f379d9497f4d076c168e8e35483f6771993120 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -23,7 +23,9 @@
#include "gpu/ipc/gpu_command_buffer_traits.h"
#include "ipc/ipc_channel_handle.h"
#include "ipc/ipc_message_macros.h"
+#include "media/base/video_frame.h"
#include "media/video/video_decode_accelerator.h"
+#include "media/video/video_encode_accelerator.h"
#include "ui/base/latency_info.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/size.h"
@@ -217,6 +219,10 @@ IPC_STRUCT_TRAITS_BEGIN(content::GpuRenderingStats)
IPC_STRUCT_TRAITS_MEMBER(total_processing_commands_time)
IPC_STRUCT_TRAITS_END()
+IPC_ENUM_TRAITS(media::VideoFrame::Format)
+
+IPC_ENUM_TRAITS(media::VideoEncodeAccelerator::Error)
+
//------------------------------------------------------------------------------
// GPU Messages
// These are messages from the browser to the GPU process.
@@ -447,6 +453,12 @@ IPC_MESSAGE_CONTROL1(GpuChannelMsg_GenerateMailboxNamesAsync,
IPC_MESSAGE_CONTROL1(GpuChannelMsg_GenerateMailboxNamesReply,
std::vector<gpu::Mailbox> /* mailbox_names */)
+// Create a new GPU-accelerated video encoder.
+IPC_SYNC_MESSAGE_CONTROL0_1(GpuChannelMsg_CreateVideoEncoder,
+ int32 /* route_id */)
+
+IPC_MESSAGE_CONTROL1(GpuChannelMsg_DestroyVideoEncoder, int32 /* route_id */)
+
#if defined(OS_ANDROID)
// Register the StreamTextureProxy class with the GPU process, so that
// the renderer process will get notified whenever a frame becomes available.
@@ -690,3 +702,53 @@ IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone)
// Video decoder has encountered an error.
IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification,
uint32) /* Error ID */
+
+//------------------------------------------------------------------------------
+// Accelerated Video Encoder Messages
+// These messages are sent from the Renderer process to GPU process.
+
+// Initialize the accelerated encoder.
+IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Initialize,
+ media::VideoFrame::Format /* input_format */,
+ gfx::Size /* input_visible_size */,
+ media::VideoCodecProfile /* output_profile */,
+ int32 /* initial_bitrate */)
+
+// Queue a input buffer to the encoder to encode.
+IPC_MESSAGE_ROUTED4(AcceleratedVideoEncoderMsg_Encode,
+ int32 /* frame_id */,
+ base::SharedMemoryHandle /* buffer_handle */,
+ uint32 /* buffer_size */,
+ bool /* force_keyframe */)
+
+// Queue a buffer to the encoder for use in returning output.
+IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderMsg_UseOutputBitstreamBuffer,
+ int32 /* buffer_id */,
+ base::SharedMemoryHandle /* buffer_handle */,
+ uint32 /* buffer_size */)
+
+// Request a runtime encoding parameter change.
+IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderMsg_RequestEncodingParameterChange,
+ int32 /* bitrate */)
+
+//------------------------------------------------------------------------------
+// Accelerated Video Encoder Host Messages
+// These messages are sent from GPU process to Renderer process.
+
+IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderHostMsg_NotifyInitializeDone)
+
+IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_RequireBitstreamBuffers,
+ int /* input_count */,
+ gfx::Size /* input_coded_size */,
+ uint32 /* output_buffer_size */)
+
+IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyEncodeDone,
Ami GONE FROM CHROMIUM 2013/08/05 18:44:38 If this remains outside the VEA::Client interface
sheu 2013/08/06 06:16:36 As part of the move to media::VideoFrame: since Vi
+ int32 /* frame_id */)
+
+IPC_MESSAGE_ROUTED3(AcceleratedVideoEncoderHostMsg_BitstreamBufferReady,
+ int32 /* bitstream_buffer_id */,
+ uint32 /* payload_size */,
+ bool /* key_frame */)
+
+IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError,
+ media::VideoEncodeAccelerator::Error /* error */)

Powered by Google App Engine
This is Rietveld 408576698