Skip to content

Commit

Permalink
[Chromecast] Fix cast output stream never pass down device id
Browse files Browse the repository at this point in the history
Bug: internal: 135482025
Test: Cherry pick to cast repo and test on device.
Change-Id: I24e1beb6ae7a03aed7db0f4f661036ccb66dae9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1775376
Reviewed-by: Kenneth MacKay <kmackay@chromium.org>
Reviewed-by: Olga Sharonova <olka@chromium.org>
Commit-Queue: Kehuang Li <kehuangli@chromium.org>
Cr-Commit-Position: refs/heads/master@{#693310}
  • Loading branch information
Kehuang Li authored and Commit Bot committed Sep 4, 2019
1 parent 644587f commit aa860b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion services/audio/stream_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "base/trace_event/trace_event.h"
#include "base/unguessable_token.h"
#include "components/crash/core/common/crash_key.h"
#include "media/audio/audio_device_description.h"
#include "services/audio/input_stream.h"
#include "services/audio/local_muter.h"
#include "services/audio/loopback_stream.h"
Expand Down Expand Up @@ -128,7 +129,11 @@ void StreamFactory::CreateOutputStream(
// See //chromecast/media/cast_audio_manager.h for more information.
const std::string device_id_or_group_id =
#if defined(IS_CHROMECAST)
(group_id.ToString().empty()) ? output_device_id : group_id.ToString();
(::media::AudioDeviceDescription::IsCommunicationsDevice(
output_device_id) ||
group_id.is_empty())
? output_device_id
: group_id.ToString();
#else
output_device_id;
#endif
Expand Down

0 comments on commit aa860b6

Please sign in to comment.