After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 680482 - GStreamer 1.0 bindings
GStreamer 1.0 bindings
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings: GTK+ GStreamer WebKitGTK+
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on: 678301
Blocks: 679412 680797
 
 
Reported: 2012-07-23 19:57 UTC by Evan Nemerson
Modified: 2012-08-20 08:46 UTC
See Also:
GNOME target: 3.6
GNOME version: 3.5/3.6


Attachments
Add gstreamer-1.0 core bindings. (208.06 KB, patch)
2012-07-23 20:00 UTC, Evan Nemerson
none Details | Review
Add gst-plugins-base-1.0 bindings. (148.67 KB, patch)
2012-07-23 20:01 UTC, Evan Nemerson
none Details | Review
Add gstreamer-1.0 core bindings. (210.37 KB, patch)
2012-07-28 18:11 UTC, Evan Nemerson
none Details | Review
Add gstreamer-1.0 core bindings. (215.39 KB, patch)
2012-08-13 08:05 UTC, Evan Nemerson
none Details | Review
Add gst-plugins-base 1.0 bindings. (297.89 KB, patch)
2012-08-13 08:06 UTC, Evan Nemerson
none Details | Review

Description Evan Nemerson 2012-07-23 19:57:55 UTC
We need GStreamer-1.0 bindings.
Comment 1 Evan Nemerson 2012-07-23 20:00:25 UTC
Created attachment 219527 [details] [review]
Add gstreamer-1.0 core bindings.

WIP for gstreamer-1.0 core.
Comment 2 Evan Nemerson 2012-07-23 20:01:01 UTC
Created attachment 219528 [details] [review]
Add gst-plugins-base-1.0 bindings.

WIP for gst-plugins-base-1.0
Comment 3 Jens Georg 2012-07-24 16:38:17 UTC
evan: You might want to adapt the EncodingContainerProfile.add_profile to owned: https://bugzilla.gnome.org/show_bug.cgi?id=680488
Comment 4 Jens Georg 2012-07-24 17:34:46 UTC
Review of attachment 219527 [details] [review]:

Some things I encountered while porting Rygel:

::: vapi/gstreamer-1.0.vapi
@@ +539,3 @@
+	[CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy", free_function = "g_boxed_free", type_id = "gst_buffer_get_type ()")]
+	[Compact]
+	public class Buffer : Gst.MiniObject {

Would be nice to have gst_buffer_map and gst_buffer_size wrapped as well (those are macros)

@@ +1893,3 @@
+	}
+	[CCode (cheader_filename = "gst/gst.h", has_type_id = false)]
+	public struct MapInfo {

There's an issue with this struct; vala tries to call gst_map_info_destroy on it which doesn't exist

@@ +1896,3 @@
+		public weak Gst.Memory memory;
+		public Gst.MapFlags flags;
+		public uint8 data;

That should be an array with the size being size
Comment 5 Jens Georg 2012-07-24 20:38:58 UTC
- the init_* functions are missing (gst_init, gst_init_get_option_group)
- add_pad_template from ElementClass is rather important for implementing sources/sinks
Comment 6 Evan Nemerson 2012-07-28 18:11:29 UTC
Created attachment 219797 [details] [review]
Add gstreamer-1.0 core bindings.

(In reply to comment #4)
> Review of attachment 219527 [details] [review]:
> 
> Some things I encountered while porting Rygel:

Thanks for testing :)

> 
> ::: vapi/gstreamer-1.0.vapi
> @@ +539,3 @@
> +    [CCode (cheader_filename = "gst/gst.h", copy_function = "g_boxed_copy",
> free_function = "g_boxed_free", type_id = "gst_buffer_get_type ()")]
> +    [Compact]
> +    public class Buffer : Gst.MiniObject {
> 
> Would be nice to have gst_buffer_map and gst_buffer_size wrapped as well (those
> are macros)

Changed the gst_buffer_* macros to functions in gstreamer, just waiting for them to merge (attached patch is based on the unmerged patch but should work fine).

> 
> @@ +1893,3 @@
> +    }
> +    [CCode (cheader_filename = "gst/gst.h", has_type_id = false)]
> +    public struct MapInfo {
> 
> There's an issue with this struct; vala tries to call gst_map_info_destroy on
> it which doesn't exist

Should only happen if data is an owned array, which AFAICT it shouldn't be.

> 
> @@ +1896,3 @@
> +        public weak Gst.Memory memory;
> +        public Gst.MapFlags flags;
> +        public uint8 data;
> 
> That should be an array with the size being size

Done, it's a weak uint8[] now.

(In reply to comment #5)
> - the init_* functions are missing (gst_init, gst_init_get_option_group)

gst_init was there already, but now gst_init_get_option_group is too.

> - add_pad_template from ElementClass is rather important for implementing
> sources/sinks

Done.  Just required fixing bug 666800.
Comment 7 Evan Nemerson 2012-08-13 08:05:56 UTC
Created attachment 220969 [details] [review]
Add gstreamer-1.0 core bindings.
Comment 8 Evan Nemerson 2012-08-13 08:06:26 UTC
Created attachment 220970 [details] [review]
Add gst-plugins-base 1.0 bindings.
Comment 9 Sebastian Pölsterl 2012-08-17 17:51:20 UTC
Thanks for your efforts to provide bindings for gstreamer-1.0. I was trying to compile a simple application and get the following:

error: Argument 1: Cannot pass unowned ref argument to owned reference parameter
  Gst.init(ref args);
           ^^^^^^^^
Comment 10 Evan Nemerson 2012-08-20 08:46:27 UTC
commit 24549e9535cbacf2784ff69923d4ac72c50387e7
Author: Evan Nemerson <evan@coeus-group.com>
Date:   Mon Aug 20 01:35:29 2012 -0700

    Add gst-plugins-base-1.0 bindings.

commit e643b8fad03c2cf96fc4c03acddc9aadba41dbe3
Author: Evan Nemerson <evan@coeus-group.com>
Date:   Mon Aug 20 01:30:38 2012 -0700

    Add gstreamer-1.0 core bindings.