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

Side by Side 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: Split the strcutre into {Audio|Video}Config Created 5 years, 7 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 unified diff | Download patch
OLDNEW
(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_
gunsch 2015/04/29 17:42:52 not correct
erickung1 2015/04/29 20:49:15 Done.
6 #define CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_
7
8 #include <string>
gunsch 2015/04/29 17:42:52 not used
erickung1 2015/04/29 20:49:15 Done.
9 #include <vector>
10
11 #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.
12
13 namespace chromecast {
14 namespace media {
15
16 enum AudioCodec {
17 kAudioCodecUnknown = -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
32 enum VideoCodec {
33 kVideoCodecUnknown = -1,
34
35 kVideoCodecMin = 0,
36 kCodecH264 = kVideoCodecMin,
37 kCodecVC1,
38 kCodecMPEG2,
39 kCodecMPEG4,
40 kCodecTheora,
41 kCodecVP8,
42 kCodecVP9,
43 kCodecHEVC,
44 kVideoCodecMax = kCodecHEVC,
45 };
46
47 // Profile for Video codec.
48 enum VideoProfile {
49 kVideoProfileUnknown = -1,
50
51 kVideoProfileMin = 0,
52 kH264Baseline = kVideoProfileMin,
53 kH264Main = 1,
54 kH264Extended = 2,
55 kH264High = 3,
56 kH264High10 = 4,
57 kH264High422 = 5,
58 kH264High444Predictive = 6,
59 kH264ScalabBaseline = 7,
60 kH264ScalableHigh = 8,
61 kH264Stereohigh = 9,
62 kH264MultiviewHigh = 10,
63 kVP8ProfileAny = 11,
64 kVP9ProfileAny = 12,
65 kVideoProfileMax = kVP9ProfileAny,
66 };
67
68 struct DecoderConfig {
69 DecoderConfig();
70 ~DecoderConfig();
71
72 // Optional extra buffer for decoder initialization.
73 std::vector<uint8> extra_data;
74 bool is_encrypted;
75 };
76
77
78 struct AudioConfig : public DecoderConfig {
79 AudioConfig();
80 ~AudioConfig();
81 bool IsValidConfig() const;
gunsch 2015/04/29 17:42:52 curious to hear lcwu's thoughts comments here: so
82
83 AudioCodec codec;
84 int bytes_per_channel;
85 int channel_number;
86 int samples_per_second;
87 };
88
89 struct VideoConfig : public DecoderConfig {
90 VideoConfig();
91 ~VideoConfig();
92 bool IsValidConfig() const;
93
94 VideoCodec codec;
95 VideoProfile profile;
96 VideoConfig* additional_config;
97 };
98
99 } // namespace media
100 } // namespace chromecast
101
102 #endif // CHROMECAST_MEDIA_CMA_PUBLIC_DECODER_CONFIG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698