Skip to main content

LocalAsyncVideoSegmentService

Trait LocalAsyncVideoSegmentService 

Source
pub trait LocalAsyncVideoSegmentService {
    // Required methods
    fn create_segments(
        &self,
        auth_: BearerToken,
        video_rid: VideoRid,
        request: CreateSegmentsRequest,
    ) -> impl Future<Output = Result<(), Error>>;
    fn create_video_file_segments(
        &self,
        auth_: BearerToken,
        video_rid: VideoRid,
        video_file_rid: VideoFileRid,
        request: CreateSegmentsRequest,
    ) -> impl Future<Output = Result<CreateSegmentsResponse, Error>>;
    fn create_video_stream_segments(
        &self,
        auth_: BearerToken,
        video_rid: VideoRid,
        stream_uuid: Uuid,
        request: CreateSegmentsRequest,
    ) -> impl Future<Output = Result<CreateSegmentsResponse, Error>>;
    fn create_segments_v2(
        &self,
        auth_: BearerToken,
        request: CreateSegmentsV2Request,
    ) -> impl Future<Output = Result<CreateSegmentsV2Response, Error>>;
    fn get_segment_by_timestamp(
        &self,
        auth_: BearerToken,
        video_rid: VideoRid,
        request: GetSegmentByTimestampRequest,
    ) -> impl Future<Output = Result<Option<Segment>, Error>>;
}
Expand description

Upon ingestion, every video is split into smaller segments. The Video Segment Service manages operations on videos at the segment-level.

Required Methods§

Source

fn create_segments( &self, auth_: BearerToken, video_rid: VideoRid, request: CreateSegmentsRequest, ) -> impl Future<Output = Result<(), Error>>

Source

fn create_video_file_segments( &self, auth_: BearerToken, video_rid: VideoRid, video_file_rid: VideoFileRid, request: CreateSegmentsRequest, ) -> impl Future<Output = Result<CreateSegmentsResponse, Error>>

Source

fn create_video_stream_segments( &self, auth_: BearerToken, video_rid: VideoRid, stream_uuid: Uuid, request: CreateSegmentsRequest, ) -> impl Future<Output = Result<CreateSegmentsResponse, Error>>

Creates segments for a video stream. Similar to createVideoFileSegments but for streaming video.

Source

fn create_segments_v2( &self, auth_: BearerToken, request: CreateSegmentsV2Request, ) -> impl Future<Output = Result<CreateSegmentsV2Response, Error>>

Creates segments for a dataset file video. Used for channel-based video ingestion. Internal use only.

Source

fn get_segment_by_timestamp( &self, auth_: BearerToken, video_rid: VideoRid, request: GetSegmentByTimestampRequest, ) -> impl Future<Output = Result<Option<Segment>, Error>>

Returns metadata for the segment within a video containing the requested absolute timestamp.

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§