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

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: Change NULL to nullptr 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
« no previous file with comments | « chromecast/media/media.gyp ('k') | chromecast/public/media/decoder_config.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..e7363543a836aa3c59a91b61371acceb67093c27
--- /dev/null
+++ b/chromecast/public/media/decoder_config.h
@@ -0,0 +1,100 @@
+// 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_PUBLIC_MEDIA_DECODER_CONFIG_H_
+#define CHROMECAST_PUBLIC_MEDIA_DECODER_CONFIG_H_
+
+#include <stdint.h>
+#include <vector>
+
+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,
gunsch 2015/05/01 05:32:01 why are these values numbered, while the ones abov
+ kH264Extended = 2,
+ kH264High = 3,
+ kH264High10 = 4,
+ kH264High422 = 5,
+ kH264High444Predictive = 6,
+ kH264ScalableBaseline = 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_t> extra_data;
+ bool is_encrypted;
+};
+
gunsch 2015/05/01 05:32:01 nit: extra blank line
+
+struct AudioConfig : public DecoderConfig {
+ AudioConfig();
+ ~AudioConfig();
+ bool IsValidConfig() const;
+
+ 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_PUBLIC_MEDIA_DECODER_CONFIG_H_
« no previous file with comments | « chromecast/media/media.gyp ('k') | chromecast/public/media/decoder_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698