From 1b76561d958461d5daba9fed712f06660c45d645 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 14 Jul 2015 19:39:20 +0200 Subject: [PATCH] vaapidecoder: no wmv profiles gstreamer 1.4/1.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fix the auto-plugging problem in gstreamer 1.2 and gstreamer 1.4 Right now there is not a primary ranked parser for vc1 and the demuxers delivers caps without specifying the profile. This situation is not an issue for avdec_vc1 but for vaapidecode it is, which refuses to negotiate without a explicit profile defined in the negotiated caps. Nonetheless, in gstreamer 1.5 it seems not to be a problem since the negotiation admits caps subsets try outs. This patch solves the issue ignoring the profile negotiation in the caps. For gstreamer < 1.5 the profile string is not handled, so the auto-plugging get done without the vc1 parser, such as happens in gstreamer 1.5. Signed-off-by: Víctor Manuel Jáquez Leal --- gst-libs/gst/vaapi/gstvaapiprofile.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gst-libs/gst/vaapi/gstvaapiprofile.c b/gst-libs/gst/vaapi/gstvaapiprofile.c index a6f9e98a59..731bee3674 100644 --- a/gst-libs/gst/vaapi/gstvaapiprofile.c +++ b/gst-libs/gst/vaapi/gstvaapiprofile.c @@ -121,6 +121,7 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = { "video/x-h264", "stereo-high" }, #endif +#if GST_CHECK_VERSION(1,5,0) { GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple, "video/x-wmv, wmvversion=3", "simple" }, @@ -130,6 +131,17 @@ static const GstVaapiProfileMap gst_vaapi_profiles[] = { { GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced, "video/x-wmv, wmvversion=3, format=(string)WVC1", "advanced" }, +#else + { GST_VAAPI_PROFILE_VC1_SIMPLE, VAProfileVC1Simple, + "video/x-wmv, wmvversion=3", NULL + }, + { GST_VAAPI_PROFILE_VC1_MAIN, VAProfileVC1Main, + "video/x-wmv, wmvversion=3", NULL + }, + { GST_VAAPI_PROFILE_VC1_ADVANCED, VAProfileVC1Advanced, + "video/x-wmv, wmvversion=3, format=(string)WVC1", NULL + }, +#endif #if VA_CHECK_VERSION(0,32,0) { GST_VAAPI_PROFILE_JPEG_BASELINE, VAProfileJPEGBaseline, "image/jpeg", NULL