subscribeTo

abstract fun subscribeTo(requirements: MediaProcessor.Input.Requirements, onResult: Consumer<MediaProcessor.Input.Result>): Closeable

Subscribes to the provided onResult to be notified when a new Result is available for this input. The subscriber specifies its Requirements that must be taken into account when selecting media items to pass as a Result to make sure that subscriber receives expected media data. The returned Closeable must be closed when done working with this input otherwise underlying resources will be leaked.