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