ARG_WIDTH,
ARG_HEIGHT,
ARG_FOURCC,
+ ARG_RATE,
/* FILL ME */
};
g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_FOURCC,
g_param_spec_string ("fourcc", "fourcc", "fourcc",
NULL, G_PARAM_READWRITE));
+ g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_RATE,
+ g_param_spec_int ("rate", "Rate", "Frame rate",
+ 0, 100, 30, G_PARAM_READWRITE));
parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
videotestsrc->width = 640;
videotestsrc->height = 480;
+ videotestsrc->rate = 30;
videotestsrc->timestamp = 0;
- videotestsrc->interval = GST_SECOND / 1;
+ videotestsrc->interval = GST_SECOND / videotestsrc->rate;
videotestsrc->pool = NULL;
}
printf ("forcing FOURCC to 0x%08x\n", src->forced_format);
}
break;
+ case ARG_RATE:
+ src->rate = g_value_get_int (value);
+ src->interval = GST_SECOND/src->rate;
+ break;
default:
break;
}
/* FIXME */
/* g_value_set_int (value, src->forced_format); */
break;
+ case ARG_RATE:
+ g_value_set_int (value, src->rate);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;