+2007-06-05 Wim Taymans <wim@fluendo.com>
+
+ * gst/gstobject.c: (gst_object_class_init):
+ Fix signal signature.
+
+ * gst/gstsegment.c:
+ Add small clarification in the api docs.
+
+ * plugins/elements/gstfilesrc.c: (gst_file_src_set_location):
+ States are protected with object lock.
+
2007-06-05 Jan Schmidt <thaytan@mad.scientist.com>
* AUTHORS:
g_signal_new ("deep-notify", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_FIRST | G_SIGNAL_NO_RECURSE | G_SIGNAL_DETAILED |
G_SIGNAL_NO_HOOKS, G_STRUCT_OFFSET (GstObjectClass, deep_notify), NULL,
- NULL, gst_marshal_VOID__OBJECT_PARAM, G_TYPE_NONE, 2, G_TYPE_OBJECT,
+ NULL, gst_marshal_VOID__OBJECT_PARAM, G_TYPE_NONE, 2, GST_TYPE_OBJECT,
G_TYPE_PARAM);
klass->path_string_separator = "/";
* updated. If @clip_start or @clip_stop are different from @start or @stop
* respectively, the region fell partially in the segment.
*
+ * Note that when @stop is -1, @clip_stop will be set to the end of the
+ * segment. Depending on the use case, this may or may not be what you want.
+ *
* Returns: TRUE if the given @start and @stop times fall partially or
* completely in @segment, FALSE if the values are completely outside
* of the segment.
static gboolean
gst_file_src_set_location (GstFileSrc * src, const gchar * location)
{
- /* the element must be stopped in order to do this */
- GST_STATE_LOCK (src);
- {
- GstState state;
+ GstState state;
- state = GST_STATE (src);
- if (state != GST_STATE_READY && state != GST_STATE_NULL)
- goto wrong_state;
- }
- GST_STATE_UNLOCK (src);
+ /* the element must be stopped in order to do this */
+ GST_OBJECT_LOCK (src);
+ state = GST_STATE (src);
+ if (state != GST_STATE_READY && state != GST_STATE_NULL)
+ goto wrong_state;
+ GST_OBJECT_UNLOCK (src);
g_free (src->filename);
g_free (src->uri);
wrong_state:
{
GST_DEBUG_OBJECT (src, "setting location in wrong state");
- GST_STATE_UNLOCK (src);
+ GST_OBJECT_UNLOCK (src);
return FALSE;
}
}