GStreamer 1.0 backport from master branch.