summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* player: use libavutil API to get number of CPUswm42015-01-055-72/+2
| | | | | | | | | | | Our own code was introduced when FFmpeg didn't provide this API (or maybe didn't even have a way to determine the CPU count). But now, av_cpu_count() is available for all FFmpeg/Libav versions we support, and there's no reason to have our own code. libavutil's code seems to be slightly more sophisticated than our's, and it's possible that the detected CPU count is different on some platforms after this change.
* player: print used number of threads in verbose modewm42015-01-054-6/+8
| | | | Also, don't use av_log() for mpv output.
* command: ignore chapter cycling if there's only 1 chapterwm42015-01-051-2/+5
| | | | | | If there's only 1 chapter, the seeking by chapter (using the chapter property) will either jump to the chapter point, or quit playback. This is as designed, but seems like a useless and annoying behavior.
* demux_mkv: avoid PTS warning with image attachmentswm42015-01-051-0/+5
| | | | | | | Removes an annoying "No video PTS! Making something up." warning. Mark it as keyframe, which is needed to prevent strange behavior with PNG. Also, don't leak the picture data.
* manpage: clarify syntax for color optionswm42015-01-051-1/+1
| | | | | | | | | 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.)
* client API: clarify some vo_opengl_cb requirementswm42015-01-041-0/+6
| | | | Stupid drivers. I hope the problem described here isn't actually common.
* client API, vo_opengl_cb: properly uninit videowm42015-01-041-0/+1
| | | | | | | | | | | | mpv_opengl_cb_uninit_gl() can be called at any time; but then the decoder must be destroyed due to complications with hardware decoding. This is why kill_video() exists. To make things easier, there is the invariant that while vo_opengl_cb is active, the OpenGL state must exist. But kill_video() didn't actually destroy the VO; only the video decoder. This could trigger an assertion (vo_opengl_cb.c:187). Actually, the video output is always destroyed lazily at a later point if the decoder is destroyed, but not early enough for out purposes.
* vo_opengl: remove obsolete comment in shaderwm42015-01-041-1/+1
|
* manpage: fix --video-unscaled descriptionwm42015-01-041-3/+2
| | | | This was changed a long time ago in commit 37319ab6.
* x11: make display-names property stricterwm42015-01-041-1/+3
| | | | | | | | | | | | | | Returning the property before the window is mapped could lead to confusing behavior, and in particular strange differences between vo_vdpau and vo_opengl. (vo_opengl creates the window right at the start, while vdpau waits until the first reconfigure event.) It might even be possible that for vo_opengl random results were returned, because the hidden window can have different placement than the actual, final one on initial video reconfig. Fix this by returning the property only if the window is considered mapped. command.c handles this case specifically, and makes the property unavailable, instead of returning an empty list.
* af_volume: dump applied replaygain in verbose modewm42015-01-041-1/+5
|
* travis: disable on OSXwm42015-01-031-1/+1
| | | | Useless crap that keeps spamming IRC with timeout "errors".
* video: batch query_format callswm42015-01-034-9/+12
| | | | | | | 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.
* TOOLS/lua/observe-all: add a warningwm42015-01-031-0/+4
| | | | This is just natural, but it's also not that obvious.
* TOOLS/lua/autoload: fix behavior with network URLswm42015-01-031-0/+3
| | | | | readdir() fails if the directory is an URL, so just exit instead of letting the Lua script fail.
* vf_vapoursynth: fix Lua backendwm42015-01-031-0/+3
| | | | It couldn't handle the newly added float variable.
* ytdl: silence "succeeded" messagewm42015-01-031-1/+1
| | | | Pretty useless by now.
* vf_vapoursynth: pass through container FPS valuewm42015-01-034-10/+20
| | | | | | | | 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.
* manpage: vf_vapoursynth: document mpv-specific predefined variableswm42015-01-031-0/+11
|
* x11: make display-names property observablewm42015-01-032-1/+3
| | | | Reuse MP_EVENT_WIN_STATE for this.
* video: better pipelining with vf_vapoursynthwm42015-01-036-12/+99
| | | | | | | | | | 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.
* TOOLS/stats-conv: more improvementswm42015-01-031-13/+20
| | | | | | | | | | 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).
* ao/wasapi: style/code formatting tweaksKevin Mitchell2015-01-023-64/+63
|
* ao/wasapi: improve exclusive mode format searchKevin Mitchell2015-01-021-46/+36
| | | | fixes #1376
* ao/wasapi: revamp set_waveformatexKevin Mitchell2015-01-021-27/+43
| | | | | | | | * 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
* ao/wasapi: add CO_E_NOTINITIALIZED to explain_errKevin Mitchell2015-01-021-0/+1
| | | | someone on irc reported seeing this error
* cocoa: fix build on 10.9Stefano Pigozzi2015-01-021-1/+1
| | | | Use -isInFullScreenMode instead of the property introduced with the 10.10 SDK.
* OSC: idlemessage: fix alignmentChrisK22015-01-021-3/+3
|
* TOOLS/stas-conv: add timed value event typewm42015-01-021-0/+8
|
* TOOLS/stats-conv: better outputwm42015-01-021-11/+20
| | | | | | 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.
* cocoa: fix NSMapGet errorStefano Pigozzi2015-01-021-2/+4
| | | | regression from 64b6b2ea45
* manpage: talk about one script, not multiple scriptsRyan Jacobs2015-01-021-2/+2
| | | | | | There aren't multiple scripts. We're just talking about one: youtube-dl. Signed-off-by: wm4 <wm4@nowhere>
* OSC: add osc-message script command (wip)ChrisK22015-01-022-0/+9
|
* OSC: display "drop files here" message when idle + forced-windowChrisK22015-01-021-2/+52
| | | | This currently doesn't work properly on OSX due to some bugs.
* build: rename MPLAYER_CONFDIR definewm42015-01-023-5/+5
| | | | | | 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.
* player: move terminal input init to a better placewm42015-01-021-3/+3
| | | | | | Mostly of cosmetic nature. Move initialization to the same place where another component (cocoa) will start accessing the input context from a foreign thread.
* player: print config.h contents in verbose modewm42015-01-022-6/+19
| | | | | | | | | 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.
* build: prefer libswresample over libavresample on FFmpegwm42015-01-022-10/+10
| | | | | | | | | | 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).
* vo_opengl_old: remove ancient ATI-specific YUV conversionswm42015-01-025-236/+6
| | | | | | | | | | 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.
* build: try to make examples build both in-tree and out-of-treewm42015-01-024-4/+17
| | | | | | | | | | | | | | | | | | | | | | | | | 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.
* DOCS/client_api_examples: move all examples into their own subdirswm42015-01-017-15/+22
| | | | | 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.
* DOCS/client_api_examples: don't throw char* in C++ codewm42015-01-012-6/+9
| | | | | | | 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.
* manpage: fix typowm42015-01-011-1/+1
|
* command: make the "run" command work on Windows toowm42015-01-014-26/+40
| | | | | | | | | 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().
* subprocess: allow disabling redirection of stdout/stderrwm42015-01-012-6/+10
| | | | | | | | | 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.
* win32: add native wrappers for pthread functionswm42015-01-016-0/+394
| | | | | | | Off by default, use --enable-win32-internal-pthreads . This probably still needs a lot more testing. It also won't work on Windows XP.
* cocoa: fix uninitialization while in fullscreenStefano Pigozzi2015-01-013-2/+36
| | | | | | | | 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
* Update copyright yearwm42015-01-012-2/+2
|
* player: capitalize --display-tags itemswm42014-12-311-2/+2
| | | | | | | | 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.
* gl_hwdec_vda: refuse to work with old OpenGL versionswm42014-12-311-0/+5
| | | | | | | | | | | | 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).
* client API: add function to create new mpv_handles from existing oneswm42014-12-314-0/+44
| | | | | | | 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.
* vo_opengl_cb: simplify API uninitializationwm42014-12-315-21/+59
| | | | | | | | | | | 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.
* vo_opengl_cb: pass context directlywm42014-12-313-62/+43
| | | | | This is simpler than setting the context after VO creation, which requires the code to check for the context on every entrypoint.
* video: pass some VO params as structwm42014-12-314-24/+30
| | | | | Not particularly elegant, but better than adding more and more stuff to the relevant function signatures.
* demux_mkv: enable codec parsing for vfw-muxed files toowm42014-12-311-9/+10
| | | | | | | | | | | | 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.
* client API: qthelper: return NULL as handle if unsetwm42014-12-301-2/+6
| | | | | | | | | 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.
* DOCS/client_api_examples: add an explicit licensewm42014-12-302-2/+14
| | | | IANAL, but we don't give a shit what you do with this code.
* DOCS/client_api_examples: qtexample: use queued signalswm42014-12-303-20/+19
| | | | | | | | 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.
* DOCS/client_api_examples: qtquick: fix destructionwm42014-12-304-38/+35
| | | | | | | | | | | | | | | | 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.
* client API: qthelper: add a refcounting wrapper around mpv_handlewm42014-12-303-1/+32
| | | | | This is useful to deal with crazy Qt object lifetime issues (the following commit needs it).
* command: make empty vf-metadata not an errorwm42014-12-302-14/+10
| | | | | | | | 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.
* demux_playlist: unquote entries in pls playlistswm42014-12-301-0/+3
| | | | I guess these parsers still have a way to go...
* vf: fix crash if filter doesn't provide control entrypointwm42014-12-301-1/+1
| | | | | | | | This input command crashed: vf add @mf:format=yuv420p ; show_text "${vf-metadata/mf}" Fixes #1408.
* options: expand ~ for the include optionStefano Pigozzi2014-12-301-1/+5
| | | | Fixes #1406
* demux_mkv: reduce log noisewm42014-12-292-3/+2
| | | | | | | This message can happen a lot for mkv files which index clusters in the seekhead (which is also broken non-sense, but that's a different story). Also remove a duplicate define from matroska.h.
* demux_mf: move mf.c contents to demux_mf.cwm42014-12-296-189/+122
| | | | | | | | | There's no reason why parts of this demuxer would be in a separate source file. The existence of this code is already somewhat questionable anyway, so it may as well be dumped into a single file. Even stranger that demux.c included mf.h for no reason (it was an artifact from 2002 when the architecture was uncleaner).
* command: add filtered-metadata propertywm42014-12-292-1/+16
| | | | | Goes in hand with the previous commit; the main purpose is to easily show on OSD what is shown on terminal.
* player: filter tags, add --display-tags optionwm42014-12-297-7/+45
| | | | | | | | 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.
* player: make --shuffle/--merge-files affect runtime loaded playlistswm42014-12-295-19/+26
| | | | | | | 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.
* ao_portaudio: remove this audio outputwm42014-12-297-304/+0
|