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

Unified Diff: chromecast/public/media/decoder_config.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/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..24abd5860245e78db1583b890f7d41945c61c561
--- /dev/null
+++ b/chromecast/public/media/decoder_config.h
@@ -0,0 +1,88 @@
+// 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_
+#define CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_
+
+#include <string>
+#include <vector>
+
+#include "base/basictypes.h"
+
+namespace chromecast {
+namespace media {
+
+enum Codec {
+ kUnknownCodec = -1,
+
+ kAudioCodecMin = 0,
+ kCodecAAC = kAudioCodecMin,
+ kCodecMP3,
+ kCodecPCM,
+ kCodecPCM_S16BE,
+ kCodecVorbis,
+ kCodecOpus,
+ kCodecEAC3,
+ kCodecAC3,
+ kCodecDTS,
+ kAudioCodecMax = kCodecDTS,
+
+ kVideoCodecMin = 0x100,
+ kCodecH264 = kVideoCodecMin,
+ kCodecVC1,
+ kCodecMPEG2,
+ kCodecMPEG4,
+ kCodecTheora,
+ kCodecVP8,
+ kCodecVP9,
+ kCodecHEVC,
+ kVideoCodecMax = kCodecHEVC,
+};
+
+// Profile for Video codec.
+enum Profile {
+ kCodecProfileUnknown = -1,
+
+ kCodecProfileMin = 0,
+ kH264Baseline = kCodecProfileMin,
+ kH264Main = 1,
+ kH264Extended = 2,
+ kH264High = 3,
+ kH264High10 = 4,
+ kH264High422 = 5,
+ kH264High444Predictive = 6,
+ kH264ScalabBaseline = 7,
+ kH264ScalableHigh = 8,
+ kH264Stereohigh = 9,
+ kH264MultiviewHigh = 10,
+ kVP8ProfileAny = 11,
+ kVP9ProfileAny = 12,
+ kCodecProfileMax = kVP9ProfileAny,
+};
+
+struct DecoderConfig {
gunsch 2015/04/17 01:38:51 Out of curiosity, what was the logic for merging t
erickung1 2015/04/29 08:52:20 Done. Slipt to AudioConfig and VideoConfig
+ DecoderConfig();
+ ~DecoderConfig();
+
+ Codec codec;
+
+ // Video related config.
+ Profile profile;
+
+ // Audio related config.
+ int bytes_per_channel;
+ int channel_number;
+ int samples_per_second;
+
+ // Optional extra buffer for decoder initialization.
+ std::vector<uint8> extra_data;
+
+ bool is_encrypted;
+ bool is_valid_config;
+};
+
+} // namespace media
+} // namespace chromecast
+
+#endif // CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_

Powered by Google App Engine
This is Rietveld 408576698