Revert again, this time without post-commit reindent hooks to put back the indentatio...
[platform/upstream/gstreamer.git] / plugins / elements / gstbufferstore.h
1 /* GStreamer
2  * Copyright (C) 2003 Benjamin Otte <in7y118@public.uni-hamburg.de>
3  *
4  * gsttypefind.h: keep an easily accessible list of all buffers
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21
22
23 #ifndef __GST_BUFFER_STORE_H__
24 #define __GST_BUFFER_STORE_H__
25
26 #include <gst/gstbuffer.h>
27 #include <gst/gstinfo.h>
28 #include <gst/gstmarshal.h>
29
30 G_BEGIN_DECLS
31
32 #define GST_TYPE_BUFFER_STORE           (gst_buffer_store_get_type ())
33 #define GST_BUFFER_STORE(obj)           (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_TYPE_BUFFER_STORE, GstBufferStore))
34 #define GST_IS_BUFFER_STORE(obj)                (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GST_TYPE_BUFFER_STORE))
35 #define GST_BUFFER_STORE_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_BUFFER_STORE, GstBufferStoreClass))
36 #define GST_IS_BUFFER_STORE_CLASS(klass)        (G_TYPE_CHECK_CLASS_TYPE ((klass), GST_TYPE_BUFFER_STORE))
37 #define GST_BUFFER_STORE_GET_CLASS(obj)         (G_TYPE_INSTANCE_GET_CLASS ((obj), GST_TYPE_BUFFER_STORE, GstBufferStoreClass))
38
39 typedef struct _GstBufferStore          GstBufferStore;
40 typedef struct _GstBufferStoreClass     GstBufferStoreClass;
41
42 struct _GstBufferStore {
43   GObject               object;
44
45   GList *               buffers;
46 };
47
48 struct _GstBufferStoreClass {
49   GObjectClass          parent_class;
50
51   /* signals */
52   void                  (* cleared)                     (GstBufferStore *       store);
53   gboolean              (* buffer_added)                (GstBufferStore *       store,
54                                                          GstBuffer *            buffer);
55 };
56
57 GType                   gst_buffer_store_get_type       (void);
58
59 GstBufferStore *        gst_buffer_store_new            (void);
60 void                    gst_buffer_store_clear          (GstBufferStore *       store);
61
62 gboolean                gst_buffer_store_add_buffer     (GstBufferStore *       store,
63                                                          GstBuffer *            buffer);
64
65 GstBuffer *             gst_buffer_store_get_buffer     (GstBufferStore *       store,
66                                                          guint64                offset,
67                                                          guint                  size);
68 guint                   gst_buffer_store_get_size       (GstBufferStore *       store,
69                                                          guint64                offset);
70
71 G_END_DECLS
72
73 #endif /* __GST_BUFFER_STORE_H__ */