I have an AVMutableComposition with two tracks (one for video and audio each) that combines multiple videos (as segments: AVCompositionTrackSegment) for playback. I have to apply filters on selected videos and not on the whole composition (lets say on 2nd and 4th segment when I have total 4 segments). For example if user selects to apply a filter on video 2 then I apply that filter for the respective duration of composition using AVMutableVideoComposition(asset: AVAsset, applyingCIFiltersWithHandler: (AVAsynchronousCIImageFilteringRequest) -> Void). It is working fine.
Now I want to use some custom filters, created using GPUImage library. So my question is does GPUImage has an API to apply filters on a selected segment or for a specific duration of AVMutableComposition? So that I can use both CIFilter for built-in and GPUImage for custom filters.