videodetect

videodetect — Detect a pattern in a video signal

Synopsis




                    GstVideoDetect;

Description

This plugin detects ::pattern-count squares in the bottom left corner of the video frames. The squares have a width and height of respectively ::pattern-width and ::patern-height. Even squares must be black and odd squares must be white.

When the pattern has been found, ::pattern-data-count squares after the pattern squares are read as a bitarray. White squares represent a 1 bit and black squares a 0 bit. The bitarray will will included in the element message that is posted (see below).

After the pattern has been found and the data pattern has been read, an element message called "GstVideoDetect" will be posted on the bus. If the pattern is no longer found in the frame, the same element message is posted with the have-pattern field set to FALSE. The message is only posted if the message property is TRUE.

The message's structure contains these fields:

  • gboolean "have-pattern": if the pattern was found. This field will be set to TRUE for as long as the pattern was found in the frame and set to FALSE for the first frame that does not contain the pattern anymore.

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

  • GstClockTime "stream-time": the stream time of the buffer.

  • GstClockTime "running-time": the running_time of the buffer.

  • GstClockTime "duration": the duration of the buffer.

  • guint "data": the data-pattern found after the pattern or 0 when have-signal is FALSE.

Example launch line

gst-launch videotestsrc ! videodetect ! ffmpegcolorspace ! ximagesink

Last reviewed on 2007-05-30 (0.10.5)

Element Information

plugin videosignal
author Wim Taymans <wim@fluendo.com>
class Filter/Effect/Video

Details

GstVideoDetect

typedef struct {
  GstVideoFilter videofilter;
  
  gint width, height;
  guint32 format;

  gboolean message;
  gint pattern_width;
  gint pattern_height;
  gint pattern_count;
  gint pattern_data_count;
  gdouble pattern_sensitivity;

  gboolean in_pattern;
} GstVideoDetect;

Opaque datastructure.