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.
5 #ifndef CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_
6 #define CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_
8 #include "chromecast/public/media/decoder_config.h"
9 #include "media/base/audio_decoder_config.h"
10 #include "media/base/video_decoder_config.h"
12 namespace chromecast
{
15 class DecoderConfigAdapter
{
17 // Converts ::media::AudioDecoderConfig to chromecast::media::AudioConfig.
18 static AudioConfig
ToCastAudioConfig(
20 const ::media::AudioDecoderConfig
& config
);
22 // Converts chromecast::media::AudioConfig to ::media::AudioDecoderConfig.
23 static ::media::AudioDecoderConfig
ToMediaAudioDecoderConfig(
24 const AudioConfig
& config
);
26 // Converts ::media::VideoDecoderConfig to chromecast::media::VideoConfig.
27 static VideoConfig
ToCastVideoConfig(
29 const ::media::VideoDecoderConfig
& config
);
33 } // namespace chromecast
35 #endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_