Code Monkey home page Code Monkey logo

Comments (5)

pavouk avatar pavouk commented on June 8, 2024

Umm. Looks like gstreamer wants transfer of the input arguments, which is generally not recommended for use with gobject-introspection (and unsupported by lgi call marshalling code :-( ).

There is a possible workaround, adding overrides for all methods which consume the input arguments, something similar to
https://github.com/pavouk/lgi/blob/master/lgi/override/Pango.lua#L130

In the long term (I hope during this summer), I plan to have major rewrite of the marshaling system, so these atrocitities should be possible to handle better using overrides. I'm not sure if it is worth the effort to add ugly workarounds into Gst overrides roght now, given the longer-term plan...

from lgi.

pavouk avatar pavouk commented on June 8, 2024

Turned out that implementing transfer!=none on input objects in generic marshaller was much easier than I originally thought. Pushed to master, I don't see any warnings from gstreamer samples any more.

from lgi.

pavouk avatar pavouk commented on June 8, 2024

Turned out that implementing transfer!=none on input objects in generic marshaller was much easier than I originally thought. Pushed to master, I don't see any warnings from gstreamer samples any more.

from lgi.

pavouk avatar pavouk commented on June 8, 2024

gstreamer ownership is really thorny. There is only one thing which is sure: 0.10 is total failure with regard to gobject integration (gstminiobject, custom refsink, misunderstood transfer/floating interactions etc). It seems that all these issues are fixed in 0.11, but it is unfortunately not in widespread use yet, so we'll probably have to deal with 0.10.

I agree that the (transfer full) annotation on return types returning floatings are incorrect. But it seems to me that the annotations (transfer full) on input arguments are incorrect too, but those two incorrectnesses basically work together, resulting in some (albeit a bit fragile) equilibrium - at least after my patch allowing tranfer-full on input arguments the samples seem to run well. Please let me know if you don't agree with this.

As for your attempts to override callable information, I've just one word: congrats. I'm amazed that someone was able to understand that ugly twisted code of mine. The idea of __newindex on callable is very neat.

However, given that a) 0.11 seems to have fixed these issues consistently and b) I'm in the middle of the redesign of the whole callable/marshal/repo machinery, I'm inclined to leave things as is for now (unless some other problems with current scheme appears).

BTW: there is basically no difference between Buf:add_watch() and Buf._method:add_watch(). _method, _property etc serve mainly for categorization (and easier implementation of lazy loading from GI), but when accessed, they behave the same (Buf.add() has precedence before Buf._method.watch). There is another important effect of categorization - slowdown during symbol lookup :-(, and thus for 99% the category table will go away.

from lgi.

jkl1337 avatar jkl1337 commented on June 8, 2024

Lol... thanks

I missed your follow-up before I had done mine..... and then deleted it before I saw your response.

lgi might have accreted some overcomplexity in some places but I appreciate the complexity of gi and the task at hand. I like hacking on this and I really like overall what you've done here. I could go just go off and use lgob or some other wrapper thing :), but I prefer lgi.

from lgi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.