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

Side by Side Diff: media/base/video_codecs.h

Issue 2697643003: media: Clean up MediaCodecBridge and remove subclasses (Closed)
Patch Set: Remove static initializers (thanks to dale's suggestion) Created 3 years, 10 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
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_BASE_VIDEO_CODECS_H_ 5 #ifndef MEDIA_BASE_VIDEO_CODECS_H_
6 #define MEDIA_BASE_VIDEO_CODECS_H_ 6 #define MEDIA_BASE_VIDEO_CODECS_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 #include "media/media_features.h" 11 #include "media/media_features.h"
12 12
13 namespace media { 13 namespace media {
14 14
15 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media
15 enum VideoCodec { 16 enum VideoCodec {
16 // These values are histogrammed over time; do not change their ordinal 17 // These values are histogrammed over time; do not change their ordinal
17 // values. When deleting a codec replace it with a dummy value; when adding a 18 // values. When deleting a codec replace it with a dummy value; when adding a
18 // codec, do so at the bottom (and update kVideoCodecMax). 19 // codec, do so at the bottom (and update kVideoCodecMax).
19 kUnknownVideoCodec = 0, 20 kUnknownVideoCodec = 0,
20 kCodecH264, 21 kCodecH264,
21 kCodecVC1, 22 kCodecVC1,
22 kCodecMPEG2, 23 kCodecMPEG2,
23 kCodecMPEG4, 24 kCodecMPEG4,
24 kCodecTheora, 25 kCodecTheora,
25 kCodecVP8, 26 kCodecVP8,
26 kCodecVP9, 27 kCodecVP9,
27 kCodecHEVC, 28 kCodecHEVC,
28 // DO NOT ADD RANDOM VIDEO CODECS! 29 // DO NOT ADD RANDOM VIDEO CODECS!
29 // 30 //
30 // The only acceptable time to add a new codec is if there is production code 31 // The only acceptable time to add a new codec is if there is production code
31 // that uses said codec in the same CL. 32 // that uses said codec in the same CL.
32 33
33 kVideoCodecMax = kCodecHEVC // Must equal the last "real" codec above. 34 kVideoCodecMax = kCodecHEVC, // Must equal the last "real" codec above.
34 }; 35 };
35 36
36 // Video codec profiles. Keep in sync with mojo::VideoCodecProfile (see 37 // Video codec profiles. Keep in sync with mojo::VideoCodecProfile (see
37 // media/mojo/interfaces/media_types.mojom), gpu::VideoCodecProfile (see 38 // media/mojo/interfaces/media_types.mojom), gpu::VideoCodecProfile (see
38 // gpu/config/gpu_info.h), and 39 // gpu/config/gpu_info.h), and PP_VideoDecoder_Profile (translation is performed
39 // media/base/android/java/src/org/chromium/media/CodecProfileLevelList.java, 40 // in content/renderer/pepper/ppb_video_decoder_impl.cc).
40 // as well as PP_VideoDecoder_Profile (translation is performed in 41 // NOTE: These values are histogrammed over time in UMA so the values must never
41 // content/renderer/pepper/ppb_video_decoder_impl.cc). 42 // ever change (add new values to tools/metrics/histograms/histograms.xml)
42 // NOTE: These values are histogrammed over time in UMA so the values must 43 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.media
43 // never ever change (add new values to tools/metrics/histograms/histograms.xml)
44 enum VideoCodecProfile { 44 enum VideoCodecProfile {
45 // Keep the values in this enum unique, as they imply format (h.264 vs. VP8, 45 // Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
46 // for example), and keep the values for a particular format grouped 46 // for example), and keep the values for a particular format grouped
47 // together for clarity. 47 // together for clarity.
48 VIDEO_CODEC_PROFILE_UNKNOWN = -1, 48 VIDEO_CODEC_PROFILE_UNKNOWN = -1,
49 VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN, 49 VIDEO_CODEC_PROFILE_MIN = VIDEO_CODEC_PROFILE_UNKNOWN,
50 H264PROFILE_MIN = 0, 50 H264PROFILE_MIN = 0,
51 H264PROFILE_BASELINE = H264PROFILE_MIN, 51 H264PROFILE_BASELINE = H264PROFILE_MIN,
52 H264PROFILE_MAIN = 1, 52 H264PROFILE_MAIN = 1,
53 H264PROFILE_EXTENDED = 2, 53 H264PROFILE_EXTENDED = 2,
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER) 115 #if BUILDFLAG(ENABLE_MSE_MPEG2TS_STREAM_PARSER)
116 // Translate legacy avc1 codec ids (like avc1.66.30 or avc1.77.31) into a new 116 // Translate legacy avc1 codec ids (like avc1.66.30 or avc1.77.31) into a new
117 // style standard avc1 codec ids like avc1.4D002F. If the input codec is not 117 // style standard avc1 codec ids like avc1.4D002F. If the input codec is not
118 // recognized as a legacy codec id, then returns the input string unchanged. 118 // recognized as a legacy codec id, then returns the input string unchanged.
119 std::string TranslateLegacyAvc1CodecIds(const std::string& codec_id); 119 std::string TranslateLegacyAvc1CodecIds(const std::string& codec_id);
120 #endif 120 #endif
121 121
122 } // namespace media 122 } // namespace media
123 123
124 #endif // MEDIA_BASE_VIDEO_CODECS_H_ 124 #endif // MEDIA_BASE_VIDEO_CODECS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698