2006-09-15 Wim Taymans <wim@fluendo.com>
+ * gst/gstobject.c: (gst_object_set_parent):
+ * gst/gstpipeline.c: (do_pipeline_seek):
+ Small cleanups in docs and code.
+
+ * gst/gstsegment.c: (gst_segment_clip):
+ * tests/check/gst/gstsegment.c: (GST_START_TEST):
+ if stop == start and start is in the segment, no clipping should be
+ done. Also add a test for this.
+
+2006-09-15 Wim Taymans <wim@fluendo.com>
+
* docs/design/part-buffering.txt:
* docs/gst/gstreamer-sections.txt:
* gst/gstmessage.c: (gst_message_new_buffering),
/* ERROR handling */
had_parent:
{
+ GST_CAT_DEBUG_OBJECT (GST_CAT_REFCOUNTING, object,
+ "set parent failed, object already had a parent");
GST_OBJECT_UNLOCK (object);
return FALSE;
}
/* need to call _get_state() since a bin state is only updated
* with this call. */
gst_element_get_state (element, &state, NULL, 0);
- was_playing = state == GST_STATE_PLAYING;
+ was_playing = (state == GST_STATE_PLAYING);
if (was_playing) {
/* and PAUSE when the pipeline was PLAYING, we don't need
* to wait for the state change to complete since we are going
- * to flush out any preroll sample anyway */
+ * to flush out any preroll sample anyway. */
gst_element_set_state (element, GST_STATE_PAUSED);
}
}
/* if a stop position is given and is before the segment start,
* we're outside of the segment */
- if (G_UNLIKELY (stop != -1 && stop <= segment->start))
+ if (G_UNLIKELY (stop != -1 && stop != start && stop <= segment->start))
return FALSE;
if (clip_start) {
fail_unless (cstart == 100);
fail_unless (cstop == 150);
+ /* special case, 0 duration */
+ res = gst_segment_clip (&segment, GST_FORMAT_BYTES,
+ 100, 100, &cstart, &cstop);
+ fail_unless (res == TRUE);
+ fail_unless (cstart == 100);
+ fail_unless (cstop == 100);
+
/* completely inside */
res = gst_segment_clip (&segment, GST_FORMAT_BYTES,
150, 200, &cstart, &cstop);