mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
gst/: Small cleanups in docs and code.
Original commit message from CVS: * 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.
This commit is contained in:
parent
bc14daabe7
commit
bb634398b7
5 changed files with 23 additions and 3 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
|||
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:
|
||||
|
|
|
@ -810,6 +810,8 @@ gst_object_set_parent (GstObject * object, GstObject * parent)
|
|||
/* 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;
|
||||
}
|
||||
|
|
|
@ -341,12 +341,12 @@ do_pipeline_seek (GstElement * element, GstEvent * event)
|
|||
/* 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -630,7 +630,7 @@ gst_segment_clip (GstSegment * segment, GstFormat format, gint64 start,
|
|||
|
||||
/* 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) {
|
||||
|
|
|
@ -70,6 +70,13 @@ GST_START_TEST (segment_seek_nosize)
|
|||
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);
|
||||
|
|
Loading…
Reference in a new issue