Commit c8467809 authored by Sergey Ulanov's avatar Sergey Ulanov Committed by Commit Bot

[fuchsia] Use FUCHSIA_AUDIO_NO_TIMESTAMP in AudioOutputStreamFuchsia

Previously AudioOutputStreamFuchsia was setting PTS (presentation
timestamp) to 0 to indicate that PTS is not set. The media_client API
expects FUCHSIA_AUDIO_NO_TIMESTAMP (!= 0) in that case.

Bug: 737802
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I858d72044f283f5bce1d457f7358644d6b258aa3
Reviewed-on: https://chromium-review.googlesource.com/801481Reviewed-by: default avatarJames Robinson <jamesr@chromium.org>
Commit-Queue: Sergey Ulanov <sergeyu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520764}
parent 6f7d7544
...@@ -133,14 +133,14 @@ void AudioOutputStreamFuchsia::PumpSamples() { ...@@ -133,14 +133,14 @@ void AudioOutputStreamFuchsia::PumpSamples() {
audio_bus_->frames(), buffer_.data()); audio_bus_->frames(), buffer_.data());
do { do {
zx_time_t presentation_time = 0; zx_time_t presentation_time = FUCHSIA_AUDIO_NO_TIMESTAMP;
if (started_time_.is_null()) { if (started_time_.is_null()) {
// Presentation time (PTS) needs to be specified only for the first frame // Presentation time (PTS) needs to be specified only for the first frame
// after stream is started or restarted. Mixer will calculate PTS for all // after stream is started or restarted. Mixer will calculate PTS for all
// following frames. 1us is added to account for the time passed between // following frames. 1us is added to account for the time passed between
// zx_time_get() and fuchsia_audio_output_stream_write(). // zx_time_get() and fuchsia_audio_output_stream_write().
zx_time_t zx_now = zx_time_get(ZX_CLOCK_MONOTONIC); zx_time_t zx_now = zx_time_get(ZX_CLOCK_MONOTONIC);
presentation_time = zx_now + presentation_delay_ns_ + 1000; presentation_time = zx_now + presentation_delay_ns_ + ZX_USEC(1);
started_time_ = base::TimeTicks::FromZxTime(zx_now); started_time_ = base::TimeTicks::FromZxTime(zx_now);
stream_position_samples_ = 0; stream_position_samples_ = 0;
} }
......
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