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

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

Issue 10837206: Rewrite media::Pipeline state transition machinery and simplify shutdown. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: nits 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/media_log.cc » ('j') | no next file with comments »
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 #ifndef MEDIA_BASE_MEDIA_LOG_H_ 5 #ifndef MEDIA_BASE_MEDIA_LOG_H_
6 #define MEDIA_BASE_MEDIA_LOG_H_ 6 #define MEDIA_BASE_MEDIA_LOG_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "media/base/media_export.h" 10 #include "media/base/media_export.h"
11 #include "media/base/media_log_event.h" 11 #include "media/base/media_log_event.h"
12 #include "media/base/pipeline.h" 12 #include "media/base/pipeline.h"
13 #include "media/base/pipeline_status.h" 13 #include "media/base/pipeline_status.h"
14 14
15 namespace media { 15 namespace media {
16 16
17 class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> { 17 class MEDIA_EXPORT MediaLog : public base::RefCountedThreadSafe<MediaLog> {
18 public: 18 public:
19 // Convert various enums to strings. 19 // Convert various enums to strings.
20 static const char* EventTypeToString(MediaLogEvent::Type type); 20 static const char* EventTypeToString(MediaLogEvent::Type type);
21 static const char* PipelineStateToString(Pipeline::State);
22 static const char* PipelineStatusToString(PipelineStatus); 21 static const char* PipelineStatusToString(PipelineStatus);
23 22
24 MediaLog(); 23 MediaLog();
25 24
26 // Add an event to this log. Overriden by inheritors to actually do something 25 // Add an event to this log. Overriden by inheritors to actually do something
27 // with it. 26 // with it.
28 virtual void AddEvent(scoped_ptr<MediaLogEvent> event); 27 virtual void AddEvent(scoped_ptr<MediaLogEvent> event);
29 28
30 // Helper methods to create events and their parameters. 29 // Helper methods to create events and their parameters.
31 scoped_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type); 30 scoped_ptr<MediaLogEvent> CreateEvent(MediaLogEvent::Type type);
(...skipping 20 matching lines...) Expand all
52 private: 51 private:
53 // A unique (to this process) id for this MediaLog. 52 // A unique (to this process) id for this MediaLog.
54 int32 id_; 53 int32 id_;
55 54
56 DISALLOW_COPY_AND_ASSIGN(MediaLog); 55 DISALLOW_COPY_AND_ASSIGN(MediaLog);
57 }; 56 };
58 57
59 } // namespace media 58 } // namespace media
60 59
61 #endif // MEDIA_BASE_MEDIA_LOG_H_ 60 #endif // MEDIA_BASE_MEDIA_LOG_H_
OLDNEW
« no previous file with comments | « no previous file | media/base/media_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698