/** * gst_vaapi_plugin_base_ensure_display: * @plugin: a #GstVaapiPluginBase * * Ensures the display stored in @plugin complies with the requested * display type constraints. * * Returns: %TRUE if the display was created to match the requested * type, %FALSE otherwise. */ gboolean gst_vaapi_plugin_base_ensure_display (GstVaapiPluginBase * plugin) { if (gst_vaapi_plugin_base_has_display_type (plugin, plugin->display_type_req)) return TRUE; gst_vaapi_display_replace (&plugin->display, NULL); if (!gst_vaapi_ensure_display (GST_ELEMENT (plugin), plugin->display_type_req)) return FALSE; plugin->display_type = gst_vaapi_display_get_display_type (plugin->display); GST_VAAPI_PLUGIN_BASE_GET_CLASS (plugin)->display_changed (plugin); return TRUE; }
static inline gboolean gst_vaapidecode_ensure_display(GstVaapiDecode *decode) { return gst_vaapi_ensure_display(decode, GST_VAAPI_DISPLAY_TYPE_ANY, &decode->display); }