VideoImportSessionProtocol

public protocol VideoImportSessionProtocol : VideoSessionProtocol

Protocol for a video session that can be imported

Create this type of session for every video file that should be processed. Video file should be accessible for within the app.

  • import video from a file on local disk

    Declaration

    Swift

    @discardableResult
    func importVideo(fromFile: URL, useInPlace: Bool) -> VideoImportSessionProtocol
  • Start reading and processing the imported video

    Process the video within the given time range from offset to offset + duration. Observe status.processing property to see if processing is finished

    Note

    the resulting HighlightObject will have the offset relative to the given offset, not the start of the video.

    Declaration

    Swift

    func start(offset: TimeInterval, duration: TimeInterval)

    Parameters

    offset

    offset in seconds where to start processing the video

    duration

    duration in seconds to process the video

  • start reading and processing the imported video

    Observe status.processing property to see if processing is finished

    Declaration

    Swift

    func start()
  • stop video processing before it actually ended

    use this function if you want to interrupt video processing before it finishes by itself, i.e before reading and processing all the frames.

    Declaration

    Swift

    func stop()
  • Set VideoImportStatus object to get processing updates or use the existing status property

    Declaration

    Swift

    func setStatusObject(_ obj: VideoImportStatus)

    Parameters

    obj

    VideoImportStatus object to be updated

  • current status of the video import

    Declaration

    Swift

    var status: VideoImportStatus { get }