Commit Graph

931 Commits

Author SHA1 Message Date
Bin Jin 3f73d63523 file2string: mark question mark as non-safe
Escaping all question marks as well, they can be used to form
trigraph characters which are effective even within string literal.
2015-11-05 17:38:20 +01:00
James Ross-Gowan a9833a71ce TOOLS/gen-x11-icon.sh: fix for recent ImageMagick
Apparently ImageMagick no longer appends a newline to the format. This
also sets the execute bit on the script.
2015-11-04 21:48:27 +01:00
wm4 252dcdcc99 sd_lavc: take care of AVPicture deprecation 2015-10-23 20:14:08 +02:00
bitingsock 0121d00478 TOOLS/autoload: avoid throwing an error when playing e.g. youtube
Signed-off-by: wm4 <wm4@nowhere>
2015-10-20 12:33:57 +02:00
wm4 d27d91715f build: remove explicit checks for VPP
This was once done when old versions of libva without VPP had to be
supported. Some parts of it were removed earlier already.
2015-10-17 14:25:09 +02:00
wm4 2483dab54d TOOLS/stats-conv: rewrite for pygtgraph
matplotlib is pathetically slow, which makes using stats-conv.py to view
dumps longer than a few seconds a huge pain.

pyqtgraph is slightly faster than matplotlib. Other than that, it seems
to be worse in every aspect (at least for plotting), but such is life.
2015-10-15 23:07:03 +02:00
wm4 ebb43f5176 Revert "vo_x11: remove this video output"
This reverts commit d11184a256.

Unfortunately, there was a lot of unexpected resistance.

Do note that this is still extremely slow, crappy, etc.

Note that vo_x11.c was further edited. Compared to the removed vo_x11.c,
an additional ~200 lines of code was removed in order to simplify it. I
tried to strip it down as much as possible. In particular, support for
odd non-32 bit formats (24, 16, 15, 8 bit) is dropped.

Closes #2300.
2015-09-30 22:52:22 +02:00
wm4 b4491c00c4 Take care of libavcodec convergence_duration deprecation
This AVPacket field was a hack against the fact that the duration field
was merely an int (too small for things like subtitle durations). Newer
libavcodec drops this field and makes duration 64 bit.
2015-09-29 18:43:28 +02:00
wm4 1dd7b7bddc video: remove VDA support
VideoToolbox is preferred. Now that FFmpeg released 2.8, there's no
reason to support VDA anymore. In fact, we had a bug that made VDA not
useable with older FFmpeg versions in some newer mpv releases.

VideoToolbox is supported even on slightly older OSX versions, and if
not, you still can run mpv without hw decoding.
2015-09-28 22:03:14 +02:00
wm4 8aa8417aa3 vo_opengl: vaapi: add Wayland support
Pretty trivial with the new EGL interop.

Fixes #478.
2015-09-27 21:38:45 +02:00
wm4 1fa674c109 vo_opengl: refactor EGL context information callback
Move the ugliness from x11egl.c to common.c, so that the ugliness
doesn't have to be duplicated in wayland.c.
2015-09-27 21:34:11 +02:00
wm4 710872bc22 vaapi: remove dependency on X11
There are at least 2 ways of using VAAPI without X11 (Wayland, DRM).
Remove the X11 requirement from the decoder part and the EGL interop.
This will be used by a following commit, which adds Wayland support.

The worst about this is the decoder part, which includes a bad hack for
using the decoder without any VO interop (also known as "vaapi-copy"
mode). Separate the X11 parts so that they're self-contained. For the
EGL interop code we do something similar (it's kept slightly simpler,
because it essentially only has to translate between our silly
MPGetNativeDisplay abstraction and the vaGetDisplay...() call).
2015-09-27 21:33:15 +02:00
wm4 2e5df94f0f vo_opengl: vaapi: redo how EGL extensions are loaded
It looks like my hope that we can unconditionally include EGL headers in
the OpenGL code is not coming true, because OSX does not support EGL at
all. So I prefer loading the VAAPI EGL/GL specific extensions manually,
because it's less of a mess. Partially reverts commit d47dff3f.
2015-09-27 16:18:06 +02:00
wm4 0ae8aebb89 video: refactor GPU memcpy usage
Make the GPU memcpy from the dxva2 code generally useful to other parts
of the player.

We need to check at configure time whether SSE intrinsics work at all.
(At least in this form, they won't work on clang, for example. It also
won't work on non-x86.)

Introduce a mp_image_copy_gpu(), and make the dxva2 code use it. Do some
awkward stuff to share the existing code used by mp_image_copy(). I'm
hoping that FFmpeg will sooner or later provide a function like this, so
we can remove most of this again. (There is a patch, bit it's stuck in
limbo since forever.)

All this is used by the following commit.
2015-09-25 19:18:16 +02:00
wm4 8d8a2045bd vo_opengl: support new VAAPI EGL interop
Should work much better than the old GLX interop code. Requires Mesa 11,
and explicitly selecting the X11 EGL backend with:

    --vo=opengl:backend=x11egl

Should it turn out that the new interop works well, we will try to
autodetect EGL by default.

This code still uses some bad assumptions, like expecting surfaces to be
in NV12. (This is probably ok, because virtually all HW will use this
format. But we should at least check this on init or so, instead of
failing to render an image if our assumption doesn't hold up.)

This repo was a lot of help: https://github.com/gbeauchesne/ffvademo
The kodi code was also helpful (the magic FourCC it uses for
EGL_LINUX_DRM_FOURCC_EXT are nowhere documented, and
EGL_IMAGE_INTERNAL_FORMAT_EXT as used in ffvademo does
not actually exist).

(This is the 3rd VAAPI GL interop that was implemented in this player.)
2015-09-25 00:26:19 +02:00
wm4 d47dff3faa vo_opengl: load certain EGL extensions needed for VAAPI EGL interop
These extensions use a bunch of EGL types, so we need to include the EGL
headers in common.h to use our GL function loader with this.

In the future, we should probably require presence of the EGL headers to
reduce the hacks. This might be not so simple at least with OSX, so for
now this has to do.
2015-09-25 00:19:58 +02:00
wm4 8782354e6d player: rename and move find_subfiles.c
This was in sub/, because the code used to be specific to subtitles. It
was extended to automatically load external audio files too, and moving
the file and renaming it was long overdue.
2015-09-20 18:05:06 +02:00
Philip Sequeira bad743aed5 TOOLS/zsh.pl: only check the actual exit code when calling mpv
Ignore the other bits of $?. Apparently they can be set even if the
command succeeded.
2015-09-20 14:21:03 +02:00
wm4 7020908691 video/filter: remove some vf_lavfi wrappers
I see no point in keeping these around. Keeping wrappers for some select
libavfilter filters just because MPlayer had these filters is not a good
reason.

Ultimately, all real filtering work should go to libavfilter, and users
should get used to using vf_lavfi directly. We might even not require
the awful double-nested syntax for using libavfilter one day.

vf_rotate, vf_yadif, vf_stereo3d are kept because mpv uses them
internally. (They all extend the lavfi filters or change their
defaults.) vf_mirror is kept for symmetry with vf_flip. vf_gradfun and
vf_pullup are probably semi-popular, so I'll remove them not yet - only
after some more discussion.
2015-09-11 23:47:00 +02:00
wm4 9e04e31906 video: do not use deprecated libavutil pixdesc fields
These were normalized and are saner now. We want to use the new fields,
and also get rid of the deprecation warnings, so use them. There's no
release yet which uses these, so some ifdeffery is unfortunately needed.
2015-09-10 22:13:52 +02:00
wm4 95d5bee832 old-makefile: update for recent OpenGL refactors 2015-09-09 18:21:09 +02:00
Rudolf Polzer 37544e53dc Use setfield, not --field-dominance. See #2297. 2015-09-09 02:57:44 +02:00
wm4 d04d2380e3 audio/filter: remove af_bs2b too
Some users still use this filter, so the filter was going to be kept.
But I overlooked that libavfilter provides this filter. Remove the
redundant wrapper from mpv. Something like --af=lavfi=bs2b should work
and give exactly the same results.
2015-09-04 00:23:39 +02:00
wm4 091bfa3abf audio/filter: remove some useless filters
All of these filters are considered not useful anymore by us. Some have
replacements in libavfilter (useable through af_lavfi).

af_center, af_extrastereo, af_karaoke, af_sinesuppress, af_sub,
af_surround, af_sweep: pretty simple and useless filters which probably
nobody ever wants.

af_ladspa: has a replacement in libavfilter.

af_hrtf: the algorithm doesn't work properly on most sources, and the
implementation was buggy and complicated. (The filter was inherited from
MPlayer; but even in mpv times we had to apply fixes that fixed major
issues with added noise.) There is a ladspa filter if you still want to
use it.

af_export: I'm not even sure what this is supposed to do. Possibly it
was meant for GUIs rendering audio visualizations, but it couldn't
really work well. For example, the size of the audio depended on the
samplerate (fixed number of samples only), and it couldn't retrieve the
complete audio, only fragments. If this is really needed for GUIs, mpv
should add native visualization, or a proper API for it.
2015-09-03 23:55:36 +02:00
Ricardo Constantino b144da63a8 TOOLS/lua/autoload: fix adding more files at end of auto-playlist
Fixes regression in dfd8a5f that made autoload not add more files
at the end of the current playlist if playlist was made by the
script.

This still prevents loading the script if more than one (media or
playlist) file was manually added.
2015-08-20 22:05:03 +02:00
wm4 9cd929bf79 TOOLS/lua/autoload: add all files on start
Or almost. I don't know or care.

Fixes #2219 (maybe, I don't know or care).
2015-08-20 22:04:36 +02:00
wm4 3bceb37b06 old-configure: avoid a warning 2015-08-19 21:38:47 +02:00
wm4 2b280f4522 stream: libarchive wrapper for reading compressed archives
This works similar to the existing .rar support, but uses libarchive.
libarchive supports a number of formats, including zip and (most of)
rar.

Unfortunately, seeking does not work too well. Most libarchive readers
do not support seeking, so it's emulated by skipping data until the
target position. On backwards seek, the file is reopened. This works
fine on a local machine (and if the file is not too large), but will
perform not so well over network connection.

This is disabled by default for now. One reason is that we try
libarchive on every file we open, before trying libavformat, and I'm not
sure if I trust libarchive that much yet. Another reason is that this
breaks multivolume rar support. While libarchive supports seeking in
rar, and (probably) supports multivolume archive, our support of
libarchive (probably) does not. I don't care about multivolume rar, but
vocal users do.
2015-08-17 00:55:26 +02:00
wm4 70c990cda5 atomics: cleanup HAVE_ATOMICS define
The waf build system generates this already. No point in redoing it in
the header file.

The legacy build system (which we really should drop) didn't; fix it.
2015-08-13 23:34:14 +02:00
wm4 5a52fe47a0 TOOLS/stats-conv: allow passing regex via command line 2015-08-10 18:36:10 +02:00
Ricardo Constantino dfd8a5ff06 TOOLS/lua/autoload: don't run if playlist is loaded 2015-08-10 00:07:31 +02:00
Ricardo Constantino 91b9dcf800 TOOLS/lua: Add zones.lua
Lua script that enables handling of certain commands depending on where
the mouse pointer is. Mostly useful for mouse-wheel handling via
input.conf.

Example:

MOUSE_BTN3 script-message-to zones commands "*-left: add volume +5"
"default: seek +10"
MOUSE_BTN4 script-message-to zones commands "*-left: add volume -5"
"default: seek -10"

Will changes behavior of Mouse Wheel Up/Down to alter volume if mouse is
in the left zone of the window, but re-adds the default to seek if wheel
is used on other parts.
2015-08-09 23:52:13 +02:00
wm4 410553aaaa old-configure: add dummies for recently added config.h entries
Also add a note that you should not use the old build system. (It's only
kept because of the "asshole maintainer" rule: no matter how broken or
pointless someting is, as long as you're the maintainer and want to keep
it, it stays in the repo.)
2015-08-05 23:11:13 +02:00
wm4 f792f56440 player: remove higher-level remains of DVD/BD menu support
Nobody wanted to restore this, so it gets the boot.

If anyone still wants to volunteer to restore menu support, this would
be welcome. (I might even try it myself if I feel masochistic and like
wasting a lot of time for nothing.) But if it does get restored, it
should be done differently. There were many stupid things about how it
was done. For example, it somehow tried to pull mp_nav_events through
all the layers (including needing to "buffer" them in the demuxer),
which was needlessly complicated. It could be done simpler.

This code was already inactive, so this commit actually changes nothing.
Also keep in mind that normal DVD/BD playback still works.
2015-08-03 23:49:14 +02:00
wm4 a74914a057 charset_conv: add uchardet support
For now, it needs to be explicitly selected. ENCA is still the default.

This assumes uchardet returns iconv names. This doesn't seem to be
always the case, and the result are lots of iconv errors. So
explicitly check for this situation, and print a warning if it
occurs. It's entirely possible that uchardet support is actually
useless, because names are not necessarily iconv-compatible (but
uchardet doesn't seem to document whether it attempts to return
iconv-compatible names if possible).

Fixes #908.
2015-08-02 00:03:29 +02:00
wm4 e0c55cbfea audio: remove af_dummy
Was used internally once; has no function anymore.
2015-08-01 21:20:55 +02:00
wm4 efd7100962 old-configure: some adjustments 2015-08-01 21:14:50 +02:00
wm4 c6b5645991 TOOLS: remove youtube-starttime.lua
Obsolete due to native youtube-dl start time support.
2015-07-29 13:23:12 +02:00
ChrisK2 aeb99f2718 TOOLS: unbreak osxbundle.py
broekn by 739d345d6c
2015-07-21 23:04:06 +02:00
Philip Sequeira 2cf019ed70 TOOLS/zsh.pl: die loudly if mpv fails to run 2015-07-19 22:04:45 +02:00
Kevin Mitchell ebdbb4f24c TOOLS: make autodeint detect telecine in parallel
This avoids having to rewind the video for a second telecine detection pass.
2015-07-16 16:14:58 -07:00
wm4 739d345d6c build: don't make version.sh create version.h by default
You could actually run version.sh, and then the waf build system could
accidentally pick up the generated (and most likely stale) version.h.
2015-07-14 23:11:06 +02:00
Philip Langdale 4b0b9b515b vf_vdpaurb: Add a new filter for reading back vdpau decoded frames
Normally, vdpau decoded frames are passed directly to a suitable
vo (vo_vdpau or vo_opengl) without ever touching system memory. This
is efficient for output purposes, but prevents any of the regular
filters from being used with such frames.

This new filter implements a read-back step to pull the frames back
into system memory where they can be acted on by other filters.
Eventually the frames will be sent to the vo as if they were normal
software-decoded frames.

Note that a vdpau compatible vo must still be used to ensure that
the decoder is properly initialised.

Signed-off-by: wm4 <wm4@nowhere>
2015-07-11 10:44:34 +02:00
wm4 5446637e99 av_log: print FFmpeg version
The individual library versionsd are pretty useless. This will actually
tell us at least the git hash or git tag of the FFmpeg build.
2015-07-03 15:11:29 +02:00
wm4 d11184a256 vo_x11: remove this video output
It only causes additional maintenance work.

Even if you wanted to have a fallback, it's probably better to use
--vo=sdl or so.
2015-06-26 17:17:34 +02:00
wm4 ae2873f72e demux_mkv: don't use byte strings
Use char* for strings instead of bstr (data ptr + length pair). Matroska
actually (probably) allows "padding" strings with \0 bytes, so using
normal C strings instead of byte strings is more appropriate.
2015-06-24 14:02:40 +02:00
wm4 552dc0d564 af_convert24: remove this filter 2015-06-16 22:40:37 +02:00
wm4 831d7c3c40 audio: remove S8, U16, U24, U32 formats
They are useless. Not only are they actually rarely in use; but
libavcodec doesn't even output them, as libavcodec has no such sample
formats for decoded audio.

Even if it should happen that we actually still need them (e.g. if doing
direct hardware output), there are better solutions. Swapping the sign
is a fast and lossless operation and can be done inplace, so AO actually
needing it could do this directly.

If you wonder why we keep U8 instead of S8: because libavcodec does it.
2015-06-16 21:11:59 +02:00
Rudolf Polzer f14a3df778 idet.sh: Support larger files. 2015-06-02 15:37:41 +02:00
wm4 6f5a10542c vdpau: add support for the "new" libavcodec vdpau API
Yet another of these dozens of hwaccel changes. This time, libavcodec
provides utility functions, which initialize the vdpau decoder and map
codec profiles. So a lot of work the API user had to do falls away.

This also will give us support for high bit depth profiles, and possibly
HEVC once libavcodec supports it.
2015-05-28 21:56:13 +02:00
wm4 0699a6c598 video: rename vdpau.c to vdpau_old.c
vdpau.c will be used for new code.
2015-05-28 21:56:09 +02:00
wm4 446a10020f TOOLS/lua/status-bar: update use of a deprecated property
Also mention that this code does not reflect the status line of current
mpv.
2015-05-25 22:01:34 +02:00
wm4 0ed1719e1a demux_cue: move cue parser to a separate file
Preparation for the next commit.
2015-05-19 21:36:21 +02:00
Michael Vetter 9251fa125f Remove trailing whitespaces 2015-05-15 11:02:44 +02:00
wm4 a5aa58c63c TOOLS/stats-conv.py: add another event type 2015-05-11 17:20:30 +02:00
wm4 27f7489adc build: exclude -Wredundant-decls
It's useless, and creates a bogus warning in subprocess-posix.c.

Since I don't know which compilers might have it by default, just change
it to -Wno-redundant-decls.
2015-05-09 19:59:52 +02:00
wm4 0f063a5011 old-configure: hide
It shouldn't be used, but it's still in the repo because I say so.
2015-05-09 19:55:11 +02:00
wm4 b32a2bf364 osxbundle: remove unnecessary config file entry
This is done via pseudo-gui now.
2015-05-01 21:58:17 +02:00
Marcin Kurczewski eb62d7ec40 TOOLS/autoload: load only files that make sense 2015-04-21 20:24:00 +02:00
Marcin Kurczewski eabd2ac9e4 TOOLS/autoload: add blank lines for readability 2015-04-21 20:23:55 +02:00
wm4 f51952441e TOOLS: autoload.lua: sort files case insensitive
Suggested by a user. The suggested code which was added her comes from
PIL.
2015-04-18 20:33:35 +02:00
Adrian Sadłocha 18f30787f2 TOOLS/umpv: fix typo in docstring 2015-04-17 13:37:47 +02:00
robin007bond 5b1c3e4b50 OSX/mpv.app/mpv.conf: Use pseudo-gui
The player is now forced to use the pseudo-gui profile.

Fixes #1808 and #1754.

Signed-off-by: wm4 <wm4@nowhere>
2015-04-13 14:26:55 +02:00
Philip Sequeira 8158dfc9e8 TOOLS/zsh.pl: complete multiple values for ao, vo, af, vf
It still doesn't deal with sub-options, but that's for another day.
2015-03-31 15:05:09 +02:00
Philip Sequeira d6b102cab0 TOOLS/zsh.pl: cosmetics 2015-03-31 15:05:08 +02:00
Philip Sequeira 638a398d62 TOOLS/zsh.pl: use --no-config when calling mpv 2015-03-31 15:05:08 +02:00
Patrick Hipp dd08aa7364 TOOLS: add a lua scripts for extracting and setting starttime with ytdl
Signed-off-by: wm4 <wm4@nowhere>
2015-03-23 20:46:22 +01:00
Patrick Hipp c48de9e399 TOOLS: add a lua script for a -stay on top only during playback- mode
Signed-off-by: wm4 <wm4@nowhere>
2015-03-23 20:45:12 +01:00
wm4 dfec71f55a TOOLS: remove youtube-dl_mpv.sh
It lost all reason to exist, since mpv includes ytdl_hook.lua by default.
2015-03-13 20:33:08 +01:00
wm4 7e9c441d41 demux_mkv: make matroska.pl script output deterministic
Work around the randomized Perl hashtables by sorting the elements.

Fixes #1673.
2015-03-11 22:17:23 +01:00
James Ross-Gowan a26ea50694 w32_common: support the "window-minimized" property 2015-03-09 11:46:06 +01:00
Jaime Marquínez Ferrándiz d7f04e2085 cocoa: support the "window-minimized" property
Signed-off-by: Stefano Pigozzi <stefano.pigozzi@gmail.com>
2015-03-08 22:00:47 +01:00
wm4 816d7bba1f osxbundle: config file special case isn't needed anymore
The previous commit effectively fixes the mess caused by 'config' vs.
'mpv.conf', and the hack introduced by commit e01a6dac and extended by
commit db167cd4 isn't needed anymore.
2015-02-15 17:29:06 +01:00
Stefano Pigozzi 70802d519f ao_coreaudio: add support for hotplug notifications
This commit adds notifications for hot plugging of devices. It also extends
the old behaviour of the `audio-out-detected-device` property which is now
backed by the hotplugging code. This allows clients to be notified when the
actual audio output device changes.

Maybe hotplugging should be supported for ao_coreaudio_exclusive too, but it's
device selection code is a bit fragile.
2015-02-14 12:51:15 +01:00
wm4 db167cd438 player: deprecate 'config' files (use mpv.conf), warn against clashes
Apparently there's at least one distro which ships a /etc/mpv/mpv.conf
file (mpv doesn't install such a file). This breaks config files named
'config' located in the user's mpv config directory, because mpv first
loads files named 'config' and then 'mpv.conf'. There is no mechanism
for putting files with different names into the same config path order.
(Even worse, that mpv.conf file only set an option to the default value.
Why do distros always do very stupid things?)

Print a warning on collisions.

Although using 'config' was well-supported, supporting both names is
starting to become messy, so deprecate 'config' and print a warning if
one is found.

At least we will be able to remove the whole mess once 'config' files
are ignored...

This also affects the osx-bundle, which intentionally used these not-so-
optimal semantics. Solve it in a different way. (Unfortunately with an
ifdef - it's not required, but having to explain everyone why mpv tries
to load a osx-bundle.mpv file on Linux and Windows would consume
energy.)

Closes #1569.
2015-02-13 22:28:44 +01:00
wm4 f061befb33 audio: add device change notification for hotplugging
Not very important for the command line player; but GUI applications
will want to know about this.

This only adds the internal API; support for specific audio outputs
comes later.

This reuses the ao struct as context for the hotplug event listener,
similar to how the "old" device listing API did. This is probably a bit
unclean and confusing. One argument got reusing it is that otherwise
rewriting parts of ao_pulse would be required (because the PulseAudio
API requires so damn much boilerplate). Another is that --ao-defaults is
applied to the hotplug dummy ao struct, which automatically applies such
defaults even to the hotplug context.

Notification works through the property observation mechanism in the
client API. The notification chain is a bit complicated: the AO notifies
the player, which in turn notifies the clients, which in turn will
actually retrieve the device list. (It still has the advantage that it's
slightly cleaner, since the AO stuff doesn't need to know about client
API issues.)

The weird handling of atomic flags in ao.c is because we still don't
require real atomics from the compiler. Otherwise we'd just use atomic
bitwise operations.
2015-02-12 17:17:41 +01:00
Stefano Pigozzi 568a0157ff osxbundle: don't try to package Python
This fixes usage when the bundle is used on the same machine that Python/Cython
was compiled on. It doesn't fix the harder problem of packaging a full Python
installation in the mpv app bundle (and I'm not sure we actually want that).

Fixes #1549
2015-02-02 16:11:11 +01:00
wm4 12dbbcbb15 TOOLS/stats-conv: change unit of X-axis to seconds
...instead of milliseconds.
2015-02-01 18:26:24 +01:00
Vítor Galvão d76dbbd414 youtube-dl_mpv.sh: unquote ${video_url} 2015-01-23 17:45:03 +01:00
Vítor Galvão 86f4fcf1e2 youtube-dl_mpv.sh: use curly braces and double quotes consistently 2015-01-22 21:26:14 +00:00
Philip Sequeira db30c3a3fe TOOLS/zsh.pl: complete options based on types
No more equals signs for options that don't take values.

Complete values for options with preset choices.

Complete --no-whatever where applicable.

Fixes #997.
2015-01-06 06:57:52 +01:00
wm4 411109f484 TOOLS/lua/observe-all: add a warning
This is just natural, but it's also not that obvious.
2015-01-03 14:49:48 +01:00
wm4 44c0770247 TOOLS/lua/autoload: fix behavior with network URLs
readdir() fails if the directory is an URL, so just exit instead of
letting the Lua script fail.
2015-01-03 14:48:33 +01:00
wm4 73ea0ddc08 TOOLS/stats-conv: more improvements
Add an explicit "signal" event type, because the implicit one was
confusing.

Don't rescale the Y axis of the second graph, it was nonsense.

Make the legend for the second graph separate (and cleanup the code
creating the graphs).
2015-01-03 02:57:33 +01:00
wm4 487208b2e1 TOOLS/stas-conv: add timed value event type 2015-01-02 19:27:07 +01:00
wm4 83349a0e73 TOOLS/stats-conv: better output
Sort the legend by the used y value of binary events/signals, add a way
to filter branches (although that requires editing the script), and use
the full screen if the second subplot is not used.
2015-01-02 19:26:31 +01:00
Stefano Pigozzi e01a6dac98 osxbundle: fix cascading config loading
mpv does 'cascading' configs by overriding options as the config become more
important (bundle -> system level -> user level).

Unfortunately mpv also loads two sets of configs files one after the other [1].
First it looks for 'config', then for 'mpv.conf'. For this reason a mpv.conf in
ANY location will override ANY config files named config (even if the mpv.conf
is in a system path and config in a user path).

[1]: Relevant code in player/configfiles.c

    load_all_cfgfiles(mpctx, section, "config");
    load_all_cfgfiles(mpctx, section, "mpv.conf");

Fixes: #1361
2014-12-26 09:18:20 +01:00
Avi Halachmi (:avih) 39e04e9294 options: deprecate 'lua' based options/dirs for 'script'
- --lua and --lua-opts change to --script and --script-opts
- 'lua' default script dirs change to 'scripts'
- DOCS updated

- 'lua-settings' dir was _not_ modified

The old lua-based names/dirs still work, but display a warning.

Signed-off-by: wm4 <wm4@nowhere>
2014-12-15 04:39:56 +01:00
Mihai Moldovan 8c927376a1 osxbundle: don't use sed but pure python
GNU sed and BSD sed don't share the same options for editing files in-place,
so a workaround is needed.

The most simple way is to use a pure python implementation of applying the
changes.
2014-12-13 11:20:29 +01:00
Stefano Pigozzi fab64fd3cf cocoa: bundle: use idle=once 2014-12-07 16:23:08 +01:00
Stefano Pigozzi 685b8b7a00 cocoa: use --idle when running inside bundle
Previously when using the bundle we used a custom bizarro thing to wait for
events. Just use `--idle` and greatly simplify the code.
2014-12-06 14:16:13 +01:00
Stefano Pigozzi f911ef08ab cocoa: save screenshots to desktop when using app bundle
Fixes #947
2014-12-05 23:30:23 +01:00
wm4 185e95ee3d video: remove internal QP passing
This was required by vf_pp, which was just removed.

vf_dlopen has this stuff in its API. This API is considered stable, so
the related fields are not removed from it. But the fields are always 0
now, so there's no point in keeping the example program around.

vf_pullup.c did some extremely awkward passthrough of this information,
but didn't actually use it.
2014-12-03 23:01:20 +01:00
Stefano Pigozzi e7145ae24d cocoa: add https:// url scheme to bundle's plist 2014-12-02 20:55:19 +01:00
Nyx0uf 84866cac2d cocoa: add mk3d UTI to bundle's plist
This should allow lauching a mk3d file directly from the Finder.

Fixes #1311
2014-12-02 20:48:19 +01:00
Nyx0uf f008bbb484 cocoa: split mkv/webm for imported UTI in plist 2014-12-01 21:34:31 +01:00
wm4 3295caca3d lua: add a function that formats Lua values as strings
Yep, Lua is so crappy that the stdlib doesn't provide anything like
this.

Repurposes the undocumented mp.format_table() function and moves it to
mp.utils.
2014-11-29 00:03:46 +01:00
wm4 9666d48aa3 TOOLS/lua: add script that pauses playback when minimizing the window
Uses functionality that was added a month ago for exactly this purpose.

Fixes #1237.
2014-11-29 00:03:46 +01:00
Rudolf Polzer 92316eb740 TOOLS/idet.sh: Adjust for changes in FFmpeg.
Compatibility to older idet is preserved.
2014-11-22 08:13:26 +01:00
Ben Boeckel 07c4d67565 umpv: update comment for the new FIFO location 2014-11-15 20:20:06 +01:00
wm4 805e952d82 demux_mkv: read CueRelativePosition/CueDuration elements
Nothing is done with them yet. This is preparation for the following
commit.

CueRelativePosition isn't even saved anywhere, because I don't intend to
use it. (Too messy for no gain.)
2014-11-05 21:52:07 +01:00
wm4 4e87ac8231 demux_mkv: implement audio skipping/trimming
This mechanism was introduced for Opus, and allows correct skipping of
"preroll" data, as well as discarding trailing audio if the file's
length isn't a multiple of the audio frame size.

Not sure how to handle seeking. I don't understand the purpose of the
SeekPreRoll element.

This was tested with correctness_trimming_nobeeps.opus, remuxed to mka
with mkvmerge v7.2.0. It seems to be correct, although the reported file
duration is incorrect (maybe a mkvmerge issue).
2014-11-03 20:20:28 +01:00
wm4 078f5f300d TOOLS/lua/autoload: fix operation outside of working dir
Fixes #1222. (This commit is based on a patch posted there.)
2014-10-26 14:34:46 +01:00
wm4 dd91c09a71 TOOLS/lua/autoload: don't shadow local variable
"dir" is already used somewhere above. This was ok, but not nice.
2014-10-26 14:34:37 +01:00
wm4 51a3f13705 TOOLS/umpv: create FIFO in user directory
Makes these security measures unnecessary.
2014-10-24 21:27:38 +02:00
Kevin Mitchell bbf4a8aa5d TOOLS/lua: update README.md 2014-10-21 00:55:15 +02:00
Kevin Mitchell 3617399a46 TOOLS/lua: remove tabs from some lua scripts 2014-10-21 00:55:15 +02:00
Kevin Mitchell e68cc34c99 TOOLS/lua: add autodeint.lua
This isn't quite as robust as idet.sh as the default detection
interval is only 4 seconds vs 35 for idet.sh. idet.sh can have such a
large sample time since it turns off the vo and uses --untimed, which
is currently not possible from lua.
2014-10-21 00:55:15 +02:00
shdown 040c5a9f68 TOOLS/vf_dlopen/ildetect.sh: remove duplicated assigment 2014-10-16 21:17:01 +02:00
wm4 1d45a3a163 TOOLS/umpv: drop unnecessary check
This was supposed to make sure that argv[1:] does not fail, but Python
actually allows mismatching bounds for slicing.
2014-09-24 21:29:30 +02:00
shdown 546c0f0b25 TOOLS/umpv: use python octal notation 2014-09-24 02:12:30 +02:00
shdown c6d0e41335 TOOLS/mpv_identify.sh: remove pointless escape 2014-09-24 02:08:49 +02:00
shdown 7e5f707baf TOOLS/idet.sh: add description
Just a copy of c0cd58e3f5 commit message
(with a small fix: ildetect.sh+ildetect.so, not
ildetect.sh+ildetect.sh).
2014-09-24 02:08:47 +02:00
shdown 3eae8b7170 TOOLS/idet.sh: remove unused and duplicated assignments 2014-09-24 02:08:45 +02:00
Ben Boeckel 54d1dae687 TOOLS: idet: remove extra '$' in $(()) expansion 2014-09-21 15:06:47 +02:00
shdown bb005a385a TOOLS/umpv: make URL detection consistent with mpv method
See mp_is_url in options/path.c.
2014-09-20 15:18:53 +02:00
shdown dfbb4d03ee TOOLS/umpv: print error message to stderr 2014-09-20 15:18:51 +02:00
shdown 5332ecf651 TOOLS/umpv: use MPV environment variable, not UMPV_OPTIONS
Just like the rest of TOOLS/*.sh scripts.
2014-09-20 15:18:49 +02:00
Rudolf Polzer a173d3a2fb TOOLS/idet.sh: Handle the case of multiple Parsed_idet_0: output lines.
This seems to happen frequently now. It is handled by adding their values.
2014-09-17 14:11:56 +02:00
shdown f2c46bc1d1 TOOLS: eliminate echoes with variable substitutions
echo behaviour with backslash escapes seems to be non-portable: dash does
expand such an escapes and bash does not, so use cat/printf instead.
2014-09-17 00:00:05 +02:00
shdown 02d0b2f31c TOOLS/mpv_identify.sh: simplify line-by-line reading
Use here-document idiom to read mpv output line-by-line.
2014-09-16 23:59:56 +02:00
wm4 26e0cce969 TOOLS/mpv_identify.sh: mark as executable 2014-09-16 17:34:19 +02:00
Ben Boeckel 5fd8660f5f TOOLS: idet: use quotes for the verdict value
ShellCheck warns about "vara-varb" about not being in $(()), but we
actually want the literal string, so quote it. Also fix a typo.
2014-09-16 17:32:39 +02:00
Ben Boeckel 11c044aa48 TOOLS: shellcheck: quote variable expansions 2014-09-16 17:32:33 +02:00
Ben Boeckel 45e2345a7f TOOLS: shellcheck: remove '$' on variables in $(()) expansion 2014-09-16 17:29:46 +02:00
Ben Boeckel ec2c6a17dc TOOLS, version.sh: shellcheck: replace `cmd` with $(cmd)
Signed-off-by: wm4 <wm4@nowhere>
2014-09-16 17:29:39 +02:00
Ben Boeckel ba2a3f40ac TOOLS: idet: remove unused code 2014-09-16 17:29:11 +02:00
Philip Sequeira 7c77f0b803 TOOLS/zsh.pl: complete options that take file names 2014-09-13 02:03:09 +02:00
Bruno George de Moraes bca4219dd0 malloc+memset(0) to calloc
Signed-off-by: wm4 <wm4@nowhere>
2014-09-05 01:59:11 +02:00
wm4 8599c959fe video: initial Matroska 3D support
This inserts an automatic conversion filter if a Matroska file is marked
as 3D (StereoMode element). The basic idea is similar to video rotation
and colorspace handling: the 3D mode is added as a property to the video
params. Depending on this property, a video filter can be inserted.

As of this commit, extending mp_image_params is actually completely
unnecessary - but the idea is that it will make it easier to integrate
with VOs supporting stereo 3D mogrification. Although vo_opengl does
support some stereo rendering, it didn't support the mode my sample file
used, so I'll leave that part for later.

Not that most mappings from Matroska mode to vf_stereo3d mode are
probably wrong, and some are missing.

Assuming that Matroska modes, and vf_stereo3d in modes, and out modes
are all the same might be an oversimplification - we'll see.

See issue #1045.
2014-08-30 23:24:46 +02:00
shdown b8f2f0d69e TOOLS/mpv_identify.sh: simplify $MPV handling 2014-08-30 19:23:42 +02:00
shdown 4a976c469c TOOLS/mpv_identify.sh: various style improvements
Double-quote everything, eliminate unneeded evals and deprecated
`backtits` substitution syntax.
2014-08-30 19:23:42 +02:00
shdown 880d5c8a4a TOOLS/mpv_identify.sh: move script body to a function
Don't prepend each variable with __midentify__, just make them local
to the function.
2014-08-30 19:23:42 +02:00
shdown cbe03b6255 TOOLS/youtube-dl_mpv.sh: simplify $MPV handling 2014-08-30 19:23:42 +02:00
shdown 43d4667028 TOOLS/youtube-dl_mpv.sh: disable globbing before expanding $video_url
$video_url can contain a question mark, which can be expanded to a
character in an existing file name if globbing is enabled.
2014-08-30 19:23:41 +02:00
wm4 a8299cec29 TOOLS/youtube-dl_mpv: allow playing multiple URLs
Unfortunately this also means you can't pass extra mpv options after the
URL anymore. You can prefix the script with MPV='mpv --options' though.
2014-08-29 20:20:29 +02:00
wm4 3ec6705e34 TOOLS: youtube wrapper: allow overriding mpv binary 2014-08-26 20:47:30 +02:00
wm4 3c07e86fd3 TOOLS/stats-conv.py: improvements
This is still pretty useful for debugging timing-dependent things.
2014-08-19 20:09:46 +02:00
Philip Sequeira b36ed6d9f9 TOOLS/zsh.pl: protect global environment 2014-08-17 12:51:10 +02:00
Philip Sequeira c7e67d008a TOOLS/zsh.pl: fix a ret that hadn't been changed to rc 2014-08-17 12:51:10 +02:00
Philip Sequeira 4b8f512217 TOOLS/zsh.pl: complete profiles
Implemented in shell, because it has to be done at runtime.
2014-08-17 12:51:10 +02:00
Alessandro Ghedini e7cab32fae TOOLS/zsh.pl: properly set the return value
The previous commit made the completion script always return non-zero, even when
a match is found. This explicitly sets the return value to zero whenever a match
is found but defaults to non-zero in case nothing is matched.
2014-08-13 23:42:38 +02:00
c_14 fd98863b1f TOOLS/zsh.pl: properly return non-zero when no matches are found
Returning a non-zero value signals to the zsh completion system that no matches
were added by the script so that it can try the user-defined matchers (e.g.
those defined with matcher-list).

Fixes #1008.
2014-08-13 22:57:59 +02:00
wm4 f9d2ad6c17 Move status-line.lua
Looks like TOOLS/lua/ is now established as dumping ground for random
Lua scripts, so DOCS/lua_examples/ is not needed anymore.
2014-08-11 17:08:32 +02:00
wm4 82a223e4e0 TOOLS: add test script for property change notifications 2014-08-02 01:53:21 +02:00
Rudolf Polzer 35c20c3094 idet.sh: Fix a typo. 2014-07-16 16:15:12 +02:00
Tsukasa OMOTO 1c850ff559 osxbundle: fix detection of user libraries
Previous code would detect for example `libcaca.0.dylib` as a system library,
because it matched the `libc` condition.
2014-07-16 08:36:34 +02:00
Rudolf Polzer f5449870e0 idet.sh: Fix telecine detection. 2014-07-15 11:10:24 +02:00
Nyx0uf 22c3de3f8a OS X bundle: Add more imported UTI
Not that there are widely used formats, but it will allow to play them directly from the Finder.
2014-07-04 10:05:52 +02:00
Alessandro Ghedini 29b047da6f TOOLS/zsh.pl: complete URL schemes based on --list-protocols 2014-07-03 11:03:56 +02:00