From 29f1ca86025f18de1b5eea37828bef6da81e3b68 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Wed, 16 Mar 2016 16:49:09 -0400 Subject: [PATCH] rfbsrc: Cleanup dead code Remove all the unused stuff, the include header, definition and C code that don't contribute anything to this element. --- gst/librfb/Makefile.am | 3 --- gst/librfb/rfb.c | 28 ---------------------------- gst/librfb/rfb.h | 1 - gst/librfb/rfbbuffer.c | 30 ------------------------------ gst/librfb/rfbbuffer.h | 23 ----------------------- gst/librfb/rfbcontext.h | 35 ----------------------------------- gst/librfb/rfbdecoder.h | 15 --------------- gst/librfb/rfbutil.h | 7 ------- 8 files changed, 142 deletions(-) delete mode 100644 gst/librfb/rfb.c delete mode 100644 gst/librfb/rfbbuffer.c delete mode 100644 gst/librfb/rfbbuffer.h delete mode 100644 gst/librfb/rfbcontext.h delete mode 100644 gst/librfb/rfbutil.h diff --git a/gst/librfb/Makefile.am b/gst/librfb/Makefile.am index d542ffc..78498d3 100644 --- a/gst/librfb/Makefile.am +++ b/gst/librfb/Makefile.am @@ -20,8 +20,5 @@ librfb_la_LIBADD = $(GST_LIBS) $(GIO_LIBS) noinst_HEADERS = \ rfb.h \ rfbdecoder.h \ - rfbbuffer.h \ - rfbcontext.h \ - rfbutil.h \ gstrfbsrc.h \ d3des.h diff --git a/gst/librfb/rfb.c b/gst/librfb/rfb.c deleted file mode 100644 index cd9f9bc..0000000 --- a/gst/librfb/rfb.c +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include - -#include "rfb.h" - -int -main (int argc, char *argv[]) -{ - RfbDecoder *decoder; - - // int fd = 0; - - decoder = rfb_decoder_new (); - - rfb_decoder_connect_tcp (decoder, "127.0.0.1", 5901); - // rfb_decoder_use_file_descriptor (decoder, fd); - - while (!decoder->inited) - rfb_decoder_iterate (decoder); - - rfb_decoder_send_update_request (decoder, FALSE, 0, 0, 100, 100); - - while (1) { - rfb_decoder_iterate (decoder); - } - - return 0; -} diff --git a/gst/librfb/rfb.h b/gst/librfb/rfb.h index 89a4be9..acb85f6 100644 --- a/gst/librfb/rfb.h +++ b/gst/librfb/rfb.h @@ -2,6 +2,5 @@ #define _RFB_RFB_H_ #include -#include #endif diff --git a/gst/librfb/rfbbuffer.c b/gst/librfb/rfbbuffer.c deleted file mode 100644 index d8ca081..0000000 --- a/gst/librfb/rfbbuffer.c +++ /dev/null @@ -1,30 +0,0 @@ -#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 = (RfbBufferFreeFunc) g_free; - - return buffer; -} - -void -rfb_buffer_free (RfbBuffer * buffer) -{ - g_return_if_fail (buffer != NULL); - - buffer->free_data (buffer->data, buffer->buffer_private); -} diff --git a/gst/librfb/rfbbuffer.h b/gst/librfb/rfbbuffer.h deleted file mode 100644 index 6250ad4..0000000 --- a/gst/librfb/rfbbuffer.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _LIBRFB_BUFFER_H_ -#define _LIBRFB_BUFFER_H_ - -#include - -G_BEGIN_DECLS typedef struct _RfbBuffer RfbBuffer; -typedef void (*RfbBufferFreeFunc) (guint8 * data, gpointer priv); - -struct _RfbBuffer -{ - RfbBufferFreeFunc free_data; - gpointer buffer_private; - - guint8 *data; - gint length; -}; - -RfbBuffer *rfb_buffer_new (void); -RfbBuffer *rfb_buffer_new_and_alloc (gint len); -void rfb_buffer_free (RfbBuffer * buffer); - -G_END_DECLS -#endif diff --git a/gst/librfb/rfbcontext.h b/gst/librfb/rfbcontext.h deleted file mode 100644 index 4c72bc6..0000000 --- a/gst/librfb/rfbcontext.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef _LIBRFB_RFBCONTEXT_H_ -#define _LIBRFB_RFBCONTEXT_H_ - -#include - -G_BEGIN_DECLS typedef struct _RfbContext -{ - RfbConnection *connection; - - guint8 *buffer1; - gpointer buffer1_alloc; - guint buffer1_len; - - guint8 *buffer2; - gpointer buffer2_alloc; - guint buffer2_len; - - gchar *name; -} RfbContext; - -typedef struct _RfbRect -{ - RfbContext *context; - - guint x_pos; - guint y_pos; - guint width; - guint height; - guint encoding_type; - - gchar *data; -} RfbRect; - -G_END_DECLS -#endif diff --git a/gst/librfb/rfbdecoder.h b/gst/librfb/rfbdecoder.h index 00a8520..a23d02f 100644 --- a/gst/librfb/rfbdecoder.h +++ b/gst/librfb/rfbdecoder.h @@ -95,21 +95,6 @@ struct _RfbDecoder guint line_size; }; -#if 0 -typedef struct _RfbRect -{ - RfbConnection *connection; - - guint x_pos; - guint y_pos; - guint width; - guint height; - guint encoding_type; - - gchar *data; -} RfbRect; -#endif - RfbDecoder *rfb_decoder_new (void); void rfb_decoder_free (RfbDecoder * decoder); gboolean rfb_decoder_connect_tcp (RfbDecoder * decoder, diff --git a/gst/librfb/rfbutil.h b/gst/librfb/rfbutil.h deleted file mode 100644 index b1ac946..0000000 --- a/gst/librfb/rfbutil.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef _LIBRFB_UTIL_H_ -#define _LIBRFB_UTIL_H_ - -#include - -G_BEGIN_DECLS G_END_DECLS -#endif -- 2.7.4