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_PUBLIC_MEDIA_DECODER_CONFIG_H_ | |
| 6 #define CHROMECAST_PUBLIC_MEDIA_DECODER_CONFIG_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 #include <vector> | |
| 10 | |
| 11 namespace chromecast { | |
| 12 namespace media { | |
| 13 | |
| 14 enum AudioCodec { | |
| 15 kAudioCodecUnknown = -1, | |
| 16 | |
| 17 kAudioCodecMin = 0, | |
| 18 kCodecAAC = kAudioCodecMin, | |
| 19 kCodecMP3, | |
| 20 kCodecPCM, | |
| 21 kCodecPCM_S16BE, | |
| 22 kCodecVorbis, | |
| 23 kCodecOpus, | |
| 24 kCodecEAC3, | |
| 25 kCodecAC3, | |
| 26 kCodecDTS, | |
| 27 kAudioCodecMax = kCodecDTS, | |
| 28 }; | |
| 29 | |
| 30 enum VideoCodec { | |
| 31 kVideoCodecUnknown = -1, | |
| 32 | |
| 33 kVideoCodecMin = 0, | |
| 34 kCodecH264 = kVideoCodecMin, | |
| 35 kCodecVC1, | |
| 36 kCodecMPEG2, | |
| 37 kCodecMPEG4, | |
| 38 kCodecTheora, | |
| 39 kCodecVP8, | |
| 40 kCodecVP9, | |
| 41 kCodecHEVC, | |
| 42 kVideoCodecMax = kCodecHEVC, | |
| 43 }; | |
| 44 | |
| 45 // Profile for Video codec. | |
| 46 enum VideoProfile { | |
| 47 kVideoProfileUnknown = -1, | |
| 48 | |
| 49 kVideoProfileMin = 0, | |
| 50 kH264Baseline = kVideoProfileMin, | |
| 51 kH264Main = 1, | |
|
gunsch
2015/05/01 05:32:01
why are these values numbered, while the ones abov
| |
| 52 kH264Extended = 2, | |
| 53 kH264High = 3, | |
| 54 kH264High10 = 4, | |
| 55 kH264High422 = 5, | |
| 56 kH264High444Predictive = 6, | |
| 57 kH264ScalableBaseline = 7, | |
| 58 kH264ScalableHigh = 8, | |
| 59 kH264Stereohigh = 9, | |
| 60 kH264MultiviewHigh = 10, | |
| 61 kVP8ProfileAny = 11, | |
| 62 kVP9ProfileAny = 12, | |
| 63 kVideoProfileMax = kVP9ProfileAny, | |
| 64 }; | |
| 65 | |
| 66 struct DecoderConfig { | |
| 67 DecoderConfig(); | |
| 68 ~DecoderConfig(); | |
| 69 | |
| 70 // Optional extra buffer for decoder initialization. | |
| 71 std::vector<uint8_t> extra_data; | |
| 72 bool is_encrypted; | |
| 73 }; | |
| 74 | |
|
gunsch
2015/05/01 05:32:01
nit: extra blank line
| |
| 75 | |
| 76 struct AudioConfig : public DecoderConfig { | |
| 77 AudioConfig(); | |
| 78 ~AudioConfig(); | |
| 79 bool IsValidConfig() const; | |
| 80 | |
| 81 AudioCodec codec; | |
| 82 int bytes_per_channel; | |
| 83 int channel_number; | |
| 84 int samples_per_second; | |
| 85 }; | |
| 86 | |
| 87 struct VideoConfig : public DecoderConfig { | |
| 88 VideoConfig(); | |
| 89 ~VideoConfig(); | |
| 90 bool IsValidConfig() const; | |
| 91 | |
| 92 VideoCodec codec; | |
| 93 VideoProfile profile; | |
| 94 VideoConfig* additional_config; | |
| 95 }; | |
| 96 | |
| 97 } // namespace media | |
| 98 } // namespace chromecast | |
| 99 | |
| 100 #endif // CHROMECAST_PUBLIC_MEDIA_DECODER_CONFIG_H_ | |
| OLD | NEW |