blob: dc2e602d1d0d8c87aae277fd82262a911ecfd303 [file] [log] [blame]
// Copyright 2016 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 video_capture.mojom;
import "media/mojo/interfaces/jpeg_decode_accelerator.mojom";
import "services/video_capture/public/mojom/device_factory.mojom";
import "services/video_capture/public/mojom/video_source_provider.mojom";
interface AcceleratorFactory {
// Creates a new JpegDecodeAccelerator and binds it to |jda|.
CreateJpegDecodeAccelerator(media.mojom.JpegDecodeAccelerator& jda);
// Entry point to the Video Capture Service API.
// 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.
// TODO(chfremer): Consider renaming this to VideoCaptureService.
interface DeviceFactoryProvider {
InjectGpuDependencies(AcceleratorFactory accelerator_factory);
// Legacy API. Supports one client per device.
ConnectToDeviceFactory(DeviceFactory& request);
// Current API. Supports multiple clients per source.
ConnectToVideoSourceProvider(VideoSourceProvider& request);