GNOME Bugzilla – Bug 632453
AppFilter element
Last modified: 2015-02-24 12:26:16 UTC
Created attachment 172602 [details] app filter implementaion Hi This is an early draft of a simple app-filter element. Its use is simple application controlled buffer filtering/modification. If you have any comments on flaws in the code they are more than welcome.
Created attachment 172604 [details] header file for the app filter
I think this should be more modeled after GstBaseTransform and then have the vfuncs as callbacks (and additionally signals to make bindings happy, similar to appsrc/appsink).
Wouldn't that limit what you can do with the element? I mean not all filter elements can be implemented using basetransform. So even if it might be nice to have an apptransform element it would still be good to have this appfilter for implementing things that cannot be done using basetransform.
What do you think can't be implemented with GstBaseTransform that can be implemented with this AppFilter element?
Correct me if I'm wrong but when I have tried the BaseTransform I have needed to know the size of the output buffer before the actual transform function. My task was to create an element which transformed from one format to XML format. I was forced away from BaseTransform then because there was no way I could know before the actual conversion how many bytes of data I needed to store the output XML. Unless of course I have missed something.
Yes, that's correct. For BaseTransform you have to know the output buffer size in advance. But that's something that would be worth changing in basetransform imho. Anyway, this appfilter element also needs some caps functions to get notified about new caps and to set caps for the output. And the filter vfunc should probably return a GstFlowReturn, which is then used in the chain function
Per, any updates on this ?
As far as I know the AppFilter was never developed to the level that would be required to hand it upstream. I am now working on another department and not involved in GStreamer work currently. Perhaps Jonas Holmberg can tell you the exact status of it since I have been out of touch for 2 years.
It seems to me that this can just as easily be done with pad probes now (in 1.0 you can replace the buffer in the pad probe with a different one), so I'd say let's close this for now.