mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
fd89575485
Original commit message from CVS: Patch by: Andre Moreira Magalhaes <andrunko@gmail.com> * configure.ac: * gst/librfb/Makefile.am: * gst/librfb/gstrfbsrc.c: * gst/librfb/rfb.c: * gst/librfb/rfb.h: * gst/librfb/rfbbuffer.c: * gst/librfb/rfbbuffer.h: * gst/librfb/rfbbytestream.c: * gst/librfb/rfbbytestream.h: * gst/librfb/rfbcontext.h: * gst/librfb/rfbdecoder.c: * gst/librfb/rfbdecoder.h: * gst/librfb/rfbutil.h: Port librfb to 0.10 (#376106).
30 lines
476 B
C
30 lines
476 B
C
#ifdef HAVE_CONFIG_H
|
|
#include "config.h"
|
|
#endif
|
|
|
|
#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)
|
|
{
|
|
g_return_if_fail (buffer != NULL);
|
|
|
|
buffer->free_data (buffer->data, buffer->buffer_private);
|
|
}
|