From: <wt...@ke...> - 2006-04-28 13:19:12
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: wtay Date: Fri Apr 28 2006 13:18:53 UTC Log message: * libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek), (gst_base_src_send_event), (gst_base_src_change_state): Documentation updates. Modified files: . : ChangeLog libs/gst/base : gstbasesrc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.2446&r2=1.2447 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/libs/gst/base/gstbasesrc.c.diff?r1=1.103&r2=1.104 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.2446 retrieving revision 1.2447 diff -u -d -r1.2446 -r1.2447 --- ChangeLog 28 Apr 2006 13:16:03 -0000 1.2446 +++ ChangeLog 28 Apr 2006 13:18:41 -0000 1.2447 @@ -1,5 +1,11 @@ 2006-04-28 Wim Taymans <wi...@fl...> + * libs/gst/base/gstbasesrc.c: (gst_base_src_perform_seek), + (gst_base_src_send_event), (gst_base_src_change_state): + Documentation updates. + +2006-04-28 Wim Taymans <wi...@fl...> * plugins/elements/gstfdsink.c: (gst_fd_sink_render), (gst_fd_sink_check_fd), (gst_fd_sink_update_fd): handle EAGAIN, EINTR and short writes correctly. Also clean Index: gstbasesrc.c RCS file: /cvs/gstreamer/gstreamer/libs/gst/base/gstbasesrc.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -d -r1.103 -r1.104 --- gstbasesrc.c 8 Apr 2006 20:57:30 -0000 1.103 +++ gstbasesrc.c 28 Apr 2006 13:18:41 -0000 1.104 @@ -87,9 +87,10 @@ * value from the READY to PAUSED state will be GST_STATE_CHANGE_NO_PREROLL. * </para> * <para> - * A typical live source will timestamp the buffers they create with the - * current stream time of the pipeline. This is one reason that they can only - * produce data in PLAYING, when the clock is actually distributed and running. + * A typical live source will timestamp the buffers it creates with the + * current stream time of the pipeline. This is one reason why a live source + * can only produce data in the PLAYING state, when the clock is actually + * distributed and running. * The #GstBaseSrc::get_times method can be used to implement pseudo-live @@ -154,7 +155,12 @@ * </programlisting> - * Last reviewed on 2006-03-31 (0.10.5) + * Note that setting the source element to NULL or READY when the + * pipeline is in the PAUSED state may cause a deadlock since the streaming + * thread might be blocked in PREROLL. + * </para> + * <para> + * Last reviewed on 2006-04-14 (0.10.6) * </refsect2> */ @@ -405,8 +411,14 @@ * @src: base source instance * @live: new live-mode * - * If the element listens to a live source, the @livemode should - * be set to %TRUE. This declares that this source can't seek. + * If the element listens to a live source, @live should + * be set to %TRUE. + * + * A live source will not produce data in the PAUSED state and + * will therefore not be able to participate in the PREROLL phase + * of a pipeline. To signal this fact to the application and the + * pipeline, the state change return value of the live source will + * be GST_STATE_CHANGE_NO_PREROLL. void gst_base_src_set_live (GstBaseSrc * src, gboolean live) @@ -797,12 +809,12 @@ gst_base_src_unlock (src); /* grab streaming lock, this should eventually be possible, either - * because the task is paused or out streaming thread stopped + * because the task is paused or our streaming thread stopped * because our peer is flushing. */ GST_PAD_STREAM_LOCK (src->srcpad); /* make copy into temp structure, we can only update the main one - * when the subclass actually could to the seek. */ + * when the subclass actually could do the seek. */ memcpy (&seeksegment, &src->segment, sizeof (GstSegment)); /* now configure the seek segment */ @@ -892,9 +904,16 @@ switch (GST_EVENT_TYPE (event)) { case GST_EVENT_FLUSH_START: case GST_EVENT_FLUSH_STOP: + /* sending random flushes downstream can break stuff, + * especially sync since all segment info will get flushed */ break; case GST_EVENT_EOS: + /* FIXME, queue EOS and make sure the task or pull function + * perform the EOS actions. */ + break; case GST_EVENT_NEWSEGMENT: + /* sending random NEWSEGMENT downstream can break sync. */ case GST_EVENT_TAG: case GST_EVENT_BUFFERSIZE: @@ -1894,6 +1913,9 @@ if (!gst_base_src_stop (basesrc)) goto error_stop; + /* FIXME, deprecate this behaviour, it is very dangerous. + * the prefered way of sending EOS downstream is by sending + * the EOS event to the element */ if (!basesrc->priv->last_sent_eos) { GST_DEBUG_OBJECT (basesrc, "Sending EOS event"); gst_pad_push_event (basesrc->srcpad, gst_event_new_eos ()); |