Commit Graph

45601 Commits

Author SHA1 Message Date
wm4 fc013ea8ac Copyright: some more licensing clarifications
Unfortunately I'm also adding the full text of the LGPL license text,
because the GPL one was already present in this repository, and I don't
want to imply that the GPL somehow has priority.
2017-10-13 15:44:55 +02:00
wm4 902ae9ae41 options: add --vlang switch
For symmetry with --alang and --slang. 100% useless, but why not?
2017-10-13 00:31:43 +02:00
Julian 5f8438bce6 stats: add file size
also one minor cosmetic change: comment the "coming soon" dummy page
2017-10-13 00:28:41 +02:00
Julian 8dfd728ba1 stats: clarify documentation
Change true/false to yes/no because lua script configs only take these
values for booleans.
2017-10-13 00:28:41 +02:00
Julian 57654cc19e input.conf: explicit bindings for stats overlay 2017-10-13 00:28:41 +02:00
Rostislav Pehlivanov c052849e52 wayland_common: init output_list during main struct init
Otherwise if display connection or xkb init failed the uninit function
could segfault.
2017-10-12 23:18:55 +01:00
wm4 b4c1f0aae3 manpage: correct some comments about ordered chapters
Ordered chapters behavior changed at some point, and all of this was
outdated.
2017-10-11 22:45:47 +02:00
Rostislav Pehlivanov 91ebc34344 wayland_common: require wl_output v2 and send MP_INPUT_RELEASE_ALL on uninit
Every compositor (including toy compositors) has had support for wl_output v2
since forever, so there's little point in supporting degraded output for 5 year
old releases (especially considering we require zxdg6 which is far more recent).
2017-10-11 19:59:42 +01:00
James Ross-Gowan b3178eb59e vo_gpu: shaderc: include debug info when --gpu-debug is set
This adds symbol information to the generated SPIR-V, which shows up in
the SPIR-V assembly dump. It's also useful for potential RA backends
that use SPIRV-Cross, since the symbol information is used in the
generated shader source.
2017-10-11 12:22:21 +11:00
wm4 5f012f2d16 audio: clarify GPL-only parts 2017-10-10 17:36:35 +02:00
wm4 b7f90be567 demux_mkv: remove remaining GPL code
Fuck this thing.
2017-10-10 17:35:47 +02:00
wm4 474a7c26f2 build: make LGPL mode final (via --enable-gpl)
Rename --enable-preliminary-lgpl2 to --enable-gpl. This concludes the
relicensing. Some things are still to do (relicensing some still-GPL
optional code), but we consider the code included by --enable-gpl to be
fully relicensed.

The relicensing was performed by asking every known author for
permission for relicensing it to LGPL version 2.1 "or later". If an
author could not be contacted or permission could not be obtained, and
the contribution was considered relevant for copyright purposes, the
affected code was either excluded from LGPL mode (not built), or removed
or rewritten. This is the standard in open source relicensing processes.

Keep in mind that using LGPL mode is still on the user's own risk. Even
though I claim that the relicensing was pretty clean and thorough
(measured on the standards of the open source community¹), and I
followed the advice of some actual experts, there is still a residual
uncertainty due to the fact that I'm not an all-knowing entity (authors
could have taken someone else's code and pretend it's their own) nor a
lawyer (meaning I might lack associated authority or expertise), and the
fact that the judicial system is far from deterministic. The relicensing
was performed merely to the best of my knowledge. I reject all
responsibility outside of that.

This commit also cleans up the "Copyright" file to reflect the finalized
relicensing process.

¹ Not to imply that the standards of commercial companies are much
higher. Some major tech companies get away with stuff I would not
consider clean.

See #2033.
2017-10-10 16:33:38 +02:00
wm4 14541ae258 Add checks for HAVE_GPL to various GPL-only source files
This should actually cover all of them, if you take into account that
some unchanged GPL source files include header files with such checks.
Also this was done already for the libaf derived code.

This is only for "safety" and to avoid misunderstandings.
2017-10-10 15:51:16 +02:00
Rostislav Pehlivanov 7c66c2bb75 wayland_common: adjust default cursor size and scale its buffer
It turns out compositors which do scaling scale the cursor as well,
so every single surface needs to get scaled too.

Also, 32 corresponds to the default size for both GTK+ and KDE.
2017-10-10 02:39:39 +01:00
Aman Gupta 1abac5f4aa vo: fix reference to mediacodec_embed 2017-10-09 21:49:01 +02:00
Aman Gupta 502d074a31 vo_gpu: android: fix gpu context 2017-10-09 21:49:01 +02:00
Mark Thompson 05cb8d28af vo_opengl: hwdec_vaegl: Use vaExportSurfaceHandle() if present
This new interface in libva2 offers a cleaner way to export surfaces
which can then be imported to EGL.  In particular, this works with
the Mesa driver, so we can have proper playback without a pointless
download and upload on AMD cards.

This change does nothing with libva1, and will fall back to the
libva1 interface (vaDeriveImage() + vaAcquireBufferHandle()) if
vaExportSurfaceHandle() is not present.
2017-10-09 21:35:49 +02:00
Mark Thompson 2ecf240b1c vaapi: Use libva2 message callbacks
They are no longer global, so they work vaguely sensibly.
2017-10-09 21:35:47 +02:00
Julian 81cf58c8c4 stats: add documentation
stats.rst is heavily based on osc.rst
2017-10-09 20:48:44 +02:00
Julian 92a9150cc2 lua: integrate stats.lua script
Signed-off-by: wm4 <wm4@nowhere>

Rename --stats to --load-stats-overlay and add an entry to options.rst
over the original commit.

Signed-off-by: wm4 <wm4@nowhere>
2017-10-09 20:47:33 +02:00
Julian c38ad6ae6f stats: change the way toggling/oneshot works internally
Previously multiple timers were used to realize oneshot, toggling
(redrawing) and page keybindings. The oneshot case in particular also
relied on mp.osd_message to display text only for a given duration.
This was changed to only use one timer in total now. Because now each
case has a defined "start" and "end" point (including oneshot)
mp.set_osd_ass() can be used to print stats as well. This is currently
optional and has to be activated using the config option
persistent_overlay=true.

One shortcoming: oneshot and toggling are mutual exclusive right now.
Previously you could enter toggling while oneshot stats were shown,
this is not possible anymore to reduce the number of cases to be
considered. This can be added later on if desired.
2017-10-09 20:40:32 +02:00
Julian eadec19d22 stats: stop coloring timing values
It used a bad heuristic that got even worse/less reliable with recent
changes in mpv. In fact, it's not reliable at all.
Watch out for dropped frames instead. That's a useful indicator.
2017-10-09 20:40:32 +02:00
Julian 54b3a9fdb0 stats: add current and total chapter number
Fixes #44
(well, partially, I'm still not sure about the time)
2017-10-09 20:40:32 +02:00
Jan Janssen 01f2798e04 stats: add audio and video filters 2017-10-09 20:40:32 +02:00
Niklas Haas 055fc5ced3 stats: reorganize the framedrop counters
Clarified the relationship between `Dropped` and `VO`, and also merged
the DS-exclusive stats into the DS line.
2017-10-09 20:40:32 +02:00
Julian 1016ff34ea stats: revert DR indicator as it's unnecessary
It's apparently already stated as part of the upload pass name.
This reverts commit ec837f64c29a1b825e28b65edc34059b6c1cad40.
2017-10-09 20:40:32 +02:00
Julian 9bcb8f3bd9 stats: reduce default font size to 8 2017-10-09 20:40:32 +02:00
Julian 19b8dfbd2b stats: visually indicate direct rendering 2017-10-09 20:40:32 +02:00
Julian 5c8e9e8072 stats: change font weight of % sign as well
Due to popular demand
2017-10-09 20:40:32 +02:00
Julian d0608d3fdf stats: fix indentation/newline of frame timing page
There was a superfluous newline and some indentation
2017-10-09 20:40:32 +02:00
Julian 471b152527 stats: show % of a pass on frame timing page 2017-10-09 20:40:32 +02:00
Julian f0719727cc stats: always print perfdata total
There's no point in disabling it anyway
2017-10-09 20:40:32 +02:00
Julian 1231b1ae68 stats: make add_header() append at current position 2017-10-09 20:40:32 +02:00
Julian 96ef2aa48b stats: print perfdata total by default
There is enough space now
2017-10-09 20:40:32 +02:00
Julian 56029b6b59 stats: mark dummy as such 2017-10-09 20:40:32 +02:00
Julian 9470ccd8ae stats: correctly re-eval ASS tag usage
Fixes #42
2017-10-09 20:40:32 +02:00
Julian b93efd0a52 stats: make page keybinding repeatable
There's no reason it's not.
2017-10-09 20:40:32 +02:00
Julian 6c7aae769a stats: remove table in table
Almost cosmetic change.
This tables-in-table was done back when we actually processed strings
but that's long ago now and no longer needed nor useful.
2017-10-09 20:40:32 +02:00
Julian 783046f5ff stats: resilience against accidential timer removal
Previously I could trigger a bug with intense button mashing, however,
was unable to reproduce it and therefore debug it.
This change now seems to be resilient against button mashing, let's hope
it really is.
2017-10-09 20:40:32 +02:00
Julian 21603dd5af stats: allow keybindings for specific page
A keybinding in input.conf like:
   e script-binding stats/display-page-2
can be used to directly show the respective page (2, in this case)
2017-10-09 20:40:32 +02:00
Julian 98ddbf8c34 stats: support for multiple "pages" of stats
Please note that the latest version of this script needs a very recent
version of mpv (from yesterday, to be precise, see the readme).
For older versions, please go to "releases".

HOW IT WORKS:
While the stats are visible (i.e. text is printed to the OSD) a
subsequent click on a numeric key (1, 2, ...) will display the
corresponding "page".
This works no matter if the stats are toggled or just shown as a single
invocation. In case of a single invocation, the newly displayed page
will be shown for the full duration again.
The selected page will be remembered (not persistantly though).

So far, only 3 pages are available.
1: the default page, stats as they used to be
2: extensive VO performance stats (to be redesigned/changed soon)
3: dummy

In the future, many more pages are possible.

Implementation is likely to change again (functionality will stay
the same). A new timer had to be introduced to remove the forced
keybindings in the oneshot case. The toggle case can remove them without
a timer. Ensuring that each mode won't remove timers of the other mode
didn't really turn out neat.
Therefore, I intend to change this again, maybe by merging the
oneshot case into the toggle case.
2017-10-09 20:40:32 +02:00
Julian c04ff9dce0 stats: remove check for lua timer function
We now require a modern mpv version.
`property_aliases` is kept for future use.
2017-10-09 20:40:32 +02:00
Niklas Haas 1691b978cf stats: rescale graphs to make the average align with the center, if possible
For vsync measurements this is not currently done because they don't
track their average
2017-10-09 20:40:32 +02:00
Niklas Haas 22a8b99f7a stats: add support for `vo-passes`, which replaces `vo-performance`
Due to the large amount of per-pass data, the function takes a parameter
indicating whether or not to print a simplified view instead.

The overall intent is to print the simplified view for now, but supposed
printing the full view on a dedicated "tab" (or extra view type), and as
such, `o.print_perfdata_passes` will go away again. I've only introduced
it for now so users can play around with this functionality if they want
to, until Argon- gets around to implementing stats "tabs".
2017-10-09 20:40:32 +02:00
Niklas Haas 6d10d5a29f stats: update HDR peak for upstream changes
This no longer reports cd/m² but now reports a relative peak as a
multiple of the SDR reference brightness.
2017-10-09 20:40:32 +02:00
Julian fa80ac13b6 stats: add support for deprecated properties
Previously, we used a property and when it was unavailable we assumed it
doesn't exist before assuming it really is just unavailable. This lead
to unnecessarily falling back to deprecated properties which made mpv
print deprecation warnings.
Now we can really check if a property is not known to mpv.
The alternative would've been to check the error part of mp.get_property
and perform string comparisons on the returned error message.

Not sure if supporting old mpv versions is actually worth it though.

Fixes #37 #36
2017-10-09 20:40:32 +02:00
Julian 6f9a7d1fdb stats: comment to remind me about deprecated properties 2017-10-09 20:40:32 +02:00
Ricardo Constantino 7429eace57 stats: add new versions of decoder and VO dropped frame counts 2017-10-09 20:40:32 +02:00
Julian bd0d0befc0 stats: put vsync ratio and jitter on the same line
Free some vertical space. Hope this doesn't hurt visibility.
2017-10-09 20:40:32 +02:00
Julian 8bc6c91f4a stats: declare function as local
Apparently forgot this one
2017-10-09 20:40:32 +02:00