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

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

Issue 1317033006: Linux: Do not use a hard coded app name for PulseAudio output. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/pulse/pulse_util.cc
diff --git a/media/audio/pulse/pulse_util.cc b/media/audio/pulse/pulse_util.cc
index ee37c03829b3e1715307d3935b731404520ab45a..72217079948f1dc5d41413123d09f2b67a50661c 100644
--- a/media/audio/pulse/pulse_util.cc
+++ b/media/audio/pulse/pulse_util.cc
@@ -156,7 +156,7 @@ int GetHardwareLatencyInBytes(pa_stream* stream,
DLOG(ERROR) << message; \
return false; \
} \
-} while(0)
+} while (0)
bool CreateInputStream(pa_threaded_mainloop* mainloop,
pa_context* context,
@@ -234,6 +234,7 @@ bool CreateOutputStream(pa_threaded_mainloop** mainloop,
pa_stream** stream,
const AudioParameters& params,
const std::string& device_id,
+ const std::string& app_name,
pa_stream_notify_cb_t stream_callback,
pa_stream_request_cb_t write_callback,
void* user_data) {
@@ -244,7 +245,8 @@ bool CreateOutputStream(pa_threaded_mainloop** mainloop,
RETURN_ON_FAILURE(*mainloop, "Failed to create PulseAudio main loop.");
pa_mainloop_api* pa_mainloop_api = pa_threaded_mainloop_get_api(*mainloop);
- *context = pa_context_new(pa_mainloop_api, "Chromium");
+ *context = pa_context_new(pa_mainloop_api,
+ app_name.empty() ? "Chromium" : app_name.c_str());
RETURN_ON_FAILURE(*context, "Failed to create PulseAudio context.");
// A state callback must be set before calling pa_threaded_mainloop_lock() or
« no previous file with comments | « media/audio/pulse/pulse_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698