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