summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* wayland: don't compute absurd window sizewm42015-01-251-3/+6
| | | | | | | | | For some reason, schedule_resize() can be called with everything set to 0. The code couldn't handle wl->window.aspect set to 0, converting NaNs to integers. Just work this around. (I have no idea what I'm doing. This is probably a corner case caused by my broken-ish wayland setup.)
* manpage: improve --title descriptionwm42015-01-251-5/+6
| | | | | It might be rather surprising that --title also sets the audio stream title (for PulseAudio and wasapi), so it certainly should be mentioned.
* client API: reasonable behavior if window is closedwm42015-01-251-0/+2
| | | | | | | | | | | | | | | | Closing the video window sends CLOSE_WIN, which is normally mapped to the "quit" command. The client API normally disables all key bindings, and closing the window does nothing. It's simply left to the application to handle this. This is fine - an embedded window can not be destroyed by user interaction. But sometimes, the window might be destroyed anyway, for example because the containing window is destroyed. If this happens, CLOSE_WIN should better not be ignored. We can't expect client API users to handle this specially (by providing their own input.conf), so provide some fallback for this pseudo key binding. The "quit" command might be too intrusive (not every client necessarily handles "unexpected" MPV_EVENT_SHUTDOWN), but I think it's still reasonable.
* player: enable demuxer thread for external audio fileswm42015-01-251-0/+9
| | | | | | | | | | | | | | Enable asynchronous reading for external files. This excludes subtitle files (so it's effectively enabled for audio files only), because most subtitle files are fully read on loading, and running a thread for them would just cause slowdowns and increase resource usage, without having any advantages. In theory, an external file could provide multiple tracks from the same demuxer, but demux_start_thread() is idempotent, so the code can be kept simple. Should help with playing DASH with ytdl_hook.
* ao_alsa: fix dtshd passthroughwm42015-01-251-2/+6
| | | | | | | We must not try to remap channels with this. Whethever ALSA gives us, and whatever we do with it, the result will probably be nonsense. Untested, as I don't have the required hardware.
* tl_matroska: check chapter boundswm42015-01-251-6/+9
| | | | | | | | | | I have no idea what this does, but it's without doubt a sufficient fix for the issue at hand. Fixes #1445. Conflicts: player/timeline/tl_matroska.c
* ao_pulse: disable latency calculation hacks by defaultwm42015-01-252-3/+7
| | | | | | | | | | | | | | 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.
* win32: request UTF-16 API variants, Vista+ APIs, and COM C macroswm42015-01-2512-26/+10
| | | | | | | | | Put the Vista+ (_WIN32_WINNT) and the COM C (COBJMACROS) defines into the build system, instead of defining them over and over in the code. Conflicts: video/out/w32_common.c waftools/checks/custom.py
* terminal: always print to stderr with --no-input-terminalwm42015-01-251-5/+6
| | | | | | | | | | | | | | | | | The function terminal_in_background() reports whether the player was backgrounded. In this case, we don't want to annoy the user by still printing the status to stderr. If no terminal interaction is assumed, this mechanism is disabled, and stderr is always used. The read_terminal variable signals this case. Oddly, just redirecting stderr will disable output to stderr, because the background check with tcgetpgrp() is done on stderr, but read_terminal is still true (because that one depends on stdin and stdout). Explicitly disable this mechanism if --no-input-terminal is used by setting read_terminal to true only if terminal input is actually initialized.
* TOOLS/zsh.pl: complete options based on typesPhilip Sequeira2015-01-251-31/+70
| | | | | | | | | | 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.
* player: use libavutil API to get number of CPUswm42015-01-255-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-254-6/+8
| | | | Also, don't use av_log() for mpv output.
* demux_mkv: avoid PTS warning with image attachmentswm42015-01-251-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-251-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.)
* TOOLS/lua/observe-all: add a warningwm42015-01-251-0/+4
| | | | This is just natural, but it's also not that obvious.
* TOOLS/lua/autoload: fix behavior with network URLswm42015-01-251-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-251-0/+3
| | | | It couldn't handle the newly added float variable.
* vf_vapoursynth: pass through container FPS valuewm42015-01-254-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-251-0/+11
|
* x11: make display-names property observablewm42015-01-252-1/+3
| | | | Reuse MP_EVENT_WIN_STATE for this.
* video: better pipelining with vf_vapoursynthwm42015-01-256-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-251-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-253-64/+63
|
* ao/wasapi: use IsEqualGUID and IsEqualPropertyKeyKevin Mitchell2015-01-253-30/+9
| | | | before we were reinventing this wheel
* ao/wasapi: set the ao with the waveformat channelmapKevin Mitchell2015-01-251-1/+10
| | | | hopefully this fixes #1350
* ao/wasapi: improve exclusive mode format searchKevin Mitchell2015-01-251-46/+36
| | | | fixes #1376
* ao/wasapi: revamp set_waveformatexKevin Mitchell2015-01-251-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-251-0/+1
| | | | someone on irc reported seeing this error
* OSC: idlemessage: fix alignmentChrisK22015-01-251-3/+3
|
* TOOLS/stas-conv: add timed value event typewm42015-01-251-0/+8
|
* TOOLS/stats-conv: better outputwm42015-01-251-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.
* OSC: display "drop files here" message when idle + forced-windowChrisK22015-01-251-2/+52
| | | | This currently doesn't work properly on OSX due to some bugs.
* build: rename MPLAYER_CONFDIR definewm42015-01-253-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: print config.h contents in verbose modewm42015-01-252-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. Conflicts: player/main.c
* build: prefer libswresample over libavresample on FFmpegwm42015-01-252-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).
* DOCS/client_api_examples: don't throw char* in C++ codewm42015-01-251-2/+3
| | | | | | | | | | 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. Conflicts: DOCS/client_api_examples/qml/mpvrenderer.cpp
* command: make the "run" command work on Windows toowm42015-01-254-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(). Conflicts: player/command.c
* subprocess: allow disabling redirection of stdout/stderrwm42015-01-252-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.
* gl_hwdec_vda: refuse to work with old OpenGL versionswm42015-01-251-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). Conflicts: video/out/gl_hwdec_vda.c
* DOCS/client_api_examples: add an explicit licensewm42015-01-252-2/+14
| | | | IANAL, but we don't give a shit what you do with this code.
* ao_alsa: print channel map if setting it failswm42015-01-251-1/+2
| | | | | | | | | | This message is printed when the audio device advertised a channel map, but couldn't set it - which is probably a dmix bug (we'll never know, ALSA doesn't take bug reports). Print the requested map, so that the user (maybe) can make a connection when seeing the message and the actually used channel map, which might be less confusing. Or at least less useless.
* build: fix linking with --enable-static-buildStefano Pigozzi2015-01-251-2/+2
|
* ao: add debug log with the detected channel mapsStefano Pigozzi2015-01-251-0/+6
| | | | This could be helpful with bug reports.
* chmap_sel: add multichannel fallback heuristicStefano Pigozzi2015-01-259-4/+381
| | | | | | | | | | | | Instead of just failing during channel map selection, try to select a close layout that makes most sense and upmix/downmix to that instead of failing AO initialization. The heuristic is rather simple, and uses the following steps: 1) If mono is required always prefer stereo to a multichannel upmix. 2) Search for an upmix that is an exact superset of the required channel map. 3) Search for a downmix that is the exact subset of the required channel map. 4) Search for either an upmix or downmix that is the closest (minimum difference of channels) to the required channel map.
* chmap: add a 7.1(rear) layout nameStefano Pigozzi2015-01-251-0/+1
| | | | This is common on Apple systems so it's handy to have a label for it.
* w32_common: allow window resizing with --no-borderJames Ross-Gowan2015-01-251-0/+58
| | | | | Conflicts: video/out/w32_common.c
* vo_opengl: Ignore approx-gamma for BT.2020-CLNiklas Haas2015-01-251-2/+9
| | | | | | The details of the non-linear transformation from/to BT.2020's constant luminance system don't really make sense with any other gamma curve, since changing the gamma curve completely breaks the chroma channels.
* stream_pvr: sort channel list by --tv-channels orderwm42015-01-251-2/+25
| | | | | | | | | | | | | Apparently this is what users would expect. Going the way of least resistance (in terms of messing with this old, rarely used code), sorting them by some kind of addition timestamp (called priority in the patch) is the easiest. Fixes #1390. Conflicts: stream/stream_pvr.c
* cocoa: move the gl function loader to gl_cocoa.cStefano Pigozzi2015-01-253-17/+15
|
* command: stip path from playlist OSD displaywm42015-01-251-2/+8
| | | | | | But only if it's not e.g. a http URL. Fixes #1388.
* ao_coreaudio: remove useless guardStefano Pigozzi2015-01-251-6/+0
| | | | useless after 069016fd6c
* ao_coreaudio: fix some naming conventionsStefano Pigozzi2015-01-251-5/+5
|
* ao_coreaudio: fix channel mappingStefano Pigozzi2015-01-251-19/+70
| | | | | | | | | | | | | | | There where 3 major errors in the previous code: 1) The kAudioDevicePropertyPreferredChannelLayout selector returns a single layout not an array. 2) The check for AudioChannelLayout allocation size was wrong (didn't account for variable sized struct). 3) Didn't query the kAudioDevicePropertyPreferredChannelsForStereo selector since I didn't know about it's existence. All of these are fixed. Might help with #1367
* ao_coreaudio: fix typoStefano Pigozzi2015-01-251-1/+1
|
* ao_coreaudio: move some code to make output readableStefano Pigozzi2015-01-251-1/+1
|
* ao_coreaudio: add more layout debug outputsStefano Pigozzi2015-01-251-19/+25
| | | | Should help remote debugging #1367 with --msg-level=ao=debug
* ao_coreaudio: fix AudioChannelLayout allocationsStefano Pigozzi2015-01-251-34/+46
| | | | | | | | AudioChannelLayout uses a trailing variable sized array so we need to query CoreAudio for the size of the struct it is going to need (or the conversion of that particular layout would fail). Fixes #1366
* ao_coreaudio: fix mono/stereo channel mappingStefano Pigozzi2015-01-251-9/+7
| | | | | | Needed after af3bbb800d since now we use channel mapping all the time. Fixes #1357
* stream_pvr: increase timeout, slightly better error reportingwm42015-01-251-5/+10
| | | | | | | An attempt to find out what's wrong with issue #1382. I don't even know why a timeout would be needed; for robustness with broken devices maybe?
* stream: always disable cache for pseudo-streamswm42015-01-251-1/+0
| | | | | Streams which don't have a full_buffer function never return any actual data. Slight improvement over commit 5640c195.
* client API: document requirement to block SIGPIPEwm42015-01-252-1/+3
| | | | | | | | | I noticed that the IPC code does not use MSG_NOSIGNAL or SO_NOSIGPIPE. The former is "only" POSIX 2008 and also requires switching to sendto(), while the latter is even less portable. Not going to bother with this obsolete 80ies crap, just block SIGPIPE, and instruct client API users to do the same.
* ipc: report some user errors betterwm42015-01-251-2/+5
| | | | | | | | | | | | | | | Using the IPC with a program, it's not often obvious that a newline must be sent to terminate a command. Print a warning if the connection is closed while there is still uninterpreted data in the buffer. Print the OS reported error if reading/writing the socket fails. Print an erro if JSON parsing fails. I considered silencing write errors if the write end is closed (EPIPE), because a client might send a bunch of commands, and then close the socket without wanting to read the reply. But then, mpv disconnects without reading further commands that might still be buffered, so it's probably a good idea to always print the error.
* Do not call strerror()wm42015-01-2516-90/+117
| | | | | | | | | | | | | | | | | | | | | | | | | ...because everything is terrible. strerror() is not documented as having to be thread-safe by POSIX and C11. (Which is pretty much bullshit, because both mandate threads and some form of thread-local storage - so there's no excuse why implementation couldn't implement this in a thread-safe way. Especially with C11 this is ridiculous, because there is no way to use threads and convert error numbers to strings at the same time!) Since we heavily use threads now, we should avoid unsafe functions like strerror(). strerror_r() is in POSIX, but GNU/glibc deliberately fucks it up and gives the function different semantics than the POSIX one. It's a bit of work to convince this piece of shit to expose the POSIX standard function, and not the messed up GNU one. strerror_l() is also in POSIX, but only since the 2008 standard, and thus is not widespread. The solution is using avlibc (libavutil, by its official name), which handles the unportable details for us, mostly. We avoid some pain.
* stream_edl: disable cachingwm42015-01-251-0/+1
| | | | | | | | | | | stream_edl merely makes demux_edl act "special", which checks for the stream type explicitly and then does something with its URL. If a cache is added before the stream, it'll try to use the cache's URL (i.e. an empty string), and will then obviously fail to parse the URL. While this is slightly stupid, just disabling the entir