summaryrefslogtreecommitdiff
path: root/gst/librfb/rfbbuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'gst/librfb/rfbbuffer.c')
-rw-r--r--gst/librfb/rfbbuffer.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gst/librfb/rfbbuffer.c b/gst/librfb/rfbbuffer.c
new file mode 100644
index 000000000..e38def36a
--- /dev/null
+++ b/gst/librfb/rfbbuffer.c
@@ -0,0 +1,27 @@
+
+#include <rfbbuffer.h>
+
+RfbBuffer *
+rfb_buffer_new (void)
+{
+ return g_new0 (RfbBuffer, 1);
+
+}
+
+RfbBuffer *
+rfb_buffer_new_and_alloc (int len)
+{
+ RfbBuffer *buffer = g_new0 (RfbBuffer, 1);
+
+ buffer->data = g_malloc (len);
+ buffer->free_data = (void *) g_free;
+
+ return buffer;
+}
+
+void
+rfb_buffer_free (RfbBuffer * buffer)
+{
+ buffer->free_data (buffer->data, buffer->buffer_private);
+
+}