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 <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/json/json_writer.h" | 10 #include "base/json/json_writer.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 case DECODER_ERROR_NOT_SUPPORTED: | 133 case DECODER_ERROR_NOT_SUPPORTED: |
134 return "decoder: not supported"; | 134 return "decoder: not supported"; |
135 case CHUNK_DEMUXER_ERROR_APPEND_FAILED: | 135 case CHUNK_DEMUXER_ERROR_APPEND_FAILED: |
136 return "chunk demuxer: append failed"; | 136 return "chunk demuxer: append failed"; |
137 case CHUNK_DEMUXER_ERROR_EOS_STATUS_DECODE_ERROR: | 137 case CHUNK_DEMUXER_ERROR_EOS_STATUS_DECODE_ERROR: |
138 return "chunk demuxer: application requested decode error on eos"; | 138 return "chunk demuxer: application requested decode error on eos"; |
139 case CHUNK_DEMUXER_ERROR_EOS_STATUS_NETWORK_ERROR: | 139 case CHUNK_DEMUXER_ERROR_EOS_STATUS_NETWORK_ERROR: |
140 return "chunk demuxer: application requested network error on eos"; | 140 return "chunk demuxer: application requested network error on eos"; |
141 case AUDIO_RENDERER_ERROR: | 141 case AUDIO_RENDERER_ERROR: |
142 return "audio renderer: output device reported an error"; | 142 return "audio renderer: output device reported an error"; |
143 case AUDIO_RENDERER_ERROR_SPLICE_FAILED: | |
144 return "audio renderer: post-decode audio splicing failed"; | |
145 } | 143 } |
146 NOTREACHED(); | 144 NOTREACHED(); |
147 return NULL; | 145 return NULL; |
148 } | 146 } |
149 | 147 |
150 std::string MediaLog::MediaEventToLogString(const MediaLogEvent& event) { | 148 std::string MediaLog::MediaEventToLogString(const MediaLogEvent& event) { |
151 // Special case for PIPELINE_ERROR, since that's by far the most useful | 149 // Special case for PIPELINE_ERROR, since that's by far the most useful |
152 // event for figuring out media pipeline failures, and just reporting | 150 // event for figuring out media pipeline failures, and just reporting |
153 // pipeline status as numeric code is not very helpful/user-friendly. | 151 // pipeline status as numeric code is not very helpful/user-friendly. |
154 int error_code = 0; | 152 int error_code = 0; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 const scoped_refptr<MediaLog>& media_log) | 302 const scoped_refptr<MediaLog>& media_log) |
305 : level_(level), media_log_(media_log) { | 303 : level_(level), media_log_(media_log) { |
306 DCHECK(media_log_.get()); | 304 DCHECK(media_log_.get()); |
307 } | 305 } |
308 | 306 |
309 LogHelper::~LogHelper() { | 307 LogHelper::~LogHelper() { |
310 media_log_->AddLogEvent(level_, stream_.str()); | 308 media_log_->AddLogEvent(level_, stream_.str()); |
311 } | 309 } |
312 | 310 |
313 } //namespace media | 311 } //namespace media |
OLD | NEW |