Make QGstreamerPlayerSession 'VAAPI-aware'.

At the moment the GStreamer player pipeline is not setup properly when
the VAAPI plugin is available, resulting in no video being shown.

Added 'video/x-surface' as one of the default raw formats for the
decodebin.
Don't use vaapidecode when the video sink is not compatible.

This is a preliminary patch to support VAAPI. In the current state
vaapidecode will never be used as none of our video sinks support the
video/x-surface format.

Change-Id: I39f339b483d4052dd1e29c2b0ef06343d5670224
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
This commit is contained in:
Yoann Lopes
2012-10-11 19:19:31 +02:00
committed by The Qt Project
parent bce5525cbb
commit abcc107731
2 changed files with 86 additions and 0 deletions

View File

@@ -66,6 +66,12 @@ class QGstreamerVideoRendererInterface;
class QGstreamerVideoProbeControl;
class QGstreamerAudioProbeControl;
typedef enum {
GST_AUTOPLUG_SELECT_TRY,
GST_AUTOPLUG_SELECT_EXPOSE,
GST_AUTOPLUG_SELECT_SKIP
} GstAutoplugSelectResult;
class QGstreamerPlayerSession : public QObject,
public QGstreamerBusMessageFilter
{
@@ -182,6 +188,7 @@ private:
static void insertColorSpaceElement(GstElement *element, gpointer data);
static void handleElementAdded(GstBin *bin, GstElement *element, QGstreamerPlayerSession *session);
static void handleStreamsChange(GstBin *bin, gpointer user_data);
static GstAutoplugSelectResult handleAutoplugSelect(GstBin *bin, GstPad *pad, GstCaps *caps, GstElementFactory *factory, QGstreamerPlayerSession *session);
void processInvalidMedia(QMediaPlayer::Error errorCode, const QString& errorString);