diff options
author | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2015-11-11 16:33:24 +0100 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2015-11-16 16:07:07 +0100 |
commit | ce3d1a6203330d6a2110797dc89709605c4c9282 (patch) | |
tree | 060409f1d0dc9fc1a495aa071871b44e20b2d15c | |
parent | 8ee23ffd967b65f244ed5c72dadf8b3e1b374b6c (diff) | |
download | gst-vaapi-ce3d1a6203330d6a2110797dc89709605c4c9282.tar.gz |
vaapidecodebin: delay the bin configuration
Delay the bin configuration until changing to READY state. This is because we
should add the vaapipostproc element until the vaapidecode has emitted the
HAVE_CONTEXT message, so de gst_bin_add() could set the context set to
vaapipostproc.
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 | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gst/vaapi/gstvaapidecodebin.c b/gst/vaapi/gstvaapidecodebin.c index 4baec20b..edde5c80 100644 --- a/gst/vaapi/gstvaapidecodebin.c +++ b/gst/vaapi/gstvaapidecodebin.c @@ -194,10 +194,16 @@ ensure_vpp (GstVaapiDecodeBin * vaapidecbin) gst_vaapi_display_unref (display); - if (!activate_vpp (vaapidecbin)) + return TRUE; +} + +static gboolean +gst_vaapi_decode_bin_reconfigure (GstVaapiDecodeBin* vaapidecbin) +{ + if (!ensure_vpp (vaapidecbin)) return FALSE; - return TRUE; + return activate_vpp (vaapidecbin); } static void @@ -311,8 +317,6 @@ gst_vaapi_decode_bin_handle_message (GstBin * bin, GstMessage * message) } } - activate_vpp (vaapidecbin); - bail: if (display) gst_vaapi_display_unref (display); @@ -343,7 +347,7 @@ gst_vaapi_decode_bin_change_state (GstElement * element, switch (transition) { case GST_STATE_CHANGE_NULL_TO_READY: - if (!ensure_vpp (vaapidecbin)) + if (!gst_vaapi_decode_bin_reconfigure (vaapidecbin)) return GST_STATE_CHANGE_FAILURE; break; default: |