| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef MEDIA_BASE_MEDIA_LOG_EVENT_H_ | 5 #ifndef MEDIA_BASE_MEDIA_LOG_EVENT_H_ |
| 6 #define MEDIA_BASE_MEDIA_LOG_EVENT_H_ | 6 #define MEDIA_BASE_MEDIA_LOG_EVENT_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/time.h" | 9 #include "base/time.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 struct MediaLogEvent { | 14 struct MediaLogEvent { |
| 15 enum Type { | 15 enum Type { |
| 16 // A media player is being created or destroyed. | 16 // A WebMediaPlayer is being created or destroyed. |
| 17 // params: none. | 17 // params: none. |
| 18 CREATING, | 18 WEBMEDIAPLAYER_CREATED, |
| 19 DESTROYING, | 19 WEBMEDIAPLAYER_DESTROYED, |
| 20 |
| 21 // A PipelineImpl is being created or destroyed. |
| 22 // params: none. |
| 23 PIPELINE_CREATED, |
| 24 PIPELINE_DESTROYED, |
| 20 | 25 |
| 21 // A media player is loading a resource. | 26 // A media player is loading a resource. |
| 22 // params: "url": <URL of the resource>. | 27 // params: "url": <URL of the resource>. |
| 23 LOAD, | 28 LOAD, |
| 24 | 29 |
| 30 // A media player has started seeking. |
| 31 // params: "seek_target": <number of seconds to which to seek>. |
| 32 SEEK, |
| 33 |
| 25 // A media player has been told to play or pause. | 34 // A media player has been told to play or pause. |
| 26 // params: none. | 35 // params: none. |
| 27 PLAY, | 36 PLAY, |
| 28 PAUSE, | 37 PAUSE, |
| 29 | 38 |
| 39 // The state of PipelineImpl has changed. |
| 40 // params: "pipeline_state": <string name of the state>. |
| 41 PIPELINE_STATE_CHANGED, |
| 42 |
| 30 // The extents of the sliding buffer have changed. | 43 // The extents of the sliding buffer have changed. |
| 31 // params: "buffer_start": <first buffered byte>. | 44 // params: "buffer_start": <first buffered byte>. |
| 32 // "buffer_current": <current offset>. | 45 // "buffer_current": <current offset>. |
| 33 // "buffer_end": <last buffered byte>. | 46 // "buffer_end": <last buffered byte>. |
| 34 BUFFERED_EXTENTS_CHANGED, | 47 BUFFERED_EXTENTS_CHANGED, |
| 35 }; | 48 }; |
| 36 | 49 |
| 37 int32 id; | 50 int32 id; |
| 38 Type type; | 51 Type type; |
| 39 base::DictionaryValue params; | 52 base::DictionaryValue params; |
| 40 base::Time time; | 53 base::Time time; |
| 41 }; | 54 }; |
| 42 | 55 |
| 43 } // namespace media | 56 } // namespace media |
| 44 | 57 |
| 45 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_ | 58 #endif // MEDIA_BASE_MEDIA_LOG_EVENT_H_ |
| OLD | NEW |