Thu 02 Jun 2016 08:23:11 AM UTC, original submission:
This is a follow-up of support https://savannah.gnu.org/support/?109027 and gnash-dev email conversations on May 26- June 1.
Problems:
- The call to gst_install_plugins_sync in libmedia/gst/GstUtil.cpp will not return if the plugin installer crashes.
- If the plugin installation is unsuccessful or the user cancels, gst_install_plugins_sync will be called repeatedly, making the movie unusable.
Flash file:
http://kids.discovery.com/files/games/pompeii/media/global.swf
OS:
Ubuntu 16.04 (64 bit) without the package gstreamer0.10-ffmpeg installed.
Scenario:
Downloaded the file above, ran gtk-gnash from the commandline with the file. The plugin installer attempts to install gstreamer0.10-ffmpeg, which is not in the ubuntu distribution. The plugin installer crashes at this point, which freezes the whole movie and has to be killed.
If I instead click cancel in the plugin installer dialog, the plugin installer is just called again and again, making the movie unusable.
Fix in the attached patch
- Changed the call to gst_install_plugins_async, as recommended by the gstremaer docs.
- Made the movie pause during plugin installation, and resume afterwards. The user may click "Play" on the screen at any time, e.g. if the installer crashes.
- Prevented any further install attempts after the user has once clicked cancel.
- Added dialogs for some of the different return values from the gst plugin installer: Informing the user about the consequence of plugin installation errors, and asking the user whether to restart the movie in case of successful installation.
To do the last part, I had to get hold of a movie_root object, which was not available in libmedia. I passed the object down all the calls from the classes in libcore/asobj, where it is available.
If you can use this code, it would be nice. Please tell me if there are issues or it's better if I send this in some other way.
Questions:
- Is there a better way to get access to movie_root or the gui? (Sandro Santili suggests using RunResources instead, but that would also have to be passed down the same path. I think.)
- Do the automatic pausing of the movie during plugin installation, and the added dialogs fit in the general user experience?
Cheers,
Dag Hovland
|