Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: media/base/pipeline_status.h

Issue 2643103002: [Video] Fix keyframe distance average calculations. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/filters/decoder_stream_traits.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "media/base/timestamp_constants.h"
13 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,
(...skipping 29 matching lines...) Expand all
52 53
53 typedef base::Callback<void(PipelineStatus)> PipelineStatusCB; 54 typedef base::Callback<void(PipelineStatus)> PipelineStatusCB;
54 55
55 struct PipelineStatistics { 56 struct PipelineStatistics {
56 uint64_t audio_bytes_decoded = 0; 57 uint64_t audio_bytes_decoded = 0;
57 uint64_t video_bytes_decoded = 0; 58 uint64_t video_bytes_decoded = 0;
58 uint32_t video_frames_decoded = 0; 59 uint32_t video_frames_decoded = 0;
59 uint32_t video_frames_dropped = 0; 60 uint32_t video_frames_dropped = 0;
60 int64_t audio_memory_usage = 0; 61 int64_t audio_memory_usage = 0;
61 int64_t video_memory_usage = 0; 62 int64_t video_memory_usage = 0;
62 base::TimeDelta video_keyframe_distance_average; 63 base::TimeDelta video_keyframe_distance_average = kNoTimestamp;
63 }; 64 };
64 65
65 // Used for updating pipeline statistics; the passed value should be a delta 66 // Used for updating pipeline statistics; the passed value should be a delta
66 // of all attributes since the last update. 67 // of all attributes since the last update.
67 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB; 68 typedef base::Callback<void(const PipelineStatistics&)> StatisticsCB;
68 69
69 } // namespace media 70 } // namespace media
70 71
71 #endif // MEDIA_BASE_PIPELINE_STATUS_H_ 72 #endif // MEDIA_BASE_PIPELINE_STATUS_H_
OLDNEW
« no previous file with comments | « media/base/pipeline_impl.cc ('k') | media/filters/decoder_stream_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698