Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_FRAME_METADATA_H_ | 5 #ifndef MEDIA_BASE_VIDEO_FRAME_METADATA_H_ |
| 6 #define MEDIA_BASE_VIDEO_FRAME_METADATA_H_ | 6 #define MEDIA_BASE_VIDEO_FRAME_METADATA_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // maximum sustainable utilization. Greater than 1.0 indicates the consumer | 87 // maximum sustainable utilization. Greater than 1.0 indicates the consumer |
| 88 // is likely to stall or drop frames if the data volume is not reduced. | 88 // is likely to stall or drop frames if the data volume is not reduced. |
| 89 // | 89 // |
| 90 // Example: In a system that encodes and transmits video frames over the | 90 // Example: In a system that encodes and transmits video frames over the |
| 91 // network, this value can be used to indicate whether sufficient CPU | 91 // network, this value can be used to indicate whether sufficient CPU |
| 92 // is available for encoding and/or sufficient bandwidth is available for | 92 // is available for encoding and/or sufficient bandwidth is available for |
| 93 // transmission over the network. The maximum of the two utilization | 93 // transmission over the network. The maximum of the two utilization |
| 94 // measurements would be used as feedback. | 94 // measurements would be used as feedback. |
| 95 RESOURCE_UTILIZATION, | 95 RESOURCE_UTILIZATION, |
| 96 | 96 |
| 97 // This field indicates if the VideoFrame content has uploaded as | |
|
miu
2016/02/22 21:17:37
This is a nice comment, but it belongs in VideoRes
xjz
2016/02/23 03:36:03
Done.
| |
| 98 // PlaneResource. Previously VideoResourceUpdater used VideoFrame pointer, | |
| 99 // timestamp and plane_index as the unique ID for each PlaneResource. When | |
| 100 // the original VideoFrame is destroyed and re-created a new VideoFrame | |
| 101 // with the same pointer, if the client always set the timestamp to zero, | |
| 102 // the old resource will be incorrectly reused. This field is introduced to | |
| 103 // prevent this happening. | |
| 104 RESOURCE_UPDATER_FLAG, | |
|
miu
2016/02/22 21:17:37
Please move this up (to before RESOURCE_UTILIZATIO
xjz
2016/02/23 03:36:03
Done.
| |
| 105 | |
| 97 NUM_KEYS | 106 NUM_KEYS |
| 98 }; | 107 }; |
| 99 | 108 |
| 100 VideoFrameMetadata(); | 109 VideoFrameMetadata(); |
| 101 ~VideoFrameMetadata(); | 110 ~VideoFrameMetadata(); |
| 102 | 111 |
| 103 bool HasKey(Key key) const; | 112 bool HasKey(Key key) const; |
| 104 | 113 |
| 105 void Clear() { dictionary_.Clear(); } | 114 void Clear() { dictionary_.Clear(); } |
| 106 | 115 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 135 const base::BinaryValue* GetBinaryValue(Key key) const; | 144 const base::BinaryValue* GetBinaryValue(Key key) const; |
| 136 | 145 |
| 137 base::DictionaryValue dictionary_; | 146 base::DictionaryValue dictionary_; |
| 138 | 147 |
| 139 DISALLOW_COPY_AND_ASSIGN(VideoFrameMetadata); | 148 DISALLOW_COPY_AND_ASSIGN(VideoFrameMetadata); |
| 140 }; | 149 }; |
| 141 | 150 |
| 142 } // namespace media | 151 } // namespace media |
| 143 | 152 |
| 144 #endif // MEDIA_BASE_VIDEO_FRAME_METADATA_H_ | 153 #endif // MEDIA_BASE_VIDEO_FRAME_METADATA_H_ |
| OLD | NEW |