-
Notifications
You must be signed in to change notification settings - Fork 52
Add a 'missing-plugin' signal to player #11
Conversation
Thanks for the patch but I'm not sure how useful that is in general. Wouldn't an application prefer some API that directly lets you install the plugins? |
Yeah, I should have talked about that... The gst API for this exists for two reasons :
and I only covered part 1 here because I wasn't going to do the actual installation myself anyway... but if you prefer that, I could include "installer_detail" string in the signal, so applications could then use gst_install_plugins_async () with that... |
IMHO ideally 1) should be solved by putting these information into the error or warning message that is posted after the missing-plugin messages, instead of providing a second API for a different kind of errors. |
I'm afraid I don't understand what you mean by "a second API for different kind of errors". I'll try to explain my suggestion more clearly: So the "installer_detail" I refer to would be from gst_missing_plugin_message_get_installer_detail() and is not really human readable (not for normal people anyway). So I think the best we can do for issue 1 is what I already provided. But the installer_detail might indeed be useful for applications that do want to start a plugin installation process to fix issue 2: I was proposing adding that string to the signal that is already in the patch. |
For 1), what we have already should be enough. There should be an error message that tells exactly what is missing, and if not that should be fixed 😄 With a second API I meant the "error" signal as the primary error API, and your new "missing-plugin" as a secondary API. For the installer stuff, I would prefer to abstract that a bit more so that people wouldn't have to use magic GStreamer API but that it would just do the right thing easily, and install plugins if needed and if allowed by the application. Without leaking the non-human readable details about things to the application. |
Oh, now I finally got what you meant. Let me try the error signal -- it should indeed be usable for this. |
Note that this error does not necessarily mean the playback has completely failed, but in practice the user experience will be bad (think, e.g. of a mp4 file where H.264 codec is missing: AAC playback still works...).
How about now? It uses "error" signal to achieve the same UX result. If you don't think this is worthwhile, that's fine too: but I'm happy to keep iterating if I can make this into something you'd like to take into upstream gst-player... |
Thanks, I'll take a look later. I definitely want to integrate something for this, but I'm also not completely sure yet about what API would be useful to have :) |
emit_error (self, g_error_new (GST_PLAYER_ERROR, | ||
GST_PLAYER_ERROR_MISSING_PLUGIN, "Missing plugin '%s'", desc)); | ||
g_free (desc); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is almost ok, but note that there can be multiple missing-plugin messages in theory. And only after the last one an error message is posted, or a warning message if only irrelevant plugins are missing and playback can continue.
I think you should accumulate all missing plugin messages and wait until the error or warning message (GST_CORE_ERROR_MISSING_PLUGIN or GST_STREAM_ERROR_CODEC_NOT_FOUND). And only if it's an error message, actually emit an error. As emitting an error will stop playback, which might not be needed.
In case of a warning message, it might make sense to add a warning signal that mirrors the error signal but has the big difference that it does not cause playback to stop.
See comments inside the commit, this is definitely going into the right direction now. Thanks for working on it 😄 |
Are you planning to continue working on this? |
Yes, I've just been distracted -- I think I can look at it later next week... (but feel free to just take what's there and modify if you want) |
Thanks, it's not urgent :) |
bb478ae
to
ecb3636
Compare
The commit that "closes" this didn't actually close it, but had a stack track in so closed all bugs 1 through 14. Reopen please! |
I notice I've promised things in this bug that I've not delivered on :/ I won't do anything about it in the next weeks. I'll try to fit it in the calendar later but won't mind if someone else grabs it. |
Also use the signal to notify user in both gst-play and gtk-play.
For gtk-play this means a GtkInfoBar that says e.g.
Missing plugin 'H.264 decoder'.
For gst-play it's just a g_warning() with same content.