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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 case Pipeline::kFlushing: | 78 case Pipeline::kFlushing: |
79 return "flushing"; | 79 return "flushing"; |
80 case Pipeline::kStarting: | 80 case Pipeline::kStarting: |
81 return "starting"; | 81 return "starting"; |
82 case Pipeline::kStarted: | 82 case Pipeline::kStarted: |
83 return "started"; | 83 return "started"; |
84 case Pipeline::kStopping: | 84 case Pipeline::kStopping: |
85 return "stopping"; | 85 return "stopping"; |
86 case Pipeline::kStopped: | 86 case Pipeline::kStopped: |
87 return "stopped"; | 87 return "stopped"; |
88 case Pipeline::kError: | |
89 return "error"; | |
90 } | 88 } |
91 NOTREACHED(); | 89 NOTREACHED(); |
92 return NULL; | 90 return NULL; |
93 } | 91 } |
94 | 92 |
95 const char* MediaLog::PipelineStatusToString(PipelineStatus status) { | 93 const char* MediaLog::PipelineStatusToString(PipelineStatus status) { |
96 switch (status) { | 94 switch (status) { |
97 case PIPELINE_OK: | 95 case PIPELINE_OK: |
98 return "pipeline: ok"; | 96 return "pipeline: ok"; |
99 case PIPELINE_ERROR_URL_NOT_FOUND: | 97 case PIPELINE_ERROR_URL_NOT_FOUND: |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
207 size_t start, size_t current, size_t end) { | 205 size_t start, size_t current, size_t end) { |
208 scoped_ptr<MediaLogEvent> event( | 206 scoped_ptr<MediaLogEvent> event( |
209 CreateEvent(MediaLogEvent::BUFFERED_EXTENTS_CHANGED)); | 207 CreateEvent(MediaLogEvent::BUFFERED_EXTENTS_CHANGED)); |
210 event->params.SetInteger("buffer_start", start); | 208 event->params.SetInteger("buffer_start", start); |
211 event->params.SetInteger("buffer_current", current); | 209 event->params.SetInteger("buffer_current", current); |
212 event->params.SetInteger("buffer_end", end); | 210 event->params.SetInteger("buffer_end", end); |
213 return event.Pass(); | 211 return event.Pass(); |
214 } | 212 } |
215 | 213 |
216 } //namespace media | 214 } //namespace media |
OLD | NEW |