use std::sync::Arc;
use crate::client::{ClientError, PluginIpcClient, WhepAnswer};
#[derive(Clone)]
pub struct VideoClient {
pub(super) ipc: Arc<PluginIpcClient>,
}
impl VideoClient {
pub async fn whep_offer(
&self,
camera_id: &str,
offer_sdp: &str,
) -> Result<WhepAnswer, ClientError> {
self.ipc.whep_offer(camera_id, offer_sdp).await
}
pub async fn whep_close(&self, location: &str) -> Result<(), ClientError> {
self.ipc.whep_close(location).await
}
}
#[derive(Clone)]
pub struct SensorsClient {
pub(super) ipc: Arc<PluginIpcClient>,
}
impl SensorsClient {
pub async fn put_rig(
&self,
rig: &serde_json::Value,
) -> Result<(u16, serde_json::Value), ClientError> {
self.ipc.put_rig(rig).await
}
}