Go to file
Lyndon Brown 58260a7ab3 iso639: tweak name-inclusive search algorithm to check names last
under this algorithm codes are searched first, names second. (though of
course codes are skipped if length is not 2 or 3).

in short, this is partly because in cases where clashes between short
names and codes occur (which can happen, as discussed shortly), i feel
that it is best to prefer the code match, and partly because of the
disadvantages of using names as identifiers, as discussed in a moment,
that make codes perhaps more likely to be used for most languages.

please note the note in the previous commit about how this is only of
relevance to users specifying language preference for dvdnav and bluray,
with `--sub-language`, `--audio-language` and `--menu-language` options.

-- names as identifiers --

the disadvantages/problems of using names as identifiers:

 1. first, note that since 236ca7aea1
    introduced the possibility, the help text of the few relevant
    options has never actually informed users that it was possible. (in
    fact they also fail to clarify that the mentioned codes to be used
    are iso-639). so presumably any users of these options are more
    used to using codes already.

 2. only English names are available, since only English names exist in
    the table, and the lookups have never involved translation. this
    makes the feature less useful than originally viewed in the commit
    log of the commit that introduced it. so for instance you can use
    "french" but not in fact "francais".

 3. the names in the iso-639 table are primarily intended for display
    purposes rather than matching purposes. while many of the names are
    simple like "English" and "French", working just fine for the type of
    lookup performed, many are not so ideal like the following examples
    (some of which have been picked from the MR 146 update ([1])):

      - "Greek, Modern" (updated to "Greek, Modern (1453-)")
      - "Chichewa; Nyanja"
      - "Sotho, Southern"
      - "Tonga (Tonga Islands)"
      - "North Azerbaijani"
      - "Limburgan; Limburger; Limburgish"
      - "Gaelic; Scottish Gaelic"
      - "Interlingua (International Auxiliary Language Association)"
      - "Altaic (Other)"
      - "Apache languages"

    there are many such examples (especially after MR 146). (we would
    not want to rename them to be better identifiers, since this would
    make them less ideal for their primary display purpose, and it
    could make future updates from the glibc set much harder).

 5. it is not even possible for users to easily discover the (English)
    language names (or rather labels?) that are available for use
    instead of codes. not all are easily guessable.

 6. as shown by the MR 146 update, the names are far more prone to
    change than codes. this creates a backwards compatibility problem
    both for CLI use and saved settings. (we should not want to avoid
    such updates just for such backwards compatibility).

so, aside from some cases like "english" and "french", which are ideal
and reliable, for most languages codes are the better choice, putting
more emphasis on codes being checked first. though of course the
name/code clash issue discussed next is more significant.

-- result differences --

the results given are identical with the current data set, since there are
currently no records where the 3-char name of one matches (ignoring case)
the iso-639-2 code of another.

if/when MR 146 is merged, there are some such clashing records added, and
considering the order of the records (preserved from glibc order to make
updates easier if for no other reason), a different match would be returned
by this algorithm than the previous one, preferring now the code-based
match of the later record over the name-based match of the earlier.

the clashing records of interest are:
 - "Kru" and "Kurukh", with the latter having an ISO-639-2 code of "kru".
 - "Mon" and "Mongolian", with the latter having a code of "mon".

with "Kru" coming before "Kurukh" and "Mon" before "Mongolian", use of "kru"
and "mon" with the previous algorithm would have matched "Kru" and "Mon"
named records respectively, while the new algorithm will instead match
"Kurukh" and "Mongolian" respectively, preferring the code-based match.

(MR 146 with the old algorithm actually introduces a regression for
"Mongolian" in that "mon" then matches the "Mon" record, whilst the new
algorithm fixes that, restoring the "Mongolian" match).

thus "Kurukh" and "Mongolian" could with the previous algorithm only be
matched via their full names (or the "mn" iso-639-1 code in the Mongolian
case), whilst with the new algorithm they can be reached via codes also,
whilst "Kru" and "Mon" can only now be reached via codes ("kro" and "mnw"
respectively).

either way there's an unavoidable imperfection in doing a case-insensitive
name-inclusive lookup, but i feel code-based being primary is best; we don't
necessarily want to ditch the name-based lookup considering those languages
that it does work well for, and i don't expect we would want to make the
name search case-sensitive, requiring capitals.

[1]: https://code.videolan.org/videolan/vlc/-/merge_requests/146
2021-06-12 13:09:35 +00:00
autotools Fix .gitignore 2017-11-07 19:04:24 +02:00
bin bin: fix linkage on OS/2 2021-01-29 15:53:43 +01:00
compat compat: tfind: Don't use K&R prototypes 2020-12-04 10:21:25 +01:00
contrib contrib: update mpg123 to 1.28.0 2021-06-08 11:25:36 +00:00
doc d3d11_player: field renaming 2021-05-07 08:21:48 +00:00
extras CI: apple: re-use before_script and after_script from the default job 2021-06-12 11:27:54 +00:00
include iso639: tweak name-inclusive search algorithm to check names last 2021-06-12 13:09:35 +00:00
lib lib: remove libtool version for iOS/tvOS 2021-05-28 16:46:17 +00:00
m4 m4: with_pkg: fix PKG_HAVE_WITH_MODULES macro 2021-03-04 19:47:48 +01:00
modules esout,dvdnav,bluray: fix ugly language search hack 2021-06-12 13:09:35 +00:00
po qt: Create MLItemCover 2021-05-20 11:15:31 +00:00
share liveleak.lua: fix video resolution selection 2021-04-03 15:46:41 +02:00
src iso639: tweak name-inclusive search algorithm to check names last 2021-06-12 13:09:35 +00:00
test test: libvlc: fix build 2021-06-02 09:42:06 +00:00
.gitignore gitignore: unblacklist build.sh script 2021-03-12 22:27:03 +01:00
.mailmap mailmap: unify my addresses 2018-09-24 22:19:05 +03:00
AUTHORS AUTHORS: Add Doney den Ouden 2018-02-10 13:47:12 +01:00
COPYING COPYING.*: Use full versions of licenses. 2012-02-14 17:40:06 +04:00
COPYING.LIB COPYING.*: Use full versions of licenses. 2012-02-14 17:40:06 +04:00
INSTALL Update GCC version 2016-09-20 13:03:20 +03:00
Makefile.am Update Changelogs 2021-04-05 12:24:52 +02:00
NEWS NEWS: update from 3.0.x branch 2021-04-18 11:40:15 +02:00
README.md Improve README 2021-05-30 13:17:59 +00:00
THANKS THANKS: Updated a few copyright dates 2017-02-01 22:02:59 +01:00
bootstrap Remove old mail address from sources 2019-09-04 22:11:04 +03:00
configure.ac configure: remove redundant PIE flags for sanitizers 2021-06-04 07:12:50 +00:00
make-alias Take program prefix and suffix into account in the make-alias script. 2008-05-26 00:11:33 +02:00

README.md

VLC media player

VLC is a libre and open source media player and multimedia engine, focused on playing everything, and running everywhere.

VLC can play most multimedia files, discs, streams, devices and is also able to convert, encode, stream and manipulate streams into numerous formats.

VLC is used by many over the world, on numerous platforms, for very different use cases.

The engine of VLC can be embedded into 3rd party applications, and is called libVLC.

VLC is part of the VideoLAN project and is developed and supported by a community of volunteers.

The VideoLAN project was started at the university École Centrale Paris who relicensed VLC under the GPLv2 license in February 2001. Since then, VLC has been downloaded billions of times.

License

VLC is released under the GPLv2 (or later) license. On some platforms, it is de facto GPLv3, because of the licenses of dependencies.

libVLC, the engine is released under the LGPLv2 (or later) license.
This allows embedding the engine in 3rd party applications, while letting them to be licensed under other licenses.

Platforms

VLC is available for the following platforms:

  • Windows (from 7 and later, including UWP platforms and all versions of Windows 10)
  • macOS (10.10 and later)
  • GNU/Linux and affiliated
  • *BSD and affiliated
  • Android (4.2 and later), including Android TV and Android Auto
  • iOS (9 and later), including AppleTV and iPadOS
  • Haiku, OS/2 and a few others.

Not all platforms receive the same amount of care, due to our limited resources.

Nota Bene: The Android app and the iOS app are located in different repositories than the main one.

Contributing & Community

VLC is maintained by a community of people, and VideoLAN is not paying any of them.
The community is composed of developers, helpers, maintainers, designers and writers that want this open source project to thrive.

The main development of VLC is done in the C language, but this repository also contains plenty of C++, Obj-C, asm and Rust.

Other repositories linked to vlc are done in languages including Kotlin/Java (Android), Swift (iOS), and C# (libVLCSharp).

We need help with the following tasks:

  • coding
  • packaging for Windows, macOS and Linux distributions
  • technical writing for the documentation
  • design
  • support
  • community management and communication.

Please contribute :)

We are on IRC. You can find us on the #videolan channel on Libera.chat.

Contributions

Contributions are now done through Merge Requests on our GitLab repository.

CI and discussions should be resolved before a Merge Request can be merged.

libVLC

libVLC is an embeddable engine for 3rd party applications and frameworks.

It runs on the same platforms as VLC (and sometimes on more) and can provide playback, streaming and converting of multimedia files and streams.

libVLC has numerous bindings for other languages, like C++, Python and C#.

Support

Some useful links that might help you:

Source Code sitemap

ABOUT-NLS          - Notes on the Free Translation Project.
AUTHORS            - VLC authors.
COPYING            - The GPL license.
COPYING.LIB        - The LGPL license.
INSTALL            - Installation and building instructions.
NEWS               - Important modifications between the releases.
README             - Project summary.
THANKS             - VLC contributors.

bin/               - VLC binaries.
bindings/          - libVLC bindings to other languages.
compat/            - compatibility library for operating systems missing
                     essential functionalities.
contrib/           - Facilities for retrieving external libraries and building
                     them for systems that don't have the right versions.
doc/               - Miscellaneous documentation.
extras/analyser    - Code analyser and editor specific files.
extras/buildsystem - Different build system specific files.
extras/misc        - Files that don't fit in the other extras/ categories.
extras/package     - VLC packaging specific files such as spec files.
extras/tools/      - Facilities for retrieving external building tools needed
                     for systems that don't have the right versions.
include/           - Header files.
lib/               - libVLC source code.
modules/           - VLC plugins and modules. Most of the code is here.
po/                - VLC translations.
share/             - Common resource files.
src/               - libvlccore source code.
test/              - Testing system.