2012-10-22 08:13:20 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2009-2010 Edward Hervey <bilboed@bilboed.com>
|
|
|
|
*
|
|
|
|
* gstqueuearray.h:
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2012-10-22 08:13:20 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
|
|
|
#ifndef __GST_QUEUE_ARRAY_H__
|
|
|
|
#define __GST_QUEUE_ARRAY_H__
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
#include <gst/base/base-prelude.h>
|
|
|
|
|
2017-03-24 12:21:30 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
2014-06-26 17:30:52 +00:00
|
|
|
/**
|
|
|
|
* GstQueueArray: (skip)
|
|
|
|
*/
|
2012-10-22 08:13:20 +00:00
|
|
|
typedef struct _GstQueueArray GstQueueArray;
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
GstQueueArray * gst_queue_array_new (guint initial_size);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
void gst_queue_array_free (GstQueueArray * array);
|
|
|
|
|
2018-09-27 14:30:25 +00:00
|
|
|
GST_BASE_API
|
|
|
|
void gst_queue_array_set_clear_func (GstQueueArray *array,
|
|
|
|
GDestroyNotify clear_func);
|
|
|
|
|
|
|
|
GST_BASE_API
|
|
|
|
void gst_queue_array_clear (GstQueueArray * array);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
gpointer gst_queue_array_pop_head (GstQueueArray * array);
|
2017-05-09 15:19:31 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
gpointer gst_queue_array_peek_head (GstQueueArray * array);
|
|
|
|
|
2018-04-11 13:38:36 +00:00
|
|
|
GST_BASE_API
|
|
|
|
gpointer gst_queue_array_peek_nth (GstQueueArray * array, guint idx);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2018-02-01 18:29:27 +00:00
|
|
|
gpointer gst_queue_array_pop_tail (GstQueueArray * array);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2018-02-01 18:29:27 +00:00
|
|
|
gpointer gst_queue_array_peek_tail (GstQueueArray * array);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
void gst_queue_array_push_tail (GstQueueArray * array,
|
|
|
|
gpointer data);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
gboolean gst_queue_array_is_empty (GstQueueArray * array);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
gpointer gst_queue_array_drop_element (GstQueueArray * array,
|
|
|
|
guint idx);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
guint gst_queue_array_find (GstQueueArray * array,
|
|
|
|
GCompareFunc func,
|
|
|
|
gpointer data);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2012-10-22 08:13:20 +00:00
|
|
|
guint gst_queue_array_get_length (GstQueueArray * array);
|
|
|
|
|
2015-05-30 12:07:50 +00:00
|
|
|
/* Functions for use with structures */
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2015-05-30 12:07:50 +00:00
|
|
|
GstQueueArray * gst_queue_array_new_for_struct (gsize struct_size,
|
|
|
|
guint initial_size);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2015-05-30 12:07:50 +00:00
|
|
|
void gst_queue_array_push_tail_struct (GstQueueArray * array,
|
|
|
|
gpointer p_struct);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2015-05-30 12:07:50 +00:00
|
|
|
gpointer gst_queue_array_pop_head_struct (GstQueueArray * array);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2015-05-30 12:07:50 +00:00
|
|
|
gpointer gst_queue_array_peek_head_struct (GstQueueArray * array);
|
|
|
|
|
2018-04-11 13:38:36 +00:00
|
|
|
GST_BASE_API
|
|
|
|
gpointer gst_queue_array_peek_nth_struct (GstQueueArray * array, guint idx);
|
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2015-05-30 12:07:50 +00:00
|
|
|
gboolean gst_queue_array_drop_struct (GstQueueArray * array,
|
|
|
|
guint idx,
|
|
|
|
gpointer p_struct);
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2018-03-04 08:53:10 +00:00
|
|
|
gpointer gst_queue_array_pop_tail_struct (GstQueueArray * array);
|
2018-04-11 13:38:36 +00:00
|
|
|
|
2018-03-12 23:03:26 +00:00
|
|
|
GST_BASE_API
|
2018-03-01 21:19:09 +00:00
|
|
|
gpointer gst_queue_array_peek_tail_struct (GstQueueArray * array);
|
2015-05-30 12:07:50 +00:00
|
|
|
|
2017-03-24 12:21:30 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
2012-10-22 08:13:20 +00:00
|
|
|
#endif
|