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

Issue 1140003002: Chromecast: fix handling of streams with different durations (Closed)

Created:
5 years, 7 months ago by servolk
Modified:
5 years, 7 months ago
Reviewers:
lcwu1, damienv1, gunsch
CC:
chromium-reviews, feature-media-reviews_chromium.org, lcwu+watch_chromium.org, gunsch+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Chromecast: fix handling of streams with different durations When one of the streams is much shorter than other(s), the shorter stream reaches EOS first and then its media time stops increasing, which blocks other streams due to using BalancedMediaTaskRunner. Resetting the media task runner will ensure other streams are not blocked by the shortest one. BUG=internal b/19560149 Committed: https://crrev.com/a2b2e005113c6b79690745ea4035244e14dfab98 Cr-Commit-Position: refs/heads/master@{#329557}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -0 lines) Patch
M chromecast/media/cma/filters/demuxer_stream_adapter.cc View 1 chunk +7 lines, -0 lines 1 comment Download

Messages

Total messages: 17 (2 generated)
servolk
5 years, 7 months ago (2015-05-13 01:15:22 UTC) #2
servolk
On 2015/05/13 01:15:22, servolk wrote: Note: I've tested this fix already. Started working on internal ...
5 years, 7 months ago (2015-05-13 01:16:44 UTC) #3
gunsch
lgtm! I like this solution much better than anything else that's been proposed so far.
5 years, 7 months ago (2015-05-13 01:18:46 UTC) #4
gunsch
(but curious to see if Damien agrees)
5 years, 7 months ago (2015-05-13 01:19:02 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1140003002/1
5 years, 7 months ago (2015-05-13 01:21:18 UTC) #7
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 7 months ago (2015-05-13 01:30:22 UTC) #8
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/a2b2e005113c6b79690745ea4035244e14dfab98 Cr-Commit-Position: refs/heads/master@{#329557}
5 years, 7 months ago (2015-05-13 01:31:09 UTC) #9
damienv1
Agree there might be an issue. Not sure this is the correct fix either (I'll ...
5 years, 7 months ago (2015-05-13 01:33:08 UTC) #10
damienv1
https://codereview.chromium.org/1140003002/diff/1/chromecast/media/cma/filters/demuxer_stream_adapter.cc File chromecast/media/cma/filters/demuxer_stream_adapter.cc (right): https://codereview.chromium.org/1140003002/diff/1/chromecast/media/cma/filters/demuxer_stream_adapter.cc#newcode190 chromecast/media/cma/filters/demuxer_stream_adapter.cc:190: ResetMediaTaskRunner(); 1) I don't think this fully address the ...
5 years, 7 months ago (2015-05-13 01:37:43 UTC) #11
damienv1
+ out of curiosity: does this use case (audio stream finish 3s before video or ...
5 years, 7 months ago (2015-05-13 01:38:49 UTC) #12
chromium-reviews
Thanks for your comments Damien! It's not clear to me at the moment, how we ...
5 years, 7 months ago (2015-05-13 01:44:55 UTC) #13
chromium-reviews
It happened with mse. The internal bug has a link to repro stream, where audio ...
5 years, 7 months ago (2015-05-13 01:55:51 UTC) #14
damienv1
I agree this can happen only when one stream is shorter than the other. However, ...
5 years, 7 months ago (2015-05-13 01:57:32 UTC) #15
servolk
On 2015/05/13 01:57:32, damienv1 wrote: > I agree this can happen only when one stream ...
5 years, 7 months ago (2015-05-13 19:02:13 UTC) #16
chromium-reviews
5 years, 7 months ago (2015-05-13 19:06:39 UTC) #17
Message was sent while issue was closed.
Here is what I meant:
https://codereview.chromium.org/1127183008

On Wed, May 13, 2015 at 12:02 PM, <servolk@chromium.org> wrote:

> On 2015/05/13 01:57:32, damienv1 wrote:
>
>> I agree this can happen only when one stream is shorter than the other.
>> However, all the timestamps used in the media task runner correspond to
>> timestamps that are ahead of the playback time (correspond to timestamps
>> that
>> are being fetched).
>> So, you could possibly in a situation where:
>> - you fetch the last audio frame: e.g. PTS=2s
>> - you fetch the one video frame (let's say fetching of video is ahead): so
>>
> e.g.
>
>> PTS=5.02s
>>    Here, the frame is not actually fetched since the difference is too
>> big.
>> - then, the next audio frame is actually the EOS.
>> you destroy the corresponding task runner
>> and the video task runner is actually never woken up.
>>
>
> I think we could call BalancedMediaTaskRunnerFactory::OnNewTask from
> BalancedMediaTaskRunnerFactory::UnregisterMediaTaskRunner after removing
> the
> task runner. The OnNewTask will then calculate the new timestamp range
> without
> the removed stream and will wake up any streams that can progress now. My
> only
> concern - would that cause too much unnecessary work during seeking, when
> we
> flush streams and reset task runners?
>
> https://codereview.chromium.org/1140003002/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698