Commit Graph

40313 Commits

Author SHA1 Message Date
wm4 a7dddbacc6 video: batch query_format calls
There are currently 568 pixel formats (actually fewer, but the namespace
is this big), and for each format elaborate synchronization was done to
call it synchronously on the VO. This is completely unnecessary, and we
can do with just a single call.
2015-01-03 17:23:01 +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 d5f1170679 vf_vapoursynth: fix Lua backend
It couldn't handle the newly added float variable.
2015-01-03 14:44:20 +01:00
wm4 0070e39342 ytdl: silence "succeeded" message
Pretty useless by now.
2015-01-03 03:38:23 +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
wm4 9300351a30 x11: make display-names property observable
Reuse MP_EVENT_WIN_STATE for this.
2015-01-03 03:06:26 +01:00
wm4 f5ed13bcd4 video: better pipelining with vf_vapoursynth
Most of this is explained in the code comments. This change should
improve performance with vapoursynth, especially if concurrent requests
are used.

This should change nothing if vf_vapoursynth is not in the filter chain,
since non-threaded filters obviously can not asynchronously finish
filtering of frames.
2015-01-03 03:01:58 +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
Kevin Mitchell 6a6620a554 ao/wasapi: style/code formatting tweaks 2015-01-02 14:50:59 -08:00
Kevin Mitchell 155c8e20ef ao/wasapi: improve exclusive mode format search
fixes #1376
2015-01-02 14:08:47 -08:00
Kevin Mitchell 81948634ca ao/wasapi: revamp set_waveformatex
* bits instead of bytes
* add valid_bits argument
* just pass in the mp_chmap and get the number and wavext channel map from that
* indicate valid bits in waveformat_to_str
* make appropriate accomodations in try_format
2015-01-02 14:08:47 -08:00
Kevin Mitchell 121352cd95 ao/wasapi: add CO_E_NOTINITIALIZED to explain_err
someone on irc reported seeing this error
2015-01-02 14:08:47 -08:00
Stefano Pigozzi 9633790ac6 cocoa: fix build on 10.9
Use -isInFullScreenMode instead of the property introduced with the 10.10 SDK.
2015-01-02 20:54:09 +01:00
ChrisK2 03a0d74da7 OSC: idlemessage: fix alignment 2015-01-02 19:39:01 +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 43faae7a1e cocoa: fix NSMapGet error
regression from 64b6b2ea45
2015-01-02 19:19:23 +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
ChrisK2 4e013afd37 OSC: display "drop files here" message when idle + forced-window
This currently doesn't work properly on OSX due to some bugs.
2015-01-02 16:48:16 +01:00
wm4 c4f39d2aba build: rename MPLAYER_CONFDIR define
We certainly don't use the mplayer configuration dir. The name didn't
matter, but now that it's in user-visible output (as part of config.h
being dumped in verbose mode), it's a bit too strange.
2015-01-02 03:18:16 +01:00
wm4 f12b70d77d player: move terminal input init to a better place
Mostly of cosmetic nature. Move initialization to the same place where
another component (cocoa) will start accessing the input context from a
foreign thread.
2015-01-02 03:09:17 +01:00
wm4 a2d790b3a4 player: print config.h contents in verbose mode
It was requested that mpv should print what features etc. have been
enabled at compile time. It can print the configure command line, but it
obviously doesn't include autodetected features.

I tried to think of a nicer way than dumping the config.h as text, but
this was still the simplest way.
2015-01-02 03:06:06 +01:00
wm4 594114e660 build: prefer libswresample over libavresample on FFmpeg
I hoped we could always use libavresample, but the FFmpeg project is
being too dickish to enable libavresample by default - which means we
need our libswresample-to-libavresample hack anyway.

Give up, and use the "supported" one of the duplicated libraries when
compiling against FFmpeg (relying on the fact that libswresample won't
be present if compiling against Libav).
2015-01-02 01:43:59 +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 44701238c7 subprocess: allow disabling redirection of stdout/stderr
If the stdout or stderr write callback is NULL, then don't redirect this
stream. Preparation for the next commit.

Not sure what to do on Windows; it seems STARTUPINFO doesn't allow
redirection only one of them. So just let them write nothing. For our
intended use-case (next commit), this is probably sensible.
2015-01-01 20:04:38 +01:00
wm4 bafb9b2271 win32: add native wrappers for pthread functions
Off by default, use --enable-win32-internal-pthreads .

This probably still needs a lot more testing. It also won't work on
Windows XP.
2015-01-01 15:10:42 +01:00
Stefano Pigozzi 64b6b2ea45 cocoa: fix uninitialization while in fullscreen
This is only needed for switching video track with `_`, since Cocoa
automatically handles cleaning up the application's presentation options when
quitting the process.

Fixes #1399
2015-01-01 14:38:08 +01:00
wm4 39548ad9e9 Update copyright year 2015-01-01 00:00:00 +01:00
wm4 7297c88998 player: capitalize --display-tags items
Tags keys are case-insensitive. Before commit 8048374a, the casing of
whatever FFmpeg returned was used (it was quite random). But since the
change, the values in --display-tags decides. Consider this an
accidental feature, and make the output nicer by capitalizing
the tag names.
2014-12-31 21:07:50 +01:00
wm4 3e12e79b8f gl_hwdec_vda: refuse to work with old OpenGL versions
The way we use rectangle textures (required by VDA for no reason) works
onl in OpenGL 3.0 or higher. Below that, the shader will fail to
compile. We could add support for older OpenGL versions, but that would
be a major pain.

This normally doesn't matter; mpv itself always creates OpenGL 3.2
contexts on OSX. But it could matter if a client API user uses
vo_opengl_cb, and gives it a 2.1 context (which OSX also allows you to
create).
2014-12-31 21:04:52 +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 65f2c6c716 vo_opengl_cb: pass context directly
This is simpler than setting the context after VO creation, which
requires the code to check for the context on every entrypoint.
2014-12-31 19:12:44 +01:00
wm4 282e3202d5 video: pass some VO params as struct
Not particularly elegant, but better than adding more and more stuff to
the relevant function signatures.
2014-12-31 19:01:28 +01:00
wm4 f5b314e9e8 demux_mkv: enable codec parsing for vfw-muxed files too
For some codecs, we need to invoke a codec parser (because libavcodec
will run into trouble otherwise). This was done based on the Matroska
codec field.

But this ignores handling of vfw-muxed files, which use a pseudo-codec
to signal presence of vfw structures, which we must unmangle to get the
real codec. Handle this by rearranging the code.

This fixes at least mp3-in-mkv for vfw-muxed files; typically old files.
2014-12-31 15:00:18 +01:00
wm4 799e8861bb client API: qthelper: return NULL as handle if unset
Creating a plain Handle() should yield a NULL mpv_handle.

Also, remove the redundant non-const definition of the conversion
operator. At least in this situation it's not needed.

Also, add include guards around qthelper.hpp.
2014-12-30 23:28:07 +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 63a414c708 command: make empty vf-metadata not an error
If a filter exists, but has no metadata, just return success. This
allows the user to distinguish between no metadata available, and filter
not inserted.

See #1408.
2014-12-30 14:04:53 +01:00
wm4 f2d6c8cb1c demux_playlist: unquote entries in pls playlists
I guess these parsers still have a way to go...
2014-12-30 13:24:43 +01:00