From: <wt...@ke...> - 2006-10-06 13:01:44
|
CVS Root: /cvs/gstreamer Module: gstreamer Changes by: wtay Date: Fri Oct 06 2006 13:01:43 UTC Log message: * plugins/elements/gstfilesink.c: (gst_file_sink_open_file), (gst_file_sink_close_file), (gst_file_sink_event), (gst_file_sink_render): Add some FIXME for the NEWSEGMENT handling. Modified files: . : ChangeLog plugins/elements: gstfilesink.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/ChangeLog.diff?r1=1.2850&r2=1.2851 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gstreamer/plugins/elements/gstfilesink.c.diff?r1=1.78&r2=1.79 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gstreamer/ChangeLog,v retrieving revision 1.2850 retrieving revision 1.2851 diff -u -d -r1.2850 -r1.2851 --- ChangeLog 5 Oct 2006 15:47:44 -0000 1.2850 +++ ChangeLog 6 Oct 2006 13:01:30 -0000 1.2851 @@ -1,3 +1,10 @@ +2006-10-06 Wim Taymans <wi...@fl...> + + * plugins/elements/gstfilesink.c: (gst_file_sink_open_file), + (gst_file_sink_close_file), (gst_file_sink_event), + (gst_file_sink_render): + Add some FIXME for the NEWSEGMENT handling. 2006-10-05 Zaheer Abbas Merali <zaheerabbas at merali dot org> * gst/parse/grammar.y: Index: gstfilesink.c RCS file: /cvs/gstreamer/gstreamer/plugins/elements/gstfilesink.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- gstfilesink.c 2 Oct 2006 09:41:09 -0000 1.78 +++ gstfilesink.c 6 Oct 2006 13:01:30 -0000 1.79 @@ -374,14 +374,18 @@ switch (type) { case GST_EVENT_NEWSEGMENT: { - gint64 soffset, eoffset; + gint64 start, stop, pos; GstFormat format; - gst_event_parse_new_segment (event, NULL, NULL, &format, &soffset, - &eoffset, NULL); + gst_event_parse_new_segment (event, NULL, NULL, &format, &start, + &stop, &pos); if (format == GST_FORMAT_BYTES) { - if (!gst_file_sink_do_seek (filesink, (guint64) soffset)) + /* FIXME, the seek should be performed on the pos field, start/stop are + * just boundaries for valid bytes offsets. We should also fill the file + * with zeroes if the new position extends the current EOF (sparse streams + * and segment accumulation). */ + if (!gst_file_sink_do_seek (filesink, (guint64) start)) goto seek_failed; } else { GST_DEBUG ("Ignored NEWSEGMENT event of format %u (%s)", |