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

Unified Diff: media/base/pipeline_impl.h

Issue 7584013: Log PipelineImpl events to MediaLog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase atop _and_diff_against_ 759001. Created 9 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: media/base/pipeline_impl.h
diff --git a/media/base/pipeline_impl.h b/media/base/pipeline_impl.h
index caf4e19f081709a4ace1b08c822a850e970136eb..6fce5dcc9c1fb74a4405fe901a364eddfe479787 100644
--- a/media/base/pipeline_impl.h
+++ b/media/base/pipeline_impl.h
@@ -27,6 +27,8 @@
namespace media {
+class MediaLog;
+
// Adapter for using asynchronous Pipeline methods in code that wants to run
// synchronously. To use, construct an instance of this class and pass the
// |Callback()| to the Pipeline method requiring a callback. Then Wait() for
@@ -93,7 +95,7 @@ class PipelineStatusNotification {
// "Stopped" state.
class PipelineImpl : public Pipeline, public FilterHost {
public:
- explicit PipelineImpl(MessageLoop* message_loop);
+ explicit PipelineImpl(MessageLoop* message_loop, MediaLog* media_log);
// Pipeline implementation.
virtual void Init(PipelineStatusCallback* ended_callback,
@@ -128,6 +130,8 @@ class PipelineImpl : public Pipeline, public FilterHost {
void SetClockForTesting(Clock* clock);
private:
+ friend class MediaLog;
+
// Pipeline states, as described above.
enum State {
kCreated,
@@ -154,7 +158,7 @@ class PipelineImpl : public Pipeline, public FilterHost {
void ResetState();
// Updates |state_|. All state transitions should use this call.
- void set_state(State next_state);
+ void SetState(State next_state);
// Simple method used to make sure the pipeline is running normally.
bool IsPipelineOk();
@@ -314,6 +318,9 @@ class PipelineImpl : public Pipeline, public FilterHost {
// Message loop used to execute pipeline tasks.
MessageLoop* message_loop_;
+ // MediaLog to which to log events.
+ scoped_refptr<MediaLog> media_log_;
+
// Lock used to serialize access for the following data members.
mutable base::Lock lock_;

Powered by Google App Engine
This is Rietveld 408576698