Comments (5)
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.
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.
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.
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.
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)
- Example of how to implement *DBusInterfaceSkeleton* abstract class HOT 10
- Has this been abandoned? For me on v5.3 it doesn't work HOT 6
- Ability to keep out parameter as NULL HOT 8
- Does lgi support Gtk4? HOT 24
- How to emit signals on an object HOT 26
- GVariant dictionnaries returned from GDBus method calls and signals are empty HOT 4
- Errors in callbacks don't terminate the loop HOT 4
- Segmentation fault in Gio.File.copy_async HOT 7
- API reference such as https://lazka.github.io/pgi-docs/? HOT 2
- Misaligned memory accesses in marshal_2c_int and marshal_2lua_int HOT 2
- Building in Windows with meson is looking for luajit-5.1.lib HOT 3
- GtkContainer.child SIGSEGVs on access HOT 5
- How to connect signal on derived class of GstBin? HOT 5
- Segmentation fault when using netwok manager HOT 1
- Segmentation fault when using upower and playerctl interfaces HOT 1
- push to luarocks HOT 14
- Fails to install on fedora 36, Lua 5.4-1 HOT 5
- install error HOT 3
- _resolve can cause luajit to segmentation fault
- Cannot import Glib HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lgi.