playbin2: Make sure that the decoders we plug are compatible with the fixed sink
authorThibault Saunier <thibault.saunier@collabora.com>
Fri, 30 Sep 2011 15:29:34 +0000 (12:29 -0300)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Mon, 3 Oct 2011 13:17:54 +0000 (15:17 +0200)
commita123195dd0ef850b65a87724d60a25061bb1e14d
tree1cf80c0d4db059840f05fb2363ba96d8f86e7a15
parent93900d47edfa358e7189d002445db060e2bb3f42
playbin2: Make sure that the decoders we plug are compatible with the fixed sink

The fact that a decoder is not compatible with the fixed sink
is currently happenning in the case where we have hardware accelerated
video decoders on the system (especially vaapi elements that are actually plugged),
and the user is providing a sink that doesn't support the surface.

A simple example that shows how it used to crash on a system where gstreamer-vaapi
is installed:
    gst-launch playbin2 video-sink=xvimagesink uri=/codec/supported/by/vaapi

What we are now doing in this case, is avoid using the accelerated
decoder and plug a "normal" decoder instead (if avalaible).

This commit doesn't handle the case where we have hardware accelerated
demuxing.
gst/playback/gstplaybin2.c