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

Side by Side Diff: content/common/gpu/media/media_messages.h

Issue 1751323002: Allow multiple texture ids per picture buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 unified diff | Download patch
OLDNEW
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 "content/common/gpu/media/create_video_encoder_params.h"
10 #include "gpu/config/gpu_info.h" 10 #include "gpu/config/gpu_info.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 IPC_STRUCT_TRAITS_END() 103 IPC_STRUCT_TRAITS_END()
104 104
105 IPC_STRUCT_TRAITS_BEGIN(content::CreateVideoEncoderParams) 105 IPC_STRUCT_TRAITS_BEGIN(content::CreateVideoEncoderParams)
106 IPC_STRUCT_TRAITS_MEMBER(input_format) 106 IPC_STRUCT_TRAITS_MEMBER(input_format)
107 IPC_STRUCT_TRAITS_MEMBER(input_visible_size) 107 IPC_STRUCT_TRAITS_MEMBER(input_visible_size)
108 IPC_STRUCT_TRAITS_MEMBER(output_profile) 108 IPC_STRUCT_TRAITS_MEMBER(output_profile)
109 IPC_STRUCT_TRAITS_MEMBER(initial_bitrate) 109 IPC_STRUCT_TRAITS_MEMBER(initial_bitrate)
110 IPC_STRUCT_TRAITS_MEMBER(encoder_route_id) 110 IPC_STRUCT_TRAITS_MEMBER(encoder_route_id)
111 IPC_STRUCT_TRAITS_END() 111 IPC_STRUCT_TRAITS_END()
112 112
113 IPC_STRUCT_TRAITS_BEGIN(media::PictureBuffer::TextureIds)
114 IPC_STRUCT_TRAITS_MEMBER(ids[0])
115 IPC_STRUCT_TRAITS_MEMBER(ids[1])
116 IPC_STRUCT_TRAITS_MEMBER(ids[2])
117 IPC_STRUCT_TRAITS_MEMBER(ids[3])
118 IPC_STRUCT_TRAITS_END()
119
113 //------------------------------------------------------------------------------ 120 //------------------------------------------------------------------------------
114 // Accelerated Video Decoder Messages 121 // Accelerated Video Decoder Messages
115 // These messages are sent from Renderer process to GPU process. 122 // These messages are sent from Renderer process to GPU process.
116 123
117 // Create and initialize a hardware video decoder using the specified route_id. 124 // Create and initialize a hardware video decoder using the specified route_id.
118 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when 125 // Created decoders should be freed with AcceleratedVideoDecoderMsg_Destroy when
119 // no longer needed. 126 // no longer needed.
120 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateVideoDecoder, 127 IPC_SYNC_MESSAGE_ROUTED2_1(GpuCommandBufferMsg_CreateVideoDecoder,
121 media::VideoDecodeAccelerator::Config /* config */, 128 media::VideoDecodeAccelerator::Config /* config */,
122 int32_t /* decoder_route_id */, 129 int32_t /* decoder_route_id */,
123 bool /* succeeded */) 130 bool /* succeeded */)
124 131
125 // Set a CDM on the decoder to handle encrypted buffers. 132 // Set a CDM on the decoder to handle encrypted buffers.
126 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm, int32_t /* CDM ID */) 133 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_SetCdm, int32_t /* CDM ID */)
127 134
128 // Send input buffer for decoding. 135 // Send input buffer for decoding.
129 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, media::BitstreamBuffer) 136 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_Decode, media::BitstreamBuffer)
130 137
131 // Give the texture IDs for the textures the decoder will use for output. 138 // Give the texture IDs for the textures the decoder will use for output.
132 IPC_MESSAGE_ROUTED2(AcceleratedVideoDecoderMsg_AssignPictureBuffers, 139 IPC_MESSAGE_ROUTED2(
133 std::vector<int32_t>, /* Picture buffer ID */ 140 AcceleratedVideoDecoderMsg_AssignPictureBuffers,
134 std::vector<uint32_t>) /* Texture ID */ 141 std::vector<int32_t>, /* Picture buffer ID */
142 std::vector<media::PictureBuffer::TextureIds>) /* Texture ID */
135 143
136 // Send from Renderer process to the GPU process to recycle the given picture 144 // Send from Renderer process to the GPU process to recycle the given picture
137 // buffer for further decoding. 145 // buffer for further decoding.
138 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer, 146 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderMsg_ReusePictureBuffer,
139 int32_t) /* Picture buffer ID */ 147 int32_t) /* Picture buffer ID */
140 148
141 // Send flush request to the decoder. 149 // Send flush request to the decoder.
142 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderMsg_Flush) 150 IPC_MESSAGE_ROUTED0(AcceleratedVideoDecoderMsg_Flush)
143 151
144 // Send reset request to the decoder. 152 // Send reset request to the decoder.
(...skipping 10 matching lines...) Expand all
155 163
156 // Notify the CDM setting result. 164 // Notify the CDM setting result.
157 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_CdmAttached, 165 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_CdmAttached,
158 bool) /* success */ 166 bool) /* success */
159 167
160 // Accelerated video decoder has consumed input buffer from transfer buffer. 168 // Accelerated video decoder has consumed input buffer from transfer buffer.
161 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed, 169 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_BitstreamBufferProcessed,
162 int32_t) /* Processed buffer ID */ 170 int32_t) /* Processed buffer ID */
163 171
164 // Allocate video frames for output of the hardware video decoder. 172 // Allocate video frames for output of the hardware video decoder.
165 IPC_MESSAGE_ROUTED3(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers, 173 IPC_MESSAGE_ROUTED4(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers,
166 int32_t, /* Number of video frames to generate */ 174 int32_t, /* Number of video frames to generate */
175 uint32_t, /* Number of textures per frame */
167 gfx::Size, /* Requested size of buffer */ 176 gfx::Size, /* Requested size of buffer */
168 uint32_t) /* Texture target */ 177 uint32_t) /* Texture target */
169 178
170 // Decoder reports that a picture is ready and buffer does not need to be passed 179 // Decoder reports that a picture is ready and buffer does not need to be passed
171 // back to the decoder. 180 // back to the decoder.
172 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer, 181 IPC_MESSAGE_ROUTED1(AcceleratedVideoDecoderHostMsg_DismissPictureBuffer,
173 int32_t) /* Picture buffer ID */ 182 int32_t) /* Picture buffer ID */
174 183
175 // Decoder reports that a picture is ready. 184 // Decoder reports that a picture is ready.
176 IPC_MESSAGE_ROUTED5(AcceleratedVideoDecoderHostMsg_PictureReady, 185 IPC_MESSAGE_ROUTED5(AcceleratedVideoDecoderHostMsg_PictureReady,
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy) 286 IPC_MESSAGE_ROUTED0(AcceleratedJpegDecoderMsg_Destroy)
278 287
279 //------------------------------------------------------------------------------ 288 //------------------------------------------------------------------------------
280 // Accelerated JPEG Decoder Host Messages 289 // Accelerated JPEG Decoder Host Messages
281 // These messages are sent from the GPU process to Browser process. 290 // These messages are sent from the GPU process to Browser process.
282 // 291 //
283 // Report decode status. 292 // Report decode status.
284 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck, 293 IPC_MESSAGE_ROUTED2(AcceleratedJpegDecoderHostMsg_DecodeAck,
285 int32_t, /* bitstream_buffer_id */ 294 int32_t, /* bitstream_buffer_id */
286 media::JpegDecodeAccelerator::Error /* error */) 295 media::JpegDecodeAccelerator::Error /* error */)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698