summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2021-02-12 15:40:33 +0100
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>2021-02-17 09:10:37 +0100
commit0ec17904e132f60e3c7a49fe065af26e56477beb (patch)
tree2cb2374d935fa1b1f50417c551db101b8ee6bb2d /sys
parent1ee9b202a6def211bc1081aa6b40464d0c258b52 (diff)
downloadgstreamer-plugins-bad-0ec17904e132f60e3c7a49fe065af26e56477beb.tar.gz
va: allocator: remove unused public functions
Deleted the public functions: gst_va_dmabuf_allocator_wait_for_memory() gst_va_allocator_wait_for_memory() And all the support for wait, cond in allocator's pool. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2013>
Diffstat (limited to 'sys')
-rw-r--r--sys/va/gstvaallocator.c61
-rw-r--r--sys/va/gstvaallocator.h4
2 files changed, 0 insertions, 65 deletions
diff --git a/sys/va/gstvaallocator.c b/sys/va/gstvaallocator.c
index 98c5fb0cb..36470de45 100644
--- a/sys/va/gstvaallocator.c
+++ b/sys/va/gstvaallocator.c
@@ -368,9 +368,6 @@ struct _GstVaMemoryPool
gint surface_count;
GMutex lock;
- GCond cond;
-
- gboolean flushing;
};
#define GST_VA_MEMORY_POOL_CAST(obj) ((GstVaMemoryPool *)obj)
@@ -383,9 +380,7 @@ gst_va_memory_pool_init (GstVaMemoryPool * self)
self->queue = gst_atomic_queue_new (2);
g_mutex_init (&self->lock);
- g_cond_init (&self->cond);
- self->flushing = FALSE;
self->surface_count = 0;
}
@@ -393,7 +388,6 @@ static void
gst_va_memory_pool_finalize (GstVaMemoryPool * self)
{
g_mutex_clear (&self->lock);
- g_cond_clear (&self->cond);
gst_atomic_queue_unref (self->queue);
}
@@ -433,25 +427,14 @@ static void
gst_va_memory_pool_flush (GstVaMemoryPool * self, GstVaDisplay * display)
{
GST_VA_MEMORY_POOL_LOCK (self);
-
- self->flushing = TRUE;
gst_va_memory_pool_flush_unlocked (self, display);
- self->flushing = FALSE;
-
- g_cond_broadcast (&self->cond);
-
GST_VA_MEMORY_POOL_UNLOCK (self);
}
static inline void
gst_va_memory_pool_push (GstVaMemoryPool * self, GstMemory * mem)
{
- GST_VA_MEMORY_POOL_LOCK (self);
-
gst_atomic_queue_push (self->queue, gst_memory_ref (mem));
- g_cond_signal (&self->cond);
-
- GST_VA_MEMORY_POOL_UNLOCK (self);
}
static inline GstMemory *
@@ -466,15 +449,6 @@ gst_va_memory_pool_peek (GstVaMemoryPool * self)
return gst_atomic_queue_peek (self->queue);
}
-static gboolean
-gst_va_memory_pool_wait_unlocked (GstVaMemoryPool * self)
-{
- while (gst_atomic_queue_length (self->queue) == 0 && !self->flushing)
- g_cond_wait (&self->cond, &self->lock);
-
- return !self->flushing;
-}
-
static inline guint
gst_va_memory_pool_surface_count (GstVaMemoryPool * self)
{
@@ -790,24 +764,6 @@ gst_va_dmabuf_allocator_prepare_buffer (GstAllocator * allocator,
return (surface != VA_INVALID_ID);
}
-gboolean
-gst_va_dmabuf_allocator_wait_for_memory (GstAllocator * allocator,
- GstBuffer * buffer)
-{
- GstVaDmabufAllocator *self = GST_VA_DMABUF_ALLOCATOR (allocator);
- VASurfaceID surface;
-
- GST_VA_MEMORY_POOL_LOCK (&self->pool);
- if (!gst_va_memory_pool_wait_unlocked (&self->pool)) {
- GST_VA_MEMORY_POOL_LOCK (&self->pool);
- return FALSE;
- }
- surface = gst_va_dmabuf_allocator_prepare_buffer_unlocked (self, buffer);
- GST_VA_MEMORY_POOL_UNLOCK (&self->pool);
-
- return (surface != VA_INVALID_ID);
-}
-
void
gst_va_dmabuf_allocator_flush (GstAllocator * allocator)
{
@@ -1433,23 +1389,6 @@ gst_va_allocator_prepare_buffer (GstAllocator * allocator, GstBuffer * buffer)
return (surface != VA_INVALID_ID);
}
-gboolean
-gst_va_allocator_wait_for_memory (GstAllocator * allocator, GstBuffer * buffer)
-{
- GstVaAllocator *self = GST_VA_ALLOCATOR (allocator);
- VASurfaceID surface;
-
- GST_VA_MEMORY_POOL_LOCK (&self->pool);
- if (!gst_va_memory_pool_wait_unlocked (&self->pool)) {
- GST_VA_MEMORY_POOL_UNLOCK (&self->pool);
- return FALSE;
- }
- surface = gst_va_allocator_prepare_buffer_unlocked (self, buffer);
- GST_VA_MEMORY_POOL_UNLOCK (&self->pool);
-
- return (surface != VA_INVALID_ID);
-}
-
void
gst_va_allocator_flush (GstAllocator * allocator)
{
diff --git a/sys/va/gstvaallocator.h b/sys/va/gstvaallocator.h
index 2dca1292c..23e06ee7e 100644
--- a/sys/va/gstvaallocator.h
+++ b/sys/va/gstvaallocator.h
@@ -36,8 +36,6 @@ gboolean gst_va_dmabuf_allocator_setup_buffer (GstAllocator * alloc
GstBuffer * buffer);
gboolean gst_va_dmabuf_allocator_prepare_buffer (GstAllocator * allocator,
GstBuffer * buffer);
-gboolean gst_va_dmabuf_allocator_wait_for_memory (GstAllocator * allocator,
- GstBuffer * buffer);
void gst_va_dmabuf_allocator_flush (GstAllocator * allocator);
gboolean gst_va_dmabuf_allocator_set_format (GstAllocator * allocator,
GstVideoInfo * info,
@@ -68,8 +66,6 @@ gboolean gst_va_allocator_setup_buffer (GstAllocator * alloca
GstBuffer * buffer);
gboolean gst_va_allocator_prepare_buffer (GstAllocator * allocator,
GstBuffer * buffer);
-gboolean gst_va_allocator_wait_for_memory (GstAllocator * allocator,
- GstBuffer * buffer);
void gst_va_allocator_flush (GstAllocator * allocator);
gboolean gst_va_allocator_set_format (GstAllocator * allocator,
GstVideoInfo * info,