[vlc-commits] access: re-refactor pf_readdir

Thomas Guillem git at videolan.org
Thu May 19 15:57:26 CEST 2016


vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue Apr 12 15:07:22 2016 +0200| [9109718b77dee4587d9b0b1eecfe2765709ed245] | committer: Thomas Guillem

access: re-refactor pf_readdir

This commit changes pf_readdir callback to its original behavior. Accesses and
streams now add items to a node.

Archive stream_filters will now be able to add nodes to a node (when an archive
has directory). This was not possible before.

This commit also adds an access_fsdir helper to help fs accesses (file, smb,
nfs, ftp, sftp) adding items to a node. These accesses need the same treatment
that is now done by this helper:
 - hide hidden files or not (depending on "show-hiddenfiles" option)
 - skip some file extensions (depending on "ignore-filetypes" option)
 - sort items by type and alphabetically (depending on "directory-sort"
   option).
 - For a next commit: attach slaves to items

The directory demux won't do these operations anymore for every access/stream.

This commit doesn't change the interruptible state of the pf_readdir function,
accesses/streams are still interruptible in the middle of a pf_readdir call.

This partially reverts commit 88ffe1587824c27f35705ee28e607f80ca335b46.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9109718b77dee4587d9b0b1eecfe2765709ed245
---

 include/vlc_access.h                |   57 ++++++++++++--
 include/vlc_stream.h                |    6 +-
 modules/access/archive/stream.c     |   25 ++++---
 modules/access/directory.c          |   39 ++++++----
 modules/access/dsm/access.c         |  119 ++++++++++++++----------------
 modules/access/fs.h                 |    3 +-
 modules/access/ftp.c                |   57 ++++++++------
 modules/access/nfs.c                |   71 +++++++++++-------
 modules/access/sftp.c               |   38 +++++-----
 modules/access/smb.c                |   31 +++++---
 modules/demux/playlist/directory.c  |  137 +---------------------------------
 modules/services_discovery/upnp.cpp |  112 ++++++++++++----------------
 modules/services_discovery/upnp.hpp |   14 +---
 modules/stream_filter/inflate.c     |    6 +-
 modules/stream_filter/prefetch.c    |    6 +-
 src/input/access.c                  |  139 +++++++++++++++++++++++++++++++++--
 src/input/stream.c                  |    9 +--
 src/input/stream_filter.c           |    4 +-
 src/libvlccore.sym                  |    3 +
 19 files changed, 468 insertions(+), 408 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=9109718b77dee4587d9b0b1eecfe2765709ed245


More information about the vlc-commits mailing list