gst/gstobject.c: Fix signal signature.
authorWim Taymans <wim.taymans@gmail.com>
Tue, 5 Jun 2007 16:25:06 +0000 (16:25 +0000)
committerWim Taymans <wim.taymans@gmail.com>
Tue, 5 Jun 2007 16:25:06 +0000 (16:25 +0000)
Original commit message from CVS:
* 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.

ChangeLog
gst/gstobject.c
gst/gstsegment.c
plugins/elements/gstfilesrc.c

index 1634709..350587b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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:
index a9293e6..c1825cc 100644 (file)
@@ -265,7 +265,7 @@ gst_object_class_init (GstObjectClass * klass)
       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 = "/";
index ba23066..29be652 100644 (file)
@@ -646,6 +646,9 @@ gst_segment_to_running_time (GstSegment * segment, GstFormat format,
  * 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.
index ceec9e2..2538bac 100644 (file)
@@ -302,16 +302,14 @@ gst_file_src_finalize (GObject * object)
 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);
@@ -333,7 +331,7 @@ gst_file_src_set_location (GstFileSrc * src, const gchar * location)
 wrong_state:
   {
     GST_DEBUG_OBJECT (src, "setting location in wrong state");
-    GST_STATE_UNLOCK (src);
+    GST_OBJECT_UNLOCK (src);
     return FALSE;
   }
 }