Index: content/common/gpu/gpu_messages.h |
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h |
index d984ac394935f9405d96d75b971ba2767ae31169..0fd69b3480abc908e4bedb00d0ac7cd94f631ff8 100644 |
--- a/content/common/gpu/gpu_messages.h |
+++ b/content/common/gpu/gpu_messages.h |
@@ -27,6 +27,7 @@ |
#include "ipc/ipc_channel_handle.h" |
#include "ipc/ipc_message_macros.h" |
#include "media/base/video_frame.h" |
+#include "media/video/jpeg_decode_accelerator.h" |
#include "media/video/video_decode_accelerator.h" |
#include "media/video/video_encode_accelerator.h" |
#include "ui/events/latency_info.h" |
@@ -56,6 +57,8 @@ IPC_ENUM_TRAITS_MAX_VALUE(gpu::MemoryAllocation::PriorityCutoff, |
gpu::MemoryAllocation::CUTOFF_LAST) |
IPC_ENUM_TRAITS_MAX_VALUE(gpu::error::ContextLostReason, |
gpu::error::kContextLostReasonLast) |
+IPC_ENUM_TRAITS_MAX_VALUE(media::JpegDecodeAccelerator::Error, |
+ media::JpegDecodeAccelerator::LARGEST_ERROR_ENUM) |
IPC_ENUM_TRAITS_MAX_VALUE(media::VideoEncodeAccelerator::Error, |
media::VideoEncodeAccelerator::kErrorMax) |
IPC_ENUM_TRAITS_MAX_VALUE(media::VideoFrame::Format, |
@@ -95,6 +98,15 @@ IPC_STRUCT_BEGIN(GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params) |
IPC_STRUCT_MEMBER(std::vector<ui::LatencyInfo>, latency_info) |
IPC_STRUCT_END() |
+IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) |
+ IPC_STRUCT_MEMBER(int32, input_buffer_id) |
+ IPC_STRUCT_MEMBER(gfx::Size, coded_size) |
+ IPC_STRUCT_MEMBER(base::SharedMemoryHandle, input_buffer_handle) |
+ IPC_STRUCT_MEMBER(uint32, input_buffer_size) |
+ IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle) |
+ IPC_STRUCT_MEMBER(uint32, output_buffer_size) |
+IPC_STRUCT_END() |
+ |
#if defined(OS_MACOSX) |
IPC_STRUCT_BEGIN(AcceleratedSurfaceMsg_BufferPresented_Params) |
// If the browser needs framerate throttling based on GPU back-pressure to be |
@@ -271,6 +283,13 @@ IPC_MESSAGE_CONTROL3(GpuMsg_DestroyGpuMemoryBuffer, |
int32, /* client_id */ |
int32 /* sync_point */) |
+// Create and initialize a hardware jpeg decoder using the specified route_id. |
+// Created decoders should be freed with AcceleratedJpegDecoderMsg_Destroy when |
+// no longer needed. |
+IPC_SYNC_MESSAGE_CONTROL1_1(GpuMsg_CreateJpegDecoder, |
+ int32 /* route_id */, |
+ bool /* succeeded */) |
+ |
// Tells the GPU process to create a context for collecting graphics card |
// information. |
IPC_MESSAGE_CONTROL0(GpuMsg_CollectGraphicsInfo) |
@@ -749,3 +768,30 @@ IPC_MESSAGE_ROUTED1(AcceleratedVideoEncoderHostMsg_NotifyError, |
// Send destroy request to the encoder. |
IPC_MESSAGE_ROUTED0(AcceleratedVideoEncoderMsg_Destroy) |
+ |
+//------------------------------------------------------------------------------ |
+// Accelerated JPEG Decoder Messages |
+// These messages are sent from the Browser process to GPU process. |
+ |
+// Decode one JPEG image from shared memory |input_buffer_handle| with size |
+// |input_buffer_size|. The input buffer is associated with |input_buffer_id| |
+// and the size of JPEG image is |coded_size|. Decoded I420 frame data will |
+// be put onto shared memory associated with |output_video_frame_handle| |
+// with size limit |output_buffer_size|. |
+IPC_MESSAGE_ROUTED1(AcceleratedJpegDecoderMsg_Decode, |
+ AcceleratedJpegDecoderMsg_Decode_Params) |
+ |
+// Send destroy request to the decoder. |
+IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) |
+ |
+//------------------------------------------------------------------------------ |
+// Accelerated JPEG Decoder Host Messages |
+// These messages are sent from the GPU process to Browser process. |
wuchengli
2015/04/24 05:54:24
add a blank line
kcwu
2015/04/30 19:25:41
Done.
|
+// Decoder reports that a video frame is ready. |
+IPC_MESSAGE_ROUTED1(AcceleratedJpegDecoderHostMsg_VideoFrameReady, |
+ int32) /* Bitstream buffer ID */ |
wuchengli
2015/04/24 05:54:24
s/Bitstream buffer ID/bitstream_buffer_id/ to be c
kcwu
2015/04/30 19:25:41
Done.
|
+ |
+// Report error condition. |
+IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_NotifyError, |
+ int32_t, /* bitstream_buffer_id */ |
wuchengli
2015/04/24 05:54:24
s/int32_t/int32/.
kcwu
2015/04/30 19:25:41
Done.
|
+ media::JpegDecodeAccelerator::Error) /* error */ |