After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316801 - new plugin: gst-fakefilter
new plugin: gst-fakefilter
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins
0.8.x
Other Linux
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-20 19:05 UTC by Jason Toffaletti
Modified: 2005-09-21 18:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jason Toffaletti 2005-09-20 19:05:43 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));
}
Comment 1 Jason Toffaletti 2005-09-20 20:32:29 UTC
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.
Comment 2 Luca Ognibene 2005-09-21 18:52:39 UTC
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!