mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 10:42:22 +00:00
ext/gnomevfs/gstgnomevfssrc.c: Better debugging.
Original commit message from CVS: * ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_create): Better debugging.
This commit is contained in:
parent
d6b5e52a36
commit
02fc9a164a
2 changed files with 27 additions and 10 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2005-07-19 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_create):
|
||||||
|
Better debugging.
|
||||||
|
|
||||||
2005-07-19 Wim Taymans <wim@fluendo.com>
|
2005-07-19 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* examples/seeking/seek.c: (make_dv_pipeline),
|
* examples/seeking/seek.c: (make_dv_pipeline),
|
||||||
|
|
|
@ -945,22 +945,20 @@ gst_gnomevfssrc_create (GstBaseSrc * basesrc, guint64 offset, guint size,
|
||||||
|
|
||||||
src = GST_GNOMEVFSSRC (basesrc);
|
src = GST_GNOMEVFSSRC (basesrc);
|
||||||
|
|
||||||
|
GST_DEBUG ("now at %llu, reading %lld, size %u", src->curoffset, offset,
|
||||||
|
size);
|
||||||
|
|
||||||
/* seek if required */
|
/* seek if required */
|
||||||
if (src->curoffset != offset) {
|
if (src->curoffset != offset) {
|
||||||
|
GST_DEBUG ("need to seek");
|
||||||
if (src->seekable) {
|
if (src->seekable) {
|
||||||
|
GST_DEBUG ("seeking to %lld", offset);
|
||||||
res = gnome_vfs_seek (src->handle, GNOME_VFS_SEEK_START, offset);
|
res = gnome_vfs_seek (src->handle, GNOME_VFS_SEEK_START, offset);
|
||||||
if (res != GNOME_VFS_OK) {
|
if (res != GNOME_VFS_OK)
|
||||||
GST_ERROR_OBJECT (src,
|
goto seek_failed;
|
||||||
"Failed to seek to requested position %lld: %s",
|
|
||||||
offset, gnome_vfs_result_to_string (res));
|
|
||||||
return GST_FLOW_ERROR;
|
|
||||||
}
|
|
||||||
src->curoffset = offset;
|
src->curoffset = offset;
|
||||||
} else {
|
} else {
|
||||||
GST_ERROR_OBJECT (src,
|
goto cannot_seek;
|
||||||
"Requested seek from %lld to %lld on non-seekable stream",
|
|
||||||
src->curoffset, offset);
|
|
||||||
return GST_FLOW_ERROR;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1017,6 +1015,20 @@ gst_gnomevfssrc_create (GstBaseSrc * basesrc, guint64 offset, guint size,
|
||||||
|
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
|
seek_failed:
|
||||||
|
{
|
||||||
|
GST_ERROR_OBJECT (src,
|
||||||
|
"Failed to seek to requested position %lld: %s",
|
||||||
|
offset, gnome_vfs_result_to_string (res));
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
|
cannot_seek:
|
||||||
|
{
|
||||||
|
GST_ERROR_OBJECT (src,
|
||||||
|
"Requested seek from %lld to %lld on non-seekable stream",
|
||||||
|
src->curoffset, offset);
|
||||||
|
return GST_FLOW_ERROR;
|
||||||
|
}
|
||||||
read_failed:
|
read_failed:
|
||||||
{
|
{
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
|
|
Loading…
Reference in a new issue