blob: 79e482b8e470846d9a8c4982dcbb70616f363590 [file] [log] [blame]
// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
module video_capture.mojom;
import "sandbox/policy/mojom/sandbox.mojom";
import "services/video_capture/public/mojom/device_factory.mojom";
import "services/video_capture/public/mojom/testing_controls.mojom";
import "services/video_capture/public/mojom/video_source_provider.mojom";
import "components/chromeos_camera/common/mjpeg_decode_accelerator.mojom";
import "media/capture/video/chromeos/mojom/camera_app.mojom";
import "chromeos/crosapi/mojom/video_capture.mojom";
import "gpu/ipc/common/luid.mojom";
interface AcceleratorFactory {
// Creates a new JpegDecodeAccelerator and binds it to |jda|.
pending_receiver<chromeos_camera.mojom.MjpegDecodeAccelerator> jda);
const sandbox.mojom.Sandbox kVideoCaptureSandbox
= sandbox.mojom.Sandbox.kVideoCapture;
const sandbox.mojom.Sandbox kVideoCaptureSandbox
= sandbox.mojom.Sandbox.kNoSandbox;
// Entry point to the Video Capture Service API.
// This interface is executed in the Video Capture Utility process.
// It is used from the Browser process.
// The factory provides access to the capture devices connected to the system.
// By using command-line switches, it is possible to replace this with a "fake"
// factory, which provides access to fake devices that generates test frames.
// The video capture supports gpu accelerated decoding of MJPEG frames
// delivered by camera devices, but to do it requires InjectGpuDependencies()
// to be called once before any call to ConnectToDeviceFactory() is made.
// Calling InjectGpuDependencies() is optional. If it is not called, MJPEG
// decoding will be performed without gpu acceleration.
interface VideoCaptureService {
InjectGpuDependencies(pending_remote<AcceleratorFactory> accelerator_factory);
// Binds a bridge for Chrome OS camera app and device.
pending_receiver<cros.mojom.CameraAppDeviceBridge> receiver);
// Interface to expose the internal DeviceFactory to be passed from ash
// to lacros.
pending_receiver<crosapi.mojom.VideoCaptureDeviceFactory> receiver);
// Current API. Supports multiple clients per source.
ConnectToVideoSourceProvider(pending_receiver<VideoSourceProvider> receiver);
// Sets a retry count that is used by the service for logging UMA events in
// the context of investigation for
SetRetryCount(int32 count);
// Binds a test-only interface for use by unit tests.
BindControlsForTesting(pending_receiver<TestingControls> receiver);
// Notify the capture service about change of the GPU adapter used in
// the GPU process.
OnGpuInfoUpdate(gpu.mojom.Luid luid);