+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),
@Returns:
-<!-- ##### FUNCTION gst_buffer_merge ##### -->
+<!-- ##### FUNCTION gst_buffer_join ##### -->
<para>
</para>
@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:
</para>
-@GST_PAD_ACTIVE:
@GST_PAD_BLOCKED:
@GST_PAD_FLUSHING:
@GST_PAD_IN_GETCAPS:
@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.
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);
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;
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;
}
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);