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

Unified Diff: media/audio/mac/audio_device_listener_mac.h

Issue 14273018: Use the browser UI thread for audio on OSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 7 years, 6 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
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/mac/audio_device_listener_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mac/audio_device_listener_mac.h
diff --git a/media/audio/mac/audio_device_listener_mac.h b/media/audio/mac/audio_device_listener_mac.h
index d2d58706972687aa252a14110c9f73c100b92580..bc1a39c62d5b7bd2e71d7d045681a7d8b9519289 100644
--- a/media/audio/mac/audio_device_listener_mac.h
+++ b/media/audio/mac/audio_device_listener_mac.h
@@ -9,21 +9,13 @@
#include "base/basictypes.h"
#include "base/callback.h"
-#include "base/scoped_native_library.h"
#include "base/threading/thread_checker.h"
#include "media/base/media_export.h"
namespace media {
-class ExclusiveDispatchQueueTaskObserver;
-
-// AudioDeviceListenerMac facilitates thread safe execution of device listener
-// callbacks issued via CoreAudio. On 10.6 this means correctly binding the
-// CFRunLoop driving callbacks to the CFRunLoop AudioDeviceListenerMac is
-// constructed on. On 10.7 this means creating a dispatch queue to drive
-// callbacks and modifying the message loop AudioDeviceListenerMac to ensure
-// message loop tasks and dispatch queue tasks are executed in a mutually
-// exclusive manner. See http://crbug.com/158170 for more discussion.
+// AudioDeviceListenerMac facilitates execution of device listener callbacks
+// issued via CoreAudio.
class MEDIA_EXPORT AudioDeviceListenerMac {
public:
// |listener_cb| will be called when a device change occurs; it's a permanent
@@ -39,30 +31,7 @@ class MEDIA_EXPORT AudioDeviceListenerMac {
AudioObjectID object, UInt32 num_addresses,
const AudioObjectPropertyAddress addresses[], void* context);
- // Attempts to dynamically load the property listener block functions. Sets
- // |core_audio_lib_|, |add_listener_block_func_|, and
- // |remove_listener_block_func_|. Returns false on failure. If successful,
- // the unload function must be called to avoid memory leaks.
- bool LoadAudioObjectPropertyListenerBlockFunctions();
-
base::Closure listener_cb_;
- scoped_ptr<ExclusiveDispatchQueueTaskObserver> task_observer_;
- base::ScopedNativeLibrary core_audio_lib_;
-
- // TODO(dalecurtis): Use the standard AudioObjectPropertyListenerBlock when
- // the deployment target is > 10.6.
- typedef void (^CrAudioObjectPropertyListenerBlock)(
- UInt32 inNumberAddresses, const AudioObjectPropertyAddress inAddresses[]);
- CrAudioObjectPropertyListenerBlock listener_block_;
-
- // Variables for storing dynamically loaded block functions.
- typedef OSStatus(*AudioObjectPropertyListenerBlockT)(
- AudioObjectID inObjectID,
- const AudioObjectPropertyAddress* inAddress,
- dispatch_queue_t inDispatchQueue,
- CrAudioObjectPropertyListenerBlock inListener);
- AudioObjectPropertyListenerBlockT add_listener_block_func_;
- AudioObjectPropertyListenerBlockT remove_listener_block_func_;
// AudioDeviceListenerMac must be constructed and destructed on the same
// thread.
« no previous file with comments | « media/audio/audio_manager_base.cc ('k') | media/audio/mac/audio_device_listener_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698