| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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_DECODER_CONFIG_H_ | 5 #ifndef MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ |
| 6 #define MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ | 6 #define MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "media/base/media_export.h" | 12 #include "media/base/media_export.h" |
| 13 #include "media/base/video_frame.h" | 13 #include "media/base/video_frame.h" |
| 14 #include "ui/gfx/rect.h" | 14 #include "ui/gfx/rect.h" |
| 15 #include "ui/gfx/size.h" | 15 #include "ui/gfx/size.h" |
| 16 | 16 |
| 17 namespace media { | 17 namespace media { |
| 18 | 18 |
| 19 enum VideoCodec { | 19 enum VideoCodec { |
| 20 // These values are histogrammed over time; do not change their ordinal | 20 // These values are histogrammed over time; do not change their ordinal |
| 21 // values. When deleting a codec replace it with a dummy value; when adding a | 21 // values. When deleting a codec replace it with a dummy value. |
| 22 // codec, do so at the bottom (and update kVideoCodecMax). | |
| 23 kUnknownVideoCodec = 0, | 22 kUnknownVideoCodec = 0, |
| 24 kCodecH264, | 23 kCodecH264, |
| 25 kCodecVC1, | 24 kCodecVC1, |
| 26 kCodecMPEG2, | 25 kCodecMPEG2, |
| 27 kCodecMPEG4, | 26 kCodecMPEG4, |
| 28 kCodecTheora, | 27 kCodecTheora, |
| 29 kCodecVP8, | 28 kCodecVP8, |
| 30 kCodecVP9, | 29 kCodecVP9, |
| 31 // DO NOT ADD RANDOM VIDEO CODECS! | 30 // DO NOT ADD RANDOM VIDEO CODECS! |
| 32 // | 31 // |
| 33 // The only acceptable time to add a new codec is if there is production code | 32 // The only acceptable time to add a new codec is if there is production code |
| 34 // that uses said codec in the same CL. | 33 // that uses said codec in the same CL. |
| 35 | 34 |
| 36 kVideoCodecMax = kCodecVP9 // Must equal the last "real" codec above. | 35 // Must always be the last value: |
| 36 kVideoCodecHistogramMax, |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 // Video stream profile. This *must* match PP_VideoDecoder_Profile. | 39 // Video stream profile. This *must* match PP_VideoDecoder_Profile. |
| 40 // (enforced in webkit/plugins/ppapi/ppb_video_decoder_impl.cc) | 40 // (enforced in webkit/plugins/ppapi/ppb_video_decoder_impl.cc) |
| 41 enum VideoCodecProfile { | 41 enum VideoCodecProfile { |
| 42 // Keep the values in this enum unique, as they imply format (h.264 vs. VP8, | 42 // Keep the values in this enum unique, as they imply format (h.264 vs. VP8, |
| 43 // for example), and keep the values for a particular format grouped | 43 // for example), and keep the values for a particular format grouped |
| 44 // together for clarity. | 44 // together for clarity. |
| 45 VIDEO_CODEC_PROFILE_UNKNOWN = -1, | 45 VIDEO_CODEC_PROFILE_UNKNOWN = -1, |
| 46 H264PROFILE_MIN = 0, | 46 H264PROFILE_MIN = 0, |
| 47 H264PROFILE_BASELINE = H264PROFILE_MIN, | 47 H264PROFILE_BASELINE = H264PROFILE_MIN, |
| 48 H264PROFILE_MAIN = 1, | 48 H264PROFILE_MAIN = 1, |
| 49 H264PROFILE_EXTENDED = 2, | 49 H264PROFILE_EXTENDED = 2, |
| 50 H264PROFILE_HIGH = 3, | 50 H264PROFILE_HIGH = 3, |
| 51 H264PROFILE_HIGH10PROFILE = 4, | 51 H264PROFILE_HIGH10PROFILE = 4, |
| 52 H264PROFILE_HIGH422PROFILE = 5, | 52 H264PROFILE_HIGH422PROFILE = 5, |
| 53 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6, | 53 H264PROFILE_HIGH444PREDICTIVEPROFILE = 6, |
| 54 H264PROFILE_SCALABLEBASELINE = 7, | 54 H264PROFILE_SCALABLEBASELINE = 7, |
| 55 H264PROFILE_SCALABLEHIGH = 8, | 55 H264PROFILE_SCALABLEHIGH = 8, |
| 56 H264PROFILE_STEREOHIGH = 9, | 56 H264PROFILE_STEREOHIGH = 9, |
| 57 H264PROFILE_MULTIVIEWHIGH = 10, | 57 H264PROFILE_MULTIVIEWHIGH = 10, |
| 58 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH, | 58 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH, |
| 59 VP8PROFILE_MIN = 11, | 59 VP8PROFILE_MIN = 11, |
| 60 VP8PROFILE_MAIN = VP8PROFILE_MIN, | 60 VP8PROFILE_MAIN = VP8PROFILE_MIN, |
| 61 VP8PROFILE_MAX = VP8PROFILE_MAIN, | 61 VP8PROFILE_MAX = VP8PROFILE_MAIN, |
| 62 VP9PROFILE_MIN = 12, | 62 VP9PROFILE_MIN = 12, |
| 63 VP9PROFILE_MAIN = VP9PROFILE_MIN, | 63 VP9PROFILE_MAIN = VP9PROFILE_MIN, |
| 64 VP9PROFILE_MAX = VP9PROFILE_MAIN, | 64 VP9PROFILE_MAX = VP9PROFILE_MAIN, |
| 65 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX, | 65 VIDEO_CODEC_PROFILE_HISTOGRAM_MAX, // Must always be the last value. |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 class MEDIA_EXPORT VideoDecoderConfig { | 68 class MEDIA_EXPORT VideoDecoderConfig { |
| 69 public: | 69 public: |
| 70 // Constructs an uninitialized object. Clients should call Initialize() with | 70 // Constructs an uninitialized object. Clients should call Initialize() with |
| 71 // appropriate values before using. | 71 // appropriate values before using. |
| 72 VideoDecoderConfig(); | 72 VideoDecoderConfig(); |
| 73 | 73 |
| 74 // Constructs an initialized object. It is acceptable to pass in NULL for | 74 // Constructs an initialized object. It is acceptable to pass in NULL for |
| 75 // |extra_data|, otherwise the memory is copied. | 75 // |extra_data|, otherwise the memory is copied. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 bool is_encrypted_; | 149 bool is_encrypted_; |
| 150 | 150 |
| 151 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler | 151 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler |
| 152 // generated copy constructor and assignment operator. Since the extra data is | 152 // generated copy constructor and assignment operator. Since the extra data is |
| 153 // typically small, the performance impact is minimal. | 153 // typically small, the performance impact is minimal. |
| 154 }; | 154 }; |
| 155 | 155 |
| 156 } // namespace media | 156 } // namespace media |
| 157 | 157 |
| 158 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ | 158 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ |
| OLD | NEW |