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" | 8 #include "base/callback.h" |
9 | 9 |
10 namespace media { | 10 namespace media { |
(...skipping 19 matching lines...) Expand all Loading... |
30 DEMUXER_ERROR_NO_SUPPORTED_STREAMS, | 30 DEMUXER_ERROR_NO_SUPPORTED_STREAMS, |
31 DEMUXER_ERROR_COULD_NOT_CREATE_THREAD, | 31 DEMUXER_ERROR_COULD_NOT_CREATE_THREAD, |
32 // Decoder related errors. | 32 // Decoder related errors. |
33 DECODER_ERROR_NOT_SUPPORTED, | 33 DECODER_ERROR_NOT_SUPPORTED, |
34 // DataSourceFactory errors. | 34 // DataSourceFactory errors. |
35 DATASOURCE_ERROR_URL_NOT_SUPPORTED, | 35 DATASOURCE_ERROR_URL_NOT_SUPPORTED, |
36 }; | 36 }; |
37 | 37 |
38 typedef base::Callback<void(PipelineStatus)> PipelineStatusCB; | 38 typedef base::Callback<void(PipelineStatus)> PipelineStatusCB; |
39 | 39 |
| 40 // TODO(scherkus): this should be moved alongside host interface definitions. |
| 41 struct PipelineStatistics { |
| 42 PipelineStatistics() |
| 43 : audio_bytes_decoded(0), |
| 44 video_bytes_decoded(0), |
| 45 video_frames_decoded(0), |
| 46 video_frames_dropped(0) { |
| 47 } |
| 48 |
| 49 uint32 audio_bytes_decoded; // Should be uint64? |
| 50 uint32 video_bytes_decoded; // Should be uint64? |
| 51 uint32 video_frames_decoded; |
| 52 uint32 video_frames_dropped; |
| 53 }; |
| 54 |
| 55 // Used for updating pipeline statistics. |
| 56 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCallback; |
| 57 |
40 } // namespace media | 58 } // namespace media |
41 | 59 |
42 #endif // MEDIA_BASE_PIPELINE_STATUS_H_ | 60 #endif // MEDIA_BASE_PIPELINE_STATUS_H_ |
OLD | NEW |