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
3 // found in the LICENSE file.
4 
5 #ifndef MEDIA_GPU_IPC_COMMON_MEDIA_PARAM_TRAITS_MACROS_H_
6 #define MEDIA_GPU_IPC_COMMON_MEDIA_PARAM_TRAITS_MACROS_H_
7 
8 #include "gpu/config/gpu_info.h"
9 #include "ipc/ipc_message_macros.h"
10 #include "media/base/ipc/media_param_traits.h"
11 #include "media/gpu/ipc/common/create_video_encoder_params.h"
12 #include "media/video/video_decode_accelerator.h"
13 #include "media/video/video_encode_accelerator.h"
14 #include "ui/gfx/ipc/color/gfx_param_traits.h"
15 #include "ui/gfx/ipc/geometry/gfx_param_traits.h"
16 
17 IPC_ENUM_TRAITS_MAX_VALUE(media::VideoEncodeAccelerator::Error,
18                           media::VideoEncodeAccelerator::kErrorMax)
19 
20 IPC_STRUCT_TRAITS_BEGIN(media::VideoDecodeAccelerator::Config)
21   IPC_STRUCT_TRAITS_MEMBER(profile)
22   IPC_STRUCT_TRAITS_MEMBER(encryption_scheme)
23   IPC_STRUCT_TRAITS_MEMBER(cdm_id)
24   IPC_STRUCT_TRAITS_MEMBER(is_deferred_initialization_allowed)
25   IPC_STRUCT_TRAITS_MEMBER(overlay_info)
26   IPC_STRUCT_TRAITS_MEMBER(initial_expected_coded_size)
27   IPC_STRUCT_TRAITS_MEMBER(supported_output_formats)
28   IPC_STRUCT_TRAITS_MEMBER(sps)
29   IPC_STRUCT_TRAITS_MEMBER(pps)
30   IPC_STRUCT_TRAITS_MEMBER(container_color_space)
31   IPC_STRUCT_TRAITS_MEMBER(target_color_space)
32   IPC_STRUCT_TRAITS_MEMBER(hdr_metadata)
33 IPC_STRUCT_TRAITS_END()
34 
35 IPC_STRUCT_TRAITS_BEGIN(media::CreateVideoEncoderParams)
36   IPC_STRUCT_TRAITS_MEMBER(input_format)
37   IPC_STRUCT_TRAITS_MEMBER(input_visible_size)
38   IPC_STRUCT_TRAITS_MEMBER(output_profile)
39   IPC_STRUCT_TRAITS_MEMBER(initial_bitrate)
40   IPC_STRUCT_TRAITS_MEMBER(encoder_route_id)
41 IPC_STRUCT_TRAITS_END()
42 
43 #endif  // MEDIA_GPU_IPC_COMMON_MEDIA_PARAM_TRAITS_MACROS_H_
44