Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a macro to help implement GstElements #32

Closed
wants to merge 4 commits into from

Conversation

thiblahute
Copy link

@thiblahute thiblahute commented Jul 20, 2022

(Includes #30 and #29)

Started to port some GStreamer elements to it here: https://gitlab.freedesktop.org/thiblahute/gst-plugins-rs/-/commits/port_to_gobject

Fixes: #25

We were overflowing when calculating the "generated_prop_id", let it be
negative when setting/getting a manually added property:

```
thread 'object_inner_methods' panicked at 'attempt to subtract with overflow', /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/ops/arith.rs:240:1
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/panicking.rs:142:14
   2: core::panicking::panic
             at /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/panicking.rs:48:5
   3: <usize as core::ops::arith::Sub>::sub
             at /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/ops/arith.rs:233:45
   4: <usize as core::ops::arith::Sub<&usize>>::sub
             at /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/internal_macros.rs:61:17
   5: <object::obj_inner::ObjInner as glib::subclass::object::ObjectImpl>::property
             at ./tests/object.rs:56:1
   6: glib::subclass::object::property
             at /var/home/thiblahute/devel/misc/gtk-rs-core/glib/src/subclass/object.rs:80:13
   7: g_object_get_property
   8: <T as glib::object::ObjectExt>::try_property_value
             at /var/home/thiblahute/devel/misc/gtk-rs-core/glib/src/object.rs:2515:13
   9: <T as glib::object::ObjectExt>::try_property
             at /var/home/thiblahute/devel/misc/gtk-rs-core/glib/src/object.rs:2485:20
  10: <T as glib::object::ObjectExt>::property
             at /var/home/thiblahute/devel/misc/gtk-rs-core/glib/src/object.rs:2493:9
  11: object::object_inner_methods
             at ./tests/object.rs:134:16
  12: object::object_inner_methods::{{closure}}
             at ./tests/object.rs:125:1
  13: core::ops::function::FnOnce::call_once
             at /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/ops/function.rs:248:5
  14: core::ops::function::FnOnce::call_once
             at /rustc/a8314ef7d0ec7b75c336af2c9857bfaf43002bfc/library/core/src/ops/function.rs:248:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
```
@thiblahute
Copy link
Author

I decided to move that into [gstreamer-rs itself])https://gitlab.freedesktop.org/thiblahute/gstreamer-rs/-/commits/gobject_macro) and openned #33 to make it possible.

Closing

@thiblahute thiblahute closed this Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support gstreamer
1 participant