Fix playback with exotic gstreamer pipelines.

Extend the list of raw video formats, and allow the playbin flags to
be overridden by an environment variable when the default isn't
suitable for whatever reason.

Change-Id: I4c7d821b0ce29f5ad2dc0341e378ffd17c489e98
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
This commit is contained in:
Andrew den Exter
2013-12-10 17:59:52 +10:00
committed by The Qt Project
parent 61001f8dd5
commit b27913b76d

View File

@@ -83,6 +83,7 @@ typedef enum {
"video/x-raw-rgb; " \
"video/x-raw-gray; " \
"video/x-surface; " \
"video/x-android-buffer; " \
"audio/x-raw-int; " \
"audio/x-raw-float; " \
"text/plain; " \
@@ -140,7 +141,12 @@ QGstreamerPlayerSession::QGstreamerPlayerSession(QObject *parent)
#else
int flags = 0;
g_object_get(G_OBJECT(m_playbin), "flags", &flags, NULL);
QByteArray envFlags = qgetenv("QT_GSTREAMER_PLAYBIN_FLAGS");
if (!envFlags.isEmpty()) {
flags |= envFlags.toInt();
} else {
flags |= GST_PLAY_FLAG_NATIVE_VIDEO;
}
#endif
g_object_set(G_OBJECT(m_playbin), "flags", flags, NULL);