From: <tve...@ke...> - 2008-07-08 21:20:33
|
CVS Root: /cvs/gstreamer Module: gst-plugins-bad Changes by: tvermeir Date: Tue Jul 08 2008 21:20:41 UTC Log message: patch by: Ilja Pavkovic <il...@gu...> * gst/librfb/gstrfbsrc.c: * gst/librfb/gstrfbsrc.h: Add view-only property to ignore the navigation events Modified files: . : ChangeLog gst/librfb : gstrfbsrc.c gstrfbsrc.h Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/ChangeLog.diff?r1=1.3436&r2=1.3437 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/librfb/gstrfbsrc.c.diff?r1=1.26&r2=1.27 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-bad/gst/librfb/gstrfbsrc.h.diff?r1=1.4&r2=1.5 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-plugins-bad/ChangeLog,v retrieving revision 1.3436 retrieving revision 1.3437 diff -u -d -r1.3436 -r1.3437 --- ChangeLog 8 Jul 2008 18:53:40 -0000 1.3436 +++ ChangeLog 8 Jul 2008 21:20:26 -0000 1.3437 @@ -1,3 +1,11 @@ +2008-07-08 Thijs Vermeir <thi...@gm...> + + patch by: Ilja Pavkovic <il...@gu...> + * gst/librfb/gstrfbsrc.c: + * gst/librfb/gstrfbsrc.h: + Add view-only property to ignore the navigation events 2008-07-08 Michael Smith <ms...@so...> * sys/dshowdecwrapper/gstdshowaudiodec.c: Index: gstrfbsrc.c RCS file: /cvs/gstreamer/gst-plugins-bad/gst/librfb/gstrfbsrc.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -d -r1.26 -r1.27 --- gstrfbsrc.c 8 Jul 2008 14:28:04 -0000 1.26 +++ gstrfbsrc.c 8 Jul 2008 21:20:27 -0000 1.27 @@ -44,7 +44,8 @@ ARG_HEIGHT, ARG_INCREMENTAL, ARG_USE_COPYRECT, - ARG_SHARED + ARG_SHARED, + ARG_VIEWONLY }; GST_DEBUG_CATEGORY_STATIC (rfbsrc_debug); @@ -152,6 +153,9 @@ g_object_class_install_property (gobject_class, ARG_SHARED, g_param_spec_boolean ("shared", "Share desktop with other clients", "Share desktop with other clients", TRUE, G_PARAM_READWRITE)); + g_object_class_install_property (gobject_class, ARG_VIEWONLY, + g_param_spec_boolean ("view-only", "Only view the desktop", + "only view the desktop", FALSE, G_PARAM_READWRITE)); gstbasesrc_class->start = GST_DEBUG_FUNCPTR (gst_rfb_src_start); gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_rfb_src_stop); gstbasesrc_class->event = GST_DEBUG_FUNCPTR (gst_rfb_src_event); @@ -174,6 +178,8 @@ src->incremental_update = TRUE; + src->view_only = FALSE; src->decoder = rfb_decoder_new (); } @@ -280,6 +286,9 @@ case ARG_SHARED: src->decoder->shared_flag = g_value_get_boolean (value); break; + case ARG_VIEWONLY: + src->view_only = g_value_get_boolean (value); + break; default: } @@ -325,6 +334,9 @@ g_value_set_boolean (value, src->decoder->shared_flag); + g_value_set_boolean (value, src->view_only); G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); @@ -453,6 +465,11 @@ switch (GST_EVENT_TYPE (event)) { case GST_EVENT_NAVIGATION: + /* if in view_only mode ignore the navigation event */ + if (src->view_only) + break; structure = event->structure; event_type = gst_structure_get_string (structure, "event"); gst_structure_get_double (structure, "pointer_x", &x); Index: gstrfbsrc.h RCS file: /cvs/gstreamer/gst-plugins-bad/gst/librfb/gstrfbsrc.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gstrfbsrc.h 31 Oct 2007 14:09:25 -0000 1.4 +++ gstrfbsrc.h 8 Jul 2008 21:20:27 -0000 1.5 @@ -55,6 +55,7 @@ RfbDecoder *decoder; gboolean go; gboolean incremental_update; + gboolean view_only; guint button_mask; |