Commit Graph

90 Commits

Author SHA1 Message Date
Steve Lhomme 721c4bc5a1 access: set all callback fields in ACCESS_SET_CALLBACKS 2023-02-04 15:22:27 +00:00
Steve Lhomme 5363279805 remove the $Id$ in the source code 2019-01-17 12:21:18 +01:00
Thomas Guillem c458178af2 input: move access_fsdir to input/item.c 2017-09-20 16:56:59 +02:00
Rémi Denis-Courmont e4ba64d291 Remove access_t 2017-07-23 08:55:40 +03:00
Rémi Denis-Courmont 66da98a722 include: remove STANDARD_(READ|BLOCK)_ACCESS_INIT macros 2017-02-21 23:07:27 +02:00
Rémi Denis-Courmont 40b946f215 directory: reconcile numerical and alphabetical sorting 2017-02-18 10:31:54 +02:00
Rémi Denis-Courmont 26b5a1ec19 doc: move access under input/stream 2016-10-26 10:49:53 +03:00
Rémi Denis-Courmont 0ba43cc513 access: remove vlc_access_* API 2016-07-21 22:27:00 +03:00
Rémi Denis-Courmont 38be0d228c stream: merge access_t and stream_t
They were mostly identical, with just a few extra fields in access_t.
Merging them will allow removing the dummy stream_Access layer.
2016-07-21 22:27:00 +03:00
Rémi Denis-Courmont 6e1ace8a75 access: make access_t.p_sys void * (refs #17078) 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont 4489a0487e access: rename access_t.psz_access to psz_name 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont 3e01621dc6 access: remove ACCESS controls, use STREAM
They have been identical for a while.
2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont da458bc49c access: info.b_eof is always false during probe 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont de280a5d11 access: set EOF implicitly when read returns 0 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont 616a010c7f access: reset EOF implicitly on succesful seek 2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont 2381c5b860 access: add flag for EOF in pf_block prototype
pf_read() returns 0 to signify EOF, and -1 to signify no data.
pf_block() returns NULL either way. This flag is added for the
distinction.
2016-07-21 19:59:24 +03:00
Rémi Denis-Courmont cc6267ceb5 access: use void pointer for pf_read callback
This matches the stream_t.pf_read convention.
2016-07-20 22:54:50 +03:00
Thomas Guillem bc8418f5be input/access: add preparsing flag
This flag will be used to notify the access module that we are preparsing.
2016-06-05 12:58:34 +02:00
Benjamin Adolphi 40ccae7608 access: attach slaves to input items
Also-by: Thomas Guillem <thomas@gllm.fr>

Signed-off-by: Thomas Guillem <thomas@gllm.fr>
2016-05-19 15:55:27 +02:00
Thomas Guillem a78bbdd234 access: change ACCESS_IS_DIRECTORY / STREAM_IS_DIRECTORY args
The first sort argument is no longer necessary.
2016-05-19 15:55:27 +02:00
Thomas Guillem 9109718b77 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 88ffe15878.
2016-05-19 15:55:27 +02:00
Rémi Denis-Courmont 1be52a6842 access: access_t.psz_access is always set
It cannot be NULL or empty (the default is typically "file").
2016-04-27 22:16:28 +03:00
Eric Engestrom f9f71a6f2b include: fix spelling mistakes
Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
2016-04-02 18:11:52 +03:00
Rémi Denis-Courmont 0506fdb335 input: support for (inter-)access redirection
Handling the redirection in the access core enables support for
redirection between different protocols (e.g. HTTP to FTP) and more
generally different access plugins (e.g. HTTP to HTTP2 in future).
2015-10-22 22:45:09 +03:00
Rémi Denis-Courmont f788fa20e1 access: fix ACCESS_GET_META and STREAM_GET_META mismatches 2015-10-20 19:11:01 +03:00
Rémi Denis-Courmont 80bc1fe21a access: add full URL/MRL in access_t 2015-09-02 22:30:29 +03:00
Rémi Denis-Courmont 5d096c300e access: add ACCESS_IS_DIRECTORY as STREAM_IS_DIRECTORY 2015-09-02 21:50:43 +03:00
Rémi Denis-Courmont 9c389564d4 access: remove info.i_pos 2015-09-02 20:10:36 +03:00
Rémi Denis-Courmont fbf85e3da7 access: remove write-only info.i_pos usage 2015-09-02 20:10:35 +03:00
Rémi Denis-Courmont 8540635824 access: make access_GetSize() return an error code
So far, it was returning zero on error. That prevented distinction
between an empty file and a file with unknown size.
2015-08-31 18:32:49 +03:00
Rémi Denis-Courmont 1965d9625a access: remove access_t.psz_demux 2015-07-26 18:29:43 +03:00
Rémi Denis-Courmont c34114a529 access: remove access_GetParentInput()
If there is a parent input, it cannot go away. There was no point in
reference counting.
2015-07-23 21:31:50 +03:00
Rémi Denis-Courmont 3660164b72 access: add vlc_access_NewMRL() and vlc_access_Delete() helpers 2015-07-22 22:30:04 +03:00
Rémi Denis-Courmont 4ee1038059 include: improve Doxygen modules
In particular, move \file stanzas inside groups.
2015-06-14 19:04:50 +03:00
Thomas Guillem 71daa94bda access: add a default pf_control for directory accesses 2015-06-04 13:17:01 +02:00
Rémi Denis-Courmont ca00082db9 access: pf_control is mandatory
As per both usage and documentation ACCESS_CAN_SEEK,
ACCESS_CAN_FASTSEEK, ACCESS_CAN_PAUSE, ACCESS_CAN_CONTROL_PACE and
ACCESS_GET_PTS_DELAY are mandatory. Thus the pf_control callback is
mandatory.

(Note that STREAM_* maps directly to ACCESS_* here.
2015-06-02 23:06:18 +03:00
Thomas Guillem 3840a03dbb access: extend STREAM_IS_DIRECTORY
It now takes two new bool* arguments.

 - specify if the access returns items that are already sorted.
 - specify if directories can loop into themselves
2015-05-20 16:07:32 +02:00
Thomas Guillem 88ffe15878 access: refactor pf_readdir
The main advantage is to move the management of the input_item_node_t from all
accesses to the directory demux.
2015-05-20 16:07:32 +02:00
Thomas Guillem 763e765d24 access: pf_control is not mandatory for directory accesses 2015-05-04 09:52:43 +02:00
Julien 'Lta' BALLET 214854fb71 Add a pf_readdir callback to access_t modules
This commit also adds a related documentation file (doc/browsing.txt) describing
the expected behavior of pf_readdir callback implementations

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2014-06-24 10:58:17 +02:00
Rafaël Carré 0213b4e206 access init macros: C++ compatibility 2014-06-19 11:22:33 +02:00
Rémi Denis-Courmont cea762697e access: remove info.i_(update|title|seekpoint) 2013-08-26 22:47:55 +03:00
Rémi Denis-Courmont a025357ee0 input: add access & stream controls for current title and seekpoint 2013-08-26 22:42:34 +03:00
Rémi Denis-Courmont 8f8ff66973 access: info.i_size -> control(ACCESS_GET_SIZE) 2013-07-21 16:15:17 +03:00
Jean-Baptiste Kempf 36ab287e77 LGPL
Re-license almost all of libVLC and libVLCcore to LGPLv2.1+

This move was authorized by the developers, either:
 - by e-mail,
 - by vote at the VideoLAN Dev Days 2011,
 - on the license website,
 - in a contract, oral or written.
No objection was raised, so far.

The developers agreeing are:
  Justus Piater
  Alexis Ballier
  Alexander Bethke
  Mohammed Adnène Trojette
  Alex Converse
  Alexey Sokolov
  Alexis de Lattre
  Andre Pang
  Anthony Loiseau
  Cyril Deguet
  André Weber
  Boris Dorès
  Brieuc Jeunhomme
  Benjamin Drung
  Hugo Beauzée-Luyssen
  Benoit Steiner
  Benjamin Pracht
  Bernie Purcell
  Przemyslaw Fiala
  Arnaud de Bossoreille de Ribou
  Brad Smith
  Nick Briggs
  Christopher Rath
  Christophe Courtaut
  Christopher Mueller
  Clement Chesnin
  Andres Krapf
  Damien Fouilleul
  David Flynn
  Sebastien Zwickert
  Antoine Cellerier
  Jérôme Decoodt
  Jérome Decoodt
  Dylan Yudaken
  Eduard Babayan
  Eugenio Jarosiewicz
  Elliot Murphy
  Eric Petit
  Erwan Tulou
  Etienne Membrives
  Ludovic Fauvet
  Fabio Ritrovato
  Tobias Güntner
  Jakub Wieczorek
  Frédéric Crozat
  Francois Cartegnie
  Laurent Aimar
  Florian G. Pflug
  Felix Paul Kühne
  Frank Enderle
  Rafaël Carré
  Simon Latapie
  Gildas Bazin
  Geoffroy Couprie
  Julien / Gellule
  Gildas Bazin
  Arnaud Schauly
  Toralf Niebuhr
  Vicente Jimenez Aguilar
  Derk-Jan Hartman
  Henri Fallon
  Ilkka Ollakka
  Olivier Teulière
  Rémi Duraffort
  Jakob Leben
  Jean-Baptiste Kempf
  Jean-Paul Saman
  Jean-Philippe Grimaldi
  Jean-François Massol
  Gaël Hendryckx
  Jakob Leben
  Jean-Marc Dressler
  Jai Menon
  Johan Bilien
  Johann Ransay
  Joris van Rooij
  JP Dinger
  Jean-Philippe André
  Adrien Grand
  Juha Jeronen
  Juho Vähä-Herttua
  Kaarlo Raiha
  Kaarlo Raiha
  Kamil Baldyga
  Keary Griffin
  Ken Self
  KO Myung-Hun
  Pierre Ynard
  Filippo Carone
  Loïc Minier
  Luca Barbato
  Lucas C. Villa Real
  Lukas Durfina
  Adrien Maglo
  Marc Ariberti
  Mark Lee
  Mark Moriarty
  Martin Storsjö
  Christophe Massiot
  Michel Kaempf
  Marian Ďurkovič
  Mirsal Ennaime
  Carlo Calabrò
  Damien Lucas
  Naohiro Koriyama
  Basos G
  Pierre Baillet
  Vincent Penquerc'h
  Olivier Aubert
  Pankaj Yadav
  Paul Corke
  Pierre d'Herbemont
  Philippe Morin
  Antoine Lejeune
  Michael Ploujnikov
  Jean-Marc Dressler
  Michael Hanselmann
  Rafaël Carré
  Ramiro Polla
  Rémi Denis-Courmont
  Renaud Dartus
  Richard Shepherd
  Faustino Osuna
  Arnaud Vallat
  Rob Jonson
  Robert Jedrzejczyk
  Steve Lhomme
  Rocky Bernstein
  Romain Goyet
  Rov Juvano
  Sam Hocevar
  Martin T. H. Sandsmark
  Sebastian Birk
  Sébastien Escudier
  Vincent Seguin
  Fabio Ritrovato
  Sigmund Augdal Helberg
  Casian Andrei
  Srikanth Raju
  Hannes Domani
  Stéphane Borel
  Stephan Krempel
  Stephan Assmus
  Tony Castley
  Pavlov Konstantin
  Eric Petit
  Tanguy Krotoff
  Dennis van Amerongen
  Michel Lespinasse
  Can Wu
  Xavier Marchesini
  Sébastien Toque
  Christophe Mutricy
  Yoann Peronneau
  Yohann Martineau
  Yuval Tze
  Scott Caudle
  Clément Stenac

It is possible, that some minor piece of code was badly tracked, for
some reasons (SVN, mainly) or that some small developers did not answer.
However, as an "œuvre collective", defined as in "CPI 113-2 alinéa 3",
and seeing "Cour. Cass. 17 Mai 1978", and seeing that the editor and
the very vast majority of developers have agreed (> 99.99% of the code,
> 99% of developers), we are fine here.
2011-11-27 22:54:33 +01:00
Rémi Denis-Courmont 6a51c0a21a Improve access initialization macro safety 2011-09-01 21:17:02 +03:00
Rémi Denis-Courmont 92f1b3aee7 Rename LIBVLC_* function attributes to VLC_* within plugin API 2011-05-07 23:08:28 +03:00
Rémi Denis-Courmont 6f258887aa Replace VLC_EXPORT macro with a simple prefix, VLC_API
This should help Doxygen parse VLC headers, and generally makes headers
easier to read. LibVLC already uses a similar approach.
2011-05-07 18:43:51 +03:00
Rémi Duraffort ec87e89b59 Core: add some LIBVLC_USED. 2010-07-05 21:56:06 +02:00
Rémi Denis-Courmont 6d4bc50f38 Rename access_t.psz_path to psz_location 2010-05-10 23:31:57 +03:00