static gboolean gst_vaapi_decode_bin_reconfigure (GstVaapiDecodeBin* vaapidecbin) { if (!ensure_vpp (vaapidecbin)) return FALSE; return activate_vpp (vaapidecbin); }
static void gst_vaapi_decode_bin_handle_message (GstBin * bin, GstMessage * message) { GstVaapiDecodeBin *vaapidecbin = GST_VAAPI_DECODE_BIN (bin); GstMessageType type; GstContext *context = NULL; const gchar *context_type; GstVaapiDisplay *display = NULL; type = GST_MESSAGE_TYPE (message); if (type != GST_MESSAGE_HAVE_CONTEXT) goto bail; gst_message_parse_have_context (message, &context); if (!context) goto bail; context_type = gst_context_get_context_type (context); if (g_strcmp0 (context_type, GST_VAAPI_DISPLAY_CONTEXT_TYPE_NAME) != 0) goto bail; if (!gst_vaapi_video_context_get_display (context, &display)) goto bail; vaapidecbin->has_vpp = gst_vaapi_display_has_video_processing (display); /* the underlying VA driver implementation doesn't support video * post-processing, hence we have to disable it */ if (!vaapidecbin->has_vpp) { GST_WARNING_OBJECT (vaapidecbin, "VA driver doesn't support VPP"); if (!vaapidecbin->disable_vpp) { vaapidecbin->disable_vpp = TRUE; g_object_notify_by_pspec (G_OBJECT (vaapidecbin), properties[PROP_DISABLE_VPP]); } } activate_vpp (vaapidecbin); bail: GST_BIN_CLASS (gst_vaapi_decode_bin_parent_class)->handle_message (bin, message); }