static void gst_face_blur_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstFaceBlur *filter = GST_FACE_BLUR (object); switch (prop_id) { case PROP_PROFILE: g_free (filter->profile); filter->profile = g_value_dup_string (value); gst_face_blur_load_profile (filter); filter->sent_profile_load_failed_msg = FALSE; break; case PROP_SCALE_FACTOR: filter->scale_factor = g_value_get_double (value); break; case PROP_MIN_NEIGHBORS: filter->min_neighbors = g_value_get_int (value); break; case PROP_MIN_SIZE_WIDTH: filter->min_size_width = g_value_get_int (value); break; case PROP_MIN_SIZE_HEIGHT: filter->min_size_height = g_value_get_int (value); break; case PROP_FLAGS: filter->flags = g_value_get_flags (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
/* initialize the new element * instantiate pads and add them to element * set pad calback functions * initialize instance structure */ static void gst_face_blur_init (GstFaceBlur * filter) { filter->profile = g_strdup (DEFAULT_PROFILE); gst_face_blur_load_profile (filter); gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter), TRUE); }
/* initialize the new element * instantiate pads and add them to element * set pad calback functions * initialize instance structure */ static void gst_face_blur_init (GstFaceBlur * filter) { filter->profile = g_strdup (DEFAULT_PROFILE); gst_face_blur_load_profile (filter); filter->sent_profile_load_failed_msg = FALSE; filter->scale_factor = DEFAULT_SCALE_FACTOR; filter->min_neighbors = DEFAULT_MIN_NEIGHBORS; filter->flags = DEFAULT_FLAGS; filter->min_size_width = DEFAULT_MIN_SIZE_WIDTH; filter->min_size_height = DEFAULT_MIN_SIZE_HEIGHT; gst_opencv_video_filter_set_in_place (GST_OPENCV_VIDEO_FILTER_CAST (filter), TRUE); }
static void gst_face_blur_set_property (GObject * object, guint prop_id, const GValue * value, GParamSpec * pspec) { GstFaceBlur *filter = GST_FACE_BLUR (object); switch (prop_id) { case PROP_PROFILE: g_free (filter->profile); filter->profile = g_value_dup_string (value); gst_face_blur_load_profile (filter); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
/* initialize the new element * instantiate pads and add them to element * set pad calback functions * initialize instance structure */ static void gst_face_blur_init (GstFaceBlur * filter) { filter->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); GST_PAD_SET_PROXY_CAPS (filter->sinkpad); gst_pad_set_event_function (filter->sinkpad, GST_DEBUG_FUNCPTR (gst_face_blur_handle_sink_event)); gst_pad_set_chain_function (filter->sinkpad, GST_DEBUG_FUNCPTR (gst_face_blur_chain)); filter->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); GST_PAD_SET_PROXY_CAPS (filter->srcpad); gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); filter->profile = g_strdup (DEFAULT_PROFILE); gst_face_blur_load_profile (filter); }
/* initialize the new element * instantiate pads and add them to element * set pad calback functions * initialize instance structure */ static void gst_face_blur_init (GstFaceBlur * filter, GstFaceBlurClass * gclass) { filter->sinkpad = gst_pad_new_from_static_template (&sink_factory, "sink"); gst_pad_set_setcaps_function (filter->sinkpad, GST_DEBUG_FUNCPTR (gst_face_blur_set_caps)); gst_pad_set_getcaps_function (filter->sinkpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_pad_set_chain_function (filter->sinkpad, GST_DEBUG_FUNCPTR (gst_face_blur_chain)); filter->srcpad = gst_pad_new_from_static_template (&src_factory, "src"); gst_pad_set_getcaps_function (filter->srcpad, GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps)); gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad); gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad); filter->profile = g_strdup (DEFAULT_PROFILE); gst_face_blur_load_profile (filter); }