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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 const uint8* extra_data, size_t extra_data_size, | 89 const uint8* extra_data, size_t extra_data_size, |
90 bool record_stats); | 90 bool record_stats); |
91 | 91 |
92 // Deep copies |video_config|. | 92 // Deep copies |video_config|. |
93 void CopyFrom(const VideoDecoderConfig& video_config); | 93 void CopyFrom(const VideoDecoderConfig& video_config); |
94 | 94 |
95 // Returns true if this object has appropriate configuration values, false | 95 // Returns true if this object has appropriate configuration values, false |
96 // otherwise. | 96 // otherwise. |
97 bool IsValidConfig() const; | 97 bool IsValidConfig() const; |
98 | 98 |
| 99 // Returns true if all fields in |config| match this config. |
| 100 // Note: The contents of |extra_data_| are compared not the raw pointers. |
| 101 bool Matches(const VideoDecoderConfig& config) const; |
| 102 |
99 // Returns a human-readable string describing |*this|. For debugging & test | 103 // Returns a human-readable string describing |*this|. For debugging & test |
100 // output only. | 104 // output only. |
101 std::string AsHumanReadableString() const; | 105 std::string AsHumanReadableString() const; |
102 | 106 |
103 VideoCodec codec() const; | 107 VideoCodec codec() const; |
104 VideoCodecProfile profile() const; | 108 VideoCodecProfile profile() const; |
105 | 109 |
106 // Video format used to determine YUV buffer sizes. | 110 // Video format used to determine YUV buffer sizes. |
107 VideoFrame::Format format() const; | 111 VideoFrame::Format format() const; |
108 | 112 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 | 159 |
156 scoped_array<uint8> extra_data_; | 160 scoped_array<uint8> extra_data_; |
157 size_t extra_data_size_; | 161 size_t extra_data_size_; |
158 | 162 |
159 DISALLOW_COPY_AND_ASSIGN(VideoDecoderConfig); | 163 DISALLOW_COPY_AND_ASSIGN(VideoDecoderConfig); |
160 }; | 164 }; |
161 | 165 |
162 } // namespace media | 166 } // namespace media |
163 | 167 |
164 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ | 168 #endif // MEDIA_BASE_VIDEO_DECODER_CONFIG_H_ |
OLD | NEW |