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 735878 - filesrc: use glib APIs for file checking
filesrc: use glib APIs for file checking
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-02 10:35 UTC by RaviKiran
Modified: 2014-09-19 15:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
use glib API to check file (1.46 KB, patch)
2014-09-02 10:35 UTC, RaviKiran
rejected Details | Review

Description RaviKiran 2014-09-02 10:35:10 UTC
Created attachment 285126 [details] [review]
use glib API to check file

in gstfilesrc.c, use glib APIs to check whether file is regular/directory.
(as FIXME comment says)

Patch attached for proposed changes. Please review.
Comment 1 Tim-Philipp Müller 2014-09-02 10:48:55 UTC
I don't know if this really needs to be fixed. The current code is more efficient and without race condition.
Comment 2 Luis de Bethencourt 2014-09-18 12:57:08 UTC
I agree with Tim. But if this is the case the
"FIXME we should use glib for this" should be removed.

I am assuming the current code is good across all platforms and glib isn't needed for this.
Comment 3 Tim-Philipp Müller 2014-09-18 17:57:41 UTC
commit 3c4567f5916619f1476e8294391371639f815e10
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Thu Sep 18 18:55:47 2014 +0100

    filesrc: remove FIXME
    
    https://bugzilla.gnome.org/show_bug.cgi?id=735878
Comment 4 Nicolas Dufresne (ndufresne) 2014-09-18 18:18:10 UTC
(In reply to comment #1)
> I don't know if this really needs to be fixed. The current code is more
> efficient and without race condition.

It's kind of weird that we don't use GLib, while we strictly use that everywhere else. I would have preferred if you added a comment about the race condition and efficiency (with links if needed).
Comment 5 Tim-Philipp Müller 2014-09-18 18:26:58 UTC
It seemed obvious to me and it's standard operating procedure for all fd/file related things to prefer using the already-open descriptor.
Comment 6 Luis de Bethencourt 2014-09-19 15:28:42 UTC
Fix pushed by Tim :)