Skip to main content

LocalAsyncVideoFileService

Trait LocalAsyncVideoFileService 

Source
pub trait LocalAsyncVideoFileService<O> {
    type GetPlaylistBody: LocalAsyncWriteBody<O> + 'static;

Show 14 methods // Required methods fn create( &self, auth_: BearerToken, request: CreateVideoFileRequest, ) -> impl Future<Output = Result<VideoFile, Error>>; fn get( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<VideoFile, Error>>; fn batch_get( &self, auth_: BearerToken, video_file_rids: BTreeSet<VideoFileRid>, ) -> impl Future<Output = Result<BTreeSet<VideoFile>, Error>>; fn list_files_in_video( &self, auth_: BearerToken, video_rid: VideoRid, ) -> impl Future<Output = Result<BTreeSet<VideoFile>, Error>>; fn list_files_in_video_paginated( &self, auth_: BearerToken, video_rid: ListFilesInVideoRequest, ) -> impl Future<Output = Result<ListFilesInVideoResponse, Error>>; fn update( &self, auth_: BearerToken, video_file_rid: VideoFileRid, request: UpdateVideoFileRequest, ) -> impl Future<Output = Result<VideoFile, Error>>; fn delete( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<(), Error>>; fn archive( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<(), Error>>; fn unarchive( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<(), Error>>; fn get_ingest_status( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<GetIngestStatusResponse, Error>>; fn batch_get_ingest_status( &self, auth_: BearerToken, video_file_rids: BTreeSet<VideoFileRid>, ) -> impl Future<Output = Result<BTreeMap<VideoFileRid, VideoFileIngestStatus>, Error>>; fn update_ingest_status( &self, auth_: BearerToken, video_file_rid: VideoFileRid, request: UpdateIngestStatusRequest, ) -> impl Future<Output = Result<(), Error>>; fn get_segment_summaries( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<Vec<SegmentSummary>, Error>>; fn get_playlist( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<Self::GetPlaylistBody, Error>>;
}
Expand description

The video service manages individual video files and their metadata.

Required Associated Types§

Source

type GetPlaylistBody: LocalAsyncWriteBody<O> + 'static

The body type returned by the get_playlist method.

Required Methods§

Source

fn create( &self, auth_: BearerToken, request: CreateVideoFileRequest, ) -> impl Future<Output = Result<VideoFile, Error>>

Create and persist a video file entity with the given metadata

Source

fn get( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<VideoFile, Error>>

Returns video file metadata associated with a video file RID.

Source

fn batch_get( &self, auth_: BearerToken, video_file_rids: BTreeSet<VideoFileRid>, ) -> impl Future<Output = Result<BTreeSet<VideoFile>, Error>>

Returns all video files and their metadata associated with the given RIDs

Source

fn list_files_in_video( &self, auth_: BearerToken, video_rid: VideoRid, ) -> impl Future<Output = Result<BTreeSet<VideoFile>, Error>>

Source

fn list_files_in_video_paginated( &self, auth_: BearerToken, video_rid: ListFilesInVideoRequest, ) -> impl Future<Output = Result<ListFilesInVideoResponse, Error>>

Returns a paginated list of all video files and their metadata associated with the given video RID.

Source

fn update( &self, auth_: BearerToken, video_file_rid: VideoFileRid, request: UpdateVideoFileRequest, ) -> impl Future<Output = Result<VideoFile, Error>>

Updates the metadata for a video file associated with the given RID.

Source

fn delete( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<(), Error>>

Permanently deletes a video file and all associated segments from the database. This operation cannot be undone.

Source

fn archive( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<(), Error>>

Source

fn unarchive( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<(), Error>>

Source

fn get_ingest_status( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<GetIngestStatusResponse, Error>>

Get the latest ingest status for a given video file by RID.

Source

fn batch_get_ingest_status( &self, auth_: BearerToken, video_file_rids: BTreeSet<VideoFileRid>, ) -> impl Future<Output = Result<BTreeMap<VideoFileRid, VideoFileIngestStatus>, Error>>

Get the latest ingest status for a set of given video files by RID.

Source

fn update_ingest_status( &self, auth_: BearerToken, video_file_rid: VideoFileRid, request: UpdateIngestStatusRequest, ) -> impl Future<Output = Result<(), Error>>

Update the latest ingest status for a given video file by RID.

Source

fn get_segment_summaries( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<Vec<SegmentSummary>, Error>>

Returns the min and max absolute and media timestamps for each segment in a video file. To be used during frame-timestamp mapping when playing back videos.

Source

fn get_playlist( &self, auth_: BearerToken, video_file_rid: VideoFileRid, ) -> impl Future<Output = Result<Self::GetPlaylistBody, Error>>

Generate an HLS playlist for a video file with the given RID to enable playback. The HLS playlist will contain links to all of the video segments in the video in sequential order.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§