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

Unified Diff: media/audio/pulse/pulse_util.h

Issue 2258143002: Add GetAssociatedOutputDeviceID support to pulse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Tommis comments. Created 4 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
« no previous file with comments | « media/audio/pulse/pulse.sigs ('k') | media/audio/pulse/pulse_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/pulse_util.h
diff --git a/media/audio/pulse/pulse_util.h b/media/audio/pulse/pulse_util.h
index b8e5cdcda4c606eaef98770e1507bbff99522855..522f7f6c47d63fef3962b6fefad708bc7c83a012 100644
--- a/media/audio/pulse/pulse_util.h
+++ b/media/audio/pulse/pulse_util.h
@@ -17,6 +17,8 @@ class AudioParameters;
namespace pulse {
+enum class RequestType : int8_t { INPUT, OUTPUT };
+
// A helper class that acquires pa_threaded_mainloop_lock() while in scope.
class AutoPulseLock {
public:
@@ -75,6 +77,16 @@ bool CreateOutputStream(pa_threaded_mainloop** mainloop,
pa_stream_request_cb_t write_callback,
void* user_data);
+// Utility functions to match up outputs and inputs.
+std::string GetBusOfInput(pa_threaded_mainloop* mainloop,
+ pa_context* context,
+ const std::string& name);
+std::string GetOutputCorrespondingTo(pa_threaded_mainloop* mainloop,
+ pa_context* context,
+ const std::string& bus);
+std::string GetRealDefaultDeviceId(pa_threaded_mainloop* mainloop,
+ pa_context* context,
+ RequestType type);
} // namespace pulse
} // namespace media
« no previous file with comments | « media/audio/pulse/pulse.sigs ('k') | media/audio/pulse/pulse_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698