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

Unified Diff: media/audio/audio_output_controller.h

Issue 51003005: Add AudioOutputController trace events and UMA backed wedge detection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use scoped_ptr. Created 7 years, 1 month 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
« no previous file with comments | « no previous file | media/audio/audio_output_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_controller.h
diff --git a/media/audio/audio_output_controller.h b/media/audio/audio_output_controller.h
index b6fa5c46b5d08cdb4021d1fc168c276323293583..d16ce9e79b6c60c7cb483f6bb6dc1acd8ccdd5f2 100644
--- a/media/audio/audio_output_controller.h
+++ b/media/audio/audio_output_controller.h
@@ -9,6 +9,7 @@
#include "base/callback.h"
#include "base/cancelable_callback.h"
#include "base/memory/ref_counted.h"
+#include "base/timer/timer.h"
#include "media/audio/audio_io.h"
#include "media/audio/audio_manager.h"
#include "media/audio/audio_power_monitor.h"
@@ -222,6 +223,9 @@ class MEDIA_EXPORT AudioOutputController
void AllowEntryToOnMoreIOData();
void DisallowEntryToOnMoreIOData();
+ // Checks if a stream was started successfully but never calls OnMoreIOData().
+ void WedgeCheck();
+
AudioManager* const audio_manager_;
const AudioParameters params_;
EventHandler* const handler_;
@@ -267,9 +271,9 @@ class MEDIA_EXPORT AudioOutputController
base::CancelableClosure power_poll_callback_;
#endif
- // When starting stream we wait for data to become available.
- // Number of times left.
- int number_polling_attempts_left_;
+ // Flags when we've asked for a stream to start but it never did.
+ base::AtomicRefCount on_more_io_data_called_;
+ scoped_ptr<base::OneShotTimer<AudioOutputController> > wedge_timer_;
DISALLOW_COPY_AND_ASSIGN(AudioOutputController);
};
« no previous file with comments | « no previous file | media/audio/audio_output_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698