ximagesrc: Remove unused screen-num property
authorAntonio Ospite <ao2@ao2.it>
Mon, 15 Sep 2014 12:39:41 +0000 (14:39 +0200)
committerSebastian Dröge <sebastian@centricular.com>
Tue, 16 Sep 2014 07:36:10 +0000 (10:36 +0300)
The screen number can be still specified as part of the display-name
property (e.g. for screen 1 of display 0 use display-name=":0.1").

https://bugzilla.gnome.org/show_bug.cgi?id=736122

sys/ximage/gstximagesrc.c
sys/ximage/gstximagesrc.h
sys/ximage/ximageutil.c
sys/ximage/ximageutil.h

index 97fed27..bafe695 100644 (file)
@@ -66,7 +66,6 @@ enum
 {
   PROP_0,
   PROP_DISPLAY_NAME,
-  PROP_SCREEN_NUM,
   PROP_SHOW_POINTER,
   PROP_USE_DAMAGE,
   PROP_STARTX,
@@ -920,9 +919,6 @@ gst_ximage_src_set_property (GObject * object, guint prop_id,
       g_free (src->display_name);
       src->display_name = g_strdup (g_value_get_string (value));
       break;
-    case PROP_SCREEN_NUM:
-      src->screen_num = g_value_get_uint (value);
-      break;
     case PROP_SHOW_POINTER:
       src->show_pointer = g_value_get_boolean (value);
       break;
@@ -978,9 +974,6 @@ gst_ximage_src_get_property (GObject * object, guint prop_id, GValue * value,
         g_value_set_string (value, src->display_name);
 
       break;
-    case PROP_SCREEN_NUM:
-      g_value_set_uint (value, src->screen_num);
-      break;
     case PROP_SHOW_POINTER:
       g_value_set_boolean (value, src->show_pointer);
       break;
@@ -1193,9 +1186,6 @@ gst_ximage_src_class_init (GstXImageSrcClass * klass)
   g_object_class_install_property (gc, PROP_DISPLAY_NAME,
       g_param_spec_string ("display-name", "Display", "X Display Name", NULL,
           G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-  g_object_class_install_property (gc, PROP_SCREEN_NUM,
-      g_param_spec_uint ("screen-num", "Screen number", "X Screen Number",
-          0, G_MAXINT, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
   g_object_class_install_property (gc, PROP_SHOW_POINTER,
       g_param_spec_boolean ("show-pointer", "Show Mouse Pointer",
           "Show mouse pointer (if XFixes extension enabled)", TRUE,
index efaff75..e43447a 100644 (file)
@@ -56,7 +56,6 @@ struct _GstXImageSrc
 
   Window xwindow;
   gchar *display_name;
-  guint screen_num;
 
   /* Window selection */
   guint64 xid;
index 47fa116..0c2b2f3 100644 (file)
@@ -175,18 +175,17 @@ ximageutil_xcontext_get (GstElement * parent, const gchar * display_name)
     return NULL;
   }
   xcontext->screen = DefaultScreenOfDisplay (xcontext->disp);
-  xcontext->screen_num = DefaultScreen (xcontext->disp);
-  xcontext->visual = DefaultVisual (xcontext->disp, xcontext->screen_num);
-  xcontext->root = DefaultRootWindow (xcontext->disp);
-  xcontext->white = XWhitePixel (xcontext->disp, xcontext->screen_num);
-  xcontext->black = XBlackPixel (xcontext->disp, xcontext->screen_num);
+  xcontext->visual = DefaultVisualOfScreen (xcontext->screen);
+  xcontext->root = RootWindowOfScreen (xcontext->screen);
+  xcontext->white = WhitePixelOfScreen (xcontext->screen);
+  xcontext->black = BlackPixelOfScreen (xcontext->screen);
   xcontext->depth = DefaultDepthOfScreen (xcontext->screen);
 
-  xcontext->width = DisplayWidth (xcontext->disp, xcontext->screen_num);
-  xcontext->height = DisplayHeight (xcontext->disp, xcontext->screen_num);
+  xcontext->width = WidthOfScreen (xcontext->screen);
+  xcontext->height = HeightOfScreen (xcontext->screen);
 
-  xcontext->widthmm = DisplayWidthMM (xcontext->disp, xcontext->screen_num);
-  xcontext->heightmm = DisplayHeightMM (xcontext->disp, xcontext->screen_num);
+  xcontext->widthmm = WidthMMOfScreen (xcontext->screen);
+  xcontext->heightmm = HeightMMOfScreen (xcontext->screen);
 
   xcontext->caps = NULL;
 
index cd2e889..3476861 100644 (file)
@@ -50,7 +50,6 @@ typedef struct _GstMetaXImage GstMetaXImage;
  * GstXContext:
  * @disp: the X11 Display of this context
  * @screen: the default Screen of Display @disp
- * @screen_num: the Screen number of @screen
  * @visual: the default Visual of Screen @screen
  * @root: the root Window of Display @disp
  * @white: the value of a white pixel on Screen @screen
@@ -78,7 +77,6 @@ struct _GstXContext {
   Display *disp;
 
   Screen *screen;
-  gint screen_num;
 
   Visual *visual;