[Bug 702960] gst_element_add_pad()'s pad parameter should be marked as transfer none

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jan 8 13:38:37 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=702960
  GStreamer | gstreamer (core) | git

--- Comment #27 from Christoph Reiter (lazka) <reiter.christoph at gmail.com> 2015-01-08 21:38:34 UTC ---
(In reply to comment #26)
> (In reply to comment #25)
> > I just noticed that gi already understands transfer-floating as an alias for
> > transfer-none in this case. So imho moving to transfer-floating should be a
> > good first step, independent of what the final solution is going to be. It adds
> > the needed documentation for C users and has the expected transfer type for
> > current bindings.
> 
> I thought (transfer floating) did only work for return values, not parameters.
> If it works for parameters we should definitely do that.

Seems this was unintentionally added in the patch for return values.
I've opened bug 742618 which adds a test to make sure it doesn't break.
Let's see how this works out..

> > Since you were worried (on IRC) about breaking bindings by moving to
> > transfer-none. I'd assume all scripting bindings sink_ref atm, and vala seems
> > to ref_sink as well, see this small example:
> > https://bpaste.net/show/65bdcb07bfff
> 
> I assume all current bindings are doing this because otherwise they would run
> into problems because GI is not expressive enough, and instead of fixing this
> gtk_container_add() and friends became (transfer none).
> 
> > I'd also like to add that currently none of the above functions really are
> > transfer-floating, as they don't sink the references in case of an error. Imo,
> > if you really want proper semantics, this should be fixed as well. This would
> > also need further changes as some functions depend on this error-case behavior.
> 
> Yes, those need to be fixed to have consistent behaviour on error cases too.
> There should be no difference in ownership transfer depending on error or not
> in any case.
> 
> Want to provide patches? :)

I can't promise anything.. maybe :)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list