zbar: GStreamer Bad Plugins 1.0 Plugins Reference Manual

## zbar zbar |

## Properties

gboolean | message | Read / Write
gboolean | cache | Read / Write
gboolean | attach-frame | Read / Write

## Types and Values

struct | GstZBar

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GstObject
                ╰── GstElement
                    ╰── GstBaseTransform
                        ╰── GstVideoFilter
                            ╰── GstZBar

## Description

Detect bar codes in the video streams and send them as element messages to the GstBus if .“message” property is `TRUE`. If the .“attach-frame” property is `TRUE`, the posted barcode message includes a sample of the frame where the barcode was detected (Since 1.6).

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.

- gint `"quality"`: an unscaled, relative quantity: larger values are better than smaller values.

- GstSample `"frame"`: the frame in which the barcode message was detected, if the .“attach-frame” property was set to `TRUE` (Since 1.6)

### Example launch lines

    1
    gst-launch-1.0 -m v4l2src ! videoconvert ! zbar ! videoconvert ! xvimagesink

This pipeline will detect barcodes and send them as messages.

    1
    gst-launch-1.0 -m v4l2src ! tee name=t ! queue ! videoconvert ! 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 | sink
direction | sink
presence | always
details | video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

name | src
direction | source
presence | always
details | video/x-raw, format=(string){ Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }, width=(int)[ 1, 2147483647 ], height=(int)[ 1, 2147483647 ], framerate=(fraction)[ 0/1, 2147483647/1 ]

## Functions

## Types and Values

### struct GstZBar

    struct GstZBar;

Opaque data structure.

## Property Details

### The `“message”` property

      “message”                  gboolean

Post a barcode message for each detected code.

Flags: Read / Write

Default value: TRUE

### The `“cache”` property

      “cache”                    gboolean

Enable or disable the inter-image result cache.

Flags: Read / Write

Default value: FALSE

### The `“attach-frame”` property

      “attach-frame”             gboolean

Attach a frame dump to each barcode message.

Flags: Read / Write

Default value: FALSE