use crate::constants::{PROFILE_TOKEN, VIDEO_SOURCE_TOKEN};
use crate::error::{not_implemented, OnvifError};
use crate::generated::types::MediaProfile;
use async_trait::async_trait;
#[async_trait]
pub trait MediaService: Send + Sync + 'static {
fn profiles(&self) -> Vec<MediaProfile> {
vec![MediaProfile {
token: PROFILE_TOKEN.to_string(),
name: "MainProfile".to_string(),
video_source_token: VIDEO_SOURCE_TOKEN.to_string(),
width: 1920,
height: 1080,
encoding: "H264".to_string(),
framerate: 30,
bitrate: 4096,
}]
}
async fn get_stream_uri(&self, _profile_token: &str) -> Result<String, OnvifError> {
not_implemented()
}
async fn get_snapshot_uri(&self, _profile_token: &str) -> Result<String, OnvifError> {
not_implemented()
}
}