[Bug 796470] vaapidisplay: remove calling gst_vaapi_display_new in each descendant.

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Thu Jun 7 09:28:11 UTC 2018


https://bugzilla.gnome.org/show_bug.cgi?id=796470

Víctor Manuel Jáquez Leal <vjaquez at igalia.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #372502|none                        |reviewed
             status|                            |

--- Comment #9 from Víctor Manuel Jáquez Leal <vjaquez at igalia.com> ---
Review of attachment 372502:
 --> (https://bugzilla.gnome.org/review?bug=796470&attachment=372502)

finally, perhaps it would be nice remove gst_vaapi_display_new() to avoid
confusion.

::: gst-libs/gst/vaapi/gstvaapidisplay.c
@@ +1378,3 @@

+void
+gst_vaapi_display_set_display (GstVaapiDisplay * display, VADisplay
va_display)

As far as I understand, this is not enough, since it is required to update all
the private data using the vmethod get_display_info()

Something like this:

    GstVaapiDisplayInfo info = { NULL, };
    GstVaapiDisplayClass *const klass = GST_VAAPI_DISPLAY_GET_CLASS (display);

    if (klass->get_display && !klass->get_display (display, &info))
      return FALSE;

    priv->display = info.va_display;
    priv->native_display = info.native_display;
    g_free (priv->display_name);
    priv->display_name = g_strdup (info.display_name);

Also, this function can be reused by gst_vaapi_display_setup() (aka
gst_vaapi_display_create())

::: gst-libs/gst/vaapi/gstvaapidisplay_priv.h
@@ +205,3 @@

+gboolean
+gst_vaapi_display_create (GstVaapiDisplay * display,

I would rename this function to gst_vaapi_display_setup()

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list