New issue
Advanced search Search tips

Issue 775264 link

Starred by 1 user

Issue metadata

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

Blocking:
issue 713335



Sign in to add a comment

Make media_metric work for multiple media playbacks in a single trace

Project Member Reported by crouleau@chromium.org, Oct 16 2017

Issue description

https://cs.chromium.org/chromium/src/third_party/catapult/tracing/tracing/metrics/media_metric.html?q=media_metric.html&sq=package:chromium&dr&l=61
Only reports a single time_to_play even when there are multiple playbacks in a single trace.

There are two ways that we could have multiple playbacks in a single trace:
(1). Back to back playbacks:
If you play a video, the video ends, and then you play another video.

(2). Simultaneous playbacks
Either you can have two videos running on a single page at the same time, or you could have two videos going in separate tabs at the same time.

It would be good to at least support (1). Supporting (2) might be rather difficult.

Low hanging fruit: This line https://cs.chromium.org/chromium/src/third_party/catapult/tracing/tracing/metrics/media_metric.html?q=media_metric.html&sq=package:chromium&dr&l=61 
rendererHelper.process.findAtMostOneThreadNamed('AudioOutputDevice');
has an assumption that only one audio output device exists. When that assumption is false, the code simply fails. That assumption is false for multiple audio playbacks.

This blocks MSE cases merge to TBMv2 work because MSE cases requires to be able to play back-to-back videos so that we can get statistically-significant results.

John has offered to start looking into this, but he may assign back to me.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Nov 1 2017

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

commit 5b164a0a81e41905c7affe966aa06b7e1fea9612
Author: John Chen <johnchen@chromium.org>
Date: Wed Nov 01 00:36:09 2017

Add playback ID to media trace events used by media metric

Use the MediaLog ID associated with each WebMediaPlayerImpl object as a
unique identifier, to allow the media metric to handle multiple media
playbacks in a single trace.

Bug:  775264 
Change-Id: I412bbf5bf8ccab223c027cb5c936fac3de47251e
Reviewed-on: https://chromium-review.googlesource.com/741143
Reviewed-by: Caleb Rouleau <crouleau@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Dan Sanders <sandersd@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513024}
[modify] https://crrev.com/5b164a0a81e41905c7affe966aa06b7e1fea9612/media/base/media_log.h
[modify] https://crrev.com/5b164a0a81e41905c7affe966aa06b7e1fea9612/media/blink/webmediaplayer_impl.cc
[modify] https://crrev.com/5b164a0a81e41905c7affe966aa06b7e1fea9612/media/renderers/audio_renderer_impl.cc
[modify] https://crrev.com/5b164a0a81e41905c7affe966aa06b7e1fea9612/media/renderers/video_renderer_impl.cc

Project Member

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

The following revision refers to this bug:
  https://chromium.googlesource.com/catapult/+/5b827c45019ed01e2a673520c122e729532f7e83

commit 5b827c45019ed01e2a673520c122e729532f7e83
Author: John Chen <johnchen@chromium.org>
Date: Thu Nov 02 05:25:27 2017

Update media metric to support multiple media in a trace

Make use of the media ID that has been added to media trace events,
to support multiple media playbacks in a single trace.

Bug:  chromium:775264 
Change-Id: I0e5c89304179bb1e1c38bd15c1f964506326cd64
Reviewed-on: https://chromium-review.googlesource.com/740870
Commit-Queue: John Chen <johnchen@chromium.org>
Reviewed-by: Ben Hayden <benjhayden@chromium.org>

[modify] https://crrev.com/5b827c45019ed01e2a673520c122e729532f7e83/tracing/tracing/metrics/media_metric.html
[modify] https://crrev.com/5b827c45019ed01e2a673520c122e729532f7e83/tracing/tracing/metrics/media_metric_test.html

Status: Fixed (was: Assigned)

Sign in to add a comment