[Bug 769293] vaapi/gl : Uploading to GL texture optimization
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Tue Sep 20 14:07:47 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=769293
Víctor Manuel Jáquez Leal <vjaquez at igalia.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #335888|none |needs-work
status| |
--- Comment #18 from Víctor Manuel Jáquez Leal <vjaquez at igalia.com> ---
Review of attachment 335888:
--> (https://bugzilla.gnome.org/review?bug=769293&attachment=335888)
Good!
Now I'm a bit worried about the duplicated code, either in
gstvaapidisplay_egl.c and gstvaapidisplay_glx.c
I'm wondering, what if a new "object" is created, an gstvaapiobject that wraps
GHashTable and the duplicated functions, and its methods will be
gst_vaapi_texture_map_{add, lookup, reset}, and its normal constructor and
destructor.
Now, GstVaapiDisplayGLX and GstVaapiDisplayEGL, will have and instance of this
new object, and a getter for this object, that will be a virtual function in
GstVaapiDisplay: gst_vaapi_display_get_texture_map(). And that should be the
only new virtual function.
Then, when the user ask for a new texture, the create_texture() vmethod would
look for the requested texture in the texture map, if the current
GstVaapiDisplay provides one, and if it is not, or the texture is not found
either, a new GstVaapiTexture is created, otherwise returns the found one.
What do you think?
--
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