naiveproxy/media/mojo/interfaces/media_metrics_provider.mojom

39 lines
1.6 KiB
Plaintext
Raw Normal View History

2018-08-15 01:19:20 +03:00
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module media.mojom;
import "media/mojo/interfaces/media_types.mojom";
import "media/mojo/interfaces/video_decode_stats_recorder.mojom";
import "media/mojo/interfaces/watch_time_recorder.mojom";
import "mojo/public/mojom/base/time.mojom";
import "ui/gfx/geometry/mojo/geometry.mojom";
// Provider interface used to avoid having one time setters on each interface.
// Each recorder will be stamped with an ID which can be used for linking UKM.
interface MediaMetricsProvider {
// Assigns a playback ID and sets up this provider instance with information
// needed to make UKM reports. No other methods may be called until after
// Initialize() has been called.
Initialize(bool is_mse);
// Called when a playback ends in error. The status is reported to UKM when
// the provider is destructed.
OnError(PipelineStatus status);
// Setters for various one-time lazily generated metrics or properties.
SetIsEME();
SetTimeToMetadata(mojo_base.mojom.TimeDelta elapsed);
SetTimeToFirstFrame(mojo_base.mojom.TimeDelta elapsed);
SetTimeToPlayReady(mojo_base.mojom.TimeDelta elapsed);
// Creates a WatchTimeRecorder instance using |properties|. If any of those
// properties changes, a new recorder should be requested.
AcquireWatchTimeRecorder(PlaybackProperties properties,
WatchTimeRecorder& recorder);
// Creates a VideoDecodeStatsRecorder instance.
AcquireVideoDecodeStatsRecorder(VideoDecodeStatsRecorder& recorder);
};