You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class MyFilter: VideoConfigurationProtocol {
var filter: TestFilter!
public var setIntensity: CGFloat = 0.3
public init() { }
public func applyEffect(to sourceImage: CIImage, info: VideoConfigurationEffectInfo) -> CIImage {
var finalImage = sourceImage
filter = TestFilter()
filter.inputImage = finalImage
filter.intensity = setIntensity
finalImage = filter.outputImage!
return finalImage
}
}
Then when appending this class into trackItem.videoConfiguration.configurations, would there be a preferred method to adjust the setIntensity variable with a UISlider?
The text was updated successfully, but these errors were encountered:
You can call setIntensity anywhere you like, no preferred method. But be careful of multi-thread issue, the applyEffect method will be called on the render thread.
Basic example -
Then when appending this class into trackItem.videoConfiguration.configurations, would there be a preferred method to adjust the setIntensity variable with a UISlider?
The text was updated successfully, but these errors were encountered: