Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: chromecast/media/cma/base/decoder_config_adapter.h

Issue 1074383002: Introduce VideoConfig/AudioConfig class for CMA backend (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: single DecoderConfig structure for both Audio and Video Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromecast/media/cma/base/decoder_config_adapter.h
diff --git a/chromecast/media/cma/base/decoder_config_adapter.h b/chromecast/media/cma/base/decoder_config_adapter.h
new file mode 100644
index 0000000000000000000000000000000000000000..c57256332dd87549164b620e599773ee0b5add39
--- /dev/null
+++ b/chromecast/media/cma/base/decoder_config_adapter.h
@@ -0,0 +1,43 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_
+#define CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_
+
+#include "chromecast/public/media/decoder_config.h"
+#include "media/base/audio_decoder_config.h"
+#include "media/base/video_decoder_config.h"
+
+namespace chromecast {
+namespace media {
+
+class DecoderConfig;
+
+class DecoderConfigAdapter {
+ public:
+ // Converts ::media::AudioDecoderConfig to chromecast::media::DecoderConfig.
+ static DecoderConfig ToDecoderConfig(
+ const ::media::AudioDecoderConfig& config);
+
+ // Converts ::media::VideoDecoderConfig to chromecast::media::DecoderConfig
+ static DecoderConfig ToDecoderConfig(
+ const ::media::VideoDecoderConfig& config);
+
+ private:
+ // Converts ::media::AudioCodec to chromecast::media::Codec. Any unknown or
+ // unsupported codec will be converted to chromecast::media::UnknownCodec.
+ 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.
+
+ // Converts ::media::VideoCodec to chromecast::media::Codec. Any unknown or
+ // unsupported codec will be converted to chromecast::media::UnknownCodec.
+ static Codec ToCodec(const ::media::VideoCodec video_codec);
+
+ // Converts ::media::VideoCodecProfile to chromecast::media::Profile.
+ static Profile ToProfile(const ::media::VideoCodecProfile codec_profile);
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_BASE_DECODER_CONFIG_ADAPTER_H_

Powered by Google App Engine
This is Rietveld 408576698