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 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 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 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 >>>> interface defined here: >>>> >>>> >http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gstreamer/html/gstreamer-GstUriHandler.html#GstURIHandlerInterface >>>> . >>>> >>>> In particular, my class inherits Gst.bin and implements >Gst.URIHandler >>>> interface: >>>> >>>> public class StreamingSource: Gst.Bin, Gst.URIHandler { >>>> >>>> ... >>>> >>>> public URIType get_type (Type type) { return URIType.SRC; } >>>> >>>> ... >>>> } >>>> >>>> When I compile the vala code to c code, I get the following error: >>>> >>>> StreamingSource.get_type hides inherited method >`GLib.Object.get_type'. >>>> Use >>>> the `new' keyword if hiding was intentional >>>> public URIType get_type (Type type) { return >>>> URIType.SRC; } >>>> >>>> The problem seems to be that GLib.Object also has a method called >>>> "get_type". So in this case, does anybody know how I can implement >the >>>> "get_type" method of Gst.URIHandler? >>>> >>>> It's worth noting that according to this link: >>>> http://references.valadoc.org/#!api=gstreamer-1.0/Gst.URIHandler , >the >>>> method is called get_uri_type() instead. This is inconsistent with >the >>>> gstreamer 1.0 reference manual. In fact, Gstreamer code has both >methods >>>> defined, but it uses get_type() for element registration. >>>> >>>> Regards, >>>> >>>> LM >>>> _______________________________________________ >>>> vala-list mailing list >>>> vala-list@gnome.org >>>> https://mail.gnome.org/mailman/listinfo/vala-list >>>> >>> >>> >>> >>> -- >>> www.debian.org - The Universal Operating System >>> >> > > >-- >www.debian.org - The Universal Operating System >_______________________________________________ >vala-list mailing list >vala-list@gnome.org >https://mail.gnome.org/mailman/listinfo/vala-list -- Sent from my Android device with K-9 Mail. Please excuse my brevity. _______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list