blob: b2252e47837409e259039af9544ddf25f0e4484d [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;
import "mojom/device_management.mojom";
import "mojom/pipeline.mojom";
struct SuccessStatus {
// Whether or not the action succeeded.
bool success@0;
string? failure_reason@1;
};
// Feature or configuration specific functionality belongs in these interfaces.
struct PerceptionInterfaceRequests {
};
interface MediaPerception {
// Sets up the pipeline configuration to select a desired featureset. Media
// perception service responds back with the InterfaceType(s) that the client
// needs to have implemented.
// Client of the MediaPerception service needs to provide an implemented
// interface for the requests that are returned.
SetupConfiguration@0(string configuration_name) =>
(SuccessStatus status,
PerceptionInterfaceRequests requests);
// ------------------- Start of device management definitions. -------------
GetVideoDevices@1() => (array<VideoDevice> devices);
GetAudioDevices@2() => (array<AudioDevice> devices);
// Returns a list of template names for devices that can be filled in for
// a particular configuration.
GetTemplateDevices@3(string configuration_name) =>
(array<DeviceTemplate> device_templates);
SetVideoDeviceForTemplateName@4(
string configuration_name, string template_name,
VideoDevice device) => (SuccessStatus status);
SetAudioDeviceForTemplateName@5(
string configuration_name, string template_name,
AudioDevice device) => (SuccessStatus status);
SetVirtualVideoDeviceForTemplateName@6(
string configuration_name, string template_name,
VirtualVideoDevice device) => (SuccessStatus status);
// ------------------- End of device management definitions. ---------------
// ------------------- Start of pipeline state definitions. ----------------
// Get the status of the media perception processing pipeline.
GetPipelineState@7(string configuration_name) => (PipelineState state);
// Set the desired state of the media perception pipeline.
SetPipelineState@8(string configuration_name, PipelineState desired_state)
=> (PipelineState state);
// ------------------- End of pipeline state definitions. ------------------
};