Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: media/base/media_log.cc

Issue 10837206: Rewrite media::Pipeline state transition machinery and simplify shutdown. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: one more time Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/base/pipeline.h » ('j') | media/base/pipeline.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return "VIDEO_ENDED"; 52 return "VIDEO_ENDED";
53 case MediaLogEvent::AUDIO_RENDERER_DISABLED: 53 case MediaLogEvent::AUDIO_RENDERER_DISABLED:
54 return "AUDIO_RENDERER_DISABLED"; 54 return "AUDIO_RENDERER_DISABLED";
55 case MediaLogEvent::BUFFERED_EXTENTS_CHANGED: 55 case MediaLogEvent::BUFFERED_EXTENTS_CHANGED:
56 return "BUFFERED_EXTENTS_CHANGED"; 56 return "BUFFERED_EXTENTS_CHANGED";
57 } 57 }
58 NOTREACHED(); 58 NOTREACHED();
59 return NULL; 59 return NULL;
60 } 60 }
61 61
62 const char* MediaLog::PipelineStateToString(Pipeline::State state) { 62 const char* MediaLog::PipelineStateToString(Pipeline::State state) {
acolwell GONE FROM CHROMIUM 2012/09/05 13:22:22 Remove and call Pipeline::GetStateString() instead
63 switch (state) { 63 switch (state) {
64 case Pipeline::kCreated: 64 case Pipeline::kCreated:
65 return "created"; 65 return "created";
66 case Pipeline::kInitDemuxer: 66 case Pipeline::kInitDemuxer:
67 return "initDemuxer"; 67 return "initDemuxer";
68 case Pipeline::kInitAudioDecoder: 68 case Pipeline::kInitAudioDecoder:
69 return "initAudioDecoder"; 69 return "initAudioDecoder";
70 case Pipeline::kInitAudioRenderer: 70 case Pipeline::kInitAudioRenderer:
71 return "initAudioRenderer"; 71 return "initAudioRenderer";
72 case Pipeline::kInitVideoRenderer: 72 case Pipeline::kInitVideoRenderer:
73 return "initVideoRenderer"; 73 return "initVideoRenderer";
74 case Pipeline::kPausing: 74 case Pipeline::kInitPrerolling:
75 return "pausing"; 75 return "initPrerolling";
76 case Pipeline::kSeeking: 76 case Pipeline::kSeeking:
77 return "seeking"; 77 return "seeking";
78 case Pipeline::kFlushing:
79 return "flushing";
80 case Pipeline::kStarting: 78 case Pipeline::kStarting:
81 return "starting"; 79 return "starting";
82 case Pipeline::kStarted: 80 case Pipeline::kStarted:
83 return "started"; 81 return "started";
84 case Pipeline::kStopping: 82 case Pipeline::kStopping:
85 return "stopping"; 83 return "stopping";
86 case Pipeline::kStopped: 84 case Pipeline::kStopped:
87 return "stopped"; 85 return "stopped";
88 } 86 }
89 NOTREACHED(); 87 NOTREACHED();
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 size_t start, size_t current, size_t end) { 203 size_t start, size_t current, size_t end) {
206 scoped_ptr<MediaLogEvent> event( 204 scoped_ptr<MediaLogEvent> event(
207 CreateEvent(MediaLogEvent::BUFFERED_EXTENTS_CHANGED)); 205 CreateEvent(MediaLogEvent::BUFFERED_EXTENTS_CHANGED));
208 event->params.SetInteger("buffer_start", start); 206 event->params.SetInteger("buffer_start", start);
209 event->params.SetInteger("buffer_current", current); 207 event->params.SetInteger("buffer_current", current);
210 event->params.SetInteger("buffer_end", end); 208 event->params.SetInteger("buffer_end", end);
211 return event.Pass(); 209 return event.Pass();
212 } 210 }
213 211
214 } //namespace media 212 } //namespace media
OLDNEW
« no previous file with comments | « no previous file | media/base/pipeline.h » ('j') | media/base/pipeline.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698