1 // Copyright 2014 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.
5 // Singly or Multiply-included shared traits file depending on circumstances.
6 // This allows the use of IPC serialization macros in more than one IPC message
8 #ifndef CHROMECAST_COMMON_MEDIA_CMA_PARAM_TRAITS_MACROS_H_
9 #define CHROMECAST_COMMON_MEDIA_CMA_PARAM_TRAITS_MACROS_H_
11 #include "chromecast/common/media/cma_ipc_common.h"
12 #include "chromecast/media/cma/pipeline/load_type.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "ipc/param_traits_macros.h"
15 #include "media/base/audio_decoder_config.h"
16 #include "media/base/buffering_state.h"
17 #include "media/base/channel_layout.h"
18 #include "media/base/pipeline_status.h"
19 #include "media/base/sample_format.h"
20 #include "media/base/video_decoder_config.h"
21 #include "media/base/video_frame.h"
23 IPC_ENUM_TRAITS_MIN_MAX_VALUE(chromecast::media::LoadType
,
24 chromecast::media::kLoadTypeURL
,
25 chromecast::media::kLoadTypeMediaStream
)
27 IPC_ENUM_TRAITS_MIN_MAX_VALUE(chromecast::media::TrackId
,
28 chromecast::media::kNoTrackId
,
29 chromecast::media::kVideoTrackId
)
31 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::AudioCodec
,
32 media::AudioCodec::kUnknownAudioCodec
,
33 media::AudioCodec::kAudioCodecMax
)
34 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::BufferingState
,
35 media::BUFFERING_HAVE_NOTHING
,
36 media::BUFFERING_HAVE_ENOUGH
)
37 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::SampleFormat
,
38 media::SampleFormat::kUnknownSampleFormat
,
39 media::SampleFormat::kSampleFormatMax
)
40 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::PipelineStatus
,
42 media::PIPELINE_STATUS_MAX
)
43 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::VideoCodec
,
44 media::VideoCodec::kUnknownVideoCodec
,
45 media::VideoCodec::kVideoCodecMax
)
47 IPC_STRUCT_TRAITS_BEGIN(media::PipelineStatistics
)
48 IPC_STRUCT_TRAITS_MEMBER(audio_bytes_decoded
)
49 IPC_STRUCT_TRAITS_MEMBER(video_bytes_decoded
)
50 IPC_STRUCT_TRAITS_MEMBER(video_frames_decoded
)
51 IPC_STRUCT_TRAITS_MEMBER(video_frames_dropped
)
52 IPC_STRUCT_TRAITS_END()
54 #endif // CHROMECAST_COMMON_MEDIA_CMA_PARAM_TRAITS_MACROS_H_