pub struct RecorderManager { /* private fields */ }Expand description
Owns and supervises the per-camera recorder tasks.
Implementations§
Source§impl RecorderManager
impl RecorderManager
pub fn new(pool: SqlitePool, cfg: Arc<Config>) -> Arc<Self>
Sourcepub async fn start_all(self: &Arc<Self>) -> Result<()>
pub async fn start_all(self: &Arc<Self>) -> Result<()>
Start recorders for all cameras that should record.
Sourcepub async fn reconcile(self: &Arc<Self>, camera_id: &str)
pub async fn reconcile(self: &Arc<Self>, camera_id: &str)
Reconcile a single camera’s recorder against its current DB state.
Sourcepub async fn stop(self: &Arc<Self>, camera_id: &str)
pub async fn stop(self: &Arc<Self>, camera_id: &str)
Stop a camera’s recorder task, killing its FFmpeg process. Returns only once the task is actually gone (aborting it if it does not stop promptly).
Sourcepub async fn active_ids(&self) -> Vec<String>
pub async fn active_ids(&self) -> Vec<String>
Camera ids currently being supervised.
Auto Trait Implementations§
impl !Freeze for RecorderManager
impl !RefUnwindSafe for RecorderManager
impl !UnwindSafe for RecorderManager
impl Send for RecorderManager
impl Sync for RecorderManager
impl Unpin for RecorderManager
impl UnsafeUnpin for RecorderManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more