summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThijs Vermeir <thijsvermeir@gmail.com>2007-09-27 14:52:58 +0000
committerThijs Vermeir <thijsvermeir@gmail.com>2007-09-27 14:52:58 +0000
commit77e7c4aaddc9714651fe9cb4d86f760170f6564d (patch)
treedf0a28af18919d53153d6997f749607f7314d1c6
parentd69b3423f3e98988658be5ba275bb18836038022 (diff)
downloadgst-plugins-bad-77e7c4aaddc9714651fe9cb4d86f760170f6564d.tar.gz
gst-plugins-bad-77e7c4aaddc9714651fe9cb4d86f760170f6564d.tar.bz2
gst-plugins-bad-77e7c4aaddc9714651fe9cb4d86f760170f6564d.zip
gst/librfb/gstrfbsrc.*: Added a property for incremental screen updates
Original commit message from CVS: * gst/librfb/gstrfbsrc.c: * gst/librfb/gstrfbsrc.h: Added a property for incremental screen updates
-rw-r--r--ChangeLog6
-rw-r--r--gst/librfb/gstrfbsrc.c18
-rw-r--r--gst/librfb/gstrfbsrc.h2
3 files changed, 21 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 46e852e6..a9aa6c55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-09-27 Thijs Vermeir <thijsvermeir@gmail.com>
+
+ * gst/librfb/gstrfbsrc.c:
+ * gst/librfb/gstrfbsrc.h:
+ Added a property for incremental screen updates
+
2007-09-27 Tim-Philipp Müller <tim at centricular dot net>
* ext/xvid/gstxvidenc.c:
diff --git a/gst/librfb/gstrfbsrc.c b/gst/librfb/gstrfbsrc.c
index 8aeed6c6..626a5ff6 100644
--- a/gst/librfb/gstrfbsrc.c
+++ b/gst/librfb/gstrfbsrc.c
@@ -42,6 +42,7 @@ enum
ARG_OFFSET_Y,
ARG_WIDTH,
ARG_HEIGHT,
+ ARG_INCREMENTAL,
};
GST_DEBUG_CATEGORY_STATIC (rfbsrc_debug);
@@ -138,6 +139,9 @@ gst_rfb_src_class_init (GstRfbSrcClass * klass)
g_object_class_install_property (gobject_class, ARG_HEIGHT,
g_param_spec_int ("height", "height of screen", "height of screen", 0,
65535, 0, G_PARAM_READWRITE));
+ g_object_class_install_property (gobject_class, ARG_INCREMENTAL,
+ g_param_spec_boolean ("incremental", "Incremental updates",
+ "Incremental updates", TRUE, G_PARAM_READWRITE));
gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_rfb_src_start);
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_rfb_src_stop);
@@ -161,6 +165,8 @@ gst_rfb_src_init (GstRfbSrc * src, GstRfbSrcClass * klass)
src->version_major = 3;
src->version_minor = 3;
+ src->incremental_update = TRUE;
+
src->decoder = rfb_decoder_new ();
}
@@ -251,6 +257,9 @@ gst_rfb_src_set_property (GObject * object, guint prop_id,
case ARG_HEIGHT:
src->decoder->rect_height = g_value_get_int (value);
break;
+ case ARG_INCREMENTAL:
+ src->incremental_update = g_value_get_boolean (value);
+ break;
default:
break;
}
@@ -287,6 +296,9 @@ gst_rfb_src_get_property (GObject * object, guint prop_id,
case ARG_HEIGHT:
g_value_set_int (value, src->decoder->rect_height);
break;
+ case ARG_INCREMENTAL:
+ g_value_set_boolean (value, src->incremental_update);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
@@ -311,8 +323,6 @@ gst_rfb_src_start (GstBaseSrc * bsrc)
return FALSE;
}
- src->inter = FALSE;
-
while (!decoder->inited) {
rfb_decoder_iterate (decoder);
}
@@ -362,8 +372,8 @@ gst_rfb_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
gulong newsize;
GstFlowReturn ret;
- rfb_decoder_send_update_request (decoder, src->inter, decoder->offset_x,
- decoder->offset_y,
+ rfb_decoder_send_update_request (decoder, src->incremental_update,
+ decoder->offset_x, decoder->offset_y,
(decoder->rect_width ? decoder->rect_width : decoder->width),
(decoder->rect_height ? decoder->rect_height : decoder->height));
// src->inter = TRUE;
diff --git a/gst/librfb/gstrfbsrc.h b/gst/librfb/gstrfbsrc.h
index 57e6d338..13f79287 100644
--- a/gst/librfb/gstrfbsrc.h
+++ b/gst/librfb/gstrfbsrc.h
@@ -57,7 +57,7 @@ struct _GstRfbSrc
RfbDecoder *decoder;
guint8 *frame;
gboolean go;
- gboolean inter;
+ gboolean incremental_update;
guint button_mask;