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

9626 Commits

Author SHA1 Message Date
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
wm4
10f51a8c57 DOCS/client_api_examples: qtquick: fix destruction
Destruction (e.g. when closing the window) was a bit broken. This commit
fixes some possible crashes, and should make lifetime management
relatively sane. (Still a bit complex, though. Maybe this code should be
moved into a tiny library.)

QtQuick runs the renderer on a separate thread. This thread is rather
loosely connected to the main thread. The loose separation is enforced
by the API, which also makes coordination of initialization and
destruction harder. Throw refcounting at the problem, which fixes it.
The refcounting wrapper introduced in the previous commit is used for
this.

Also contains some general cleanups.
2014-12-30 22:40:25 +01:00
wm4
50c40b6ded client API: qthelper: add a refcounting wrapper around mpv_handle
This is useful to deal with crazy Qt object lifetime issues (the
following commit needs it).
2014-12-30 22:24:57 +01:00
wm4
97ab40290e command: add filtered-metadata property
Goes in hand with the previous commit; the main purpose is to easily
show on OSD what is shown on terminal.
2014-12-29 23:03:39 +01:00
wm4
8048374a5c player: filter tags, add --display-tags option
This attempts to increase user-friendliness by excluding useless tags.
It should be especially helpful with mp4 files, because the FFmpeg mp4
demuxer adds tons of completely useless information to the metadata.

Fixes #1403.
2014-12-29 22:51:18 +01:00
wm4
6618e5d69a player: make --shuffle/--merge-files affect runtime loaded playlists
Until now, these options took effect only at program start. This could
be confusing when e.g. doing "mpv list.m3u --shuffle". Make them always
take effect when a playlist is loaded either via a playlist file, or
with the "loadlist" command.
2014-12-29 22:08:22 +01:00
wm4
4075518011 ao_portaudio: remove this audio output
It's just completely useless. We have good native support for all 3
desktop platforms, and ao_sdl or ao_openal as fallbacks.
2014-12-29 18:53:12 +01:00
wm4
460f47ef7a manpage: document new --stream-dump behavior
That's probably a good idea.
2014-12-27 21:31:43 +01:00
wm4
adf7f0661e command: overlay_add: more flexible treatment of offset parameter
Essentially, don't make it the mmap() argument, and just add it to the
memory address. This hides tricky things like alignment reequirements
from the user.

Strictly speaking, this is not entirely backwards compatible: this adds
the regression that you can't access past 2 or 4 GB of a file on 32 bit
systems anymore. But I doubt anyone cared about this.

In theory, we could be clever, and just align the offset manually and
pass that to mmap(). This would also be transparent to the user, but
minimally more effort, so this is left as exercise to the reader.
2014-12-26 18:11:22 +01:00
wm4
3fdb6be316 win32: add mmap() emulation
Makes all of overlay_add work on windows/mingw.

Since we now don't explicitly check for mmap() anymore (it's always
present), this also requires us to make af_export.c compile, but I
haven't tested it.
2014-12-26 17:30:10 +01:00
wm4
db4685ac75 manpage: lua: fix a link 2014-12-26 13:43:46 +01:00
wm4
8721ba08a5 manpage: fix typo
Fixes #1384.
2014-12-25 21:09:18 +01:00
wm4
f71696510c manpage: lua: fixes and improvements
Some things were outdated, or outright wrong.
2014-12-25 19:45:17 +01:00
wm4
51abca8afd ipc: add enable_event and disable_event commands
This was requested.
2014-12-24 14:32:02 +01:00
wm4
c721948efe command: extend revert_seek command
"revert_seek mark" basically forces the seekback point. It's basically a
one-way bookmark.
2014-12-17 22:56:45 +01:00
wm4
4681e7f49f vo_opengl: switch default FBO format to rgba, use GL_RGBA
I'm hoping this is generally more compatible, and it works with GLES.

This probably has not much of an effect on desktop GL. It also switches
only the default format for --vo=opengl, not --vo=opengl-hq.

"-hq" already uses GL_RGBA16, though since it's a sized format, the
story is a bit different, and it won't work on GLES either.
2014-12-17 21:35:05 +01:00
wm4
f81748c4e4 manpage: ao_alsa: link upmix wiki entry
Also clarify the statement about what we expect to happen by default.
It's well possible that distros at some point will fix their ALSA
configuration, and e.g. enable the upmix plugin by default.
2014-12-16 05:11:14 +01:00
wm4
af3bbb800d audio: make native channel count the default instead of stereo downmix
This should work well with most audio APIs, except ALSA. A long-winded
explanation is provided how to make ALSA multichannel output work.

All other AOs should have no such problems. Of course it's possible
that previously unknown issues arise, because I assume that enabling
multichannel audio is actually relatively rare.

This also disables codec downmix by default, which could change the
audio output due to different mixing in the codec and libavresample.

Fixes #1313.
2014-12-15 17:14:23 +01:00
wm4
1c2cbeabc2 vo_opengl: remove quadbuffer/anaglyph stereo 3D rendering
Obscure feature, and I've never heard of anyone using it.

The anaglyph effects can be reproduced with vf_stereo3d. The only thing
that can't be reproduced with it is "quadbuffer", which requires special
and expensive hardware.
2014-12-15 04:40:26 +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
wm4
5b618ef629 command, dvd: add property which returns list of DVD titles
This was requested.

It seems libdvdread can't get the duration for titlesets other than the
currently opened title. The data structures contain dangling pointers
for these, and MPlayer works this around by opening every title
separately for the purpose of dumping the title list.
2014-12-13 20:25:56 +01:00
Ben Boeckel
8c3dc7334b DOCS: add missing close bracket 2014-12-12 18:14:07 -05:00
wm4
82317593e9 options: add option for ignoring patch in resume mechanism
Whatever.

Fixes #1281.
2014-12-13 00:04:08 +01:00
wm4
98e400216d player: add a --keep-open=always mode
The --keep-open behavior was recently changed to act only on the last
file due to user requests (see commit 735a9c39). But the old behavior
was useful too, so bring it back as an additional mode.

Fixes #1332 (or rather, should help with it).
2014-12-12 23:45:16 +01:00
wm4
5012e5156d DOCS/crosscompile-mingw: update
Unrecommend mingw-w64-cmake, point out MXE host requirements.
2014-12-12 01:08:51 +01:00
wm4
d17c3b63c3 command: add properties for current bitrate
Fixes #1192.
2014-12-12 01:00:58 +01:00
wm4
47452443c5 demux: don't always make --cache-secs override --demuxer-readahead-secs
It's confusing. Whether the new behavior is less confusing... whatever.
2014-12-12 01:00:51 +01:00
selsta
29f28fd948 DOCS/contribute.md: remove unintentional headline
The # from the IRC channel made it appear as a headline.
2014-12-11 21:33:01 +01:00
wm4
d01cf36c74 manpage: fix mistake in --video-zoom mention
Fixes #1331.
2014-12-11 13:01:16 +01:00
wm4
c6dc0c6d99 command: add "idle" property
Yes, it's redundant with events.
2014-12-10 14:42:57 +01:00
wm4
f6d7230a6f manpage: update the ao_alsa example (no-block was removed)
Also, don't use the "hw" device, but "plughw". ALSA docs say never to
use "hw".
2014-12-09 22:57:25 +01:00
wm4
543ef1fd2e DOCS/client_api_examples: remove nonsense
I thought setSamples() was some funky abstraction to set the number of
components, but it's actually something else.

Also fix the include paths.
2014-12-09 22:53:34 +01:00
wm4
5f0a2b5908 options: enable --ytdl by default
Let's see who complains...
2014-12-09 21:55:27 +01:00
wm4
273565c525 vo_opengl_cb: simplify reconfigure, render transparent if unconfigured
I think that's expected; mpv shouldn't draw anything while no video is
active. This doesn't blend transparently, though.

Also document the vo_opengl_cb thing.
2014-12-09 21:55:27 +01:00
wm4
0125fb6714 vo_opengl: make background color configurable
This mainly affects the black bars that are drawn if the window and
video aspect ratios mismatch.
2014-12-09 21:55:27 +01:00
wm4
fb855b8659 client API: expose OpenGL renderer
This adds API to libmpv that lets host applications use the mpv opengl
renderer. This is a more flexible (and possibly more portable) option to
foreign window embedding (via --wid).

This assumes that methods like context sharing and multithreaded OpenGL
rendering are infeasible, and that a way is needed to integrate it with
an application that uses a single thread to render everything.

Add an example that does this with QtQuick/qml. The example is
relatively lazy, but still shows how relatively simple the integration
is. The FBO indirection could probably be avoided, but would require
more work (and would probably lead to worse QtQuick integration, because
it would have to ignore transformations like rotation).

Because this makes mpv directly use the host application's OpenGL
context, there is no platform specific code involved in mpv, except
for hw decoding interop.

main.qml is derived from some Qt example.

The following things are still missing:
- a way to do better video timing
- expose GL renderer options, allow changing them at runtime
- support for color equalizer controls
- support for screenshots
2014-12-09 17:59:04 +01:00