zbar

Detect bar codes in the video streams and send them as element messages to the GstBus if .#GstZBar:message property is TRUE. If the .#GstZBar: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 namedbarcode. The structure contains these fields:

  • GstClockTime timestamp: the timestamp of the buffer that triggered the message.
  • gchar * type: the symbol type.
  • gchar * symbol: the detected 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 .#GstZBar:attach-frame property was set to TRUE (Since 1.6)

Example launch lines

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

This pipeline will detect barcodes and send them as messages.

 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

Hierarchy

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

Factory details

Authors: – Stefan Kost

Classification:Filter/Analyzer/Video

Rank – none

Plugin – zbar

Package – GStreamer Bad Plug-ins

Pad Templates

sink

video/x-raw:
         format: { Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsink

Object typeGstPad


src

video/x-raw:
         format: { Y800, I420, YV12, NV12, NV21, Y41B, Y42B, YUV9, YVU9 }
          width: [ 1, 2147483647 ]
         height: [ 1, 2147483647 ]
      framerate: [ 0/1, 2147483647/1 ]

Presencealways

Directionsrc

Object typeGstPad


Properties

attach-frame

“attach-frame” gboolean

Attach a frame dump to each barcode message

Flags : Read / Write

Default value : false


cache

“cache” gboolean

Enable or disable the inter-image result cache

Flags : Read / Write

Default value : false


message

“message” gboolean

Post a barcode message for each detected code

Flags : Read / Write

Default value : true


The results of the search are