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

Issue 2701613006: [Chromecast] Process streams with different post-processing. (Closed)

Created:
3 years, 10 months ago by bshaya
Modified:
3 years, 9 months ago
CC:
chromium-reviews, alokp+watch_chromium.org, lcwu+watch_chromium.org, gfhuang+watch_chromium.org, halliwell+watch_chromium.org, feature-media-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Chromecast] Process streams with different post-processing. Adds |name| to stream_mixer_alsa_input_impl. stream_mixer_alsa can then mix streams of the same time separately, and apply different post-processing to each. Also reduce buffering of system streams from 300ms to 60ms. BUG=internal b/34817384 TEST=manual Change-Id: Ieb91e419d7d34c374d83941c02f2546696b4f489 Review-Url: https://codereview.chromium.org/2701613006 Cr-Commit-Position: refs/heads/master@{#453522} Committed: https://chromium.googlesource.com/chromium/src/+/e975664dab5f430b66817238898839b333822ac3

Patch Set 1 #

Total comments: 22

Patch Set 2 : Fix nits #

Total comments: 32

Patch Set 3 : Move filter state into filter_group.cc #

Patch Set 4 : Move audio_device_ids to chromecast/media/base #

Total comments: 4

Patch Set 5 : Split streams into TTS, Media, Alarm, Communication #

Patch Set 6 : Rebase on head #

Total comments: 2

Patch Set 7 : Fix nit #

Total comments: 20

Patch Set 8 : Assign a FilterGroup to each InputQueue on creation. #

Patch Set 9 : constexpr #

Total comments: 12

Patch Set 10 : Fix more comments. #

Total comments: 2

Patch Set 11 : Fix #endif comment #

Patch Set 12 : Fix BUILD.gn #

Patch Set 13 : Fix clang/test compile errors #

Patch Set 14 : Fix unittests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+515 lines, -129 lines) Patch
M chromecast/media/base/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
A chromecast/media/base/audio_device_ids.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +22 lines, -0 lines 0 comments Download
A chromecast/media/base/audio_device_ids.cc View 1 2 3 4 5 6 7 8 9 1 chunk +15 lines, -0 lines 0 comments Download
M chromecast/media/cma/backend/alsa/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +3 lines, -0 lines 0 comments Download
M chromecast/media/cma/backend/alsa/audio_decoder_alsa.cc View 1 2 3 4 5 6 7 2 chunks +6 lines, -4 lines 0 comments Download
M chromecast/media/cma/backend/alsa/audio_filter_factory.h View 1 2 3 4 1 chunk +6 lines, -1 line 0 comments Download
A chromecast/media/cma/backend/alsa/filter_group.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +87 lines, -0 lines 0 comments Download
A chromecast/media/cma/backend/alsa/filter_group.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +119 lines, -0 lines 0 comments Download
M chromecast/media/cma/backend/alsa/media_pipeline_backend_alsa.h View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chromecast/media/cma/backend/alsa/media_pipeline_backend_alsa.cc View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M chromecast/media/cma/backend/alsa/stream_mixer_alsa.h View 1 2 3 4 5 6 7 5 chunks +16 lines, -14 lines 0 comments Download
M chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 12 chunks +99 lines, -93 lines 0 comments Download
M chromecast/media/cma/backend/alsa/stream_mixer_alsa_input.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M chromecast/media/cma/backend/alsa/stream_mixer_alsa_input.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -3 lines 0 comments Download
M chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +9 lines, -0 lines 0 comments Download
M chromecast/media/cma/backend/alsa/stream_mixer_alsa_input_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 7 chunks +18 lines, -5 lines 0 comments Download
M chromecast/media/cma/backend/alsa/stream_mixer_alsa_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +55 lines, -2 lines 0 comments Download
M chromecast/media/cma/backend/media_pipeline_backend_manager.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M chromecast/media/cma/pipeline/load_type.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chromecast/media/cma/pipeline/media_pipeline_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +14 lines, -5 lines 0 comments Download
M chromecast/media/service/cast_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +16 lines, -1 line 0 comments Download
M chromecast/public/media/media_pipeline_device_params.h View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download

Messages

Total messages: 77 (36 generated)
bshaya
3 years, 10 months ago (2017-02-17 02:49:46 UTC) #2
kmackay
https://codereview.chromium.org/2701613006/diff/1/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/1/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode888 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:888: bool filter_frames = true; The design for mixing seems ...
3 years, 10 months ago (2017-02-17 06:11:26 UTC) #3
bshaya
https://codereview.chromium.org/2701613006/diff/1/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/1/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode888 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:888: bool filter_frames = true; On 2017/02/17 06:11:25, kmackay wrote: ...
3 years, 10 months ago (2017-02-17 18:26:54 UTC) #4
gfhuang
https://codereview.chromium.org/2701613006/diff/1/chromecast/public/media/audio_device_ids.cc File chromecast/public/media/audio_device_ids.cc (right): https://codereview.chromium.org/2701613006/diff/1/chromecast/public/media/audio_device_ids.cc#newcode13 chromecast/public/media/audio_device_ids.cc:13: const char kSystemAudioDeviceId[] = "assistant-system"; why change from enum ...
3 years, 10 months ago (2017-02-17 18:27:21 UTC) #6
bshaya
3 years, 10 months ago (2017-02-17 18:41:45 UTC) #8
bshaya
https://codereview.chromium.org/2701613006/diff/1/chromecast/public/media/audio_device_ids.cc File chromecast/public/media/audio_device_ids.cc (right): https://codereview.chromium.org/2701613006/diff/1/chromecast/public/media/audio_device_ids.cc#newcode13 chromecast/public/media/audio_device_ids.cc:13: const char kSystemAudioDeviceId[] = "assistant-system"; On 2017/02/17 18:27:21, gfhuang ...
3 years, 10 months ago (2017-02-17 19:05:13 UTC) #9
wzhong
The intention is to bring all necessary API changes to support new audio/assistant pipeline refactoring ...
3 years, 10 months ago (2017-02-17 19:33:30 UTC) #10
kmackay
https://codereview.chromium.org/2701613006/diff/1/chromecast/public/media/media_pipeline_device_params.h File chromecast/public/media/media_pipeline_device_params.h (right): https://codereview.chromium.org/2701613006/diff/1/chromecast/public/media/media_pipeline_device_params.h#newcode69 chromecast/public/media/media_pipeline_device_params.h:69: const std::string name; On 2017/02/17 18:27:21, gfhuang wrote: > ...
3 years, 10 months ago (2017-02-17 19:40:54 UTC) #11
kmackay
https://codereview.chromium.org/2701613006/diff/1/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/1/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode888 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:888: bool filter_frames = true; On 2017/02/17 18:26:53, bshaya wrote: ...
3 years, 10 months ago (2017-02-17 19:42:42 UTC) #12
tianyuwang1
https://codereview.chromium.org/2701613006/diff/20001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode855 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:855: bool is_silence = true; Do you need thi is_silence? ...
3 years, 10 months ago (2017-02-18 00:17:09 UTC) #13
kmackay
https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/media_pipeline_device_params.h File chromecast/public/media/media_pipeline_device_params.h (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/media_pipeline_device_params.h#newcode69 chromecast/public/media/media_pipeline_device_params.h:69: const std::string name; This should be last, after task_runner, ...
3 years, 10 months ago (2017-02-19 23:09:09 UTC) #14
wzhong
https://codereview.chromium.org/2701613006/diff/20001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode183 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:183: dest[i] += source[i]; No clipping or saturation? https://codereview.chromium.org/2701613006/diff/20001/chromecast/media/cma/backend/alsa/stream_mixer_alsa_input.h File ...
3 years, 10 months ago (2017-02-21 16:03:46 UTC) #15
wzhong
3 years, 10 months ago (2017-02-21 16:03:47 UTC) #16
kmackay
https://codereview.chromium.org/2701613006/diff/20001/chromecast/media/cma/pipeline/media_pipeline_impl.cc File chromecast/media/cma/pipeline/media_pipeline_impl.cc (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/media/cma/pipeline/media_pipeline_impl.cc#newcode50 chromecast/media/cma/pipeline/media_pipeline_impl.cc:50: base::TimeDelta::FromMilliseconds(60)); On 2017/02/21 16:03:46, wzhong wrote: > Nah... Those ...
3 years, 10 months ago (2017-02-21 16:08:47 UTC) #17
gfhuang
https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/media_pipeline_device_params.h File chromecast/public/media/media_pipeline_device_params.h (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/media_pipeline_device_params.h#newcode69 chromecast/public/media/media_pipeline_device_params.h:69: const std::string name; On 2017/02/19 23:09:09, kmackay wrote: > ...
3 years, 10 months ago (2017-02-21 20:06:31 UTC) #18
kmackay
https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/media_pipeline_device_params.h File chromecast/public/media/media_pipeline_device_params.h (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/media_pipeline_device_params.h#newcode69 chromecast/public/media/media_pipeline_device_params.h:69: const std::string name; On 2017/02/21 20:06:31, gfhuang wrote: > ...
3 years, 10 months ago (2017-02-21 20:14:39 UTC) #19
bshaya
https://codereview.chromium.org/2701613006/diff/1/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/1/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode888 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:888: bool filter_frames = true; On 2017/02/17 19:42:42, kmackay wrote: ...
3 years, 10 months ago (2017-02-21 23:30:14 UTC) #20
bshaya
3 years, 10 months ago (2017-02-21 23:30:28 UTC) #22
wzhong
https://codereview.chromium.org/2701613006/diff/60001/chromecast/media/cma/backend/alsa/filter_group.h File chromecast/media/cma/backend/alsa/filter_group.h (right): https://codereview.chromium.org/2701613006/diff/60001/chromecast/media/cma/backend/alsa/filter_group.h#newcode65 chromecast/media/cma/backend/alsa/filter_group.h:65: ssize_t bytes_per_output_format_sample_; Initialize POD to default value here or ...
3 years, 10 months ago (2017-02-22 16:13:02 UTC) #23
bshaya
https://codereview.chromium.org/2701613006/diff/60001/chromecast/media/cma/backend/alsa/filter_group.h File chromecast/media/cma/backend/alsa/filter_group.h (right): https://codereview.chromium.org/2701613006/diff/60001/chromecast/media/cma/backend/alsa/filter_group.h#newcode65 chromecast/media/cma/backend/alsa/filter_group.h:65: ssize_t bytes_per_output_format_sample_; On 2017/02/22 16:13:01, wzhong wrote: > Initialize ...
3 years, 10 months ago (2017-02-22 20:45:25 UTC) #25
wzhong
https://codereview.chromium.org/2701613006/diff/100001/chromecast/media/cma/backend/alsa/filter_group.cc File chromecast/media/cma/backend/alsa/filter_group.cc (right): https://codereview.chromium.org/2701613006/diff/100001/chromecast/media/cma/backend/alsa/filter_group.cc#newcode52 chromecast/media/cma/backend/alsa/filter_group.cc:52: if (silence_frames_filtered_ < silence_frames_to_filter) { Initialize silence_frames_filtered_ to 0 ...
3 years, 10 months ago (2017-02-23 05:38:58 UTC) #34
bshaya
https://codereview.chromium.org/2701613006/diff/100001/chromecast/media/cma/backend/alsa/filter_group.cc File chromecast/media/cma/backend/alsa/filter_group.cc (right): https://codereview.chromium.org/2701613006/diff/100001/chromecast/media/cma/backend/alsa/filter_group.cc#newcode52 chromecast/media/cma/backend/alsa/filter_group.cc:52: if (silence_frames_filtered_ < silence_frames_to_filter) { On 2017/02/23 05:38:58, wzhong ...
3 years, 10 months ago (2017-02-23 19:36:54 UTC) #35
tianyuwang1
https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/audio_device_ids.h File chromecast/public/media/audio_device_ids.h (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/audio_device_ids.h#newcode16 chromecast/public/media/audio_device_ids.h:16: const int kDefaultAudioStreamType = 0; On 2017/02/21 23:30:14, bshaya ...
3 years, 10 months ago (2017-02-23 20:25:38 UTC) #36
kmackay
https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/audio_device_ids.h File chromecast/public/media/audio_device_ids.h (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/audio_device_ids.h#newcode16 chromecast/public/media/audio_device_ids.h:16: const int kDefaultAudioStreamType = 0; On 2017/02/23 20:25:37, tianyuwang1 ...
3 years, 10 months ago (2017-02-23 20:32:00 UTC) #37
kmackay
https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/base/audio_device_ids.h File chromecast/media/base/audio_device_ids.h (right): https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/base/audio_device_ids.h#newcode14 chromecast/media/base/audio_device_ids.h:14: extern const char kSystemAudioDeviceId[]; Still not sure that 'system' ...
3 years, 10 months ago (2017-02-23 20:52:57 UTC) #38
gfhuang
https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode282 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:282: AudioFilterFactory::MEDIA_AUDIO_FILTER)); I don't think this is the right thing ...
3 years, 10 months ago (2017-02-23 21:24:56 UTC) #39
kmackay
https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode282 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:282: AudioFilterFactory::MEDIA_AUDIO_FILTER)); On 2017/02/23 21:24:56, gfhuang wrote: > I don't ...
3 years, 10 months ago (2017-02-23 21:30:36 UTC) #40
gfhuang
On 2017/02/23 21:30:36, kmackay wrote: > https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc > File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): > > https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode282 > ...
3 years, 10 months ago (2017-02-23 21:37:17 UTC) #41
gfhuang
3 years, 10 months ago (2017-02-23 21:37:27 UTC) #42
bshaya
https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/audio_device_ids.h File chromecast/public/media/audio_device_ids.h (right): https://codereview.chromium.org/2701613006/diff/20001/chromecast/public/media/audio_device_ids.h#newcode16 chromecast/public/media/audio_device_ids.h:16: const int kDefaultAudioStreamType = 0; On 2017/02/23 20:32:00, kmackay ...
3 years, 10 months ago (2017-02-24 00:17:08 UTC) #43
halliwell
https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/filter_group.h File chromecast/media/cma/backend/alsa/filter_group.h (right): https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/filter_group.h#newcode76 chromecast/media/cma/backend/alsa/filter_group.h:76: const FilterGroup& operator=(const FilterGroup&) = delete; On 2017/02/24 00:17:07, ...
3 years, 10 months ago (2017-02-24 00:28:09 UTC) #45
kmackay
https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode282 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:282: AudioFilterFactory::MEDIA_AUDIO_FILTER)); On 2017/02/24 00:17:08, bshaya wrote: > On 2017/02/23 ...
3 years, 10 months ago (2017-02-24 17:24:57 UTC) #46
kmackay
https://codereview.chromium.org/2701613006/diff/160001/chromecast/media/base/audio_device_ids.cc File chromecast/media/base/audio_device_ids.cc (right): https://codereview.chromium.org/2701613006/diff/160001/chromecast/media/base/audio_device_ids.cc#newcode13 chromecast/media/base/audio_device_ids.cc:13: const char kSystemAudioDeviceId[] = "assistant-system"; missing in .h file? ...
3 years, 10 months ago (2017-02-24 18:03:55 UTC) #47
bshaya
https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc File chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc (right): https://codereview.chromium.org/2701613006/diff/120001/chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc#newcode282 chromecast/media/cma/backend/alsa/stream_mixer_alsa.cc:282: AudioFilterFactory::MEDIA_AUDIO_FILTER)); On 2017/02/24 17:24:57, kmackay wrote: > On 2017/02/24 ...
3 years, 9 months ago (2017-02-27 17:00:15 UTC) #48
kmackay
lgtm
3 years, 9 months ago (2017-02-27 17:51:26 UTC) #49
wzhong
lgtm
3 years, 9 months ago (2017-02-27 20:55:45 UTC) #50
halliwell
lgtm https://codereview.chromium.org/2701613006/diff/180001/chromecast/media/base/audio_device_ids.h File chromecast/media/base/audio_device_ids.h (right): https://codereview.chromium.org/2701613006/diff/180001/chromecast/media/base/audio_device_ids.h#newcode22 chromecast/media/base/audio_device_ids.h:22: #endif // CHROMECAST_PUBLIC_MEDIA_AUDIO_DEVICE_IDS_H_ nit, doesn't match top
3 years, 9 months ago (2017-02-27 21:18:35 UTC) #53
bshaya
https://codereview.chromium.org/2701613006/diff/180001/chromecast/media/base/audio_device_ids.h File chromecast/media/base/audio_device_ids.h (right): https://codereview.chromium.org/2701613006/diff/180001/chromecast/media/base/audio_device_ids.h#newcode22 chromecast/media/base/audio_device_ids.h:22: #endif // CHROMECAST_PUBLIC_MEDIA_AUDIO_DEVICE_IDS_H_ On 2017/02/27 21:18:35, halliwell wrote: > ...
3 years, 9 months ago (2017-02-27 21:23:01 UTC) #54
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2701613006/260001
3 years, 9 months ago (2017-02-28 06:19:52 UTC) #73
commit-bot: I haz the power
Committed patchset #14 (id:260001) as https://chromium.googlesource.com/chromium/src/+/e975664dab5f430b66817238898839b333822ac3
3 years, 9 months ago (2017-02-28 06:25:44 UTC) #76
bshaya
3 years, 9 months ago (2017-02-28 07:50:24 UTC) #77
Message was sent while issue was closed.
A revert of this CL (patchset #14 id:260001) has been created in
https://codereview.chromium.org/2722673004/ by bshaya@google.com.

The reason for reverting is: Breaks some chromecast builds due to missing
include for <string> in media_pipeline_device_params.h.

Powered by Google App Engine
This is Rietveld 408576698