Index: chromecast/public/media/decoder_config.h |
diff --git a/chromecast/public/media/decoder_config.h b/chromecast/public/media/decoder_config.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..66767ea444bd915f2ed7dc970aee895afee9b6c5 |
--- /dev/null |
+++ b/chromecast/public/media/decoder_config.h |
@@ -0,0 +1,102 @@ |
+// 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_PUBLIC_DECODER_CONFIG_H_ |
gunsch
2015/04/29 17:42:52
not correct
erickung1
2015/04/29 20:49:15
Done.
|
+#define CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_ |
+ |
+#include <string> |
gunsch
2015/04/29 17:42:52
not used
erickung1
2015/04/29 20:49:15
Done.
|
+#include <vector> |
+ |
+#include "base/basictypes.h" |
gunsch
2015/04/29 17:42:52
a) basictypes.h is deprecated, use uint8_t instead
erickung1
2015/04/29 20:49:15
Done.
|
+ |
+namespace chromecast { |
+namespace media { |
+ |
+enum AudioCodec { |
+ kAudioCodecUnknown = -1, |
+ |
+ kAudioCodecMin = 0, |
+ kCodecAAC = kAudioCodecMin, |
+ kCodecMP3, |
+ kCodecPCM, |
+ kCodecPCM_S16BE, |
+ kCodecVorbis, |
+ kCodecOpus, |
+ kCodecEAC3, |
+ kCodecAC3, |
+ kCodecDTS, |
+ kAudioCodecMax = kCodecDTS, |
+}; |
+ |
+enum VideoCodec { |
+ kVideoCodecUnknown = -1, |
+ |
+ kVideoCodecMin = 0, |
+ kCodecH264 = kVideoCodecMin, |
+ kCodecVC1, |
+ kCodecMPEG2, |
+ kCodecMPEG4, |
+ kCodecTheora, |
+ kCodecVP8, |
+ kCodecVP9, |
+ kCodecHEVC, |
+ kVideoCodecMax = kCodecHEVC, |
+}; |
+ |
+// Profile for Video codec. |
+enum VideoProfile { |
+ kVideoProfileUnknown = -1, |
+ |
+ kVideoProfileMin = 0, |
+ kH264Baseline = kVideoProfileMin, |
+ kH264Main = 1, |
+ kH264Extended = 2, |
+ kH264High = 3, |
+ kH264High10 = 4, |
+ kH264High422 = 5, |
+ kH264High444Predictive = 6, |
+ kH264ScalabBaseline = 7, |
+ kH264ScalableHigh = 8, |
+ kH264Stereohigh = 9, |
+ kH264MultiviewHigh = 10, |
+ kVP8ProfileAny = 11, |
+ kVP9ProfileAny = 12, |
+ kVideoProfileMax = kVP9ProfileAny, |
+}; |
+ |
+struct DecoderConfig { |
+ DecoderConfig(); |
+ ~DecoderConfig(); |
+ |
+ // Optional extra buffer for decoder initialization. |
+ std::vector<uint8> extra_data; |
+ bool is_encrypted; |
+}; |
+ |
+ |
+struct AudioConfig : public DecoderConfig { |
+ AudioConfig(); |
+ ~AudioConfig(); |
+ bool IsValidConfig() const; |
gunsch
2015/04/29 17:42:52
curious to hear lcwu's thoughts comments here: so
|
+ |
+ AudioCodec codec; |
+ int bytes_per_channel; |
+ int channel_number; |
+ int samples_per_second; |
+}; |
+ |
+struct VideoConfig : public DecoderConfig { |
+ VideoConfig(); |
+ ~VideoConfig(); |
+ bool IsValidConfig() const; |
+ |
+ VideoCodec codec; |
+ VideoProfile profile; |
+ VideoConfig* additional_config; |
+}; |
+ |
+} // namespace media |
+} // namespace chromecast |
+ |
+#endif // CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_ |