Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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. | |
| 4 | |
| 5 #ifndef CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_ | |
| 6 #define CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include <vector> | |
| 10 | |
| 11 #include "base/basictypes.h" | |
| 12 | |
| 13 namespace chromecast { | |
| 14 namespace media { | |
| 15 | |
| 16 enum Codec { | |
| 17 kUnknownCodec = -1, | |
| 18 | |
| 19 kAudioCodecMin = 0, | |
| 20 kCodecAAC = kAudioCodecMin, | |
| 21 kCodecMP3, | |
| 22 kCodecPCM, | |
| 23 kCodecPCM_S16BE, | |
| 24 kCodecVorbis, | |
| 25 kCodecOpus, | |
| 26 kCodecEAC3, | |
| 27 kCodecAC3, | |
| 28 kCodecDTS, | |
| 29 kAudioCodecMax = kCodecDTS, | |
| 30 | |
| 31 kVideoCodecMin = 0x100, | |
| 32 kCodecH264 = kVideoCodecMin, | |
| 33 kCodecVC1, | |
| 34 kCodecMPEG2, | |
| 35 kCodecMPEG4, | |
| 36 kCodecTheora, | |
| 37 kCodecVP8, | |
| 38 kCodecVP9, | |
| 39 kCodecHEVC, | |
| 40 kVideoCodecMax = kCodecHEVC, | |
| 41 }; | |
| 42 | |
| 43 // Profile for Video codec. | |
| 44 enum Profile { | |
| 45 kCodecProfileUnknown = -1, | |
| 46 | |
| 47 kCodecProfileMin = 0, | |
| 48 kH264Baseline = kCodecProfileMin, | |
| 49 kH264Main = 1, | |
| 50 kH264Extended = 2, | |
| 51 kH264High = 3, | |
| 52 kH264High10 = 4, | |
| 53 kH264High422 = 5, | |
| 54 kH264High444Predictive = 6, | |
| 55 kH264ScalabBaseline = 7, | |
| 56 kH264ScalableHigh = 8, | |
| 57 kH264Stereohigh = 9, | |
| 58 kH264MultiviewHigh = 10, | |
| 59 kVP8ProfileAny = 11, | |
| 60 kVP9ProfileAny = 12, | |
| 61 kCodecProfileMax = kVP9ProfileAny, | |
| 62 }; | |
| 63 | |
| 64 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
| |
| 65 DecoderConfig(); | |
| 66 ~DecoderConfig(); | |
| 67 | |
| 68 Codec codec; | |
| 69 | |
| 70 // Video related config. | |
| 71 Profile profile; | |
| 72 | |
| 73 // Audio related config. | |
| 74 int bytes_per_channel; | |
| 75 int channel_number; | |
| 76 int samples_per_second; | |
| 77 | |
| 78 // Optional extra buffer for decoder initialization. | |
| 79 std::vector<uint8> extra_data; | |
| 80 | |
| 81 bool is_encrypted; | |
| 82 bool is_valid_config; | |
| 83 }; | |
| 84 | |
| 85 } // namespace media | |
| 86 } // namespace chromecast | |
| 87 | |
| 88 #endif // CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_ | |
| OLD | NEW |