| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 // Multiply-included message file, hence no include guard here, but see below | 5 // Multiply-included message file, hence no include guard here, but see below |
| 6 // for a much smaller-than-usual include guard section. | 6 // for a much smaller-than-usual include guard section. |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/unguessable_token.h" | 10 #include "base/unguessable_token.h" |
| 11 #include "gpu/config/gpu_info.h" | 11 #include "gpu/config/gpu_info.h" |
| 12 #include "gpu/ipc/common/gpu_param_traits_macros.h" | 12 #include "gpu/ipc/common/gpu_param_traits_macros.h" |
| 13 #include "ipc/ipc_message_macros.h" | 13 #include "ipc/ipc_message_macros.h" |
| 14 #include "ipc/param_traits_macros.h" | 14 #include "ipc/param_traits_macros.h" |
| 15 #include "media/gpu/ipc/common/media_param_traits.h" | 15 #include "media/gpu/ipc/common/media_param_traits.h" |
| 16 #include "media/video/jpeg_decode_accelerator.h" | 16 #include "media/video/jpeg_decode_accelerator.h" |
| 17 #include "media/video/video_decode_accelerator.h" | 17 #include "media/video/video_decode_accelerator.h" |
| 18 #include "media/video/video_encode_accelerator.h" | 18 #include "media/video/video_encode_accelerator.h" |
| 19 #include "ui/gfx/ipc/color/gfx_param_traits.h" |
| 19 #include "ui/gfx/ipc/gfx_param_traits.h" | 20 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 20 | 21 |
| 21 #define IPC_MESSAGE_START MediaMsgStart | 22 #define IPC_MESSAGE_START MediaMsgStart |
| 22 | 23 |
| 23 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) | 24 IPC_STRUCT_BEGIN(AcceleratedJpegDecoderMsg_Decode_Params) |
| 24 IPC_STRUCT_MEMBER(media::BitstreamBuffer, input_buffer) | 25 IPC_STRUCT_MEMBER(media::BitstreamBuffer, input_buffer) |
| 25 IPC_STRUCT_MEMBER(gfx::Size, coded_size) | 26 IPC_STRUCT_MEMBER(gfx::Size, coded_size) |
| 26 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle) | 27 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, output_video_frame_handle) |
| 27 IPC_STRUCT_MEMBER(uint32_t, output_buffer_size) | 28 IPC_STRUCT_MEMBER(uint32_t, output_buffer_size) |
| 28 IPC_STRUCT_END() | 29 IPC_STRUCT_END() |
| 29 | 30 |
| 30 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params) | 31 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params) |
| 31 IPC_STRUCT_MEMBER(int32_t, frame_id) | 32 IPC_STRUCT_MEMBER(int32_t, frame_id) |
| 32 IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) | 33 IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) |
| 33 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) | 34 IPC_STRUCT_MEMBER(base::SharedMemoryHandle, buffer_handle) |
| 34 IPC_STRUCT_MEMBER(uint32_t, buffer_offset) | 35 IPC_STRUCT_MEMBER(uint32_t, buffer_offset) |
| 35 IPC_STRUCT_MEMBER(uint32_t, buffer_size) | 36 IPC_STRUCT_MEMBER(uint32_t, buffer_size) |
| 36 IPC_STRUCT_MEMBER(bool, force_keyframe) | 37 IPC_STRUCT_MEMBER(bool, force_keyframe) |
| 37 IPC_STRUCT_END() | 38 IPC_STRUCT_END() |
| 38 | 39 |
| 39 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params2) | 40 IPC_STRUCT_BEGIN(AcceleratedVideoEncoderMsg_Encode_Params2) |
| 40 IPC_STRUCT_MEMBER(int32_t, frame_id) | 41 IPC_STRUCT_MEMBER(int32_t, frame_id) |
| 41 IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) | 42 IPC_STRUCT_MEMBER(base::TimeDelta, timestamp) |
| 42 IPC_STRUCT_MEMBER(std::vector<gfx::GpuMemoryBufferHandle>, | 43 IPC_STRUCT_MEMBER(std::vector<gfx::GpuMemoryBufferHandle>, |
| 43 gpu_memory_buffer_handles) | 44 gpu_memory_buffer_handles) |
| 44 IPC_STRUCT_MEMBER(gfx::Size, size) | 45 IPC_STRUCT_MEMBER(gfx::Size, size) |
| 45 IPC_STRUCT_MEMBER(bool, force_keyframe) | 46 IPC_STRUCT_MEMBER(bool, force_keyframe) |
| 46 IPC_STRUCT_END() | 47 IPC_STRUCT_END() |
| 47 | 48 |
| 49 IPC_STRUCT_BEGIN(AcceleratedVideoDecoderHostMsg_PictureReady_Params) |
| 50 IPC_STRUCT_MEMBER(int32_t, picture_buffer_id) |
| 51 IPC_STRUCT_MEMBER(int32_t, bitstream_buffer_id) |
| 52 IPC_STRUCT_MEMBER(gfx::Rect, visible_rect) |
| 53 IPC_STRUCT_MEMBER(gfx::ColorSpace, color_space) |
| 54 IPC_STRUCT_MEMBER(bool, allow_overlay) |
| 55 IPC_STRUCT_MEMBER(bool, size_changed) |
| 56 IPC_STRUCT_END() |
| 57 |
| 48 //------------------------------------------------------------------------------ | 58 //------------------------------------------------------------------------------ |
| 49 // Utility Messages | 59 // Utility Messages |
| 50 | 60 |
| 51 // Sent from Renderer to GPU process to request a token identifying the channel. | 61 // Sent from Renderer to GPU process to request a token identifying the channel. |
| 52 // These tokens can be used to prove ownership of the channel. The intended use | 62 // These tokens can be used to prove ownership of the channel. The intended use |
| 53 // case is to share the command buffer with MojoMediaApplication. | 63 // case is to share the command buffer with MojoMediaApplication. |
| 54 IPC_SYNC_MESSAGE_CONTROL0_1(GpuCommandBufferMsg_GetChannelToken, | 64 IPC_SYNC_MESSAGE_CONTROL0_1(GpuCommandBufferMsg_GetChannelToken, |
| 55 base::UnguessableToken /* channel_token */) | 65 base::UnguessableToken /* channel_token */) |
| 56 | 66 |
| 57 //------------------------------------------------------------------------------ | 67 //------------------------------------------------------------------------------ |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 uint32_t, /* Number of textures per frame */ | 123 uint32_t, /* Number of textures per frame */ |
| 114 gfx::Size, /* Requested size of buffer */ | 124 gfx::Size, /* Requested size of buffer */ |
| 115 uint32_t) /* Texture target */ | 125 uint32_t) /* Texture target */ |
| 116 | 126 |
| 117 // Decoder reports that a picture is ready and buffer does not need to be passed | 127 // Decoder reports that a picture is ready and buffer does not need to be passed |
| 118 // back to the decoder. | 128 // back to the decoder. |
| 119 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer, | 129 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer, |
| 120 int32_t) /* Picture buffer ID */ | 130 int32_t) /* Picture buffer ID */ |
| 121 | 131 |
| 122 // Decoder reports that a picture is ready. | 132 // Decoder reports that a picture is ready. |
| 123 IPC_MESSAGE_ROUTED5(AcceleratedVideoDecoderHostMsg_PictureReady, | 133 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_PictureReady, |
| 124 int32_t, /* Picture buffer ID */ | 134 AcceleratedVideoDecoderHostMsg_PictureReady_Params) |
| 125 int32_t, /* Bitstream buffer ID */ | |
| 126 gfx::Rect, /* Visible rectangle */ | |
| 127 bool, /* Buffer is HW overlay capable */ | |
| 128 bool) /* VDA updated picture size */ | |
| 129 | 135 |
| 130 // Confirm decoder has been flushed. | 136 // Confirm decoder has been flushed. |
| 131 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) | 137 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_FlushDone) |
| 132 | 138 |
| 133 // Confirm decoder has been reset. | 139 // Confirm decoder has been reset. |
| 134 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) | 140 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderHostMsg_ResetDone) |
| 135 | 141 |
| 136 // Video decoder has encountered an error. | 142 // Video decoder has encountered an error. |
| 137 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, | 143 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_ErrorNotification, |
| 138 uint32_t /* Error ID */) | 144 uint32_t /* Error ID */) |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) | 231 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) |
| 226 | 232 |
| 227 //------------------------------------------------------------------------------ | 233 //------------------------------------------------------------------------------ |
| 228 // Accelerated JPEG Decoder Host Messages | 234 // Accelerated JPEG Decoder Host Messages |
| 229 // These messages are sent from the GPU process to Browser process. | 235 // These messages are sent from the GPU process to Browser process. |
| 230 // | 236 // |
| 231 // Report decode status. | 237 // Report decode status. |
| 232 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, | 238 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, |
| 233 int32_t, /* bitstream_buffer_id */ | 239 int32_t, /* bitstream_buffer_id */ |
| 234 media::JpegDecodeAccelerator::Error /* error */) | 240 media::JpegDecodeAccelerator::Error /* error */) |
| OLD | NEW |