pub trait VideoSegmentService {
// Required methods
fn create_segments(
&self,
auth_: BearerToken,
video_rid: VideoRid,
request: CreateSegmentsRequest,
) -> Result<(), Error>;
fn create_video_file_segments(
&self,
auth_: BearerToken,
video_rid: VideoRid,
video_file_rid: VideoFileRid,
request: CreateSegmentsRequest,
) -> Result<CreateSegmentsResponse, Error>;
fn get_segment_by_timestamp(
&self,
auth_: BearerToken,
video_rid: VideoRid,
request: GetSegmentByTimestampRequest,
) -> 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§
fn create_segments( &self, auth_: BearerToken, video_rid: VideoRid, request: CreateSegmentsRequest, ) -> Result<(), Error>
fn create_video_file_segments( &self, auth_: BearerToken, video_rid: VideoRid, video_file_rid: VideoFileRid, request: CreateSegmentsRequest, ) -> Result<CreateSegmentsResponse, Error>
Sourcefn get_segment_by_timestamp(
&self,
auth_: BearerToken,
video_rid: VideoRid,
request: GetSegmentByTimestampRequest,
) -> Result<Option<Segment>, Error>
fn get_segment_by_timestamp( &self, auth_: BearerToken, video_rid: VideoRid, request: GetSegmentByTimestampRequest, ) -> Result<Option<Segment>, Error>
Returns metadata for the segment within a video containing the requested absolute timestamp.