[Bug 769293] vaapi/gl : Uploading to GL texture optimization

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Sep 21 03:04:32 UTC 2016


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

--- Comment #19 from Hyunjun Ko <zzoon at igalia.com> ---
(In reply to Víctor Manuel Jáquez Leal from comment #18)
> Review of attachment 335888 [details] [review]:
> 
> 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.

Good idea! I don't like this kind of duplicated code either.


> 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?

This approach might keep gst_vaapi_texture_upload as-is.
I like this idea. Only thing that i wonder is the name "create_texture" doesn't
only mean create any more, but get, which is a little bit ambiguous to read.
But since it's internal function, I'm ok too :)

-- 
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