OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2015 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 CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_ | |
6 #define CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_ | |
7 | |
8 #include "chromecast/public/media/decoder_config.h" | |
9 #include "media/base/audio_decoder_config.h" | |
10 #include "media/base/video_decoder_config.h" | |
11 | |
12 namespace chromecast { | |
13 namespace media { | |
14 | |
15 class DecoderConfig; | |
16 | |
17 class DecoderConfigAdapter { | |
18 public: | |
19 // Converts ::media::AudioDecoderConfig to chromecast::media::DecoderConfig. | |
20 static DecoderConfig ToDecoderConfig( | |
21 const ::media::AudioDecoderConfig& config); | |
22 | |
23 // Converts ::media::VideoDecoderConfig to chromecast::media::DecoderConfig | |
24 static DecoderConfig ToDecoderConfig( | |
25 const ::media::VideoDecoderConfig& config); | |
26 | |
27 private: | |
28 // Converts ::media::AudioCodec to chromecast::media::Codec. Any unknown or | |
29 // unsupported codec will be converted to chromecast::media::UnknownCodec. | |
30 static Codec ToCodec(const ::media::AudioCodec audio_codec); | |
gunsch
2015/04/17 01:38:51
since these are all static methods, why not just h
erickung1
2015/04/29 08:52:20
Done.
| |
31 | |
32 // Converts ::media::VideoCodec to chromecast::media::Codec. Any unknown or | |
33 // unsupported codec will be converted to chromecast::media::UnknownCodec. | |
34 static Codec ToCodec(const ::media::VideoCodec video_codec); | |
35 | |
36 // Converts ::media::VideoCodecProfile to chromecast::media::Profile. | |
37 static Profile ToProfile(const ::media::VideoCodecProfile codec_profile); | |
38 }; | |
39 | |
40 } // namespace media | |
41 } // namespace chromecast | |
42 | |
43 #endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_ | |
OLD | NEW |