gst/gstminiobject.c (gst_value_mini_object_collect): Use gst_value_set_mini_object...
authorAndy Wingo <wingo@pobox.com>
Fri, 27 May 2005 09:27:35 +0000 (09:27 +0000)
committerAndy Wingo <wingo@pobox.com>
Fri, 27 May 2005 09:27:35 +0000 (09:27 +0000)
Original commit message from CVS:
2005-05-26  Andy Wingo  <wingo@pobox.com>

* gst/gstminiobject.c (gst_value_mini_object_collect): Use
gst_value_set_mini_object so as to add a ref on the object (which
will be removed when the value is unset).

* gst/elements/gstfakesink.c (gst_fakesink_class_init): Fix signal
arg type in ::handoff.

* gst/gstelement.c (gst_element_change_state): Also deactivate
pads in READY->NULL, just in case the element didn't make it to
PAUSED. Wingo tested, Wim approved.

ChangeLog
docs/gst/tmpl/gstbuffer.sgml
docs/gst/tmpl/gstpad.sgml
gst/elements/gstfakesink.c
gst/gstelement.c
gst/gstminiobject.c
plugins/elements/gstfakesink.c

index 72c0a4c..74db72c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2005-05-26  Andy Wingo  <wingo@pobox.com>
+
+       * gst/gstminiobject.c (gst_value_mini_object_collect): Use
+       gst_value_set_mini_object so as to add a ref on the object (which
+       will be removed when the value is unset).
+
+       * gst/elements/gstfakesink.c (gst_fakesink_class_init): Fix signal
+       arg type in ::handoff.
+
+       * gst/gstelement.c (gst_element_change_state): Also deactivate
+       pads in READY->NULL, just in case the element didn't make it to
+       PAUSED. Wingo tested, Wim approved.
+
 2005-05-26  Wim Taymans  <wim@fluendo.com>
 
        * gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_prepare),
index 48c9145..cd5641d 100644 (file)
@@ -278,7 +278,7 @@ Tests if you can safely write data into a buffer's data array.
 @Returns: 
 
 
-<!-- ##### FUNCTION gst_buffer_merge ##### -->
+<!-- ##### FUNCTION gst_buffer_join ##### -->
 <para>
 
 </para>
@@ -288,42 +288,35 @@ Tests if you can safely write data into a buffer's data array.
 @Returns: 
 
 
-<!-- ##### FUNCTION gst_buffer_span ##### -->
+<!-- ##### FUNCTION gst_buffer_merge ##### -->
 <para>
 
 </para>
 
 @buf1: 
-@offset: 
 @buf2: 
-@len: 
 @Returns: 
 
 
-<!-- ##### FUNCTION gst_buffer_is_span_fast ##### -->
+<!-- ##### FUNCTION gst_buffer_span ##### -->
 <para>
 
 </para>
 
 @buf1: 
+@offset: 
 @buf2: 
+@len: 
 @Returns: 
 
 
-<!-- ##### FUNCTION gst_buffer_default_free ##### -->
-<para>
-
-</para>
-
-@buffer: 
-
-
-<!-- ##### FUNCTION gst_buffer_default_copy ##### -->
+<!-- ##### FUNCTION gst_buffer_is_span_fast ##### -->
 <para>
 
 </para>
 
-@buffer: 
+@buf1: 
+@buf2: 
 @Returns: 
 
 
index d401470..d5a62d9 100644 (file)
@@ -243,7 +243,6 @@ The direction of a pad.
 
 </para>
 
-@GST_PAD_ACTIVE: 
 @GST_PAD_BLOCKED: 
 @GST_PAD_FLUSHING: 
 @GST_PAD_IN_GETCAPS: 
@@ -354,14 +353,6 @@ Checks if the pad is linked.
 @pad: a #GstPad to check.
 
 
-<!-- ##### MACRO GST_PAD_IS_ACTIVE ##### -->
-<para>
-Checks if the pad is active.
-</para>
-
-@pad: a #GstPad to check
-
-
 <!-- ##### MACRO GST_PAD_IS_USABLE ##### -->
 <para>
 Checks if a pad is usable. A usable pad is both linked and active.
index a6887b4..1daa9cb 100644 (file)
@@ -173,7 +173,7 @@ gst_fakesink_class_init (GstFakeSinkClass * klass)
       g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
       G_STRUCT_OFFSET (GstFakeSinkClass, handoff), NULL, NULL,
       gst_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2,
-      G_TYPE_OBJECT, GST_TYPE_PAD);
+      GST_TYPE_BUFFER, GST_TYPE_PAD);
 
   gstelement_class->change_state =
       GST_DEBUG_FUNCPTR (gst_fakesink_change_state);
index d3d6ac4..672052d 100644 (file)
@@ -1956,13 +1956,15 @@ gst_element_change_state (GstElement * element)
     case GST_STATE_PLAYING_TO_PAUSED:
       break;
     case GST_STATE_PAUSED_TO_READY:
+    case GST_STATE_READY_TO_NULL:
+      /* deactivate pads in both cases, since they are activated on
+         ready->paused but the element might not have made it to paused */
       if (!gst_element_pads_activate (element, FALSE)) {
         result = GST_STATE_FAILURE;
       } else {
         element->base_time = 0;
       }
       break;
-    case GST_STATE_READY_TO_NULL:
       break;
     default:
       /* this will catch real but unhandled state changes;
index 4dd8b25..cdb9e75 100644 (file)
@@ -249,7 +249,7 @@ static gchar *
 gst_value_mini_object_collect (GValue * value, guint n_collect_values,
     GTypeCValue * collect_values, guint collect_flags)
 {
-  value->data[0].v_pointer = collect_values[0].v_pointer;
+  gst_value_set_mini_object (value, collect_values[0].v_pointer);
 
   return NULL;
 }
index a6887b4..1daa9cb 100644 (file)
@@ -173,7 +173,7 @@ gst_fakesink_class_init (GstFakeSinkClass * klass)
       g_signal_new ("handoff", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_LAST,
       G_STRUCT_OFFSET (GstFakeSinkClass, handoff), NULL, NULL,
       gst_marshal_VOID__OBJECT_OBJECT, G_TYPE_NONE, 2,
-      G_TYPE_OBJECT, GST_TYPE_PAD);
+      GST_TYPE_BUFFER, GST_TYPE_PAD);
 
   gstelement_class->change_state =
       GST_DEBUG_FUNCPTR (gst_fakesink_change_state);