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 652037 - basesrc: less persistent caching of size
basesrc: less persistent caching of size
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.1.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 701672 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-06-07 11:15 UTC by Mark Nauwelaerts
Modified: 2013-06-06 14:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
basesrc: add dynamic size handling (4.09 KB, patch)
2011-06-07 11:15 UTC, Mark Nauwelaerts
committed Details | Review

Description Mark Nauwelaerts 2011-06-07 11:15:36 UTC
Created attachment 189384 [details] [review]
basesrc: add dynamic size handling

basesrc currently only checks with the subclass for updated size when it might be reading past the end of the currently indicated size.  However, the same size is also used to answer to duration queries, which might therefore grow stale.

Attached patch allows subclass to request more dynamic size handling.
Comment 1 Mark Nauwelaerts 2011-06-08 18:26:09 UTC
commit f8168cd75f12d31332e981dcb2bbb8b56af967ec
Author: Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>
Date:   Wed Jun 8 18:22:03 2011 +0200

    basesrc: add dynamic size handling
    
    This allows subclass to indicate that size reported by src may not be static
    and should as such be updated regularly, rather than only when really
    needed.
    
    Particular examples are filesrc or fdsrc reading from a file that is still
    growing (e.g. being downloaded).
    
    Fixes #652037.
Comment 2 Sebastian Dröge (slomo) 2013-06-06 14:40:38 UTC
This introduced bug #652037
It's not really a good idea to call fstat() for every single read. What's the actual bug that was fixed by this?
Comment 3 Sebastian Dröge (slomo) 2013-06-06 14:40:53 UTC
This introduced bug #701672
It's not really a good idea to call fstat() for every single read. What's the actual bug that was fixed by this?
Comment 4 Sebastian Dröge (slomo) 2013-06-06 14:41:15 UTC
*** Bug 701672 has been marked as a duplicate of this bug. ***
Comment 5 Sebastian Dröge (slomo) 2013-06-06 14:51:53 UTC
commit bab1122a93a67c5b789fca2161249b29497db3c4
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Thu Jun 6 16:46:12 2013 +0200

    basesrc: Only force-update the duration for dynamic sources when doing the D
    
    Doing it after every single create() is not very efficient and not necessary
    Especially on network file systems fstat() is not cached and causes network
    traffic, making the source possibly unusable slow.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=652037