blob: 5fb8863d0828a9a29e813ed38208aaea788f00c0 [file] [log] [blame]
// Copyright 2018 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.
//
// Next MinVersion: 1
module chromeos.media_perception.mojom;
[Extensible]
enum PipelineStatus {
UNKNOWN = 0,
// The analytics process is running and the media processing pipeline is
// started, but not yet receiving input. This is a transitional state
// between SUSPENDED and RUNNING for the time it takes to warm up the
// processing pipeline, which can take a few seconds.
STARTED = 1,
// The process is running and the media processing pipeline is receiving
// input. At this point, events should be firing.
RUNNING = 2,
// The analytics process is running and the media processing pipeline is
// ready to be started.
SUSPENDED = 3,
// Something has gone wrong during execution of the pipeline.
ERROR = 4,
};
[Extensible]
enum PipelineErrorType {
UNKNOWN = 0,
// Configuration of the pipeline did not validate.
CONFIGURATION = 1,
// Something has gone wrong during startup. For example, a device doesn't
// open.
STARTUP = 2,
// Something has gone wrong in the pipeline.
RUNTIME = 3,
// Problem with media content (such as black frames).
CONTENT = 4,
};
struct PipelineError {
PipelineErrorType error_type@0;
// Indicates the source of an error such as a device or a particular
// calculator.
string? error_source@1;
// Human-readable string with information about what went wrong.
string? error_string@2;
};
struct PipelineState {
PipelineStatus status@0;
// Filled in if the status is ERROR.
PipelineError? error@1;
// Associated configuration name with this pipeline.
string? configuration_name@2;
};
struct GlobalPipelineState {
array<PipelineState> states@0;
};
interface PipelineEventHandler {
OnPipelineStateChanged@0(PipelineState state);
};