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 <stdint.h> | 8 #include <stdint.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 PIPELINE_ERROR_COULD_NOT_RENDER = 8, | 27 PIPELINE_ERROR_COULD_NOT_RENDER = 8, |
28 PIPELINE_ERROR_READ = 9, | 28 PIPELINE_ERROR_READ = 9, |
29 // Deprecated: PIPELINE_ERROR_OPERATION_PENDING = 10, | 29 // Deprecated: PIPELINE_ERROR_OPERATION_PENDING = 10, |
30 PIPELINE_ERROR_INVALID_STATE = 11, | 30 PIPELINE_ERROR_INVALID_STATE = 11, |
31 PIPELINE_ERROR_EXTERNAL_RENDERER_FAILED = 21, | 31 PIPELINE_ERROR_EXTERNAL_RENDERER_FAILED = 21, |
32 | 32 |
33 // Demuxer related errors. | 33 // Demuxer related errors. |
34 DEMUXER_ERROR_COULD_NOT_OPEN = 12, | 34 DEMUXER_ERROR_COULD_NOT_OPEN = 12, |
35 DEMUXER_ERROR_COULD_NOT_PARSE = 13, | 35 DEMUXER_ERROR_COULD_NOT_PARSE = 13, |
36 DEMUXER_ERROR_NO_SUPPORTED_STREAMS = 14, | 36 DEMUXER_ERROR_NO_SUPPORTED_STREAMS = 14, |
| 37 DEMUXER_ERROR_DETECTED_HLS = 22, |
37 | 38 |
38 // Decoder related errors. | 39 // Decoder related errors. |
39 DECODER_ERROR_NOT_SUPPORTED = 15, | 40 DECODER_ERROR_NOT_SUPPORTED = 15, |
40 | 41 |
41 // ChunkDemuxer related errors. | 42 // ChunkDemuxer related errors. |
42 CHUNK_DEMUXER_ERROR_APPEND_FAILED = 16, | 43 CHUNK_DEMUXER_ERROR_APPEND_FAILED = 16, |
43 CHUNK_DEMUXER_ERROR_EOS_STATUS_DECODE_ERROR = 17, | 44 CHUNK_DEMUXER_ERROR_EOS_STATUS_DECODE_ERROR = 17, |
44 CHUNK_DEMUXER_ERROR_EOS_STATUS_NETWORK_ERROR = 18, | 45 CHUNK_DEMUXER_ERROR_EOS_STATUS_NETWORK_ERROR = 18, |
45 | 46 |
46 // Audio rendering errors. | 47 // Audio rendering errors. |
47 AUDIO_RENDERER_ERROR = 19, | 48 AUDIO_RENDERER_ERROR = 19, |
48 // Deprecated: AUDIO_RENDERER_ERROR_SPLICE_FAILED = 20, | 49 // Deprecated: AUDIO_RENDERER_ERROR_SPLICE_FAILED = 20, |
49 | 50 |
50 // Must be equal to the largest value ever logged. | 51 // Must be equal to the largest value ever logged. |
51 PIPELINE_STATUS_MAX = PIPELINE_ERROR_EXTERNAL_RENDERER_FAILED, | 52 PIPELINE_STATUS_MAX = DEMUXER_ERROR_DETECTED_HLS, |
52 }; | 53 }; |
53 | 54 |
54 typedef base::Callback<void(PipelineStatus)> PipelineStatusCB; | 55 typedef base::Callback<void(PipelineStatus)> PipelineStatusCB; |
55 | 56 |
56 struct PipelineStatistics { | 57 struct PipelineStatistics { |
57 uint64_t audio_bytes_decoded = 0; | 58 uint64_t audio_bytes_decoded = 0; |
58 uint64_t video_bytes_decoded = 0; | 59 uint64_t video_bytes_decoded = 0; |
59 uint32_t video_frames_decoded = 0; | 60 uint32_t video_frames_decoded = 0; |
60 uint32_t video_frames_dropped = 0; | 61 uint32_t video_frames_dropped = 0; |
61 int64_t audio_memory_usage = 0; | 62 int64_t audio_memory_usage = 0; |
62 int64_t video_memory_usage = 0; | 63 int64_t video_memory_usage = 0; |
63 base::TimeDelta video_keyframe_distance_average = kNoTimestamp; | 64 base::TimeDelta video_keyframe_distance_average = kNoTimestamp; |
64 base::TimeDelta video_frame_duration_average = kNoTimestamp; | 65 base::TimeDelta video_frame_duration_average = kNoTimestamp; |
65 }; | 66 }; |
66 | 67 |
67 // Used for updating pipeline statistics; the passed value should be a delta | 68 // Used for updating pipeline statistics; the passed value should be a delta |
68 // of all attributes since the last update. | 69 // of all attributes since the last update. |
69 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB; | 70 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB; |
70 | 71 |
71 } // namespace media | 72 } // namespace media |
72 | 73 |
73 #endif // MEDIA_BASE_PIPELINE_STATUS_H_ | 74 #endif // MEDIA_BASE_PIPELINE_STATUS_H_ |
OLD | NEW |