0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 20:03:10 +02:00
Commit Graph

9661 Commits

Author SHA1 Message Date
wm4
6f5e5e6a9e vo_opengl: remove cscale-down suboption
For an explanation see the additions to the manpage.
2015-01-20 14:33:53 +01:00
wm4
64f72687ce client API: notify API user on event queue overflow
Before this, we merely printed a message to the terminal. Now the API
user can determine this properly. This might be important for API users
which somehow maintain complex state, which all has to be invalidated if
(state-changing) events are missing due to an overflow.

This also forces the client API user to empty the event queue, which is
good, because otherwise the event queue would reach the "filled up"
state immediately again due to further asynchronous events being added
to the queue.

Also add some minor improvements to mpv_wait_event() documentation, and
some other minor cosmetic changes.
2015-01-19 21:26:42 +01:00
wm4
eb5a83e1c1 x11: add --on-all-workspaces option and property
Fixes #1469.
2015-01-16 23:38:47 +01:00
wm4
1883b7cc0c player: add --autofit-smaller option
Fixes #1472.

(Maybe these options should have been named --autofit-max and
--autofit-min, but since --autofit-larger already exists, use
--autofit-smaller for symmetry.)
2015-01-16 22:30:41 +01:00
wm4
0092ae8676 manpage: fix osd-ass-cc examples
The "\\" escape was rendered as "\" on the website. I'm hoping quoting
this in ``...`` will render it correctly.

Also add an example for show_text, which awkwardly does not require
escaping the "\".
2015-01-16 12:17:55 +01:00
Niklas Haas
61f5a80f10
vo_opengl: get rid of approx-gamma and make it the default as per BT.1886
After finding out more about how video mastering is done in the real
world it dawned upon me why the "hack" we figured out in #534 looks so
much better.

Since mastering studios have historically been using only CRTs, the
practice adopted for backwards compatibility was to simulate CRT
responses even on modern digital monitors, a practice so ubiquitous that
the ITU-R formalized it in R-Rec BT.1886 to be precisely gamma 2.40.

As such, we finally have enough proof to get rid of the option
altogether and just always do that.

The value 1.961 is a rounded version of my experimentally obtained
approximation of the BT.709 curve, which resulted in a value of around
1.9610336. This is the closest average match to the source brightness
while preserving the nonlinear response of the BT.1886 ideal monitor.

For playback in dark environments, it's expected that the gamma shift
should be reproduced by a user controlled setting, up to a maximum of
1.224 (2.4/1.961) for a pitch black environment.

More information:
https://developer.apple.com/library/mac/technotes/tn2257/_index.html
2015-01-16 02:17:19 +01:00
Niklas Haas
7aaf71861e
manpage: changes.rst: document vo_opengl's placebo features 2015-01-15 21:32:19 +01:00
Niklas Haas
26baf5b9da
vo_opengl: add ewa_lanczos upscaler (aka jinc)
This is the polar (elliptic weighted average) version of lanczos.
This introduces a general new form of polar filters.
2015-01-15 21:20:27 +01:00
wm4
c88b535c46 DOCS/client_api_examples: fix locale nonsense in qml examples
The Qt example already does this. I hoped this was restricted to
QApplication only, but apparently Qt repeated this mistake with
QGuiApplication (QGuiApplication was specifically added for QtQuick at a
much later point, even though QApplication inherits from it).
2015-01-15 20:08:57 +01:00
wm4
c8ecb66269 ao_pcm: add append mode
Pretty useful for debugging, although a bit useless or possibly
misleading too (see comments in the manpage).
2015-01-14 22:14:56 +01:00
wm4
53a5923ba1 manpage: fix references to vf_pp
It was removed, but is still available through FFmpeg.

Fixes #1468.
2015-01-13 16:54:59 +01:00
wm4
ab185a2d42 manpage: improve --title description
It might be rather surprising that --title also sets the audio stream
title (for PulseAudio and wasapi), so it certainly should be mentioned.
2015-01-12 14:21:16 +01:00
wm4
fc95678d8d x11: support XEmbed
Seems to work with GtkSocket and passing the gtk_socket_get_id() value
via "wid" option to mpv.

One caveat is that using <tab> to move input focus from mpv to GTK does
not work. It seems we would have to interpret <tab> ourselves in this
case. I'm not sure if we really should do this - it would probably
require emulating some other typical conventions too. I'm not sure if an
embedder could do something about this on the toolkit level, but in
theory it would be possible, so leave it as is for now.
2015-01-12 12:08:48 +01:00
wm4
3f3e1547ba player: change --display-tags behavior
Remove the "all" special-behavior, and instead interpret trailing "*"
characters. --display-tags=all is replaced by --display-tags=* as a
special-case of the new behavior.

See #1404.

Note that the most straight-forward value for matchlen in the normal
case would be INT_MAX, because it should be using the entire string.
I used keylen+1 instead, because glibc seems to handle this case
incorrectly:

    snprintf(buf, sizeof(buf), "%.*s", INT_MAX, "hello");

The result is empty, instead of just containing the string argument.
This might be a glibc bug; it works with other libcs (even MinGW-w64).
2015-01-12 04:57:56 +01:00
wm4
e96c08ecb5 command: fix property naming convention
Use "-" instead of "_" as separator.
2015-01-10 21:16:34 +01:00
wm4
e5f2072364 command: change properties added in previous commit
Make their meaning more exact, and don't pretend that there's a
reasonable definition for "bits-per-pixel". Also make unset fields
unavailable.

average_depth still might be inconsistent: for example, 10 bit 4:2:0 is
identified as 24 bits, but RGB 4:4:4 as 12 bits. So YUV formats
seemingly drop the per-component padding, while RGB formats do not.
Internally it's consistent though: 10 bit YUV components are read as
16 bit, and the padding must be 0 (it's basically like an odd fixed-
point representation, rather than a bitfield).
2015-01-10 19:13:16 +01:00
xylosper
242558bec1 command.c: new subproperties for video-params: bpp and depth
bpp(bits-per-pixel) and depth(bit-depth for color component) can
be calculated from pixelformat technically but it requires massive
informations to be implemented in client side.

These subproperties are provided for convenience.
2015-01-10 18:53:03 +01:00
wm4
3c3883ebe1 DOCS/client_api_examples: qml_direct: QWindow::size() is not thread-safe
We still keep the window pointer, because we want to call
QQuickWindow::resetOpenGLState() (which runs on the rendering thread
only). Interesting mess...
2015-01-09 16:00:16 +01:00
wm4
803e579ff5 DOCS/client_api_examples: qml: reduce number of files
This is annoying.
2015-01-09 15:49:34 +01:00
James Ross-Gowan
f2fd0c48cc DOCS/compile-windows.md: fix pkg-config directory 2015-01-09 13:30:35 +11:00
Niklas Haas
286340d7d0 video: Add sigmoidal upscaling to avoid ringing artifacts
This avoids issues when upscaling directly in linear light, and is the
recommended way to upscale images according to imagemagick.

The default slope of 6.5 offers a reasonable compromise between
ringing artifacts eliminated and ringing artifacts introduced by
sigmoid-upscaling. Same goes for the default center of 0.75.
2015-01-09 03:18:21 +01:00
xylosper
5b4d587ede vo_opengl_cb: introduce frame queue
The previous implementation of opengl-cb kept only latest flipped frame.
This can cause massive frame drops because rendering is done asynchronously
and only the latest frame can be rendered.

This commit introduces frame queue and releated options to opengl-cb.

frame-queue-size: the maximum size of frame queue (1-100, default: 1)
frame-drop-mode: behavior when frame queue is full (pop, clear, default: pop)

The frame queue holds delayed frames and drops frames if the frame queue is
overflowed with next method:

'pop' mode: drops all the oldest frames overflown.
'clear' mode: drops all frames in queue and clear it.

With default options(frame-queue-size=1:frame-drop-mode=pop),
opengl-cb behaves in the same way as previous implementation effectively.

For frame-queue-size > 1, opengl-cb tries to calls update() without waiting
next flip_page() in order to consume queued frames.

Signed-off-by: wm4 <wm4@nowhere>
2015-01-08 18:50:25 +01:00
James Ross-Gowan
54d14b4480 DOCS: add instructions for building with MSYS2
mpv can be built natively on a Windows machine using MSYS2. Add detailed
instructions on how to build and merge them with the existing
instructions for cross-compilation.
2015-01-08 19:29:55 +11:00
wm4
f551fbaa25 DOCS/client_api_examples: add an alternative qml example
This one avoids use of a FBO. It's less flexible, because it uses works
around the whole QML rendering API. It seems to be the only way to get
OpenGL rendering without any indirections, though.

Parts of this example were insipired by Qt's "Squircle" example.

Also add a README file with a short description of each example, to
reduce the initial confusing.
2015-01-08 02:40:30 +01:00
wm4
dc2d0539c7 ao_pulse: disable latency calculation hacks by default
This used to be required to workaround PulseAudio bugs. Even later, when
the bugs were (partially?) fixed in PulseAudio, I had the feeling the
hacks gave better behavior. On the other hand, I couldn't actually
reproduce any bad behavior without the hacks lately. On top of this, it
seems our hacks sometimes perform much worse than PulseAudio's native
implementation (see #1430).

So disable the hacks by default, but still leave the code and the option
in case it still helps somewhere. Also, being able to blame PulseAudio's
code by using its native API is much easier than trying to debug our own
(mplayer2-derived) hacks.
2015-01-07 22:23:38 +01:00
Oliver Freyermuth
ca32a15a22 stream_dvb: Add possibility to dump a full transponder.
Was already possible before by injecting the magic PID
8192 into channels.conf, the flag makes this much more
useable and we also have it documented.
Useful not only for debugging, but also for incomplete
channels.conf (mplayer format...), multi-channel
recording, or channels which do dynamic PID switchng.

full-transponder is also useful for channels which switch PIDs on-the-fly.
ffmpeg can handle this, but it needs the full stream with all PIDs.
2015-01-06 19:52:27 +01:00
Oliver Freyermuth
545a657ab7 manpage: dvb: Add some information on VDR channel list support.
Only really helpful for DVB-S for now.
2015-01-06 19:52:27 +01:00
wm4
c3db52a0bf DOCS/client_api_examples: qml: add test for gamma control
Provides a dumb test for the functionality added in the previous commit.
2015-01-06 17:35:10 +01:00
wm4
0488829185 DOCS/client_api_examples: qtexample: demonstrate multiple mpv instances
Multiple client API contexts can exist in the same process.
2015-01-06 11:56:10 +01:00
wm4
067bb9605c sub: add option to not scale subtitles with window
--sub-scale-by-window=no attempts to keep subs always at the same pixel
size.

The implementation is a bit all over the place, because it compensates
already done scaling by an inverse scale factor, but it will probably do
its job.

Fixes #1424. (The semantics and name of --sub-scale-with-window are
kept, and this adds a new option - the name is confusingly similar, but
it's actually analogue to --osd-scale-by-window.)
2015-01-05 19:18:08 +01:00
wm4
6719662fed DOCS/client_api_examples: qml: add test for vo_cmdline 2015-01-05 15:26:57 +01:00
wm4
df595b06e6 vo_opengl_cb: support changing options at runtime
Like vo_opengl, but way messier, because the already messy config
handling meets threading.
2015-01-05 15:25:58 +01:00
wm4
6bb14a0d59 manpage: document details of option quoting and escaping
Makes me realize what a mess this is. I hope it can be simplified in the
far future, preferably by killing the suboption parser completely.
2015-01-05 14:19:18 +01:00
wm4
589e70e17d vf_vapoursynth: autodetect CPU count
This adds an "auto" choice to the concurrent-frames suboption, and makes
it the default.

I'm not so sure about making this the default, though. It could lead to
excessive buffering with large CPU counts. But we'll see.
2015-01-05 12:49:13 +01:00
wm4
09c3296683 manpage: clarify syntax for color options
Options which take colors accept two variants. The first is "r/g/b/a",
the second is "#AARRGGBB". Since they put alpha at different places,
it's probably better to document the second variant explicitly. (It's a
bit strange that they put alpha in different places, but on the other
hand, it's kind of natural. The second variant should probably be
considered deprecated.)
2015-01-05 06:15:03 +01:00
wm4
36826aebf0 manpage: fix --video-unscaled description
This was changed a long time ago in commit 37319ab6.
2015-01-04 16:49:53 +01:00
wm4
bfac1e81a6 vf_vapoursynth: pass through container FPS value
This is basically a hack; but apparently a needed one, since many
vapoursynth filters insist on having a FPS set.

We need to apply the FPS override before creating the filters. Also
change some terminal output related to the FPS value.
2015-01-03 03:37:05 +01:00
wm4
74be52b4ab manpage: vf_vapoursynth: document mpv-specific predefined variables 2015-01-03 03:25:51 +01:00
Ryan Jacobs
44cc65e5fb manpage: talk about one script, not multiple scripts
There aren't multiple scripts. We're just talking about one: youtube-dl.

Signed-off-by: wm4 <wm4@nowhere>
2015-01-02 18:54:33 +01:00
ChrisK2
7f584f68bf OSC: add osc-message script command (wip) 2015-01-02 16:48:16 +01:00
wm4
7873301be8 vo_opengl_old: remove ancient ATI-specific YUV conversions
While there's no actual need to get rid of these, I want to make sure
nobody actually needs this stuff, and removing it is the best way to
get to know this. We still can revert this commit if it turns out there
is a significant need for this stuff.

The final goal is removing vo_opengl_old entirely. Add a warning, which
basically announces this intention.
2015-01-02 00:59:27 +01:00
wm4
4ed0907f2d build: try to make examples build both in-tree and out-of-tree
The examples simple.c and cocoabasic.m can be compiled without
installing libmpv. But also, they didn't use the correct include path
libmpv programs normally use, so they couldn't be built with a properly
installed system-libmpv. That's pretty bad for examples, which are
supposed to show how to use libmpv correctly.

So do some bullshit that symlinks libmpv to a "mpv" include directory
under the build directory. This name-mismatch is a direct consequence of
the bullshit done in 499a6758 (requested in #539 for dumb reasons). (We
don't want to name the client API headers directory "mpv", because that
would be too unspecific, and clashes with having the mpv binary in the
same directory.)

If you have spaces or other "unusual" characters in your paths, the
build will break, because I couldn't find out where waf hides its
function to escape shell parameters (or a way to invoke programs
without involving the shell). Neither does such a thing to be
documented, nor do they seem to have a clear way to do this in
their code.

This also doesn't compile the Qt examples, because everything becomes
even more terrible from there on.
2015-01-02 00:00:03 +01:00
wm4
da4f722579 DOCS/client_api_examples: move all examples into their own subdirs
Also get rid of shared.h; it actually doesn't have much value. Just copy
the tiny function it contained into the 2 files which used it.
2015-01-01 23:08:15 +01:00
wm4
9aa1d71147 DOCS/client_api_examples: don't throw char* in C++ code
C++ is the worst language ever, and allows throwing any type, even if it
doesn't make sense. In this case, we were throwing char*, which the
runtime typically treats as opaque, instead of printing it as message if
such an exception was not caught.
2015-01-01 22:56:57 +01:00
wm4
0e9d19cd05 manpage: fix typo 2015-01-01 22:54:26 +01:00
wm4
4c3f042777 command: make the "run" command work on Windows too
Do so by using mp_subprocess(). Although this uses completely different
code on Unix too, you shouldn't notice a difference. A less ncie thing
is that this reserves an entire thread while the command is running
(which wastes some memory for stack, at least). But this is probably
still the simplest way, and the fork() trick is apparently not
implementable with posix_subprocess().
2015-01-01 20:37:49 +01:00
wm4
84fe12fab5 client API: add function to create new mpv_handles from existing ones
This may or may not be useful for client API users.

Fold this API extension into the previous API bump. The previous bump
was only yesterday, so it's ok.
2014-12-31 20:50:06 +01:00
wm4
a850bf786e vo_opengl_cb: simplify API uninitialization
Until now, calling mpv_opengl_cb_uninit_gl() at a "bad moment" could
make the whole thing to explode. The API user was asked to avoid such
situations by calling it only in "good moments". But this was probably a
bit too subtle and could easily be overlooked.

Integrate the approach the qml example uses directly into the
implementation. If the OpenGL context is to be unitialized, forcefully
disable video, and block until this is done.
2014-12-31 20:31:19 +01:00
wm4
628f1dcb42 DOCS/client_api_examples: add an explicit license
IANAL, but we don't give a shit what you do with this code.
2014-12-30 22:47:50 +01:00
wm4
38976703ca DOCS/client_api_examples: qtexample: use queued signals
Use queued signals instead of QEvent for the wakeup notification. This
is slightly nicer, and reduces the chance that the event (QEvent::User)
could clash with other code using the same event.

Also switch to modern connect() syntax.
2014-12-30 22:40:25 +01:00