ximagesrc

ximagesrc — a source that captures your X Display

Synopsis




                    GstXImageSrc;

Properties


  "display-name"             gchararray            : Read / Write
  "screen-num"               guint                 : Read / Write
  "show-pointer"             gboolean              : Read / Write
  "endx"                     guint                 : Read / Write
  "endy"                     guint                 : Read / Write
  "startx"                   guint                 : Read / Write
  "starty"                   guint                 : Read / Write
  "use-damage"               gboolean              : Read / Write

Description

This element captures your X Display and creates raw RGB video. It uses the XDamage extension if available to only capture areas of the screen that have changed since the last frame. It uses the XFixes extension if available to also capture your mouse pointer. By default it will fixate to 25 frames per second.

Example pipelines

gst-launch -v ximagesrc ! video/x-raw-rgb,framerate=5/1 ! ffmpegcolorspace ! theoraenc ! oggmux ! filesink location=desktop.ogg

Encodes your X display to an Ogg theora video at 5 frames per second.

Element Information

plugin ximagesrc
author Lutz Mueller <lutz@users.sourceforge.net>, Jan Schmidt <thaytan@mad.scientist.com>, Zaheer Merali <zaheerabbas at merali dot org>
class Source/Video

Details

GstXImageSrc

typedef struct {
  GstPushSrc parent;

  /* Information on display */
  GstXContext *xcontext;
  gint width;
  gint height;

  Window xwindow;
  gchar *display_name;
  guint screen_num;

  /* Desired output framerate */
  gint fps_n;
  gint fps_d;

  /* for framerate sync */
  GstClockID clock_id;
  gint64 last_frame_no;

  /* Protect X Windows calls */
  GMutex *x_lock;

  /* Gathered pool of emitted buffers */
  GMutex *pool_lock;
  GSList *buffer_pool;

  /* XFixes and XDamage support */
  gboolean have_xfixes;
  gboolean have_xdamage;
  gboolean show_pointer;
  gboolean use_damage;

  /* co-ordinates for start and end */
  guint startx;
  guint starty;
  guint endx;
  guint endy;

#ifdef HAVE_XFIXES
  int fixes_event_base;
  XFixesCursorImage *cursor_image;
#endif
#ifdef HAVE_XDAMAGE
  Damage damage;
  int damage_event_base;
  XserverRegion damage_region;
  GC damage_copy_gc;
  GstXImageSrcBuffer *last_ximage;
#endif
} GstXImageSrc;

Property Details

The "display-name" property

  "display-name"             gchararray            : Read / Write

X Display Name.

Default value: NULL


The "screen-num" property

  "screen-num"               guint                 : Read / Write

X Screen Number.

Allowed values: <= G_MAXINT

Default value: 0


The "show-pointer" property

  "show-pointer"             gboolean              : Read / Write

Show mouse pointer (if XFixes extension enabled).

Default value: TRUE


The "endx" property

  "endx"                     guint                 : Read / Write

X coordinate of bottom right corner of area to be recorded (0 for bottom right of screen)

Allowed values: <= G_MAXINT

Default value: 0

Since 0.10.4


The "endy" property

  "endy"                     guint                 : Read / Write

Y coordinate of bottom right corner of area to be recorded (0 for bottom right of screen)

Allowed values: <= G_MAXINT

Default value: 0

Since 0.10.4


The "startx" property

  "startx"                   guint                 : Read / Write

X coordinate of top left corner of area to be recorded (0 for top left of screen)

Allowed values: <= G_MAXINT

Default value: 0

Since 0.10.4


The "starty" property

  "starty"                   guint                 : Read / Write

Y coordinate of top left corner of area to be recorded (0 for top left of screen)

Allowed values: <= G_MAXINT

Default value: 0

Since 0.10.4


The "use-damage" property

  "use-damage"               gboolean              : Read / Write

Use XDamage (if the XDamage extension is enabled)

Default value: TRUE

Since 0.10.4