mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +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>
|
||||
|
||||
* examples/seeking/seek.c: (make_dv_pipeline),
|
||||
|
|
|
@ -945,22 +945,20 @@ gst_gnomevfssrc_create (GstBaseSrc * basesrc, guint64 offset, guint size,
|
|||
|
||||
src = GST_GNOMEVFSSRC (basesrc);
|
||||
|
||||
GST_DEBUG ("now at %llu, reading %lld, size %u", src->curoffset, offset,
|
||||
size);
|
||||
|
||||
/* seek if required */
|
||||
if (src->curoffset != offset) {
|
||||
GST_DEBUG ("need to seek");
|
||||
if (src->seekable) {
|
||||
GST_DEBUG ("seeking to %lld", offset);
|
||||
res = gnome_vfs_seek (src->handle, GNOME_VFS_SEEK_START, offset);
|
||||
if (res != GNOME_VFS_OK) {
|
||||
GST_ERROR_OBJECT (src,
|
||||
"Failed to seek to requested position %lld: %s",
|
||||
offset, gnome_vfs_result_to_string (res));
|
||||
return GST_FLOW_ERROR;
|
||||
}
|
||||
if (res != GNOME_VFS_OK)
|
||||
goto seek_failed;
|
||||
src->curoffset = offset;
|
||||
} else {
|
||||
GST_ERROR_OBJECT (src,
|
||||
"Requested seek from %lld to %lld on non-seekable stream",
|
||||
src->curoffset, offset);
|
||||
return GST_FLOW_ERROR;
|
||||
goto cannot_seek;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1017,6 +1015,20 @@ gst_gnomevfssrc_create (GstBaseSrc * basesrc, guint64 offset, guint size,
|
|||
|
||||
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:
|
||||
{
|
||||
gst_buffer_unref (buf);
|
||||
|
|
Loading…
Reference in a new issue