zbar

zbar — Detect bar codes in the video streams

Synopsis

                    GstZBar;

Description

Detect bar codes in the video streams and send them as element messages to the GstBus if ."message" property is TRUE.

The element generate messages named "barcode". The structure containes these fields:

  • GstClockTime "timestamp": the timestamp of the buffer that triggered the message.

  • gchar* "type": the symbol type.

  • gchar* "symbol": the deteted bar code data.

Example launch lines

gst-launch -m v4l2src ! ffmpegcolorspace ! zbar ! ffmpegcolorspace ! xvimagesink
This pipeline will detect barcodes and send them as messages.
gst-launch -m v4l2src ! tee name=t ! queue ! ffmpegcolorspace ! zbar ! fakesink t. ! queue ! xvimagesink
Same as above, but running the filter on a branch to keep the display in color

Synopsis

Element Information

plugin

zbar

author

Stefan Kost <ensonic@users.sf.net>

class

Filter/Analyzer/Video

Element Pads

name

src

direction

source

presence

always

details

video/x-raw-yuv, format=(fourcc){ Y800 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

name

sink

direction

sink

presence

always

details

video/x-raw-yuv, format=(fourcc){ Y800 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

Details

GstZBar

typedef struct {
  GstVideoFilter videofilter;

  /* format */
  gint width;
  gint height;

  /* properties */
  gboolean message;
  
  /* internals */
  zbar_image_scanner_t *scanner;
} GstZBar;

Opaque data structure.