mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-22 02:13:46 +00:00
ext/gnomevfs/gstgnomevfssrc.c: Improve debug logs a bit and be more verbose if things go wrong.
Original commit message from CVS: * ext/gnomevfs/gstgnomevfssrc.c: Improve debug logs a bit and be more verbose if things go wrong.
This commit is contained in:
parent
d5996e9c37
commit
5452f33d1b
2 changed files with 18 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-09-19 Stefan Kost <ensonic@users.sf.net>
|
||||||
|
|
||||||
|
* ext/gnomevfs/gstgnomevfssrc.c:
|
||||||
|
Improve debug logs a bit and be more verbose if things go wrong.
|
||||||
|
|
||||||
2007-09-17 Jan Schmidt <Jan.Schmidt@sun.com>
|
2007-09-17 Jan Schmidt <Jan.Schmidt@sun.com>
|
||||||
|
|
||||||
* ext/pango/gsttextoverlay.c: (gst_text_overlay_init),
|
* ext/pango/gsttextoverlay.c: (gst_text_overlay_init),
|
||||||
|
|
|
@ -639,7 +639,7 @@ gst_gnome_vfs_src_create (GstBaseSrc * basesrc, guint64 offset, guint size,
|
||||||
|
|
||||||
src = GST_GNOME_VFS_SRC (basesrc);
|
src = GST_GNOME_VFS_SRC (basesrc);
|
||||||
|
|
||||||
GST_DEBUG ("now at %llu, reading %lld, size %u", src->curoffset, offset,
|
GST_DEBUG ("now at %llu, reading from %lld, size %u", src->curoffset, offset,
|
||||||
size);
|
size);
|
||||||
|
|
||||||
/* seek if required */
|
/* seek if required */
|
||||||
|
@ -693,7 +693,7 @@ cannot_seek:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, SEEK, (NULL),
|
GST_ELEMENT_ERROR (src, RESOURCE, SEEK, (NULL),
|
||||||
("Requested seek from %" G_GINT64_FORMAT " to %" G_GINT64_FORMAT
|
("Requested seek from %" G_GINT64_FORMAT " to %" G_GINT64_FORMAT
|
||||||
"on non-seekable stream", src->curoffset, offset));
|
" on non-seekable stream", src->curoffset, offset));
|
||||||
return GST_FLOW_ERROR;
|
return GST_FLOW_ERROR;
|
||||||
}
|
}
|
||||||
read_failed:
|
read_failed:
|
||||||
|
@ -800,11 +800,11 @@ gst_gnome_vfs_src_get_size (GstBaseSrc * basesrc, guint64 * size)
|
||||||
}
|
}
|
||||||
gnome_vfs_file_info_unref (info);
|
gnome_vfs_file_info_unref (info);
|
||||||
|
|
||||||
GST_DEBUG_OBJECT (src, "return size %" G_GUINT64_FORMAT, *size);
|
|
||||||
|
|
||||||
if (*size == (GnomeVFSFileSize) - 1)
|
if (*size == (GnomeVFSFileSize) - 1)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
GST_DEBUG_OBJECT (src, "return size %" G_GUINT64_FORMAT, *size);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -820,10 +820,9 @@ gst_gnome_vfs_src_start (GstBaseSrc * basesrc)
|
||||||
gst_gnome_vfs_src_push_callbacks (src);
|
gst_gnome_vfs_src_push_callbacks (src);
|
||||||
|
|
||||||
if (src->uri != NULL) {
|
if (src->uri != NULL) {
|
||||||
GnomeVFSOpenMode mode;
|
GnomeVFSOpenMode mode = GNOME_VFS_OPEN_READ;
|
||||||
|
|
||||||
/* this can block... */
|
/* this can block... */
|
||||||
mode = GNOME_VFS_OPEN_READ;
|
|
||||||
res = gnome_vfs_open_uri (&src->handle, src->uri, mode);
|
res = gnome_vfs_open_uri (&src->handle, src->uri, mode);
|
||||||
if (res != GNOME_VFS_OK)
|
if (res != GNOME_VFS_OK)
|
||||||
goto open_failed;
|
goto open_failed;
|
||||||
|
@ -834,8 +833,7 @@ gst_gnome_vfs_src_start (GstBaseSrc * basesrc)
|
||||||
src->own_handle = FALSE;
|
src->own_handle = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gnome_vfs_seek (src->handle, GNOME_VFS_SEEK_CURRENT, 0)
|
if (gnome_vfs_seek (src->handle, GNOME_VFS_SEEK_CURRENT, 0) == GNOME_VFS_OK) {
|
||||||
== GNOME_VFS_OK) {
|
|
||||||
src->seekable = TRUE;
|
src->seekable = TRUE;
|
||||||
} else {
|
} else {
|
||||||
src->seekable = FALSE;
|
src->seekable = FALSE;
|
||||||
|
@ -882,7 +880,13 @@ gst_gnome_vfs_src_stop (GstBaseSrc * basesrc)
|
||||||
gst_gnome_vfs_src_pop_callbacks (src);
|
gst_gnome_vfs_src_pop_callbacks (src);
|
||||||
|
|
||||||
if (src->own_handle) {
|
if (src->own_handle) {
|
||||||
gnome_vfs_close (src->handle);
|
GnomeVFSResult res;
|
||||||
|
|
||||||
|
res = gnome_vfs_close (src->handle);
|
||||||
|
if (res != GNOME_VFS_OK) {
|
||||||
|
GST_ELEMENT_ERROR (src, RESOURCE, CLOSE, (NULL),
|
||||||
|
("Could not close vfs handle: %s", gnome_vfs_result_to_string (res)));
|
||||||
|
}
|
||||||
src->handle = NULL;
|
src->handle = NULL;
|
||||||
}
|
}
|
||||||
src->curoffset = 0;
|
src->curoffset = 0;
|
||||||
|
|
Loading…
Reference in a new issue