From 1457b69cb74abd975555408ed345528e6487928c Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 27 May 2005 09:27:35 +0000 Subject: [PATCH] gst/gstminiobject.c (gst_value_mini_object_collect): Use gst_value_set_mini_object so as to add a ref on the object (... Original commit message from CVS: 2005-05-26 Andy Wingo * 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 | 13 +++++++++++++ docs/gst/tmpl/gstbuffer.sgml | 23 ++++++++--------------- docs/gst/tmpl/gstpad.sgml | 9 --------- gst/elements/gstfakesink.c | 2 +- gst/gstelement.c | 4 +++- gst/gstminiobject.c | 2 +- plugins/elements/gstfakesink.c | 2 +- 7 files changed, 27 insertions(+), 28 deletions(-) diff --git a/ChangeLog b/ChangeLog index 72c0a4c..74db72c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2005-05-26 Andy Wingo + + * 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 * gst/gstpad.c: (gst_pad_set_active), (gst_pad_link_prepare), diff --git a/docs/gst/tmpl/gstbuffer.sgml b/docs/gst/tmpl/gstbuffer.sgml index 48c9145..cd5641d 100644 --- a/docs/gst/tmpl/gstbuffer.sgml +++ b/docs/gst/tmpl/gstbuffer.sgml @@ -278,7 +278,7 @@ Tests if you can safely write data into a buffer's data array. @Returns: - + @@ -288,42 +288,35 @@ Tests if you can safely write data into a buffer's data array. @Returns: - + @buf1: -@offset: @buf2: -@len: @Returns: - + @buf1: +@offset: @buf2: +@len: @Returns: - - - - - -@buffer: - - - + -@buffer: +@buf1: +@buf2: @Returns: diff --git a/docs/gst/tmpl/gstpad.sgml b/docs/gst/tmpl/gstpad.sgml index d401470..d5a62d9 100644 --- a/docs/gst/tmpl/gstpad.sgml +++ b/docs/gst/tmpl/gstpad.sgml @@ -243,7 +243,6 @@ The direction of a pad. -@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. - - -Checks if the pad is active. - - -@pad: a #GstPad to check - - Checks if a pad is usable. A usable pad is both linked and active. diff --git a/gst/elements/gstfakesink.c b/gst/elements/gstfakesink.c index a6887b4..1daa9cb 100644 --- a/gst/elements/gstfakesink.c +++ b/gst/elements/gstfakesink.c @@ -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); diff --git a/gst/gstelement.c b/gst/gstelement.c index d3d6ac4..672052d 100644 --- a/gst/gstelement.c +++ b/gst/gstelement.c @@ -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; diff --git a/gst/gstminiobject.c b/gst/gstminiobject.c index 4dd8b25..cdb9e75 100644 --- a/gst/gstminiobject.c +++ b/gst/gstminiobject.c @@ -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; } diff --git a/plugins/elements/gstfakesink.c b/plugins/elements/gstfakesink.c index a6887b4..1daa9cb 100644 --- a/plugins/elements/gstfakesink.c +++ b/plugins/elements/gstfakesink.c @@ -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); -- 2.7.4