[gst-devel] speex ported to 0.9
Andy Wingo
wingo at pobox.com
Tue Oct 11 02:55:08 CEST 2005
Hi Edgard,
On Mon, 2005-10-10 at 19:32 -0300, Edgard Niceas Arcoverde Gusmao Lima
wrote:
> I ve ported speex to 0.9 (gst-plugins-good/ext/speex)
Wonderful!
> it could be good if someone take a look to see things that could be
> improved/fixed
1) Of course position querying should be implemented (call
gst_query_parse_position first)
2) Pay attention to all return values of gst_pad_push and
gst_pad_alloc_buffer, and make sure that these values propagate back to
the return value of your chain function.
3) The speexenc = GST_SPEEXENC (GST_PAD_PARENT (pad)); idiom is OK, but
better to do speexenc = GST_SPEEKENC (gst_pad_get_parent (pad)), because
this does proper locking. Then you have a reference on speexenc, which
you should drop (via gst_object_unref) at the end of your function.
4) if (GST_PAD_IS_USABLE (speexenc->srcpad)) {
gst_pad_push (speexenc->srcpad, buffer);
No need to check if it's "usable", just push and check the return
value. There is a return value for unlinked pads, one for a flushing
element (WRONG_STATE), etc.
Other than that it looks pretty good. My compiler is catching signedness
errors; will commit a patch shortly. (2) is a serious issue tho.
Thanks for the port,
--
Andy Wingo
http://wingolog.org/
More information about the gstreamer-devel
mailing list