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

Side by Side Diff: gpu/ipc/common/gpu_info_struct_traits.cc

Issue 2640113004: Introduce Dolby Vision video codec and Demuxer support (Closed)
Patch Set: fix build break on Android Created 3 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
« no previous file with comments | « gpu/ipc/common/gpu_info.mojom ('k') | media/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "gpu/ipc/common/gpu_info_struct_traits.h" 5 #include "gpu/ipc/common/gpu_info_struct_traits.h"
6 6
7 #include "ipc/ipc_message_utils.h" 7 #include "ipc/ipc_message_utils.h"
8 #include "mojo/common/common_custom_types_struct_traits.h" 8 #include "mojo/common/common_custom_types_struct_traits.h"
9 9
10 namespace mojo { 10 namespace mojo {
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 case gpu::VideoCodecProfile::VP9PROFILE_PROFILE2: 99 case gpu::VideoCodecProfile::VP9PROFILE_PROFILE2:
100 return gpu::mojom::VideoCodecProfile::VP9PROFILE_PROFILE2; 100 return gpu::mojom::VideoCodecProfile::VP9PROFILE_PROFILE2;
101 case gpu::VideoCodecProfile::VP9PROFILE_PROFILE3: 101 case gpu::VideoCodecProfile::VP9PROFILE_PROFILE3:
102 return gpu::mojom::VideoCodecProfile::VP9PROFILE_PROFILE3; 102 return gpu::mojom::VideoCodecProfile::VP9PROFILE_PROFILE3;
103 case gpu::VideoCodecProfile::HEVCPROFILE_MAIN: 103 case gpu::VideoCodecProfile::HEVCPROFILE_MAIN:
104 return gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN; 104 return gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN;
105 case gpu::VideoCodecProfile::HEVCPROFILE_MAIN10: 105 case gpu::VideoCodecProfile::HEVCPROFILE_MAIN10:
106 return gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN10; 106 return gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN10;
107 case gpu::VideoCodecProfile::HEVCPROFILE_MAIN_STILL_PICTURE: 107 case gpu::VideoCodecProfile::HEVCPROFILE_MAIN_STILL_PICTURE:
108 return gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN_STILL_PICTURE; 108 return gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN_STILL_PICTURE;
109 case gpu::VideoCodecProfile::DOLBYVISION_PROFILE0:
110 return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE0;
111 case gpu::VideoCodecProfile::DOLBYVISION_PROFILE4:
112 return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE4;
113 case gpu::VideoCodecProfile::DOLBYVISION_PROFILE5:
114 return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE5;
115 case gpu::VideoCodecProfile::DOLBYVISION_PROFILE7:
116 return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE7;
109 } 117 }
110 NOTREACHED() << "Invalid VideoCodecProfile:" << video_codec_profile; 118 NOTREACHED() << "Invalid VideoCodecProfile:" << video_codec_profile;
111 return gpu::mojom::VideoCodecProfile::VIDEO_CODEC_PROFILE_UNKNOWN; 119 return gpu::mojom::VideoCodecProfile::VIDEO_CODEC_PROFILE_UNKNOWN;
112 } 120 }
113 121
114 // static 122 // static
115 bool EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>:: 123 bool EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>::
116 FromMojom(gpu::mojom::VideoCodecProfile input, 124 FromMojom(gpu::mojom::VideoCodecProfile input,
117 gpu::VideoCodecProfile* out) { 125 gpu::VideoCodecProfile* out) {
118 switch (input) { 126 switch (input) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 return true; 177 return true;
170 case gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN: 178 case gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN:
171 *out = gpu::VideoCodecProfile::HEVCPROFILE_MAIN; 179 *out = gpu::VideoCodecProfile::HEVCPROFILE_MAIN;
172 return true; 180 return true;
173 case gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN10: 181 case gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN10:
174 *out = gpu::VideoCodecProfile::HEVCPROFILE_MAIN10; 182 *out = gpu::VideoCodecProfile::HEVCPROFILE_MAIN10;
175 return true; 183 return true;
176 case gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN_STILL_PICTURE: 184 case gpu::mojom::VideoCodecProfile::HEVCPROFILE_MAIN_STILL_PICTURE:
177 *out = gpu::VideoCodecProfile::HEVCPROFILE_MAIN_STILL_PICTURE; 185 *out = gpu::VideoCodecProfile::HEVCPROFILE_MAIN_STILL_PICTURE;
178 return true; 186 return true;
187 case gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE0:
188 *out = gpu::VideoCodecProfile::DOLBYVISION_PROFILE0;
189 return true;
190 case gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE4:
191 *out = gpu::VideoCodecProfile::DOLBYVISION_PROFILE4;
192 return true;
193 case gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE5:
194 *out = gpu::VideoCodecProfile::DOLBYVISION_PROFILE5;
195 return true;
196 case gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE7:
197 *out = gpu::VideoCodecProfile::DOLBYVISION_PROFILE7;
198 return true;
179 } 199 }
180 NOTREACHED() << "Invalid VideoCodecProfile: " << input; 200 NOTREACHED() << "Invalid VideoCodecProfile: " << input;
181 return false; 201 return false;
182 } 202 }
183 203
184 // static 204 // static
185 bool StructTraits<gpu::mojom::VideoDecodeAcceleratorSupportedProfileDataView, 205 bool StructTraits<gpu::mojom::VideoDecodeAcceleratorSupportedProfileDataView,
186 gpu::VideoDecodeAcceleratorSupportedProfile>:: 206 gpu::VideoDecodeAcceleratorSupportedProfile>::
187 Read(gpu::mojom::VideoDecodeAcceleratorSupportedProfileDataView data, 207 Read(gpu::mojom::VideoDecodeAcceleratorSupportedProfileDataView data,
188 gpu::VideoDecodeAcceleratorSupportedProfile* out) { 208 gpu::VideoDecodeAcceleratorSupportedProfile* out) {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 data.ReadDxDiagnosticsInfoState(&out->dx_diagnostics_info_state) && 278 data.ReadDxDiagnosticsInfoState(&out->dx_diagnostics_info_state) &&
259 data.ReadDxDiagnostics(&out->dx_diagnostics) && 279 data.ReadDxDiagnostics(&out->dx_diagnostics) &&
260 #endif 280 #endif
261 data.ReadVideoDecodeAcceleratorCapabilities( 281 data.ReadVideoDecodeAcceleratorCapabilities(
262 &out->video_decode_accelerator_capabilities) && 282 &out->video_decode_accelerator_capabilities) &&
263 data.ReadVideoEncodeAcceleratorSupportedProfiles( 283 data.ReadVideoEncodeAcceleratorSupportedProfiles(
264 &out->video_encode_accelerator_supported_profiles); 284 &out->video_encode_accelerator_supported_profiles);
265 } 285 }
266 286
267 } // namespace mojo 287 } // namespace mojo
OLDNEW
« no previous file with comments | « gpu/ipc/common/gpu_info.mojom ('k') | media/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698