Commit Graph

44761 Commits

Author SHA1 Message Date
wm4 7f78929050 af: remove unused GET_VOLUME code
The entire af code is going to be removed, but Ordnung muss sein.
2017-04-27 00:22:30 +02:00
wm4 afead7a356 audio: merge --replaygain-track and --replaygain-album into one option
This is probably better than separate options. For example, the user
does not have to guess which one is applied if both options are enabled.
2017-04-27 00:21:17 +02:00
wm4 90a1ca02a2 audio: fix replaygain volume scale
The new replaygain code accidentally applied the linear gain as cubic
volume level. Fix this by moving the computation of the volume scale out
of the af_volume filter.

(Still haven't verified whether the replaygain code works correctly.)
2017-04-27 00:15:32 +02:00
wm4 f1c4d20e65 audio: move replaygain control to top-level options
af_volume is deprecated, and so are its replaygain sub-options. To make
it possible to use replaygain without deprecated options (and of course
to make it available at all after af_volume is dropped), reintroduce
them as top-level options.

This also means that they are easily changeable at runtime by using them
as properties. Change the "volume" property to use the new update
mechanism as well.

We don't actually bother sharing the implementation between new and
deprecated mechanisms, as the deprecated one will simply be deleted.

For the from_dB() functions, we mention anders' copyright, although I'm
not sure if a mere formula is copyrightable. This will have to be
determined later.

This whole change is mostly untested. Our distributed human CI will take
care of it.
2017-04-26 21:45:55 +02:00
wm4 010c7d4992 vo_opengl: context_drm_egl: remove unnecessary include
Could be broken after the previous commit removed finding the GL include
dir.
2017-04-26 17:43:23 +02:00
wm4 cb25bb5776 build: remove checks for libGL
We don't need to link against libGL directly, nor do we need OpenGL
headers. The only thing we need is the windowing interop stuff, such as
libEGL.
2017-04-26 17:09:16 +02:00
wm4 3782082722 DOCS/interface-changes.rst: fix typo
Pointed out by someone.
2017-04-26 17:00:38 +02:00
Ilya Tumaykin 9d80c08441 build: rely on internal GL headers for rpi check
Since mpv ships all the required OpenGL defines now,
rpi check doesn't need to check system GL headers.
2017-04-26 17:00:23 +02:00
Marko Hauptvogel 3fe6b36eb0 player: close audio device on no audio track
Close the audio device if there is no audio track (or stream) in the
current file. It will be opened again if the next file should contain
audio.

Signed-off-by: Marko Hauptvogel <marko.hauptvogel@googlemail.com>
Signed-off-by: wm4 <wm4@nowhere>
2017-04-25 20:21:09 +02:00
Ricardo Constantino 18703b55d8
osc: also add processing for axis_up/down events
Considered semantically equivalent with mouse_btn3/4.

This is a preemptive fix for upcoming changes to AXIS_* events.
2017-04-25 15:42:09 +01:00
Ricardo Constantino 6d65ab3a7d
wscript_build: install shared libmpv to BINDIR for Win32 2017-04-24 15:11:32 +01:00
wm4 809d160c1e options: remove remaining deprecated audio device selection options 2017-04-23 17:51:55 +02:00
wm4 f34de63450 ao_openal: kill off device listing
Probably helps with #4311. It surely is not the correct fix, of course.
But ao_openal has no business of causing trouble anyway.
2017-04-23 17:44:26 +02:00
wm4 f59371de21 video: drop vaapi/vdpau hw decoding support with FFmpeg 3.2
This drops support for the old libavcodec APIs. Now FFmpeg 3.3 or FFmpeg
git is required. Libav has no release with the new APIs yet, so for
Libav git as of a few weeks or months ago or so is required if you want
to use Libav.

Not much actually changes in hwdec_vaegl.c - some code is removed, but
the reindentation inflates the diff.
2017-04-23 16:07:03 +02:00
wm4 1d0a858447 README: list some more X11 dependencies 2017-04-23 16:01:49 +02:00
Ricardo Constantino 3526b95aaf
ytdl_hook: treat single-entry playlists as a single video 2017-04-23 01:53:59 +01:00
Ricardo Constantino d5517f0d9f
ytdl_hook: move single video code to a separate function 2017-04-23 01:53:57 +01:00
Martin Herkt 829bf1356a
Update VERSION 2017-04-23 01:57:53 +02:00
Martin Herkt eabba2de4d
Release 0.25.0
Also update release policy documentation and version extraction.
2017-04-23 01:57:53 +02:00
Ricardo Constantino 1bcb2f999e
osd-font: make volume muted glyph slightly thicker 2017-04-22 18:03:16 +01:00
wm4 591d99a988 Copyright: change osd font license to LGPL
All controbutors have agreed. In one case, someone who is unaccounted
for changed a glyph in some trivial way; we simply replaced the glyph
with another one in 1e4d3a2440 to avoid any potential problems
(although that change was probably not copyrightable anyway).
2017-04-21 13:37:33 +02:00
wm4 d2af35aeb3 demux/packet: change license to LGPL
All contributors have agreed. In 3a43f13fce, someone who potentially
disagreed reverted a commit by someone else (restoring the original
state). This shouldn't matter for Copyright, and all of the affected
code was rewritten/removed anyway.
2017-04-21 13:34:10 +02:00
wm4 cba4efb083 ebml, matroska.h: change license to LGPL
These are covered by the analysis in commit e7e6aa3d64 too
(although there are no potential problems).
2017-04-21 13:34:10 +02:00
wm4 b78d2e6d09 demux_mkv: mention non-LGPL code 2017-04-21 13:34:10 +02:00
wm4 a5f54209c0 external_files.c: add GPL header
It's been missing since mplayer2 times, not sure why. It originates from
subreader.c. No analysis on whether it can be relicensed to LGPL was
done yet.
2017-04-21 13:33:51 +02:00
wm4 e7e6aa3d64 demux_mkv: change license to LGPL
Most contributors have agreed. This claims it's based on gstreamer code,
but this was LGPL at the time (and still is). Contributors whose code
was removed were not accounted for. There are still some potentially
problematic cases:

06eee1b67 is potentially the most problematic case. Most of these
changes are gone due to mpv not using BITMAPINFOHEADER anymore. Some
of the other changes are rather trivial. If someone contests this and
claims that copyrightable changes are left, the original change can
simply be reverted.

62bfae140 has only 2 lines left: a "char *name;" struct field, and a
line that prints a message. All other code was removed. The parsing code
in particular was made declarative, which replaced reading this element
explicitly (and  other elements, see 1b22101c77). I'm putting the log
message under HAVE_GPL, but I don't think the declaration is
copyrightable, or the mere concept of reading this element. Redoing the
other 2 lines of code would result in the  same program text.

d41e860ba was applied by someone who (potentially) disagreed. The patch
itself is from someone who did agree, though. It's unknown whether the
applier changed the patch. But it seems unlikely, and the change was
mostly rewritten.

50a86fcc3 all demux_mkv changes were reverted (old stdout slave mode)
3a406e94d same
2e40bfa13 the old MPlayer subtitle code was completely removed
316bb1d44 completely removed in 1cf4802c1d
87f93d9d7 same
11bfc6780 relative seeks were removed in 92ba630796
be54f4813 the corresponding demux_mkv code was removed in 5dabaaf093
efd53eed6 all internal vobsub handling is now in FFmpeg
d7f693a20 removed in f3db4b0b93
e8a1b3713 removed in 522ee6b783
cfb890259 removed, see 6b1374b203 for analysis
c80808b5a same
2017-04-21 12:21:33 +02:00
wm4 16c468d014 common.h: change license to LGPL
The only definitions from MPlayer code are the CONTROL_* defines (added
in 7a2eec4b as part of libao2 - not part of libao), and MP_NOPTS_VALUE,
which was added in e6338c58. The latter is by "michael", who has agreed
under the condition that the core is LGPL, which has not happened yet,
but considering the macro definition used to be different, has the same
value and similar name to libavformat's AV_NOPTS_VALUE (which existed
first, and as LGPL), and that this almost certainly not copyrightable,
I'm assuming that this is fine.
2017-04-21 08:49:25 +02:00
wm4 927afa311d build: make various x11 protocol extension libs mandatory
Reduces the ifdeffery, which is good and will avoid silent breakages, or
weird behavior if a lib is omitted.

Also reorder the x11_common.c include statements.
2017-04-21 07:30:03 +02:00
wm4 4d1eab6e55 vo_opengl: fix crash by coping temporal_dither_period for dumb mode too
Specifically, this field must never be 0 (and the option can naturally
not be 0 in any way, unless it wasn't initialized correctly).
2017-04-21 07:16:26 +02:00
Ricardo Constantino 51518ddcf6
Add script to generate otf from sfdir using fontforge
Uses python scripting on fontforge since native scripting is considered
legacy and even Ubuntu Trusty seems to have python scripting.
2017-04-20 17:40:45 +01:00
Ricardo Constantino 1e4d3a2440
sub/osd_font.otf: replace triangle volume by speaker glyph
The triangle icon has potentially questionable copyright issues, see
a7e9bac132
2017-04-20 17:40:40 +01:00
Ricardo Constantino 44c6a76506
Add fontforge sfdir for mpv-osd-symbols font
Should make changes easier to inspect.

This was created by opening the current osd_font.otf in Fontforge and
saving as .sfdir.
2017-04-20 17:35:15 +01:00
cantabile 4b4dee09ad sd_lavc: Free extradata in case of init error 2017-04-20 16:11:31 +02:00
wm4 611426d162 sub/osd: relicense to LGPL
All contributors of the code used for these files agreed to the LGPL
relicensing.

There are some unaccounted contributors, but all of their code was
completely removed before. (The only exception is one contributor whose
only line left was "#include <string.h>". I don't know if that's
copyrightable, but it wasn't needed anyway, so just remove it.)

These files started out as libvo/sub.* (renamed to sub/sub.*, then
renamed again to sub/osd.*). They used to contain code for rendering
the OSD (as in, actual pixel manipulation and text layouting). But
later all this code was dropped, and libass was used to render the OSD
instead. Actual subtitle rendering was reimplemented in other files
(the old subtitle rendering path is completely gone).

One potential problem are the option declarations, which makes this
harder, as these options involve more history. But it turns out most of
them were reimplemented since 80270218cb, rather than taken from old
code. (Although not all - but the rest covered by relicensing
agreements.)

This also affects osd_state.h, which was apparently incorrectly implied
to be LGPL.
2017-04-20 12:53:47 +02:00
wm4 803a0cebc4 sd_lavc: change license to LGPL
All contributors have agreed.

Compared to sd_ass.c, this has a pretty simple history:
av_sub.c -> sub/av_sub.c -> sub/sd_lavc.c

At one point, some code from spudec.c was added to it, but it was
removed again later.
2017-04-20 12:53:30 +02:00
wm4 6b1374b203 sd_ass: change license to LGPL
All contributors of the code used for sd_ass.c agreed to the LGPL
relicensing. Some code has a very chaotic history, due to MPlayer
subtitle handling being awful, chaotic, and having been refactored a
dozen of times. Most of the subtitle code was actually rewritten from
scratch (a few times), and the initial sd_ass.c was pretty tiny. So we
should be fine, but it's still a good idea to look at this closely.
Potentially problematic cases of old code leaking into sd_ass.c are
mentioned below.

Some code originates from demux_mkv. Most of this was added by eugeni,
and later moved into mplayer.c or mpcommon.c. The old demux_mkv ASS/SSA
subtitle code is somewhat dangerous from a legal perspective, because it
involves 2 patches by a certain Tristan/z80, who disagreed with LGPL,
and who told us to "rewrite" parts we need. These patches were for
converting the ASS packet data to the old MPlayer text subtitle data
structures. None of that survived in the current code base.

Moving the subtitle handling out of demux_mkv happened in the following
commits: bdb6a07d2a, de73d4dd97, 61e4a80191. The code by
z80 was removed in b44202b69f.

At this time, the z80 code was located in mplayer.c and subreader.c.
The code was fully removed, being unnecessary due to the entire old
subtitle rendering code being removed. This adds a ass_to_plaintext(),
function, which replaces the old ASS tag stripping code in
sub_add_text(), which was based on the z80 code. The new function was
intended to strip ASS tags in a correct way, instead of somehow
dealing with other subtitle types (like HTML-style SRT tags), so it
was written from scratch.

Another potential issue is the --sub-fix-timing option is based on
-overlapsub added in d459e64463. But the implementation is new, and
no code from that commit is used in sd_ass.c. The new implementation
started out in 64b1374a44. (The following commit, bd45eb468c
removes the original code that was replaced.) The code was later
moved into sd_ass.c.

The --sub-fps option has a similar history.
2017-04-20 12:53:24 +02:00
wm4 6e26a6bafb ass_mp: change license to LGPL
Somewhat chaostic history: libass/ass_mp.* -> ass_mp.* -> sub/ass_mp.*

As far as I can tell, everyone who ever touched these files has agreed
to the relicensing.
2017-04-20 12:53:09 +02:00
wm4 f4cb4fb962 filter_sdh: remove pointless set_pos function
This change was requested during patch review, but apparently it was
overlooked on merge.
2017-04-20 08:22:46 +02:00
wm4 19db7a79d4 filter_sdh: change license to LGPL 2017-04-20 08:19:22 +02:00
wm4 5a33242854 ao_wasapi_changenotify: use %ls instead of %S for wchar_t
%ls is C99. %S is supported by some systems, including MinGW/MSVC, but
no reason to use it.
2017-04-20 07:38:03 +02:00
wm4 05e6d423d9 ao_wasapi_changenotify: fix potential race condition
IMMDeviceEnumerator_RegisterEndpointNotificationCallback() will start
listening for notifications, and is the point at which callbacks can
start firing. These callbacks will read the fields we set after the
register calls, which is a potential race condition. Move it upwards.
2017-04-20 07:33:13 +02:00
wm4 5ae25ae424 client API: add MPV_ENABLE_DEPRECATED symbol
(Of course this is on by default, because otherwise we'd randomly break
downstream applications.)
2017-04-20 06:19:55 +02:00
wm4 f41e50530f options: change --audio-file-auto default to not to load any files
There have been user complaints, and I'm annoyed by this behavior
myself.
2017-04-20 05:29:04 +02:00
Avi Halachmi (:avih) 150c988e88
osc: add user_opts.boxmaxchars for box layout title limit
The default of 80 is conservative to allow relatively wide fonts, but
with many common fonts a bigger number can be used without overflow.
2017-04-19 20:35:58 +01:00
Ricardo Constantino 6ccc40aa03
sub/osd_font.otf: fix fontforge errors/warnings 2017-04-19 20:18:24 +01:00
Ricardo Constantino 05c8707a0b
osc: add volume icons to osd font and use them
Glyphs taken and based on U+1F507 to U+1F50A from Symbola, which
is available under public domain: http://users.teilar.gr/~g1951d/
2017-04-19 20:18:23 +01:00
Ricardo Constantino a047e636ab
man/osc: document volume and fullscreen buttons 2017-04-19 20:18:23 +01:00
Ricardo Constantino 9d6c208afa
osc: move volume left of fullscreen button 2017-04-19 20:18:23 +01:00
Ricardo Constantino fe937e866d
osc: bottom/topbar: add fullscreen button 2017-04-19 20:18:23 +01:00
Ricardo Constantino a477c864a4
osc: add volume button
Click to toggle mute, mouse wheel to change volume.
OSD is shown on volume change.
2017-04-19 20:18:23 +01:00