If a codec is missing for playing some stream with GStreamer, WebKit should support calling the GStreamer codec installation infrastructure.
In short, a message is posted on the bus with information about missing stuff. WebKit should start the installation then and restart playback after things are installed. Also all following ERROR/WARNING messages after the missing plugin message should be dropped until playback is restarted.
I guess this should follow a policy decided by the application - some applications may want to never request installation of missing codecs. Looks like a good thing to start implementing our MediaPlayerClient, and our media player API for.
*** Bug 62088 has been marked as a duplicate of this bug. ***
I find this idea rather problematic. Users usually want their package manager to handle packages, not the application internally. I suggest to *not* implement this.
That's exactly the point of the GStreamer codec installation infrastructure. It will use a distribution specific script/application to install the codecs, which then use the distribution's package manager.
My apologies, I wasn't aware of that. However, I must insist that you shall not remove control from the user, nor do I approve of overly fancy auto-mechanisms.
But as I understood it, you also suggest that a message asks the user whether he wants to install Codec X/Y or not.
I then, to merge bug #62088 into this thread, suggest that
1) If neither the audio nor the video codec is installed, or either of them is not installed, a "Warning" icon appears in the place where the video would actually play, clicking it removes it and opens a context menu in which
a) The required codices can be viewed
b) The required codices can be installed by a click of the mouse
2) If all codecs are avaible, no warning appears but a context menu still provides information about which codices are in use.
*** Bug 69225 has been marked as a duplicate of this bug. ***
This should / could be fixed together with bug #34318: handling missing codecs should be one specific case of error/warning/info handling.
Created attachment 195748 [details]
Comment on attachment 195748 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=195748&action=review
Very simple and nice! Please fix the style issues when landing.
> +#include <gst/pbutils/missing-plugins.h>
Should be listed alphabetically in the list.
> + GstInstallPluginsReturn result = gst_install_plugins_async(&detail, 0, mediaPlayerPrivatePluginInstallerResultFunction, reinterpret_cast<gpointer>(this));
There's no cast necessary to go from a class pointer to void* and reinterpret_cast here can hide real errors, so please remove the cast.
> +#include <gst/pbutils/install-plugins.h>
Please list this alphabetically.
(In reply to comment #1)
> I guess this should follow a policy decided by the application - some applications may want to never request installation of missing codecs. Looks like a good thing to start implementing our MediaPlayerClient, and our media player API for.
For now I left this aside. Actually I'm not sure an application would ever want to not install codecs. If this is the case I think that if no codec-installer program is found nothing will be done anyway.
Looks good to me
Committed r147279: <http://trac.webkit.org/changeset/147279>