[gst-devel] gst_base_transform_set_passthrough and reversed effect
Stefan Kost
ensonic at hora-obscura.de
Sat Apr 15 13:31:03 CEST 2006
hi,
in my app I sometime would like to bypass fxcalculation. These FX are
gst_basetransform subclasses.
To active bypass-mode I call
gst_base_transform_set_passthrough(GST_BASE_TRANSFORM(element),TRUE);
As of gstbasetransform.c 1304 - 1316 the elements transform_ip method
will then get a read-only buffer. Thus I've added the following code to
my transform_ip routine:
static GstFlowReturn
gst_xyz_transform_ip (GstBaseTransform * base, GstBuffer * outbuf)
{
...
if (!gst_buffer_is_writable (outbuf)) return GST_FLOW_OK;
Before I've added this code calling gst_base_transform_set_passthrough()
had no effect at all. Now with the !gst_buffer_is_writable() checking it
work the wrong way around. After creating the element I set passthrough
to FALSE. After playing I don't here the effect though. When I then set
passthough to TRUE, I hear the effect.
Any good idea whats going on here. Worth to file a bug-report or am I
doing something wrong.
Happy easter!
Stefan
PS.: as a sidenote, shouldn't gstvolume have this !
gst_buffer_is_writable() check as well, there
gst_base_transform_set_passthrough() has no effect at all.
More information about the gstreamer-devel
mailing list