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 #include "media/base/media_log.h" | 5 #include "media/base/media_log.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 case MediaLogEvent::PIPELINE_ERROR: | 39 case MediaLogEvent::PIPELINE_ERROR: |
40 return "PIPELINE_ERROR"; | 40 return "PIPELINE_ERROR"; |
41 case MediaLogEvent::VIDEO_SIZE_SET: | 41 case MediaLogEvent::VIDEO_SIZE_SET: |
42 return "VIDEO_SIZE_SET"; | 42 return "VIDEO_SIZE_SET"; |
43 case MediaLogEvent::DURATION_SET: | 43 case MediaLogEvent::DURATION_SET: |
44 return "DURATION_SET"; | 44 return "DURATION_SET"; |
45 case MediaLogEvent::TOTAL_BYTES_SET: | 45 case MediaLogEvent::TOTAL_BYTES_SET: |
46 return "TOTAL_BYTES_SET"; | 46 return "TOTAL_BYTES_SET"; |
47 case MediaLogEvent::NETWORK_ACTIVITY_SET: | 47 case MediaLogEvent::NETWORK_ACTIVITY_SET: |
48 return "NETWORK_ACTIVITY_SET"; | 48 return "NETWORK_ACTIVITY_SET"; |
49 case MediaLogEvent::ENDED: | 49 case MediaLogEvent::AUDIO_ENDED: |
50 return "ENDED"; | 50 return "AUDIO_ENDED"; |
| 51 case MediaLogEvent::VIDEO_ENDED: |
| 52 return "VIDEO_ENDED"; |
51 case MediaLogEvent::AUDIO_RENDERER_DISABLED: | 53 case MediaLogEvent::AUDIO_RENDERER_DISABLED: |
52 return "AUDIO_RENDERER_DISABLED"; | 54 return "AUDIO_RENDERER_DISABLED"; |
53 case MediaLogEvent::BUFFERED_EXTENTS_CHANGED: | 55 case MediaLogEvent::BUFFERED_EXTENTS_CHANGED: |
54 return "BUFFERED_EXTENTS_CHANGED"; | 56 return "BUFFERED_EXTENTS_CHANGED"; |
55 } | 57 } |
56 NOTREACHED(); | 58 NOTREACHED(); |
57 return NULL; | 59 return NULL; |
58 } | 60 } |
59 | 61 |
60 const char* MediaLog::PipelineStateToString(Pipeline::State state) { | 62 const char* MediaLog::PipelineStateToString(Pipeline::State state) { |
(...skipping 13 matching lines...) Expand all Loading... |
74 case Pipeline::kPausing: | 76 case Pipeline::kPausing: |
75 return "pausing"; | 77 return "pausing"; |
76 case Pipeline::kSeeking: | 78 case Pipeline::kSeeking: |
77 return "seeking"; | 79 return "seeking"; |
78 case Pipeline::kFlushing: | 80 case Pipeline::kFlushing: |
79 return "flushing"; | 81 return "flushing"; |
80 case Pipeline::kStarting: | 82 case Pipeline::kStarting: |
81 return "starting"; | 83 return "starting"; |
82 case Pipeline::kStarted: | 84 case Pipeline::kStarted: |
83 return "started"; | 85 return "started"; |
84 case Pipeline::kEnded: | |
85 return "ended"; | |
86 case Pipeline::kStopping: | 86 case Pipeline::kStopping: |
87 return "stopping"; | 87 return "stopping"; |
88 case Pipeline::kStopped: | 88 case Pipeline::kStopped: |
89 return "stopped"; | 89 return "stopped"; |
90 case Pipeline::kError: | 90 case Pipeline::kError: |
91 return "error"; | 91 return "error"; |
92 } | 92 } |
93 NOTREACHED(); | 93 NOTREACHED(); |
94 return NULL; | 94 return NULL; |
95 } | 95 } |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 size_t start, size_t current, size_t end) { | 209 size_t start, size_t current, size_t end) { |
210 scoped_ptr<MediaLogEvent> event( | 210 scoped_ptr<MediaLogEvent> event( |
211 CreateEvent(MediaLogEvent::BUFFERED_EXTENTS_CHANGED)); | 211 CreateEvent(MediaLogEvent::BUFFERED_EXTENTS_CHANGED)); |
212 event->params.SetInteger("buffer_start", start); | 212 event->params.SetInteger("buffer_start", start); |
213 event->params.SetInteger("buffer_current", current); | 213 event->params.SetInteger("buffer_current", current); |
214 event->params.SetInteger("buffer_end", end); | 214 event->params.SetInteger("buffer_end", end); |
215 return event.Pass(); | 215 return event.Pass(); |
216 } | 216 } |
217 | 217 |
218 } //namespace media | 218 } //namespace media |
OLD | NEW |