| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 "chromecast/common/media/cma_param_traits.h" | 5 #include "chromecast/common/media/cma_param_traits.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "chromecast/common/media/cma_param_traits_macros.h" | 9 #include "chromecast/common/media/cma_param_traits_macros.h" |
| 10 #include "content/public/common/common_param_traits.h" | 10 #include "content/public/common/common_param_traits.h" |
| 11 #include "ipc/ipc_message_macros.h" | 11 #include "ipc/ipc_message_macros.h" |
| 12 #include "media/base/audio_decoder_config.h" | 12 #include "media/base/audio_decoder_config.h" |
| 13 #include "media/base/video_decoder_config.h" | 13 #include "media/base/video_decoder_config.h" |
| 14 #include "ui/gfx/ipc/gfx_param_traits.h" | 14 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 15 | 15 |
| 16 // Note(gunsch): these are currently defined in content/, but not declared in |
| 17 // content/public/. These headers need to be forward-declared for chromecast/, |
| 18 // but without new implementations linked in. |
| 19 // The correct long-term fix is to use Mojo instead of the content/ IPCs. |
| 20 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::ChannelLayout, |
| 21 media::ChannelLayout::CHANNEL_LAYOUT_NONE, |
| 22 media::ChannelLayout::CHANNEL_LAYOUT_MAX) |
| 23 IPC_ENUM_TRAITS_MIN_MAX_VALUE(media::VideoCodecProfile, |
| 24 media::VIDEO_CODEC_PROFILE_MIN, |
| 25 media::VIDEO_CODEC_PROFILE_MAX) |
| 26 IPC_ENUM_TRAITS_MAX_VALUE(media::VideoFrame::Format, |
| 27 media::VideoFrame::FORMAT_MAX) |
| 28 |
| 16 namespace IPC { | 29 namespace IPC { |
| 17 | 30 |
| 18 void ParamTraits<media::AudioDecoderConfig>::Write( | 31 void ParamTraits<media::AudioDecoderConfig>::Write( |
| 19 Message* m, const media::AudioDecoderConfig& p) { | 32 Message* m, const media::AudioDecoderConfig& p) { |
| 20 ParamTraits<media::AudioCodec>::Write(m, p.codec()); | 33 ParamTraits<media::AudioCodec>::Write(m, p.codec()); |
| 21 ParamTraits<media::SampleFormat>::Write(m, p.sample_format()); | 34 ParamTraits<media::SampleFormat>::Write(m, p.sample_format()); |
| 22 ParamTraits<media::ChannelLayout>::Write(m, p.channel_layout()); | 35 ParamTraits<media::ChannelLayout>::Write(m, p.channel_layout()); |
| 23 ParamTraits<int>::Write(m, p.samples_per_second()); | 36 ParamTraits<int>::Write(m, p.samples_per_second()); |
| 24 ParamTraits<bool>::Write(m, p.is_encrypted()); | 37 ParamTraits<bool>::Write(m, p.is_encrypted()); |
| 25 std::vector<uint8> extra_data; | 38 std::vector<uint8> extra_data; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 is_encrypted); | 126 is_encrypted); |
| 114 return true; | 127 return true; |
| 115 } | 128 } |
| 116 | 129 |
| 117 void ParamTraits<media::VideoDecoderConfig>::Log( | 130 void ParamTraits<media::VideoDecoderConfig>::Log( |
| 118 const media::VideoDecoderConfig& p, std::string* l) { | 131 const media::VideoDecoderConfig& p, std::string* l) { |
| 119 l->append(base::StringPrintf("<VideoDecoderConfig>")); | 132 l->append(base::StringPrintf("<VideoDecoderConfig>")); |
| 120 } | 133 } |
| 121 | 134 |
| 122 } // namespace IPC | 135 } // namespace IPC |
| OLD | NEW |