mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 07:38:16 +00:00
kmssink: Move kmsmem cache code higher
This will be needed as this API will be used elsewhere to clear the cache. https://bugzilla.gnome.org/show_bug.cgi?id=782774
This commit is contained in:
parent
b8c5a4c9ed
commit
98b91d09c2
1 changed files with 15 additions and 15 deletions
|
@ -488,6 +488,21 @@ ensure_allowed_caps (GstKMSSink * self, drmModeConnector * conn,
|
|||
return (self->allowed_caps && !gst_caps_is_empty (self->allowed_caps));
|
||||
}
|
||||
|
||||
static GstMemory *
|
||||
get_cached_kmsmem (GstMemory * mem)
|
||||
{
|
||||
return gst_mini_object_get_qdata (GST_MINI_OBJECT (mem),
|
||||
g_quark_from_static_string ("kmsmem"));
|
||||
}
|
||||
|
||||
static void
|
||||
set_cached_kmsmem (GstMemory * mem, GstMemory * kmsmem)
|
||||
{
|
||||
return gst_mini_object_set_qdata (GST_MINI_OBJECT (mem),
|
||||
g_quark_from_static_string ("kmsmem"), kmsmem,
|
||||
(GDestroyNotify) gst_memory_unref);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_kms_sink_start (GstBaseSink * bsink)
|
||||
{
|
||||
|
@ -1033,21 +1048,6 @@ event_failed:
|
|||
}
|
||||
}
|
||||
|
||||
static GstMemory *
|
||||
get_cached_kmsmem (GstMemory * mem)
|
||||
{
|
||||
return gst_mini_object_get_qdata (GST_MINI_OBJECT (mem),
|
||||
g_quark_from_static_string ("kmsmem"));
|
||||
}
|
||||
|
||||
static void
|
||||
set_cached_kmsmem (GstMemory * mem, GstMemory * kmsmem)
|
||||
{
|
||||
return gst_mini_object_set_qdata (GST_MINI_OBJECT (mem),
|
||||
g_quark_from_static_string ("kmsmem"), kmsmem,
|
||||
(GDestroyNotify) gst_memory_unref);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gst_kms_sink_import_dmabuf (GstKMSSink * self, GstBuffer * inbuf,
|
||||
GstBuffer ** outbuf)
|
||||
|
|
Loading…
Reference in a new issue