New issue
Advanced search Search tips

Issue 785407 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Preserve timestamp in Android VEA

Project Member Reported by emir...@chromium.org, Nov 15 2017

Issue description

Android VEA currently do not preserve input timestamps, causing trouble for WebRTC. We should look into how it can be done.
 
Here is a CL attempting to do it: https://chromium-review.googlesource.com/c/chromium/src/+/772080
Project Member

Comment 2 by bugdroid1@chromium.org, Nov 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e2d08f68c73a9057d749fb32f21ef8f76fdf3c49

commit e2d08f68c73a9057d749fb32f21ef8f76fdf3c49
Author: Weiyong Yao <braveyao@chromium.org>
Date: Sat Nov 18 01:13:31 2017

Preserve timestamp in Android hw encoder

Android VEA currently doesn't preserve the timestamps in the input
frames, causing trouble for WebRTC. The reason is MediaCodec assumes
the presentation timestamp to be monotonically-growing value. But in
chromium the video capture maybe paused a while or drop some frames,
so the timestamps in input frames won't be continious as expected.
Then we have to generate a seperate monotonically-growing timestamp
for encoding instead.

Here we cache the timestamps in input frames, mapping to the generated
timestamp, and read them out after encoding. Then encoder can work
happily and we can preserve the input timestamps.

Bug:  785407 
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: I594190436f18437afb937c4f0667a5b1e3019280
Reviewed-on: https://chromium-review.googlesource.com/775144
Commit-Queue: Weiyong Yao <braveyao@chromium.org>
Reviewed-by: Emircan Uysaler <emircan@chromium.org>
Reviewed-by: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517658}
[modify] https://crrev.com/e2d08f68c73a9057d749fb32f21ef8f76fdf3c49/content/renderer/media/gpu/rtc_video_encoder.cc
[modify] https://crrev.com/e2d08f68c73a9057d749fb32f21ef8f76fdf3c49/content/renderer/media/gpu/rtc_video_encoder_unittest.cc
[modify] https://crrev.com/e2d08f68c73a9057d749fb32f21ef8f76fdf3c49/media/gpu/android/android_video_encode_accelerator.cc
[modify] https://crrev.com/e2d08f68c73a9057d749fb32f21ef8f76fdf3c49/media/gpu/android/android_video_encode_accelerator.h

Status: Fixed (was: Assigned)

Sign in to add a comment