media: Convince gstreamer to deliver GL memory

Use a glsinkbin to make gstreamer deliver GL memory.
This commit is contained in:
Matthias Clasen 2021-01-01 11:31:49 -05:00
parent 7901ab857b
commit 53fe751371

View File

@ -115,11 +115,18 @@ gtk_gst_paintable_video_renderer_create_video_sink (GstPlayerVideoRenderer *rend
GstPlayer *player) GstPlayer *player)
{ {
GtkGstPaintable *self = GTK_GST_PAINTABLE (renderer); GtkGstPaintable *self = GTK_GST_PAINTABLE (renderer);
GstElement *sink, *glsinkbin;
return g_object_new (GTK_TYPE_GST_SINK, sink = g_object_new (GTK_TYPE_GST_SINK,
"paintable", self, "paintable", self,
"gl-context", self->context, "gl-context", self->context,
NULL); NULL);
glsinkbin = gst_element_factory_make ("glsinkbin", NULL);
g_object_set (glsinkbin, "sink", sink, NULL);
return glsinkbin;
} }
static void static void