From: <wt...@fr...> - 2005-10-04 18:46:27
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: wtay Date: Tue Oct 04 2005 11:46:21 PDT Log message: * gst/elements/gstfakesink.c: (gst_fake_sink_get_property), (gst_fake_sink_event), (gst_fake_sink_preroll), (gst_fake_sink_render), (gst_fake_sink_change_state): * gst/elements/gstfakesrc.c: (gst_fake_src_event_handler), (gst_fake_src_get_property), (gst_fake_src_create), (gst_fake_src_stop): * gst/elements/gstidentity.c: (gst_identity_stop): Protect last_message with lock. Modified files: . : ChangeLog gst/elements : gstfakesink.c gstfakesrc.c gstidentity.c gsttee.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.1619&r2=1.1620 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/elements/gstfakesink.c.diff?r1=1.92&r2=1.93 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/elements/gstfakesrc.c.diff?r1=1.108&r2=1.109 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/elements/gstidentity.c.diff?r1=1.86&r2=1.87 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/gst/elements/gsttee.c.diff?r1=1.66&r2=1.67 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.1619 retrieving revision 1.1620 diff -u -d -r1.1619 -r1.1620 --- ChangeLog 4 Oct 2005 15:04:50 -0000 1.1619 +++ ChangeLog 4 Oct 2005 18:46:09 -0000 1.1620 @@ -1,3 +1,14 @@ +2005-10-04 Wim Taymans <wi...@fl...> + + * gst/elements/gstfakesink.c: (gst_fake_sink_get_property), + (gst_fake_sink_event), (gst_fake_sink_preroll), + (gst_fake_sink_render), (gst_fake_sink_change_state): + * gst/elements/gstfakesrc.c: (gst_fake_src_event_handler), + (gst_fake_src_get_property), (gst_fake_src_create), + (gst_fake_src_stop): + * gst/elements/gstidentity.c: (gst_identity_stop): + Protect last_message with lock. 2005-10-04 Edward Hervey <ed...@fl...> * gst/gstformat.h: Index: gstfakesink.c RCS file: /cvs/gstreamer/gstreamer/gst/elements/gstfakesink.c,v retrieving revision 1.92 retrieving revision 1.93 diff -u -d -r1.92 -r1.93 --- gstfakesink.c 28 Sep 2005 12:52:51 -0000 1.92 +++ gstfakesink.c 4 Oct 2005 18:46:09 -0000 1.93 @@ -274,7 +274,9 @@ g_value_set_boolean (value, sink->signal_handoffs); break; case PROP_LAST_MESSAGE: + GST_LOCK (sink); g_value_set_string (value, sink->last_message); + GST_UNLOCK (sink); case PROP_CAN_ACTIVATE_PUSH: g_value_set_boolean (value, GST_BASE_SINK (sink)->can_activate_push); @@ -297,6 +299,7 @@ if (!sink->silent) { gchar *sstr; + GST_LOCK (sink); g_free (sink->last_message); if ((s = gst_event_get_structure (event))) @@ -308,6 +311,7 @@ g_strdup_printf ("event ******* E (type: %d, %s) %p", GST_EVENT_TYPE (event), sstr, event); g_free (sstr); + GST_UNLOCK (sink); g_object_notify (G_OBJECT (sink), "last_message"); } @@ -321,9 +325,11 @@ GstFakeSink *sink = GST_FAKE_SINK (bsink); sink->last_message = g_strdup_printf ("preroll ******* "); @@ -336,6 +342,7 @@ sink->last_message = @@ -346,6 +353,7 @@ GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_TIME_ARGS (GST_BUFFER_DURATION (buf)), GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET_END (buf), GST_MINI_OBJECT (buf)->flags, buf); @@ -397,8 +405,10 @@ case GST_STATE_CHANGE_READY_TO_NULL: if (fakesink->state_error == FAKE_SINK_STATE_ERROR_READY_NULL) goto error; + GST_LOCK (fakesink); g_free (fakesink->last_message); fakesink->last_message = NULL; + GST_UNLOCK (fakesink); default: Index: gstfakesrc.c RCS file: /cvs/gstreamer/gstreamer/gst/elements/gstfakesrc.c,v retrieving revision 1.108 retrieving revision 1.109 diff -u -d -r1.108 -r1.109 --- gstfakesrc.c 28 Sep 2005 12:52:51 -0000 1.108 +++ gstfakesrc.c 4 Oct 2005 18:46:09 -0000 1.109 @@ -351,11 +351,13 @@ src = GST_FAKE_SRC (basesrc); if (!src->silent) { + GST_LOCK (src); g_free (src->last_message); src->last_message = g_strdup_printf ("event ******* E (type: %d) %p", GST_EVENT_TYPE (event), event); + GST_UNLOCK (src); g_object_notify (G_OBJECT (src), "last_message"); @@ -506,7 +508,9 @@ g_value_set_boolean (value, src->dump); + GST_LOCK (src); g_value_set_string (value, src->last_message); + GST_UNLOCK (src); g_value_set_boolean (value, GST_BASE_SRC (src)->can_activate_push); @@ -693,6 +697,7 @@ GST_BUFFER_TIMESTAMP (buf) = time; @@ -703,6 +708,7 @@ @@ -741,12 +747,14 @@ + GST_LOCK (src); if (src->parent) { gst_buffer_unref (src->parent); src->parent = NULL; g_free (src->last_message); src->last_message = NULL; + GST_UNLOCK (src); return TRUE; } Index: gstidentity.c RCS file: /cvs/gstreamer/gstreamer/gst/elements/gstidentity.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- gstidentity.c 28 Sep 2005 12:52:51 -0000 1.86 +++ gstidentity.c 4 Oct 2005 18:46:09 -0000 1.87 @@ -497,8 +497,10 @@ identity = GST_IDENTITY (trans); + GST_LOCK (identity); g_free (identity->last_message); identity->last_message = NULL; + GST_UNLOCK (identity); Index: gsttee.c RCS file: /cvs/gstreamer/gstreamer/gst/elements/gsttee.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- gsttee.c 30 Sep 2005 15:43:03 -0000 1.66 +++ gsttee.c 4 Oct 2005 18:46:09 -0000 1.67 @@ -274,6 +274,7 @@ res = gst_pad_push (pad, gst_buffer_ref (data->buffer)); g_value_set_enum (ret, res); gst_object_unref (pad); return (res == GST_FLOW_OK); |