Chromium Code Reviews| 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 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH, | 59 H264PROFILE_MAX = H264PROFILE_MULTIVIEWHIGH, |
| 60 VP8PROFILE_MIN = 11, | 60 VP8PROFILE_MIN = 11, |
| 61 VP8PROFILE_MAIN = VP8PROFILE_MIN, | 61 VP8PROFILE_MAIN = VP8PROFILE_MIN, |
| 62 VP8PROFILE_MAX = VP8PROFILE_MAIN, | 62 VP8PROFILE_MAX = VP8PROFILE_MAIN, |
| 63 VP9PROFILE_MIN = 12, | 63 VP9PROFILE_MIN = 12, |
| 64 VP9PROFILE_MAIN = VP9PROFILE_MIN, | 64 VP9PROFILE_MAIN = VP9PROFILE_MIN, |
| 65 VP9PROFILE_MAX = VP9PROFILE_MAIN, | 65 VP9PROFILE_MAX = VP9PROFILE_MAIN, |
| 66 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX, | 66 VIDEO_CODEC_PROFILE_MAX = VP9PROFILE_MAX, |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 enum VideoRotation { kRotate0 = 0, kRotate90, kRotate180, kRotate270 }; | |
|
scherkus (not reviewing)
2014/07/07 20:52:38
let's move this into its own file (media/base/vide
| |
| 70 | |
| 69 class MEDIA_EXPORT VideoDecoderConfig { | 71 class MEDIA_EXPORT VideoDecoderConfig { |
| 70 public: | 72 public: |
| 71 // Constructs an uninitialized object. Clients should call Initialize() with | 73 // Constructs an uninitialized object. Clients should call Initialize() with |
| 72 // appropriate values before using. | 74 // appropriate values before using. |
| 73 VideoDecoderConfig(); | 75 VideoDecoderConfig(); |
| 74 | 76 |
| 75 // Constructs an initialized object. It is acceptable to pass in NULL for | 77 // Constructs an initialized object. It is acceptable to pass in NULL for |
| 76 // |extra_data|, otherwise the memory is copied. | 78 // |extra_data|, otherwise the memory is copied. |
| 77 VideoDecoderConfig(VideoCodec codec, | 79 VideoDecoderConfig(VideoCodec codec, |
| 78 VideoCodecProfile profile, | 80 VideoCodecProfile profile, |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 128 // Optional byte data required to initialize video decoders, such as H.264 | 130 // Optional byte data required to initialize video decoders, such as H.264 |
| 129 // AAVC data. | 131 // AAVC data. |
| 130 const uint8* extra_data() const; | 132 const uint8* extra_data() const; |
| 131 size_t extra_data_size() const; | 133 size_t extra_data_size() const; |
| 132 | 134 |
| 133 // Whether the video stream is potentially encrypted. | 135 // Whether the video stream is potentially encrypted. |
| 134 // Note that in a potentially encrypted video stream, individual buffers | 136 // Note that in a potentially encrypted video stream, individual buffers |
| 135 // can be encrypted or not encrypted. | 137 // can be encrypted or not encrypted. |
| 136 bool is_encrypted() const; | 138 bool is_encrypted() const; |
| 137 | 139 |
| 140 // Rotation of frame (0, 90, 180, 270) given in metadata | |
| 141 VideoRotation rotation() const; | |
| 142 void set_rotation(VideoRotation rotation); | |
| 143 | |
| 138 private: | 144 private: |
| 139 VideoCodec codec_; | 145 VideoCodec codec_; |
| 140 VideoCodecProfile profile_; | 146 VideoCodecProfile profile_; |
| 141 | 147 |
| 142 VideoFrame::Format format_; | 148 VideoFrame::Format format_; |
| 143 | 149 |
| 144 gfx::Size coded_size_; | 150 gfx::Size coded_size_; |
| 145 gfx::Rect visible_rect_; | 151 gfx::Rect visible_rect_; |
| 146 gfx::Size natural_size_; | 152 gfx::Size natural_size_; |
| 147 | 153 |
| 148 std::vector<uint8> extra_data_; | 154 std::vector<uint8> extra_data_; |
| 149 | 155 |
| 150 bool is_encrypted_; | 156 bool is_encrypted_; |
| 157 VideoRotation rotation_; | |
| 151 | 158 |
| 152 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler | 159 // Not using DISALLOW_COPY_AND_ASSIGN here intentionally to allow the compiler |
| 153 // generated copy constructor and assignment operator. Since the extra data is | 160 // generated copy constructor and assignment operator. Since the extra data is |
| 154 // typically small, the performance impact is minimal. | 161 // typically small, the performance impact is minimal. |
| 155 }; | 162 }; |
| 156 | 163 |
| 157 } // namespace media | 164 } // namespace media |
| 158 | 165 |
| 159 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ | 166 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ |
| OLD | NEW |