mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-14 03:54:11 +00:00
gst/librfb/gstrfbsrc.*: Add view-only property to ignore the navigation events
Original commit message from CVS: patch by: Ilja Pavkovic <illsen@gumblfarz.de> * gst/librfb/gstrfbsrc.c: * gst/librfb/gstrfbsrc.h: Add view-only property to ignore the navigation events
This commit is contained in:
parent
c709e44f98
commit
18d3b8fb96
3 changed files with 27 additions and 1 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-07-08 Thijs Vermeir <thijsvermeir@gmail.com>
|
||||
|
||||
patch by: Ilja Pavkovic <illsen@gumblfarz.de>
|
||||
|
||||
* gst/librfb/gstrfbsrc.c:
|
||||
* gst/librfb/gstrfbsrc.h:
|
||||
Add view-only property to ignore the navigation events
|
||||
|
||||
2008-07-08 Michael Smith <msmith@songbirdnest.com>
|
||||
|
||||
* sys/dshowdecwrapper/gstdshowaudiodec.c:
|
||||
|
|
|
@ -44,7 +44,8 @@ enum
|
|||
ARG_HEIGHT,
|
||||
ARG_INCREMENTAL,
|
||||
ARG_USE_COPYRECT,
|
||||
ARG_SHARED
|
||||
ARG_SHARED,
|
||||
ARG_VIEWONLY
|
||||
};
|
||||
|
||||
GST_DEBUG_CATEGORY_STATIC (rfbsrc_debug);
|
||||
|
@ -152,6 +153,9 @@ gst_rfb_src_class_init (GstRfbSrcClass * klass)
|
|||
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 @@ gst_rfb_src_init (GstRfbSrc * src, GstRfbSrcClass * klass)
|
|||
|
||||
src->incremental_update = TRUE;
|
||||
|
||||
src->view_only = FALSE;
|
||||
|
||||
src->decoder = rfb_decoder_new ();
|
||||
|
||||
}
|
||||
|
@ -280,6 +286,9 @@ gst_rfb_src_set_property (GObject * object, guint prop_id,
|
|||
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:
|
||||
break;
|
||||
}
|
||||
|
@ -325,6 +334,9 @@ gst_rfb_src_get_property (GObject * object, guint prop_id,
|
|||
case ARG_SHARED:
|
||||
g_value_set_boolean (value, src->decoder->shared_flag);
|
||||
break;
|
||||
case ARG_VIEWONLY:
|
||||
g_value_set_boolean (value, src->view_only);
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||
break;
|
||||
|
@ -453,6 +465,11 @@ gst_rfb_src_event (GstBaseSrc * bsrc, GstEvent * event)
|
|||
|
||||
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);
|
||||
|
|
|
@ -55,6 +55,7 @@ struct _GstRfbSrc
|
|||
RfbDecoder *decoder;
|
||||
gboolean go;
|
||||
gboolean incremental_update;
|
||||
gboolean view_only;
|
||||
|
||||
guint button_mask;
|
||||
|
||||
|
|
Loading…
Reference in a new issue