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 584209 - Elementgen doesn't handle missing plugins
Elementgen doesn't handle missing plugins
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-sharp
git master
Other All
: Normal normal
: 0.9.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-05-29 15:01 UTC by Maarten Bosmans
Modified: 2009-09-11 08:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (2.26 KB, patch)
2009-05-29 15:03 UTC, Maarten Bosmans
reviewed Details | Review

Description Maarten Bosmans 2009-05-29 15:01:28 UTC
Please describe the problem:
Some of the GStreamer elements are missing on Windows, like xvimagesink, fdsink and fdsrc. If an element can't be found the build should just continue, but without generating the bindings for that plugin.

Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
The solution is twofold.

gst-xmlinspect gives an error if the plugin is not found, which interrupts the build process. So even if the plugin is not found, exit with 0.

The inspect/plugin.raw files for missing plugins are empty, which causes XML error for element-gen. The error message should go to stderr, so that it doesn't end up in the generated .cs file.
Comment 1 Maarten Bosmans 2009-05-29 15:03:07 UTC
Created attachment 135559 [details] [review]
proposed patch
Comment 2 Sebastian Dröge (slomo) 2009-05-29 15:03:37 UTC
Yes, gst-xmlinspect should only be called when calling make plugins-update. I'll fix this later, thanks.

Also the element bindings should return null / throw an exception if the native element couldn't be instantiated.
Comment 3 Sebastian Dröge (slomo) 2009-05-29 15:05:03 UTC
To fix the first part we simple need to fixup the dependencies in *plugins/Makefile.am, that should be simple.

The raw files are expected to be shipped in tarballs, etc.
Comment 4 Sebastian Dröge (slomo) 2009-05-29 20:07:44 UTC
commit 91945e2131a2e1df3d033f8000a1d5700acf8683
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Fri May 29 22:05:34 2009 +0200

    Remove gst-xmlinspect from the dependencies of the raw inspection files
    
    This should fix bug #584209.



Can you confirm?
Comment 5 Maarten Bosmans 2009-05-30 09:08:43 UTC
Yes, now the .raw files from git are used.
So the problem is solved

make plugins-update doesn't update the .raw files though, the .raw have to be deleted manually first. But may be this isn't much of a problem as you are the only one supposed to update them, right?

By the way, even if I don't need to execute gsts-xmlinspect.exe, I still think my proposed changes are sane, especially the usage of Console.Error.WriteLine().
Comment 6 Sebastian Dröge (slomo) 2009-05-30 09:11:44 UTC
Right, I'll merge them and fix make plugins-update too :)

I'll commit that later today...
Comment 7 Sebastian Dröge (slomo) 2009-05-30 11:49:43 UTC
commit 2ed4e4dd98b17ca2ca76e9e8499a27872013f700
Author: Maarten Bosmans <mkbosmans@gmail.com>
Date:   Sat May 30 13:42:05 2009 +0200

    Write error messages to stderr and fix a compiler warning
    
    Fixes bug #584209.

commit 8a0f18ca70be53472534b7d6baf30e3d899cfa5d
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Sat May 30 13:49:04 2009 +0200

    Make sure that make plugins-update always regenerates the element API XML fi
    
    Fixes bug #584209.