GNOME Bugzilla – Bug 586463
Building gstreamer-sharp gives a lot of warnings
Last modified: 2009-09-11 08:52:18 UTC
In different phases of the build process (gapi-fixup, gapi-gen, csc) there are a lot of warnings. Some of these are useful pointers to things that should be fixed, others can be ignored.
Created attachment 137061 [details] [review] Avoid some C# compiler warnings Most csc warnings are about hidden members for the base class. This patch adresses these.
Created attachment 137062 [details] [review] Avoid some C# compiler warnings Most csc warnings are about hidden members for the base class. This patch adresses these.
Created attachment 137063 [details] [review] Add GstIterator generated code This patch is more about replacing custom code with generated code. It resolves some gapi-gen warnings about it not knowing about the GstIterator type.
Created attachment 137064 [details] [review] Update Gstreamer.metadata This patch mainly uses some xpath syntax to avoid a couple of warnings from the fixup/generator. Note that it adds a line for GST_PADDING/2, is this correct? With this patch there is only one (rather nontrivial) reference to GST_PADDING left after fixup.
(In reply to comment #1) > Created an attachment (id=137061) [edit] > Avoid some C# compiler warnings > > Most csc warnings are about hidden members for the base class. This patch > adresses these. Except one part this is not correct: + <attr path="/api/namespace/object[@cname='GstBaseSrc']/virtual_method[@cname='query']" name="hidden">1</attr> The query vm of GstBaseSrc is different from the query vm of GstElement. How do we fix this? :) (In reply to comment #3) > Created an attachment (id=137063) [edit] > Add GstIterator generated code > > This patch is more about replacing custom code with generated code. > It resolves some gapi-gen warnings about it not knowing about the GstIterator > type. Good idea :) But you need to store the Iterator inside the private Enumerator, otherwise the Iterator might get GC'd before the Enumerator and the Enumerator would then crash next time a native function is called.
Created attachment 137089 [details] [review] Add GstIterator generated code v2 This patch stores the Iterator in the Enumerator to prevent it from being GCed.
> Except one part this is not correct: > + <attr path="/api/namespace/object[@cname='GstBaseSrc']/virtual_method > [@cname='query']" name="hidden">1</attr> > > The query vm of GstBaseSrc is different from the query vm of GstElement. > How do we fix this? :) Hmm, if that is the case the GstBaseSrc.Query method should be marked with the new keyword. But I don't think that it's possible to add this to autogenerated code, like it is with the acces modifier by doing something like <attr name="access">private</attr>. I think that we should leave it as it was. So if you would just leave this part out of the patch when applying it, that would be great. I then just have to live with the compiler warning about it.
Thanks, it's all committed now. And I've renamed BaseSrc.Query to .SrcQuery to prevent the conflict (you might want to override both in a subclass).