shogo4405/HaishinKit.dart

Adding VideoEffect in RTMPStreamHandler does not take effect

Closed this issue · 1 comments

Describe the bug

The breakpoint will be entered, but has no effect

To Reproduce

instance?.registerVideoEffect(MonochromeEffect())

final class MonochromeEffect: VideoEffect {
let filter: CIFilter? = CIFilter(name: "CIColorMonochrome")

override func execute(_ image: CIImage, info: CMSampleBuffer?) -> CIImage {
guard let filter: CIFilter = filter else {
return image
}
filter.setValue(image, forKey: "inputImage")
filter.setValue(CIColor(red: 0.75, green: 0.75, blue: 0.75), forKey: "inputColor")
filter.setValue(1.0, forKey: "inputIntensity")
return filter.outputImage!
}
}

Expected behavior

image has grayscale

Version

fork Version

Smartphone info.

No response

Additional context

No response

Screenshots

No response

Relevant log output

No response

I'm not sure. I cannot provide support for the parts that you have customized yourself and are not functioning. If it's not possible, let's give up.