diff options
author | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2015-11-12 12:47:01 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2015-11-16 16:07:07 +0100 |
commit | 7c71ffccc04094b134437daad3571950a503ad65 (patch) | |
tree | 5608832995e681015ab86d18668f27e5d7627042 | |
parent | bd4395ce9f2bf037a86cd9597b4b22b652e61e8c (diff) | |
download | gst-vaapi-7c71ffccc04094b134437daad3571950a503ad65.tar.gz |
vaapidecodebin: try to get display from decoder
Rather than create a dummy display, if none has propagated as a context, we
should try to get the one from vaapidecode.
As the bin is already in READY state, the vaapidecode should be also in that
state. That means that the contexts have been negotiated, and it should have
already a display.
Signed-off-by: Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=757957
-rw-r--r-- | gst/vaapi/gstvaapidecodebin.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gst/vaapi/gstvaapidecodebin.c b/gst/vaapi/gstvaapidecodebin.c index 635cdf3b..e0858e39 100644 --- a/gst/vaapi/gstvaapidecodebin.c +++ b/gst/vaapi/gstvaapidecodebin.c @@ -28,6 +28,7 @@ #include "gstvaapipluginutil.h" #include "gstvaapidecodebin.h" #include "gstvaapivideocontext.h" +#include "gstvaapipluginbase.h" #define GST_PLUGIN_NAME "vaapidecodebin" #define GST_PLUGIN_DESC "A Bin of VA-API elements: vaapidecode ! queue ! vaapipostproc" @@ -197,8 +198,14 @@ ensure_vpp (GstVaapiDecodeBin * vaapidecbin) if (vaapidecbin->has_vpp != HAS_VPP_UNKNOWN) return TRUE; - GST_INFO_OBJECT (vaapidecbin, "Creating a dummy display to test for vpp"); - display = gst_vaapi_create_test_display (); + display = GST_VAAPI_PLUGIN_BASE_DISPLAY (vaapidecbin->decoder); + if (display) { + GST_INFO_OBJECT (vaapidecbin, "Got display from vaapidecode"); + gst_vaapi_display_ref (display); + } else { + GST_INFO_OBJECT (vaapidecbin, "Creating a dummy display to test for vpp"); + display = gst_vaapi_create_test_display (); + } if (!display) return FALSE; |