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

Unified Diff: content/browser/renderer_host/media/media_devices_dispatcher_host.h

Issue 2868853002: Add ability to retrieve capabilities for audio input devices to MediaDevicesDispatcherHost. (Closed)
Patch Set: rebase Created 3 years, 7 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 | « no previous file | content/browser/renderer_host/media/media_devices_dispatcher_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/media_devices_dispatcher_host.h
diff --git a/content/browser/renderer_host/media/media_devices_dispatcher_host.h b/content/browser/renderer_host/media/media_devices_dispatcher_host.h
index f37e9906ad4be45e84a954e035cc15672510b9b6..47fc6a7500927b5abf02874a2f0e36f65652d109 100644
--- a/content/browser/renderer_host/media/media_devices_dispatcher_host.h
+++ b/content/browser/renderer_host/media/media_devices_dispatcher_host.h
@@ -51,6 +51,8 @@ class CONTENT_EXPORT MediaDevicesDispatcherHost
EnumerateDevicesCallback client_callback) override;
void GetVideoInputCapabilities(
GetVideoInputCapabilitiesCallback client_callback) override;
+ void GetAudioInputCapabilities(
+ GetAudioInputCapabilitiesCallback client_callback) override;
void SubscribeDeviceChangeNotifications(MediaDeviceType type,
uint32_t subscription_id) override;
void UnsubscribeDeviceChangeNotifications(MediaDeviceType type,
@@ -102,6 +104,20 @@ class CONTENT_EXPORT MediaDevicesDispatcherHost
const std::string& default_device_id,
const media::VideoCaptureDeviceDescriptors& device_descriptors);
+ void GetDefaultAudioInputDeviceID(
+ GetAudioInputCapabilitiesCallback client_callback,
+ const url::Origin& security_origin);
+
+ void GotDefaultAudioInputDeviceID(const std::string& default_device_id);
+
+ void GotAudioInputEnumeration(const std::string& default_device_id,
+ const MediaDeviceEnumeration& enumeration);
+
+ void GotAudioInputParameters(size_t index,
+ const media::AudioParameters& parameters);
+
+ void FinalizeGetAudioInputCapabilities();
+
// Returns the currently supported video formats for the given |device_id|.
media::VideoCaptureFormats GetVideoInputFormats(const std::string& device_id);
@@ -124,6 +140,14 @@ class CONTENT_EXPORT MediaDevicesDispatcherHost
::mojom::MediaDevicesListenerPtr device_change_listener_;
url::Origin security_origin_for_testing_;
+ struct AudioInputCapabilitiesRequest;
+ // Queued requests for audio-input capabilities.
+ std::vector<AudioInputCapabilitiesRequest>
+ pending_audio_input_capabilities_requests_;
+ size_t num_pending_audio_input_parameters_;
+ std::vector<::mojom::AudioInputDeviceCapabilities>
+ current_audio_input_capabilities_;
+
base::WeakPtrFactory<MediaDevicesDispatcherHost> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MediaDevicesDispatcherHost);
« no previous file with comments | « no previous file | content/browser/renderer_host/media/media_devices_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698