static void
gst_video_analyse_init (GTypeInstance * instance, gpointer g_class)
{
  GstVideoAnalyse *videoanalyse;

  videoanalyse = GST_VIDEO_ANALYSE (instance);

  GST_DEBUG_OBJECT (videoanalyse, "gst_video_analyse_init");
}
void
gst_video_analyse_finalize (GObject * object)
{
  GstVideoAnalyse *videoanalyse = GST_VIDEO_ANALYSE (object);

  GST_DEBUG_OBJECT (videoanalyse, "finalize");

  /* clean up object here */

  G_OBJECT_CLASS (gst_video_analyse_parent_class)->finalize (object);
}
static GstFlowReturn
gst_video_analyse_transform_frame_ip (GstVideoFilter * filter,
    GstVideoFrame * frame)
{
  GstVideoAnalyse *videoanalyse = GST_VIDEO_ANALYSE (filter);

  GST_DEBUG_OBJECT (videoanalyse, "transform_frame_ip");

  gst_video_analyse_planar (videoanalyse, frame);

  if (videoanalyse->message)
    gst_video_analyse_post_message (videoanalyse, frame);

  return GST_FLOW_OK;
}
static void
gst_video_analyse_get_property (GObject * object, guint prop_id, GValue * value,
    GParamSpec * pspec)
{
  GstVideoAnalyse *videoanalyse;

  videoanalyse = GST_VIDEO_ANALYSE (object);

  switch (prop_id) {
    case PROP_MESSAGE:
      g_value_set_boolean (value, videoanalyse->message);
      break;
    default:
      G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
      break;
  }
}
static gboolean
gst_video_analyse_set_caps (GstBaseTransform * btrans, GstCaps * incaps,
    GstCaps * outcaps)
{
  GstVideoAnalyse *vf;
  GstStructure *in_s;
  gboolean ret;

  vf = GST_VIDEO_ANALYSE (btrans);

  in_s = gst_caps_get_structure (incaps, 0);

  ret = gst_structure_get_int (in_s, "width", &vf->width);
  ret &= gst_structure_get_int (in_s, "height", &vf->height);

  return ret;
}
static GstFlowReturn
gst_video_analyse_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
{
  GstVideoAnalyse *videoanalyse;
  GstFlowReturn ret = GST_FLOW_OK;
  guint8 *data;

  videoanalyse = GST_VIDEO_ANALYSE (trans);

  data = GST_BUFFER_DATA (buf);

  gst_video_analyse_420 (videoanalyse, data, videoanalyse->width,
      videoanalyse->height);

  if (videoanalyse->message)
    gst_video_analyse_post_message (videoanalyse, buf);

  return ret;
}