summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* stream: reject overly long URLswm42015-01-251-0/+4
|
* stream_lavf: escape disallowed characters in http URLswm42015-01-252-5/+24
| | | | | | | | | | | | | | | | | In my opinion, libavformat should be doing this. But a patch handling a very safe case rejected, so I suppose we have to do it manually. (This patch was only escaping spaces, which can never work because they break the basic syntax of the HTTP protocol.) This commit attempts to do 2 things: - Try to guess whether libavformat will use the URL for http. This is not always trivial, because some protocols will recursively pass part of the user URL to http in some way. - Try to fix invalid URLs. We fix only the simplest case: only characters that are never valid are escaped. This excludes invalid escape codes, which happen with freestanding '%' characters. Fixes #1495.
* vo_opengl: fix typowm42015-01-251-1/+1
|
* build: reduce worst case with mismatching FFmpeg pkg-config fileswm42015-01-251-12/+12
| | | | | | | | | | | | | | | | | | | | | | Handles mismatching libavfilter/libavdevice and libavcodec slightly better. libavfilter and libavdevice are optional, and thus are checked separately and at a later point of the build. But if a user system has at least 2 FFmpeg installations, and one of them lacks libavfilter or libavdevice, the build script will pick up the libavfilter/libavdevice package of the "other" FFmpeg installation. The moment waf picks these up, all include paths will start pointing at the "wrong" FFmpeg, and the FFmpeg API checks done earlier might be wrong too, leading to obscure and hard to explain compilation failures. Just moving the libavfilter/libavdevice checks before the FFmpeg API checks somewhat deals with this issue. Certainly not a proper solution, but since the change is harmless, and there is no proper solution, and the change doesn't actually add anything new, why not. Conflicts: wscript
* README: extend dependecy list, link Windows compilation docswm42015-01-252-5/+13
| | | | | | | Also, fix vo.rst, don't want to waste a separate commit on this. Conflicts: DOCS/man/vo.rst
* audio: don't force any parameters if spdif is usedwm42015-01-251-5/+3
| | | | | | The existing code only ignored --audio-channels, but not --audio-rate or --audio-format if spdif passthrough is used. Setting these makes no sense.
* ao_coreaudio: reset possibly random errno valuewm42015-01-251-1/+2
| | | | | | | | | | In general, you need to check errno when using strtol(), but as far as I know, strtol() won't reset errno on success. This has to be done manually. The code could have failed sporadically if strtol() succeeded, and errno was already set to one of the checked values. (This strtol() still isn't fully error checked, but I don't know if it's intentional, e.g. for parsing a numeric prefix only.)
* vo: restore framedropwm42015-01-251-1/+1
| | | | Fix inverted condition in commit 234d6329.
* player: mention mpv encoding support for transcoding in desync. warningwm42015-01-251-1/+1
|
* video: fix waiting for last frame/format reconfigwm42015-01-252-1/+2
| | | | | | | | | | | We still need to send the VO a duration in these cases. Disabling framedrop has logically absolutely nothing to do with these cases; it was overlooked in commit 918b06c4. So we always send the frame duration (or a guess for it), and check whether framedropping is actually enabled in the VO code. (It would be cleaner to send framedrop as a flag, but I don't care about that right now.)
* demux: return EOF when reading from unselected streamwm42015-01-251-1/+1
| | | | | | | | | | | | | | | | | Normally the player doesn't read from unselected streams, so this should be a no-op. But unfortunately, some broken files can severely confuse the player, and assign the same demuxer stream to multiple front-end tracks. Then selecting one of the tracks would deselect the other track, with the end result that the demuxer stream for the selected track is deselected. This could happen with mkv files that use the same track number (which is of course broken). timeline_set_part() sets the tracks using demuxer_stream_by_demuxer_id(), using the broken non-unique IDs. The observable effect was that the player never quit, because demux_read_packet_async() told the caller to wait some longer for new packets. Fix by returning EOF instead. Fixes #1481.
* cocoa: don't set application icon in libmpvStefano Pigozzi2015-01-251-2/+4
|
* player: respect --untimed on last framewm42015-01-251-1/+1
| | | | | | | | | | | | | | The last video frame is another case that has a separate code path, although it's pretty similar to the one in commit 73e5aa87. Fix this in a different way, which also takes care of the last frame case, although without context the code becomes slightly more tricky. As further cleanup, move the decision about framedropping itself to the same place, so the check in vo.c becomes much simpler. The check for the vo->driver->encode flag, which is remvoed completely, was redundant too. Fixes #1480.
* manpage: fix osd-ass-cc exampleswm42015-01-251-1/+4
| | | | | | | | 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 "\".
* player: respect --untimed on video format changeswm42015-01-251-1/+1
| | | | | | | | | | | If the video format changes (e.g. different frame size), a special code path is entered to wait until the currently displayed frame is done. Otherwise, the frame before the change would be destroyed by the vo_reconfig() call. This code path didn't respect --untimed; correct this. Fixes #1475.
* OSC: Reset all styles for idle messageChrisK22015-01-251-6/+6
|
* osc: fix disabling OSCwm42015-01-251-1/+5
| | | | | | | Upon the "DEL" key binding or the "disable-osc" message, the OSC should stay permanently invisible. This was recently broken (not sure by what), because other code accidentally reenables it anyway, which resulted in the OSC appearing again when moving the mouse.
* ao_alsa: fix a small memory leakwm42015-01-251-0/+2
|
* player: fallback to seek time for percent-pos propertywm42015-01-251-2/+2
| | | | | | | | | | | | | The percent-pos property normally goes by time, except for file formats like .ts or .ogg, where you can't trust the timestamps and duration info to compute the position in the overall files. These use the byte position and size instead. When the file position was unavailable (e.g. due to an ongoing seek), the percent-pos was unknown. Change it to use the time position instead. In most cases, it's actually accurate enough, and the temporary unavailability of the property can be annoying, e.g. on the terminal status line.
* wayland: implement key modifierswm42015-01-251-18/+24
| | | | Includes shift, ctrl, alt, meta.
* 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.