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_PIPELINE_STATUS_H_ | 5 #ifndef MEDIA_BASE_PIPELINE_STATUS_H_ |
6 #define MEDIA_BASE_PIPELINE_STATUS_H_ | 6 #define MEDIA_BASE_PIPELINE_STATUS_H_ |
7 | 7 |
8 #include "base/callback.h" | |
9 | |
10 #include <stdint.h> | 8 #include <stdint.h> |
11 | 9 |
12 #include <string> | 10 #include <string> |
13 | 11 |
12 #include "base/callback.h" | |
13 #include "ui/gfx/geometry/size.h" | |
14 | |
14 namespace media { | 15 namespace media { |
15 | 16 |
16 // Status states for pipeline. All codes except PIPELINE_OK indicate errors. | 17 // Status states for pipeline. All codes except PIPELINE_OK indicate errors. |
17 // Logged to UMA, so never reuse a value, always add new/greater ones! | 18 // Logged to UMA, so never reuse a value, always add new/greater ones! |
18 enum PipelineStatus { | 19 enum PipelineStatus { |
19 PIPELINE_OK = 0, | 20 PIPELINE_OK = 0, |
20 // Deprecated: PIPELINE_ERROR_URL_NOT_FOUND = 1, | 21 // Deprecated: PIPELINE_ERROR_URL_NOT_FOUND = 1, |
21 PIPELINE_ERROR_NETWORK = 2, | 22 PIPELINE_ERROR_NETWORK = 2, |
22 PIPELINE_ERROR_DECODE = 3, | 23 PIPELINE_ERROR_DECODE = 3, |
23 // Deprecated: PIPELINE_ERROR_DECRYPT = 4, | 24 // Deprecated: PIPELINE_ERROR_DECRYPT = 4, |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
57 uint32_t video_frames_decoded = 0; | 58 uint32_t video_frames_decoded = 0; |
58 uint32_t video_frames_dropped = 0; | 59 uint32_t video_frames_dropped = 0; |
59 int64_t audio_memory_usage = 0; | 60 int64_t audio_memory_usage = 0; |
60 int64_t video_memory_usage = 0; | 61 int64_t video_memory_usage = 0; |
61 }; | 62 }; |
62 | 63 |
63 // Used for updating pipeline statistics; the passed value should be a delta | 64 // Used for updating pipeline statistics; the passed value should be a delta |
64 // of all attributes since the last update. | 65 // of all attributes since the last update. |
65 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB; | 66 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB; |
66 | 67 |
68 // Used for updating video natural size; the passed value is the new natural | |
69 // size of video frames being rendered. | |
70 typedef base::Callback<void(const gfx::Size&)> NaturalSizeChangedCB; | |
xhwang
2016/04/12 19:40:37
nit:
This seems an odd place to declare this call
alokp
2016/04/19 00:16:07
I thought about this for some time and could not c
| |
71 | |
67 } // namespace media | 72 } // namespace media |
68 | 73 |
69 #endif // MEDIA_BASE_PIPELINE_STATUS_H_ | 74 #endif // MEDIA_BASE_PIPELINE_STATUS_H_ |
OLD | NEW |