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 744465 - install-plugins: add _set_desktop_id(), _set_startup_notification_id() and _set_confirm_search() API
install-plugins: add _set_desktop_id(), _set_startup_notification_id() and _s...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-02-13 12:47 UTC by Kalev Lember
Modified: 2015-02-15 16:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
install-plugins: Add API for passing desktop ID and startup ID (5.95 KB, patch)
2015-02-13 12:49 UTC, Kalev Lember
committed Details | Review
install-plugins: Add API to suppress confirmation before searching (3.78 KB, patch)
2015-02-13 12:49 UTC, Kalev Lember
committed Details | Review

Description Kalev Lember 2015-02-13 12:47:02 UTC
I've been looking into making missing gstreamer plugin installation work with gnome-software.

Currently, the missing plugin installation API is rather limited and only supports passing the XID of the app's window and no other details. The way this was used was that gnome-packagekit would use the app's window XID to to attach its own window as a transient child to the app's window.

In gnome-software, we would like to avoid doing that for a number of reasons, most of all because it can't work under Wayland.

I'd like to add some replacement missing plugin API to make it work without replying on the window XID. Attaching two patches for that.
Comment 1 Kalev Lember 2015-02-13 12:49:01 UTC
Created attachment 296772 [details] [review]
install-plugins: Add API for passing desktop ID and startup ID

The new gst_install_plugins_context_set_desktop_id() and
gst_install_plugins_context_set_startup_notification_id() API can be
used to pass extra details to the external installer process.
Comment 2 Kalev Lember 2015-02-13 12:49:17 UTC
Created attachment 296773 [details] [review]
install-plugins: Add API to suppress confirmation before searching

The new gst_install_plugins_context_set_confirm_search() API can be used
to pass a hint to modify the behaviour of the external installer
process.
Comment 3 Tim-Philipp Müller 2015-02-13 22:54:31 UTC
Thanks, that looks fine, pushed to master with minor changes (added "Since: 1.6" gtk-doc markers and ran gst-indent on the .c files):

commit 25abb5fd4d31cf8568bb4c650971bbc566a63e24
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Fri Feb 13 22:49:04 2015 +0000

    install-plugins: add new API to exports .def and to docs
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744465

commit 4d8f52eeef81a4b44af36d007dbeda157c5cec3f
Author: Kalev Lember <kalevlember@gmail.com>
Date:   Tue Feb 3 10:47:11 2015 +0100

    install-plugins: Add API to suppress confirmation before searching
    
    The new gst_install_plugins_context_set_confirm_search() API can be used
    to pass a hint to modify the behaviour of the external installer
    process.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744465

commit 538dc374c6899ae243831f134af2dbe9487bb48d
Author: Kalev Lember <kalevlember@gmail.com>
Date:   Mon Feb 2 16:16:46 2015 +0100

    install-plugins: Add API for passing desktop ID and startup ID
    
    The new gst_install_plugins_context_set_desktop_id() and
    gst_install_plugins_context_set_startup_notification_id() API can be
    used to pass extra details to the external installer process.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744465


I knew the day would come when we'll be glad we added that extra context thingy :)

Not entirely sure about the docs blurbfor gst_install_plugins_context_set_startup_notification_id(): it basically suggests this:

  startup_id = g_strdup_printf ("_TIME%u", gtk_get_current_event_time ());

which is not what the spec suggests, which has an additional hostname+pid prefix at the beginning, but I suppose it doesn't matter much in practice.
Comment 4 Kalev Lember 2015-02-15 16:54:54 UTC
Thanks for getting this in so quickly!