Commit c57e8073 authored by Ken MacKay's avatar Ken MacKay Committed by Commit Bot

[Chromecast] Add option to hide streams from stream count

Change-Id: I300499d16e732092e206abb746146b25c3f224c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1891135Reviewed-by: default avatarYuchen Liu <yucliu@chromium.org>
Commit-Queue: Kenneth MacKay <kmackay@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710929}
parent 8e49b3c3
...@@ -52,6 +52,9 @@ message OutputStreamParams { ...@@ -52,6 +52,9 @@ message OutputStreamParams {
// If |true|, playback will not start until a start timestamp has been // If |true|, playback will not start until a start timestamp has been
// provided via a SetStartTimestamp message. // provided via a SetStartTimestamp message.
optional bool use_start_timestamp = 13; optional bool use_start_timestamp = 13;
// If |true|, this stream will not be included in the mixer's stream counts.
optional bool ignore_for_stream_count = 14;
} }
// Indicates that we want to start playing the sample with PTS |start_pts| // Indicates that we want to start playing the sample with PTS |start_pts|
......
...@@ -149,6 +149,7 @@ MixerInputConnection::MixerInputConnection( ...@@ -149,6 +149,7 @@ MixerInputConnection::MixerInputConnection(
const mixer_service::OutputStreamParams& params) const mixer_service::OutputStreamParams& params)
: mixer_(mixer), : mixer_(mixer),
socket_(std::move(socket)), socket_(std::move(socket)),
ignore_for_stream_count_(params.ignore_for_stream_count()),
fill_size_(GetFillSize(params)), fill_size_(GetFillSize(params)),
num_channels_(params.num_channels()), num_channels_(params.num_channels()),
input_samples_per_second_(params.sample_rate()), input_samples_per_second_(params.sample_rate()),
...@@ -466,7 +467,7 @@ int MixerInputConnection::playout_channel() { ...@@ -466,7 +467,7 @@ int MixerInputConnection::playout_channel() {
bool MixerInputConnection::active() { bool MixerInputConnection::active() {
base::AutoLock lock(lock_); base::AutoLock lock(lock_);
return !paused_; return !ignore_for_stream_count_ && !paused_;
} }
void MixerInputConnection::WritePcm(scoped_refptr<net::IOBuffer> data) { void MixerInputConnection::WritePcm(scoped_refptr<net::IOBuffer> data) {
......
...@@ -133,6 +133,7 @@ class MixerInputConnection : public mixer_service::MixerSocket::Delegate, ...@@ -133,6 +133,7 @@ class MixerInputConnection : public mixer_service::MixerSocket::Delegate,
StreamMixer* const mixer_; StreamMixer* const mixer_;
std::unique_ptr<mixer_service::MixerSocket> socket_; std::unique_ptr<mixer_service::MixerSocket> socket_;
const bool ignore_for_stream_count_;
const int fill_size_; const int fill_size_;
const int num_channels_; const int num_channels_;
const int input_samples_per_second_; const int input_samples_per_second_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment