Chromium Code Reviews| 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 "content/common/content_export.h" | 8 #include "content/common/content_export.h" |
| 9 #include "content/common/gpu/media/create_video_encoder_params.h" | |
| 9 #include "gpu/config/gpu_info.h" | 10 #include "gpu/config/gpu_info.h" |
| 10 #include "ipc/ipc_message_macros.h" | 11 #include "ipc/ipc_message_macros.h" |
| 11 #include "ipc/param_traits_macros.h" | 12 #include "ipc/param_traits_macros.h" |
| 12 #include "media/base/bitstream_buffer.h" | 13 #include "media/base/bitstream_buffer.h" |
| 13 #include "media/base/decrypt_config.h" | 14 #include "media/base/decrypt_config.h" |
| 14 #include "media/base/video_types.h" | 15 #include "media/base/video_types.h" |
| 15 #include "media/video/jpeg_decode_accelerator.h" | 16 #include "media/video/jpeg_decode_accelerator.h" |
| 16 #include "media/video/video_decode_accelerator.h" | 17 #include "media/video/video_decode_accelerator.h" |
| 17 #include "media/video/video_encode_accelerator.h" | 18 #include "media/video/video_encode_accelerator.h" |
| 18 | 19 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 94 IPC_STRUCT_TRAITS_MEMBER(max_resolution) | 95 IPC_STRUCT_TRAITS_MEMBER(max_resolution) |
| 95 IPC_STRUCT_TRAITS_MEMBER(max_framerate_numerator) | 96 IPC_STRUCT_TRAITS_MEMBER(max_framerate_numerator) |
| 96 IPC_STRUCT_TRAITS_MEMBER(max_framerate_denominator) | 97 IPC_STRUCT_TRAITS_MEMBER(max_framerate_denominator) |
| 97 IPC_STRUCT_TRAITS_END() | 98 IPC_STRUCT_TRAITS_END() |
| 98 | 99 |
| 99 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) | 100 IPC_STRUCT_TRAITS_BEGIN(media::SubsampleEntry) |
| 100 IPC_STRUCT_TRAITS_MEMBER(clear_bytes) | 101 IPC_STRUCT_TRAITS_MEMBER(clear_bytes) |
| 101 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) | 102 IPC_STRUCT_TRAITS_MEMBER(cypher_bytes) |
| 102 IPC_STRUCT_TRAITS_END() | 103 IPC_STRUCT_TRAITS_END() |
| 103 | 104 |
| 105 IPC_STRUCT_TRAITS_BEGIN(content::CreateVideoEncoderParams) | |
| 106 IPC_STRUCT_TRAITS_MEMBER(command_buffer_route_id) | |
| 107 IPC_STRUCT_TRAITS_MEMBER(input_format) | |
| 108 IPC_STRUCT_TRAITS_MEMBER(input_visible_size) | |
| 109 IPC_STRUCT_TRAITS_MEMBER(output_profile) | |
| 110 IPC_STRUCT_TRAITS_MEMBER(initial_bitrate) | |
| 111 IPC_STRUCT_TRAITS_MEMBER(encoder_route_id) | |
| 112 IPC_STRUCT_TRAITS_END() | |
| 113 | |
| 114 // Create and initialize a hardware jpeg decoder using the specified route_id. | |
| 115 // Created decoders should be freed with AcceleratedJpegDecoderMsg_Destroy when | |
| 116 // no longer needed. | |
| 117 IPC_SYNC_MESSAGE_CONTROL1_1(GpuChannelMsg_CreateJpegDecoder, | |
| 118 int32_t /* route_id */, | |
| 119 bool /* succeeded */) | |
| 120 | |
| 104 // Create and initialize a hardware video decoder using the specified route_id. | 121 // Create and initialize a hardware video decoder using the specified route_id. |
| 105 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when | 122 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when |
| 106 // no longer needed. | 123 // no longer needed. |
| 107 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateVideoDecoder, | 124 IPC_SYNC_MESSAGE_CONTROL3_1(GpuCommandBufferMsg_CreateVideoDecoder, |
|
dcheng
2016/03/04 02:00:11
Btw, are these renderer to GPU messages? Or someth
Fady Samuel
2016/03/04 02:30:00
Good point! I moved them to their appropriate sect
| |
| 108 media::VideoDecodeAccelerator::Config, /* config */ | 125 int32_t /* command_buffer_route_id */, |
| 109 int32_t, /* route_id */ | 126 media::VideoDecodeAccelerator::Config /* config */, |
| 110 bool /* succeeded */) | 127 int32_t /* decoder_route_id */, |
| 128 bool /* succeeded */) | |
| 111 | 129 |
| 112 // Create and initialize a hardware video encoder using the specified route_id. | 130 // Create and initialize a hardware video encoder using the specified route_id. |
| 113 // Created encoders should be freed with AcceleratedVideoEncoderMsg_Destroy when | 131 // Created encoders should be freed with AcceleratedVideoEncoderMsg_Destroy when |
| 114 // no longer needed. | 132 // no longer needed. |
| 115 IPC_SYNC_MESSAGE_ROUTED5_1(GpuCommandBufferMsg_CreateVideoEncoder, | 133 IPC_SYNC_MESSAGE_CONTROL1_1(GpuCommandBufferMsg_CreateVideoEncoder, |
| 116 media::VideoPixelFormat /* input_format */, | 134 content::CreateVideoEncoderParams, |
| 117 gfx::Size /* input_visible_size */, | 135 bool /* succeeded */) |
| 118 media::VideoCodecProfile /* output_profile */, | |
| 119 uint32_t /* initial_bitrate */, | |
| 120 int32_t, /* route_id */ | |
| 121 bool /* succeeded */) | |
| 122 | 136 |
| 123 //------------------------------------------------------------------------------ | 137 //------------------------------------------------------------------------------ |
| 124 // Accelerated Video Decoder Messages | 138 // Accelerated Video Decoder Messages |
| 125 // These messages are sent from Renderer process to GPU process. | 139 // These messages are sent from Renderer process to GPU process. |
| 126 | 140 |
| 127 // Set a CDM on the decoder to handle encrypted buffers. | 141 // Set a CDM on the decoder to handle encrypted buffers. |
| 128 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm, int32_t /* CDM ID */) | 142 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm, int32_t /* CDM ID */) |
| 129 | 143 |
| 130 // Send input buffer for decoding. | 144 // Send input buffer for decoding. |
| 131 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, media::BitstreamBuffer) | 145 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, media::BitstreamBuffer) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) | 278 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) |
| 265 | 279 |
| 266 //------------------------------------------------------------------------------ | 280 //------------------------------------------------------------------------------ |
| 267 // Accelerated JPEG Decoder Host Messages | 281 // Accelerated JPEG Decoder Host Messages |
| 268 // These messages are sent from the GPU process to Browser process. | 282 // These messages are sent from the GPU process to Browser process. |
| 269 // | 283 // |
| 270 // Report decode status. | 284 // Report decode status. |
| 271 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, | 285 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, |
| 272 int32_t, /* bitstream_buffer_id */ | 286 int32_t, /* bitstream_buffer_id */ |
| 273 media::JpegDecodeAccelerator::Error /* error */) | 287 media::JpegDecodeAccelerator::Error /* error */) |
| OLD | NEW |