After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 568678 - filesrc doesn't logs offsets
filesrc doesn't logs offsets
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.23
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-22 11:38 UTC by pancake
Modified: 2009-01-22 13:04 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description pancake 2009-01-22 11:38:15 UTC
The filesrc element only logs the length of the reads, but not the offset address.

This patch adds this information to the GST_DEBUG line:

diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c
index 964b605..db60212 100644
--- a/plugins/elements/gstfilesrc.c
+++ b/plugins/elements/gstfilesrc.c
@@ -830,7 +830,7 @@ gst_file_src_create_read (GstFileSrc * src, guint64 offset, guint length,
     return GST_FLOW_ERROR;
   }
 
-  GST_LOG_OBJECT (src, "Reading %d bytes", length);
+  GST_LOG_OBJECT (src, "Reading %d bytes at 0x"G_GUINT64_FORMAT" offset", length, offset);
   ret = read (src->fd, GST_BUFFER_DATA (buf), length);
   if (G_UNLIKELY (ret < 0))
     goto could_not_read;
Comment 1 Sebastian Dröge (slomo) 2009-01-22 12:59:59 UTC
Hi,
this change is a good idea but your patch is not entirely correct. I've committed a slightly different version.

commit e5ce2995936a5f9b81e298dfc57f90d19b000a1a
Author: Sebastian Dröge <slomo@circular-chaos.org>
Date:   Thu Jan 22 13:58:57 2009 +0100

    Improve debug output by logging the offsets. Fixes bug #568678.
    
    In create() also log the offsets and not only the
    buffer size.
Comment 2 pancake 2009-01-22 13:04:06 UTC
Yep, i noticed the problem in my patch just after reporting it O:)

Thanks