Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-19 Thread Luca Bruno
On 18/03/2014 23:25, Lei Miao wrote: That worked! Thank you so much for the help! I still have a related question though: In the following function in the generated c code, static gchar**my_streaming_source_real_get_protocols (GstURIHandler* base, GType type, int* result_length1) {

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-18 Thread Luca Bruno
On 17/03/2014 20:29, Lei Miao wrote: Thanks for pointing out the typo. Unfortunately, it doesn't resolve the problem. Below is what I have right now in gstreamer-1.0.vapi: [CCode (cheader_filename = gst/gst.h, type_cname = GstURIHandlerInterface, type_id = gst_uri_handler_get_type ())]

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-18 Thread Lei Miao
That worked! Thank you so much for the help! I still have a related question though: In the following function in the generated c code, static gchar**my_streaming_source_real_get_protocols (GstURIHandler* base, GType type, int* result_length1) { MyStreamingSource * self; gchar**

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-17 Thread Luca Bruno
On 16/03/2014 22:33, Lei Miao wrote: Yes, I tried it, but it has no effect. I have the following in my vala code: ... [CCode (vfunc = get_type)] public URIType get_uri_type (Type type) { return URIType.SRC; } ... Is it what you recommended? Basically, the problem is that iface-get_type =...

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-17 Thread Lei Miao
Thanks for pointing out the typo. Unfortunately, it doesn't resolve the problem. Below is what I have right now in gstreamer-1.0.vapi: [CCode (cheader_filename = gst/gst.h, type_cname = GstURIHandlerInterface, type_id = gst_uri_handler_get_type ())] public interface URIHandler :

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-16 Thread Luca Bruno
I don't understand what you mean by gstreamer uses get_type, can you point to the specific C method? On Sat, Mar 15, 2014 at 4:05 PM, Lei Miao leimia...@gmail.com wrote: Thank you for the response. I could implement get_uri_type, but the problem is that gstreamer uses get_type. If I can

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-16 Thread Abderrahim Kitouni
Hi, I've looked at thé gst docs and the vfunc for get_uri_type is called get_type. HTH, On March 16, 2014 9:19:34 AM CET, Luca Bruno lethalma...@gmail.com wrote: I don't understand what you mean by gstreamer uses get_type, can you point to the specific C method? On Sat, Mar 15, 2014 at 4:05

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-16 Thread Luca Bruno
Try [CCode (vfunc = get_type)] or such, see gio vapi for some examples about read_fn. On Sun, Mar 16, 2014 at 10:05 AM, Abderrahim Kitouni a.kito...@gmail.comwrote: Hi, I've looked at thé gst docs and the vfunc for get_uri_type is called get_type. HTH, On March 16, 2014 9:19:34 AM CET,

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-16 Thread Lei Miao
Thank you for the information, but it doesn't seem to be related to my case. To be clear, I was referring to the following interface: struct GstURIHandlerInterface struct GstURIHandlerInterface { GTypeInterface parent; /* vtable */ /* querying capabilities */ GstURIType

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-16 Thread Lei Miao
Yes, I tried it, but it has no effect. I have the following in my vala code: ... [CCode (vfunc = get_type)] public URIType get_uri_type (Type type) { return URIType.SRC; } ... Is it what you recommended? Basically, the problem is that iface-get_type =... is missing in

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-15 Thread Lei Miao
Thank you for the response. I could implement get_uri_type, but the problem is that gstreamer uses get_type. If I can implement get_type in vala, then I don't have to modify gstreamer code. Regards, LM On Mar 14, 2014 5:30 PM, Luca Bruno lethalma...@gmail.com wrote: I don't understand why

[Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-14 Thread Lei Miao
Hi, I am trying to write a gstreamer 1.0 plugin using vala. However, I am having trouble to implement the get_type() method of the Gst.URIHandler interface defined here: http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstUriHandler.html#GstURIHandlerInterface.

Re: [Vala] How to implement the get_type method of Gst.URIHandler interface in vala?

2014-03-14 Thread Luca Bruno
I don't understand why you are using get_type. Implement get_uri_type. On Fri, Mar 14, 2014 at 10:21 PM, Lei Miao leimia...@gmail.com wrote: Hi, I am trying to write a gstreamer 1.0 plugin using vala. However, I am having trouble to implement the get_type() method of the Gst.URIHandler