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
@ -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>
|
2008-07-08 Michael Smith <msmith@songbirdnest.com>
|
||||||
|
|
||||||
* sys/dshowdecwrapper/gstdshowaudiodec.c:
|
* sys/dshowdecwrapper/gstdshowaudiodec.c:
|
||||||
|
@ -44,7 +44,8 @@ enum
|
|||||||
ARG_HEIGHT,
|
ARG_HEIGHT,
|
||||||
ARG_INCREMENTAL,
|
ARG_INCREMENTAL,
|
||||||
ARG_USE_COPYRECT,
|
ARG_USE_COPYRECT,
|
||||||
ARG_SHARED
|
ARG_SHARED,
|
||||||
|
ARG_VIEWONLY
|
||||||
};
|
};
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_STATIC (rfbsrc_debug);
|
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_object_class_install_property (gobject_class, ARG_SHARED,
|
||||||
g_param_spec_boolean ("shared", "Share desktop with other clients",
|
g_param_spec_boolean ("shared", "Share desktop with other clients",
|
||||||
"Share desktop with other clients", TRUE, G_PARAM_READWRITE));
|
"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->start = GST_DEBUG_FUNCPTR (gst_rfb_src_start);
|
||||||
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_rfb_src_stop);
|
gstbasesrc_class->stop = GST_DEBUG_FUNCPTR (gst_rfb_src_stop);
|
||||||
gstbasesrc_class->event = GST_DEBUG_FUNCPTR (gst_rfb_src_event);
|
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->incremental_update = TRUE;
|
||||||
|
|
||||||
|
src->view_only = FALSE;
|
||||||
|
|
||||||
src->decoder = rfb_decoder_new ();
|
src->decoder = rfb_decoder_new ();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -280,6 +286,9 @@ gst_rfb_src_set_property (GObject * object, guint prop_id,
|
|||||||
case ARG_SHARED:
|
case ARG_SHARED:
|
||||||
src->decoder->shared_flag = g_value_get_boolean (value);
|
src->decoder->shared_flag = g_value_get_boolean (value);
|
||||||
break;
|
break;
|
||||||
|
case ARG_VIEWONLY:
|
||||||
|
src->view_only = g_value_get_boolean (value);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -325,6 +334,9 @@ gst_rfb_src_get_property (GObject * object, guint prop_id,
|
|||||||
case ARG_SHARED:
|
case ARG_SHARED:
|
||||||
g_value_set_boolean (value, src->decoder->shared_flag);
|
g_value_set_boolean (value, src->decoder->shared_flag);
|
||||||
break;
|
break;
|
||||||
|
case ARG_VIEWONLY:
|
||||||
|
g_value_set_boolean (value, src->view_only);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
|
||||||
break;
|
break;
|
||||||
@ -453,6 +465,11 @@ gst_rfb_src_event (GstBaseSrc * bsrc, GstEvent * event)
|
|||||||
|
|
||||||
switch (GST_EVENT_TYPE (event)) {
|
switch (GST_EVENT_TYPE (event)) {
|
||||||
case GST_EVENT_NAVIGATION:
|
case GST_EVENT_NAVIGATION:
|
||||||
|
|
||||||
|
/* if in view_only mode ignore the navigation event */
|
||||||
|
if (src->view_only)
|
||||||
|
break;
|
||||||
|
|
||||||
structure = event->structure;
|
structure = event->structure;
|
||||||
event_type = gst_structure_get_string (structure, "event");
|
event_type = gst_structure_get_string (structure, "event");
|
||||||
gst_structure_get_double (structure, "pointer_x", &x);
|
gst_structure_get_double (structure, "pointer_x", &x);
|
||||||
|
@ -55,6 +55,7 @@ struct _GstRfbSrc
|
|||||||
RfbDecoder *decoder;
|
RfbDecoder *decoder;
|
||||||
gboolean go;
|
gboolean go;
|
||||||
gboolean incremental_update;
|
gboolean incremental_update;
|
||||||
|
gboolean view_only;
|
||||||
|
|
||||||
guint button_mask;
|
guint button_mask;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user