https://bugzilla.gnome.org/show_bug.cgi?id=709417
Copied from gnome-media. See that module for git history.