Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,11 @@ trim_trailing_whitespace = true

[.git/COMMIT*]
max_line_length = 72

[{osdep/dirent-win.h,TOOLS/osxbundle/mpv.app/Contents/PkgInfo}]
charset = unset
insert_final_newline = unset
indent_style = unset
indent_size = unset
max_line_length = unset
trim_trailing_whitespace = unset
7 changes: 7 additions & 0 deletions .editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Format": "github-actions",
"Disable": {
"IndentSize": true,
"MaxLineLength": true
}
}
1 change: 1 addition & 0 deletions .lsan_suppressions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
leak:FcFontSetSort
109 changes: 109 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
local mp_globals = {
mp = {
fields = {
command = {},
commandv = {},
command_native = {},
command_native_async = {},
add_hook = {},
abort_async_command = {},
del_property = {},
get_property = {},
get_property_osd = {},
get_property_bool = {},
get_property_number = {},
get_property_native = {},
set_property = {},
set_property_bool = {},
set_property_number = {},
set_property_native = {},
get_time = {},
add_key_binding = {},
add_forced_key_binding = {},
remove_key_binding = {},
register_event = {},
unregister_event = {},
observe_property = {},
unobserve_property = {},
add_timeout = {},
add_periodic_timer = {},
get_opt = {},
get_script_name = {},
get_script_directory = {},
osd_message = {},
get_wakeup_pipe = {},
get_next_timeout = {},
dispatch_events = {},
register_idle = {},
unregister_idle = {},
enable_messages = {},
register_script_message = {},
unregister_script_message = {},
create_osd_overlay = {},
get_osd_size = {},
msg = {
fields = {
fatal = {},
error = {},
warn = {},
info = {},
verbose = {},
debug = {},
trace = {},
}
},
-- Not documented
-- TODO: Document or remove them
disable_key_bindings = {},
enable_key_bindings = {},
find_config_file = {},
format_time = {},
get_mouse_pos = {},
set_key_bindings = {},
set_mouse_area = {},
set_osd_ass = {},
}
},
exit = {},
unpack = {},
}

local mp_internal = {
mp = {
fields = {
-- Internal
-- TODO: Move to mp_internal module
ARRAY = { fields = { info = {}, type = {} }},
MAP = { fields = { info = {}, type = {} }},
UNKNOWN_TYPE = { fields = { info = {}, type = {} }},
_legacy_overlay = { fields = { res_x = {}, res_y = {}, data = {}, update = {} }},
cancel_timer = {},
flush_keybindings = {},
get_osd_margins = {},
input_define_section = {},
input_disable_section = {},
input_enable_section = {},
input_set_section_mouse_area = {},
keep_running = {},
log = {},
raw_abort_async_command = {},
raw_command_native_async = {},
raw_hook_add = {},
raw_hook_continue = {},
raw_observe_property = {},
raw_unobserve_property = {},
raw_wait_event = {},
request_event = {},
script_name = {},
use_suspend = {},
wait_event = {},
}
}
}

std = "min+mp"
stds = { mp = { read_globals = mp_globals } }
-- mp_internal seems to be merged with mp for other files too...
files["player/lua/defaults.lua"] = { globals = mp_internal }
files["player/lua/auto_profiles.lua"] = { globals = { "p", "get" } }
max_line_length = 100
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-illegal-windows-names
- id: check-json
- id: check-shebang-scripts-are-executable
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
exclude: ^TOOLS/osxbundle/mpv.app/Contents/PkgInfo$
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args: ["--ignore-words-list", "datas,DNE,enew,HDA,numer,ontop,optionA,Paeth,pathc,inout"]
exclude: ^misc/language.c$
10 changes: 10 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
disabled_rules:
- identifier_name
- line_length
- large_tuple
- void_function_in_ternary
- function_body_length
- cyclomatic_complexity
- file_length
- type_body_length
strict: true
30 changes: 17 additions & 13 deletions Copyright
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ mpv is a fork of mplayer2, which is a fork of MPlayer.

mpv as a whole is licensed under the GNU General Public License GPL version 2
or later (called GPLv2+ in this document, see LICENSE.GPL for full license
text) by default, or the GNU Lesser General Public License LGPL version 2 or
later (LGPLv2.1+ in this document, see LICENSE.LGPL for full license text) if
built with the -Dgpl=false configure switch.
text) by default. The mpv program is licensed the GNU Lesser General Public
License LGPL version 2 or later (LGPLv2.1+ in this document, see LICENSE.LGPL
for full license text) if built without using any GPL only files.
The -Dgpl=false configure switch is provided as a convenience for excluding
the GPL only files listed below from the build process.

However, do note that the build system is provided "as is" and using the
-Dgpl=false configure switch does not in itself create a LGPLv2.1+ license
grant.

Additionally, some non-program parts, such as the documentation and some config
files listed below, are still built and licensed under their respective licenses
even when -Dgpl=false is used. Please consult GPLv2+ and LGPLv2.1+ license texts
for further details on how to distribute these files.

Most source files are LGPLv2.1+ or GPLv2+, but some files are available under
more liberal licenses, such as BSD, MIT, ISC, and possibly others. Look at the
Expand All @@ -26,21 +37,15 @@ See DOCS/contribute.md for binding rules wrt. licensing for contributions.
For information about authors and contributors, consult the git log, which
contains the complete SVN and CVS history as well.

"v2.1+" in this context means "version 2.1 or later".

Some libraries are GPLv2+ or GPLv3+ only. Building mpv with Samba support makes
it GPLv3+.

mpv can be built as LGPLv2.1+ with the -Dgpl=false configure option. To add a
mpv can be built as LGPLv2.1+ without using any GPL only files. To add a
LGPL mode to mpv, MPlayer code had to be relicensed from GPLv2+ to LGPLv2.1+ by
asking the MPlayer authors for permission. Since permission could not be
obtained from everyone, LGPL mode disables the following features, some of them
quite central:
- Linux X11 video output
- BSD audio output via OSS
- NVIDIA/Linux hardware decoding (vdpau, although nvdec usually works)
- Linux TV input
- minor features: jack, DVD, CDDA, SMB, CACA, legacy direct3d VO
- minor features: jack, DVD, CDDA, DVB, CACA, legacy direct3d VO
Some of these will be fixed in the future. The intended use for LGPL mode is
with libmpv, and currently it's not recommended to build mpv CLI in LGPL mode
at all.
Expand All @@ -64,9 +69,8 @@ The following files are still GPL only (-Dgpl=false disables them):
video/vdpau.h unknown
video/vdpau_mixer.* actual code must be rewritten
DOCS/man/ GPLv2+
bootstrap.py unknown license, probably GPLv2+ or LGPLv2+
etc/mplayer-input.conf unknown license, probably GPLv2+
mpv.desktop unknown license, probably GPLv2+
etc/mpv.desktop unknown license, probably GPLv2+
etc/restore-old-bindings.conf unknown license, probably GPLv2+

None of the cases listed above affect the final binary if it's built as
Expand Down
10 changes: 8 additions & 2 deletions DOCS/client-api-changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ API changes
===========

::

--- mpv 0.40.0 ---
2.5 - Deprecate MPV_RENDER_PARAM_AMBIENT_LIGHT. no replacement.
--- mpv 0.39.0 ---
2.4 - mpv_render_param with the MPV_RENDER_PARAM_ICC_PROFILE argument no
longer has incorrect assumptions about memory allocation and can be
correctly used.
--- mpv 0.38.0 ---
2.3 - partially revert the changes from API version 1.27, remove libmpv as
the default VO and move it to the bottom of the auto-probing order.
Expand All @@ -50,7 +57,7 @@ API changes
TRACK_SWITCHED, METADATA_UPDATE, CHAPTER_CHANGE events
--- mpv 0.33.0 ---
1.109 - add MPV_RENDER_API_TYPE_SW and related (software rendering API)
- inactivate the opengl_cb API (always fails to initialize now)
- deactivate the opengl_cb API (always fails to initialize now)
The opengl_cb API was deprecated over 2 years ago. Use the render API
instead.
1.108 - Deprecate MPV_EVENT_IDLE
Expand Down Expand Up @@ -281,4 +288,3 @@ API changes
- macOS: the "coreaudio" AO spdif code is split into a separate AO
--- mpv 0.4.0 ---
1.0 - the API is declared stable

26 changes: 22 additions & 4 deletions DOCS/compatibility.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,16 @@ All of these are important for interfacing both with end users and API users
(which include Lua scripts, libmpv, and the JSON IPC). As such, they constitute
a large part of the user interface and APIs.

All incompatible changes to this must be declared in interface-changes.rst.
Certain options and commands may have documented default values. These default
values are considered a part of the API since scripts may already rely on these
documented behaviors. Changing these defaults are considered incompatible
changes and must be documented. Undocumented default values do not subject to
this requirement, and it is recommended to discourage such usage in the related
documentations if there is a need to frequently change such defaults.

All incompatible changes to this must be declared in interface-changes.rst,
which include the types of changes, the impact of these changes, and suggested
actions to address such impact so that the incompatibility is alleviated.
(This may also list compatible additions, but it's not a requirement.)

Degrees of importance and compatibility preservation
Expand All @@ -49,8 +58,17 @@ functionality still works, and a replacement is available (if technically
reasonable). For example, a feature deprecated in mpv 0.30.0 may be removed in
mpv 0.32.0. Minor releases do not count towards this.

Under extraordinary circumstances, such as missed incompatible changes that are
already included in a release, critical security fixes, or a severe shortage of
developer time to address the known incompatible changes, important/often used
parts may be broken immediately, but the change must be extensively documented:
all of the related documentations (including manpage, interface-changes.rst,
etc., retrospectively modified if applicable) must clearly state the following:
the fact that the change is a breaking change; the version when the breaking
change happened; and the reason, impact, and suggested remedy actions.

Less useful parts can be broken immediately, but must come with some sort of
removal warning-
removal warning.

Parts for debugging and testing may be removed any time, potentially even
without any sort of documentation.
Expand Down Expand Up @@ -108,7 +126,7 @@ CLI
Things such as default key bindings do not necessarily require compatibility.
However, the release notes should be extremely clear on changes to "important"
key bindings. Bindings which restore the old behavior should be added to
restore-old-bindings.conf.
restore-old-bindings.conf and restore-osc-bindings.conf.

Some option parsing is CLI-only and not available from libmpv or scripting. No
compatibility guarantees come with them. However, the rules which mpv uses to
Expand All @@ -135,7 +153,7 @@ command-interface.
libmpv C API
------------

The libmpv client API (such as ``<libmpv/client.h>``) mostly gives access to
The libmpv client API (such as ``<mpv/client.h>``) mostly gives access to
the command interface. The API itself (if looked at as a component separate
from the command interface) is intended to be extremely stable.

Expand Down
Loading
Loading