GNOME Bugzilla – Bug 316801
new plugin: gst-fakefilter
Last modified: 2005-09-21 18:52:39 UTC
http://cornsyrup.org/~jason/gst-fakefilter.tar.gz I'd like to see this plugin or at least the functionality included in gstreamer. I use it for specialized applications which can't be or don't need to be their own plugin such as audio fingerprinting and file hashing. I think it would also be useful for prototyping plugins or testing algorithms before taking the time to develop a full plugin. Very over simplified example of usage: pipeline = gst_parse_launch("filesrc ! fakefilter name=hash_filter ! asfdemux name=tag ! fakesink"); hash_filter = gst_bin_get_by_name(GST_BIN(pipeline->pipeline), "hash_filter"); g_signal_connect(hash_filter, "chain", G_CALLBACK(filter_chain_cb), pipeline); void filter_chain_cb(GstElement* filter, GstPad *srcpad, GstPad *sinkpad, GstData *data, State *state) { GstBuffer *buf = GST_BUFFER(data); sha1_update(&state->sha1_ctx, GST_BUFFER_DATA(buf), GST_BUFFER_SIZE(buf)); }
homeas told me in #gstreamer that there are better ways of doing this now, so i'll try to reimplement my code with his suggestions and then withdraw this request.
Yes, you should use probes to do such things. filesrc ! somefilter ! fakesink Attach a probe to the src pad of "somefilter" and do whatever you want with the buffer :) If you don't want to change a lot in your program the "identity" plugin has a "handoff" signal that can be useful to you! Closing the bug, please reopen if you really need an element!