don't override offset and offset_end

Original commit message from CVS:
don't override offset and offset_end
This commit is contained in:
Thomas Vander Stichele 2004-06-25 13:05:11 +00:00
parent cd0d806b11
commit ccdfac8a3b
2 changed files with 19 additions and 9 deletions

View File

@ -1,3 +1,8 @@
2004-06-25 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/tcp/gsttcpclientsrc.c: (gst_tcpclientsrc_get):
better debug, don't override OFFSET and OFFSET_END
2004-06-25 Iain <iain@prettypeople.org> 2004-06-25 Iain <iain@prettypeople.org>
* gst-libs/gst/media-info/media-info-priv.c (gmi_set_mime): Add * gst-libs/gst/media-info/media-info-priv.c (gmi_set_mime): Add

View File

@ -222,10 +222,12 @@ gst_tcpclientsrc_get (GstPad * pad)
if (src->buffer_after_discont) { if (src->buffer_after_discont) {
buf = src->buffer_after_discont; buf = src->buffer_after_discont;
GST_LOG_OBJECT (src, GST_LOG_OBJECT (src,
"Returning buffer after discont of size %d with timestamp %" "Returning buffer after discont of size %d, ts %"
GST_TIME_FORMAT " and duration %" GST_TIME_FORMAT, GST_TIME_FORMAT ", dur %" GST_TIME_FORMAT
", offset %" G_GINT64_FORMAT ", offset_end %" G_GINT64_FORMAT,
GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); GST_TIME_ARGS (GST_BUFFER_DURATION (buf)),
GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET_END (buf));
src->buffer_after_discont = NULL; src->buffer_after_discont = NULL;
return GST_DATA (buf); return GST_DATA (buf);
} }
@ -295,8 +297,9 @@ gst_tcpclientsrc_get (GstPad * pad)
readsize = ret; readsize = ret;
GST_BUFFER_SIZE (buf) = readsize; GST_BUFFER_SIZE (buf) = readsize;
GST_BUFFER_MAXSIZE (buf) = readsize; GST_BUFFER_MAXSIZE (buf) = readsize;
GST_BUFFER_OFFSET (buf) = src->curoffset;
GST_BUFFER_OFFSET_END (buf) = src->curoffset + readsize; /* FIXME: we could decide to set OFFSET and OFFSET_END for non-protocol
* streams to mean the bytes processed */
/* if this is our first buffer, we need to send a discont with the /* if this is our first buffer, we need to send a discont with the
* given timestamp or the current offset, and store the buffer for * given timestamp or the current offset, and store the buffer for
@ -329,10 +332,12 @@ gst_tcpclientsrc_get (GstPad * pad)
src->curoffset += readsize; src->curoffset += readsize;
GST_LOG_OBJECT (src, GST_LOG_OBJECT (src,
"Returning buffer of size %d with timestamp %" GST_TIME_FORMAT "Returning buffer from _get of size %d, ts %"
" and duration %" GST_TIME_FORMAT, readsize, GST_TIME_FORMAT ", dur %" GST_TIME_FORMAT
GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)), ", offset %" G_GINT64_FORMAT ", offset_end %" G_GINT64_FORMAT,
GST_TIME_ARGS (GST_BUFFER_DURATION (buf))); GST_BUFFER_SIZE (buf), GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buf)),
GST_TIME_ARGS (GST_BUFFER_DURATION (buf)),
GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET_END (buf));
return GST_DATA (buf); return GST_DATA (buf);
} }