blob: eb84e14dde5a820affe799ee2b88b8c7c8d3da9f [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Set of possible errors for methods on the |VirtualCameraDevice| protocol.
type Error = strict enum {
// Occurs when |AddToDeviceWatcher| is called and the device has already been added.
// Parameters that can be set for a stream created with |AddStreamConfig|.
type StreamConfig = table {
1: width uint32;
2: height uint32;
/// This interface provides a way for test clients to set up fake streams
/// using the 'virtual' camera.
protocol VirtualCameraDevice {
// Makes the virtual camera available to the |DeviceWatcher| agent.
// This allows the fake streams to be picked up by other components
// in the system. Must be called before proceeding with tests otherwise
// the virtual camera won't be available to camera clients.
AddToDeviceWatcher() -> (struct {}) error Error;
// Adds a |StreamConfig| at the given |index|. |index| is used to refer
// to the config in future operations. If this is called multiple times
// with the same |index|, the older value will be overwritten.
AddStreamConfig(struct {
index uint64;
config StreamConfig;