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::AUDIO_ENDED: | 49 case MediaLogEvent::ENDED: |
50 return "AUDIO_ENDED"; | 50 return "ENDED"; |
51 case MediaLogEvent::VIDEO_ENDED: | |
52 return "VIDEO_ENDED"; | |
53 case MediaLogEvent::TEXT_ENDED: | 51 case MediaLogEvent::TEXT_ENDED: |
54 return "TEXT_ENDED"; | 52 return "TEXT_ENDED"; |
55 case MediaLogEvent::BUFFERED_EXTENTS_CHANGED: | 53 case MediaLogEvent::BUFFERED_EXTENTS_CHANGED: |
56 return "BUFFERED_EXTENTS_CHANGED"; | 54 return "BUFFERED_EXTENTS_CHANGED"; |
57 case MediaLogEvent::MEDIA_SOURCE_ERROR: | 55 case MediaLogEvent::MEDIA_SOURCE_ERROR: |
58 return "MEDIA_SOURCE_ERROR"; | 56 return "MEDIA_SOURCE_ERROR"; |
59 case MediaLogEvent::PROPERTY_CHANGE: | 57 case MediaLogEvent::PROPERTY_CHANGE: |
60 return "PROPERTY_CHANGE"; | 58 return "PROPERTY_CHANGE"; |
61 } | 59 } |
62 NOTREACHED(); | 60 NOTREACHED(); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 const char* key, base::TimeDelta value) { | 231 const char* key, base::TimeDelta value) { |
234 scoped_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::PROPERTY_CHANGE)); | 232 scoped_ptr<MediaLogEvent> event(CreateEvent(MediaLogEvent::PROPERTY_CHANGE)); |
235 if (value.is_max()) | 233 if (value.is_max()) |
236 event->params.SetString(key, "unknown"); | 234 event->params.SetString(key, "unknown"); |
237 else | 235 else |
238 event->params.SetDouble(key, value.InSecondsF()); | 236 event->params.SetDouble(key, value.InSecondsF()); |
239 AddEvent(event.Pass()); | 237 AddEvent(event.Pass()); |
240 } | 238 } |
241 | 239 |
242 } //namespace media | 240 } //namespace media |
OLD | NEW |