Skip to content
lpsinger edited this page Apr 14, 2011 · 12 revisions

Welcome to the gst-plugins-cairovis wiki!

This package is a collection of scientific visualization plugins for GStreamer using Cairo-powered graphics. It grew out of a larger collection of science-related plugins, called gstlal, that are being used for gravitational wave searches as part of the LIGO Project.

What can it do?

It's easy to add any number of realtime figures such as line plots, waterfall plots, and histograms to any GStreamer pipeline. Below is a frame from a sophisticated example including the cairovis_waterfall and cairovis_histogram elements. Plots can be placed side by side and composited using the videobox and videomixer elements. It is also possible to send output of different cairovis elements to different ximagesinks in order to render them in different windows, or even to send some of them to files or network connections. (Follow image link for full-size screenshot)

Example of pipeline containing many cairovis elements

Here's a very simple example, demonstrating the cairovis_lineseries element.

$ gst-launch audiotestsrc wave=pink-noise ! cairovis_lineseries title="Pink noise" x-label="sample" y-label="counts" y-autoscale=no y-min=-0.5 y-max=0.5 ! ximagesink

This opens an X window containing a realtime oscilloscope-style display of a pink noise signal. A still snapshot might look like this:

Still snapshot of lineseries

Here's another simple example, demonstrating the cairovis_histogram element.

$ gst-launch audiotestsrc wave=gaussian-noise volume=1 ! cairovis_histogram title="Gaussian noise" normed=yes bin-min=-5 bin-max=5 history-samples=1000 y-autoscale=no y-min=0 y-max=1 ! ximagesink

Still snapshot of histogram

To find out what other elements are available, you can use the gst-inspect tool, which comes with GStreamer.

$ gst-inspect cairovis
Plugin Details:
  Name:			cairovis
  Description:		Cairo visualization elements
  Filename:		/home/xxx/opt/gstlal-0.10.32/lib/gstreamer-0.10/libgstcairovis.so
  Version:		0.10.0
  License:		GPL
  Source module:	gst-plugins-cairovis
  Binary package:	gst-plugins-cairovis
  Origin URL:		http://www.lsc-group.phys.uwm.edu/daswg

  cairovis_base: Cairo Visualization Base Class
  cairovis_histogram: Histogram Visualizer
  cairovis_lineseries: Lineseries Visualizer
  cairovis_waterfall: Waterfall Visualizer

  4 features:
  +-- 4 elements

You can also use gst-inspect to get more help with one particular element:

$ gst-inspect cairovis_waterfall
Factory Details:
  Long name:	Waterfall Visualizer
  Class:	Filter
  Description:	Render a multi-channel input as a waterfall plot
  Author(s):	Leo Singer <leo.singer@ligo.org>
  Rank:		none (0)

Plugin Details:
  Name:			cairovis
  Description:		Cairo visualization elements
  Filename:		/home/xxx/opt/gstlal-0.10.32/lib/gstreamer-0.10/libgstcairovis.so
  Version:		0.10.0
  License:		GPL
  Source module:	gst-plugins-cairovis
  Binary package:	gst-plugins-cairovis
  Origin URL:		http://www.lsc-group.phys.uwm.edu/daswg

GObject
 +----GstObject
       +----GstElement
             +----cairovis_base
                   +----cairovis_waterfall

Pad Templates:
  SRC template: 'src'
    Availability: Always
    Capabilities:
      video/x-raw-rgb
                    bpp: 32
                  depth: 24
             endianness: 4321
               red_mask: 65280
             green_mask: 16711680
              blue_mask: -16777216
                  width: [ 1, 2147483647 ]
                 height: [ 1, 2147483647 ]
              framerate: [ 0/1, 2147483647/1 ]

  SINK template: 'sink'
    Availability: Always
    Capabilities:
      audio/x-raw-float
               channels: [ 2, 2147483647 ]
                  width: 64


Element Flags:
  no flags set

Element Implementation:
  Has change_state() function: gst_element_change_state_func
  Has custom save_thyself() function: gst_element_save_thyself
  Has custom restore_thyself() function: gst_element_restore_thyself

Element has no clocking capabilities.
Element has no indexing capabilities.
Element has no URI handling capabilities.

Pads:
  SINK: 'sink'
    Implementation:
      Has chainfunc(): sink_chain
      Has getcapsfunc(): gst_pad_get_fixed_caps_func
      Has setcapsfunc(): sink_setcaps
      Has acceptcapsfunc(): gst_pad_acceptcaps_default
    Pad Template: 'sink'
  SRC: 'src'
    Implementation:
      Has getcapsfunc(): gst_pad_get_fixed_caps_func
      Has acceptcapsfunc(): gst_pad_acceptcaps_default
      Has fixatecapsfunc(): fixate
    Pad Template: 'src'

Element Properties:
  name                : The name of the object
                        flags: readable, writable
                        String. Default: null Current: "cairovis_waterfall0"
  title               : Title of plot
                        flags: readable, writable
                        String. Default: null Current: null
  x-label             : Label for x-axis
                        flags: readable, writable
                        String. Default: null Current: null
  y-label             : Label for y-axis
                        flags: readable, writable
                        String. Default: null Current: null
  x-scale             : Linear or logarithmic scale
                        flags: readable, writable
                        Enum "CairoVisScale" Default: 0, "linear" Current: 0, "linear"
                           (0): linear           - linear scale
                           (1): log              - logarithmic scale
  y-scale             : Linear or logarithmic scale
                        flags: readable, writable
                        Enum "CairoVisScale" Default: 0, "linear" Current: 0, "linear"
                           (0): linear           - linear scale
                           (1): log              - logarithmic scale
  x-autoscale         : Set to true to autoscale the x-axis
                        flags: readable, writable
                        Boolean. Default: true Current: true
  y-autoscale         : Set to true to autoscale the y-axis
                        flags: readable, writable
                        Boolean. Default: true Current: true
  x-min               : Minimum limit of y-axis (has no effect if x-autoscale is set to true)
                        flags: readable, writable
                        Double. Range:  -1.797693e+308 -   1.797693e+308 Default:              -2 Current:              -2
  x-max               : Maximum limit of x-axis (has no effect if x-autoscale is set to true)
                        flags: readable, writable
                        Double. Range:  -1.797693e+308 -   1.797693e+308 Default:               2 Current:               2
  y-min               : Minimum limit of y-axis (has no effect if y-autoscale is set to true)
                        flags: readable, writable
                        Double. Range:  -1.797693e+308 -   1.797693e+308 Default:              -2 Current:              -2
  y-max               : Maximum limit of y-axis (has no effect if y-autoscale is set to true)
                        flags: readable, writable
                        Double. Range:  -1.797693e+308 -   1.797693e+308 Default:               2 Current:               2
  z-label             : Label for z-axis
                        flags: readable, writable
                        String. Default: null Current: null
  z-scale             : Linear or logarithmic scale
                        flags: readable, writable
                        Enum "CairoVisScale" Default: 0, "linear" Current: 0, "linear"
                           (0): linear           - linear scale
                           (1): log              - logarithmic scale
  z-autoscale         : Set to true to autoscale the z-axis
                        flags: readable, writable
                        Boolean. Default: true Current: true
  z-min               : Minimum limit of z-axis (has no effect if z-autoscale is set to true)
                        flags: readable, writable
                        Double. Range:  -1.797693e+308 -   1.797693e+308 Default:              -2 Current:              -2
  z-max               : Maximum limit of z-axis (has no effect if z-autoscale is set to true)
                        flags: readable, writable
                        Double. Range:  -1.797693e+308 -   1.797693e+308 Default:               2 Current:               2
  history             : Duration of history to keep, in nanoseconds
                        flags: readable, writable
                        Unsigned Integer64. Range: 0 - 18446744073709551615 Default: 10000000000 Current: 10000000000
  colormap            : Name of colormap (e.g. 'jet')
                        flags: readable, writable
                        Enum "CairoVisColormap" Default: 92, "jet" Current: 92, "jet"
                           (0): Accent           - Accent
                           (1): Accent_r         - Accent_r
                           (2): Blues            - Blues
                           (3): Blues_r          - Blues_r
                           (4): BrBG             - BrBG
                           (5): BrBG_r           - BrBG_r
                           (6): BuGn             - BuGn
                           (7): BuGn_r           - BuGn_r
                           (8): BuPu             - BuPu
                           (9): BuPu_r           - BuPu_r
                           (10): Dark2            - Dark2
                           (11): Dark2_r          - Dark2_r
                           (12): GnBu             - GnBu
                           (13): GnBu_r           - GnBu_r
                           (14): Greens           - Greens
                           (15): Greens_r         - Greens_r
                           (16): Greys            - Greys
                           (17): Greys_r          - Greys_r
                           (18): OrRd             - OrRd
                           (19): OrRd_r           - OrRd_r
                           (20): Oranges          - Oranges
                           (21): Oranges_r        - Oranges_r
                           (22): PRGn             - PRGn
                           (23): PRGn_r           - PRGn_r
                           (24): Paired           - Paired
                           (25): Paired_r         - Paired_r
                           (26): Pastel1          - Pastel1
                           (27): Pastel1_r        - Pastel1_r
                           (28): Pastel2          - Pastel2
                           (29): Pastel2_r        - Pastel2_r
                           (30): PiYG             - PiYG
                           (31): PiYG_r           - PiYG_r
                           (32): PuBu             - PuBu
                           (33): PuBuGn           - PuBuGn
                           (34): PuBuGn_r         - PuBuGn_r
                           (35): PuBu_r           - PuBu_r
                           (36): PuOr             - PuOr
                           (37): PuOr_r           - PuOr_r
                           (38): PuRd             - PuRd
                           (39): PuRd_r           - PuRd_r
                           (40): Purples          - Purples
                           (41): Purples_r        - Purples_r
                           (42): RdBu             - RdBu
                           (43): RdBu_r           - RdBu_r
                           (44): RdGy             - RdGy
                           (45): RdGy_r           - RdGy_r
                           (46): RdPu             - RdPu
                           (47): RdPu_r           - RdPu_r
                           (48): RdYlBu           - RdYlBu
                           (49): RdYlBu_r         - RdYlBu_r
                           (50): RdYlGn           - RdYlGn
                           (51): RdYlGn_r         - RdYlGn_r
                           (52): Reds             - Reds
                           (53): Reds_r           - Reds_r
                           (54): Set1             - Set1
                           (55): Set1_r           - Set1_r
                           (56): Set2             - Set2
                           (57): Set2_r           - Set2_r
                           (58): Set3             - Set3
                           (59): Set3_r           - Set3_r
                           (60): Spectral         - Spectral
                           (61): Spectral_r       - Spectral_r
                           (62): YlGn             - YlGn
                           (63): YlGnBu           - YlGnBu
                           (64): YlGnBu_r         - YlGnBu_r
                           (65): YlGn_r           - YlGn_r
                           (66): YlOrBr           - YlOrBr
                           (67): YlOrBr_r         - YlOrBr_r
                           (68): YlOrRd           - YlOrRd
                           (69): YlOrRd_r         - YlOrRd_r
                           (70): autumn           - autumn
                           (71): autumn_r         - autumn_r
                           (72): binary           - binary
                           (73): binary_r         - binary_r
                           (74): bone             - bone
                           (75): bone_r           - bone_r
                           (76): cool             - cool
                           (77): cool_r           - cool_r
                           (78): copper           - copper
                           (79): copper_r         - copper_r
                           (80): gist_earth       - gist_earth
                           (81): gist_earth_r     - gist_earth_r
                           (82): gist_ncar        - gist_ncar
                           (83): gist_ncar_r      - gist_ncar_r
                           (84): gist_stern       - gist_stern
                           (85): gist_stern_r     - gist_stern_r
                           (86): gray             - gray
                           (87): gray_r           - gray_r
                           (88): hot              - hot
                           (89): hot_r            - hot_r
                           (90): hsv              - hsv
                           (91): hsv_r            - hsv_r
                           (92): jet              - jet
                           (93): jet_r            - jet_r
                           (94): pink             - pink
                           (95): pink_r           - pink_r
                           (96): spectral         - spectral
                           (97): spectral_r       - spectral_r
                           (98): spring           - spring
                           (99): spring_r         - spring_r
                           (100): summer           - summer
                           (101): summer_r         - summer_r
                           (102): winter           - winter
                           (103): winter_r         - winter_r
Clone this wiki locally