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

Issue 759383003: [Cast] CastAudioSink audio reference_time adjustment and fixes/clean-up. (Closed)

Created:
6 years ago by miu
Modified:
6 years ago
Reviewers:
hubbe
CC:
chromium-reviews, hclam+watch_chromium.org, imcheng+watch_chromium.org, hguihot+watch_chromium.org, jasonroberts+watch_google.com, avayvod+watch_chromium.org, pwestin+watch_google.com, feature-media-reviews_chromium.org, miu+watch_chromium.org, hubbe+watch_chromium.org, mikhal+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Cast] CastAudioSink audio reference_time adjustment and fixes/clean-up. This change adds a computation to adjust the reference_time based on the amount of audio data backlogged in the resampler buffers. In practice, it seems to offset the timestamp by -20ms, and the performance test shows this moves overall AV sync almost 20ms closer to zero (good). A number of bugs and cleanups were also made in this change: 1) Calls to AudioBus::FromInterleaved() were passing an invalid 3rd argument, which happened to work because sizeof(int16) == number_of_channels. 2) Possible, yet improbable, FIFO buffer overruns are now checked. 3) Unused members of the CastAudioSink class were removed. 4) The fast, non-resampling code path is now reachable. BUG=335335, 437064 Committed: https://crrev.com/1cf451a6580a01a12a3c8bc95d3752e69eb31692 Cr-Commit-Position: refs/heads/master@{#306338}

Patch Set 1 #

Patch Set 2 : Replace hacky FIFO size computation with a logical one. #

Total comments: 2

Patch Set 3 : Use loop to pull out all pending data, to prevent FIFO overflow. #

Patch Set 4 : Naming tweak. #

Total comments: 2

Patch Set 5 : Simpler loop. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+126 lines, -106 lines) Patch
M chrome/renderer/media/cast_rtp_stream.cc View 1 2 3 4 4 chunks +126 lines, -106 lines 0 comments Download

Messages

Total messages: 10 (2 generated)
miu
hubbe: PTAL.
6 years ago (2014-11-27 00:39:37 UTC) #2
hubbe
https://codereview.chromium.org/759383003/diff/20001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/759383003/diff/20001/chrome/renderer/media/cast_rtp_stream.cc#newcode420 chrome/renderer/media/cast_rtp_stream.cc:420: if (fifo_->frames() < converter_->ChunkSize()) I wonder if we may ...
6 years ago (2014-12-01 22:49:18 UTC) #3
miu
PTAL. https://codereview.chromium.org/759383003/diff/20001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/759383003/diff/20001/chrome/renderer/media/cast_rtp_stream.cc#newcode420 chrome/renderer/media/cast_rtp_stream.cc:420: if (fifo_->frames() < converter_->ChunkSize()) On 2014/12/01 22:49:18, hubbe ...
6 years ago (2014-12-02 00:06:31 UTC) #4
hubbe
lgtm https://codereview.chromium.org/759383003/diff/60001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/759383003/diff/60001/chrome/renderer/media/cast_rtp_stream.cc#newcode434 chrome/renderer/media/cast_rtp_stream.cc:434: if (fifo_->frames() < converter_->ChunkSize()) It seems like you're ...
6 years ago (2014-12-02 00:45:02 UTC) #5
miu
https://codereview.chromium.org/759383003/diff/60001/chrome/renderer/media/cast_rtp_stream.cc File chrome/renderer/media/cast_rtp_stream.cc (right): https://codereview.chromium.org/759383003/diff/60001/chrome/renderer/media/cast_rtp_stream.cc#newcode434 chrome/renderer/media/cast_rtp_stream.cc:434: if (fifo_->frames() < converter_->ChunkSize()) On 2014/12/02 00:45:02, hubbe wrote: ...
6 years ago (2014-12-02 02:36:19 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/759383003/80001
6 years ago (2014-12-02 02:37:25 UTC) #8
commit-bot: I haz the power
Committed patchset #5 (id:80001)
6 years ago (2014-12-02 03:58:40 UTC) #9
commit-bot: I haz the power
6 years ago (2014-12-02 03:59:26 UTC) #10
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/1cf451a6580a01a12a3c8bc95d3752e69eb31692
Cr-Commit-Position: refs/heads/master@{#306338}

Powered by Google App Engine
This is Rietveld 408576698