sl4f_lib/virtual_camera/
commands.rs1use crate::server::Facade;
6use crate::virtual_camera::facade::VirtualCameraFacade;
7use crate::virtual_camera::types::VirtualCameraMethod;
8use anyhow::Error;
9use async_trait::async_trait;
10use serde_json::Value;
11
12#[async_trait(?Send)]
13impl Facade for VirtualCameraFacade {
14 async fn handle_request(&self, method: String, args: Value) -> Result<Value, Error> {
15 match method.parse()? {
16 VirtualCameraMethod::AddStreamConfig => self.add_stream_config(args).await,
17 VirtualCameraMethod::AddToDeviceWatcher => self.add_to_device_watcher().await,
18 }
21 }
22}