summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* coreaudio: only list output devicesStefano Pigozzi2014-10-281-0/+12
|
* manpage: clarify loadfile append-play modewm42014-10-281-1/+3
| | | | Documents the behavior introduced with the previous commit.
* command: play the correct entry with loadfile ... append-playAlessandro Ghedini2014-10-271-1/+1
| | | | | The playlist may be non-empty even if the player is idle. Instead of playing the first entry, play the entry that was just added.
* player: don't spam video-reconfig eventwm42014-10-271-1/+1
| | | | | | | | Without --force-window, this is called on every iteration or so, and calling uninit_video_out() sends the video-reconfig event. Avoid sending redundant events. Fixes #1225 (using an alternative patch).
* cocoa: fix small leakStefano Pigozzi2014-10-271-0/+1
|
* libmpv: cocoa: fix view leak on uninitStefano Pigozzi2014-10-271-4/+6
| | | | | The code was lacking a -removeFromSuperview call which resulted in a leak on our part if the parent view in the client was not released.
* libmpv: cocoa: add basic menuStefano Pigozzi2014-10-271-10/+7
|
* command: try 'icy-title' metadata for media-title as wellAlessandro Ghedini2014-10-271-0/+3
|
* x11: fix display FPS detection for interlaced modeswm42014-10-271-1/+6
| | | | | | | | | In interlaced modes, we output fields, not complete frames, so the framerate doubles. The method to calculate this was borrowed from xrandr code. Hopefully fixes #1224.
* dxva2: use gpu_memcpy with unmatched stridesJames Ross-Gowan2014-10-271-8/+29
| | | | Like memcpy_pic, this checks if the strides match first.
* command: add audio-device propertywm42014-10-272-0/+24
| | | | Meant for changing the --audio-device at runtime.
* audio: add command/function to reload audio outputwm42014-10-276-1/+29
| | | | | Anticipated use: simple solution for dealing with audio APIs which request configuration changes via events.
* dxva2: fix copying surfaces with different strideJames Ross-Gowan2014-10-271-10/+18
|
* dxva2: fix crash on initialization failurewm42014-10-261-0/+2
| | | | If dxva2_init() fails, dxva2_uninit() will be called twice.
* TOOLS/lua/autoload: fix operation outside of working dirwm42014-10-261-3/+7
| | | | Fixes #1222. (This commit is based on a patch posted there.)
* TOOLS/lua/autoload: don't shadow local variablewm42014-10-261-4/+4
| | | | "dir" is already used somewhere above. This was ok, but not nice.
* manpage: options: various fixesAlessandro Ghedini2014-10-261-9/+9
|
* dxva2: gpu_memcpy: fix build for GCC 4.8.3James Ross-Gowan2014-10-261-3/+10
|
* vo_direct3d: support nv12/nv21 directlywm42014-10-261-0/+8
|
* video: clarify what IMFMT_DXVA2 iswm42014-10-261-1/+1
|
* dxva2: use optimized memcpyJames Ross-Gowan2014-10-263-12/+165
| | | | | | At least on my machine, reading back the frame with system memcpy is slower than just using software rendering. Use the optimized gpu_memcpy from LAV to speed things up.
* lua: subprocess: fix dumbwm42014-10-261-1/+1
|
* lua: subprocess: tunnel stderr through mp_logwm42014-10-261-20/+63
| | | | | | | | | | | Pretty much a fringe-feature, but also it's awkward if something appears on the terminal with no indication for the source. This is made quite awkward by the fact that stderr and stdout could be closed at different times, and that poll() doesn't accept "holes" in its FD list. Invalid (.e.g negative) FDs just make it return immediately, as required by the standard. So sparse_poll() takes care of the messy details.
* osdep: add helper for creating a sane pipe()wm42014-10-262-4/+21
| | | | | Or in other words, a pipe that has the CLOEXEC flag set. Needed since Linux' pipe2() is not in POSIX yet.
* lua: parse_json(): fix inverted condition for trail argumentwm42014-10-261-1/+1
| | | | It accidentally had the opposite meaning.
* lua: subprocess: don't distinguish pipe errors/EOFwm42014-10-261-7/+4
| | | | | | | What was the purpose of that? Probably none. Also simplify another thing: if we get the cancel signal through FD, there's no reason to check it separately.
* build: fix Lua detectionStefano Pigozzi2014-10-251-2/+4
| | | | | | | | | | | | | We need to manually define the flag since we are using a separate identifier for each of the Lua checks. This was done before 9b45b48 by the composed check with a define_key (see waftools/checks/generic.py). The pkg-config check was the only one to not redefine a define key because Waf already does that automatically when we call the generated function with the same identifier as the generator function. Now if they are called with two different arguments we will get two different definitions. Fixes #1218
* Drop libquvi supportwm42014-10-2521-555/+12
| | | | | | | | | | | No development activity (or even any sign of life) for almost a year. A replacement based on youtube-dl will probably be provided before the next mpv release. Ask on the IRC channel if you want to test. Simplify the Lua check too: libquvi linking against a different Lua version than mpv was a frequent issue, but with libquvi gone, no direct dependency uses Lua, and such a clash is rather unlikely.
* video: initial dxva2 supportwm42014-10-259-2/+623
| | | | | Shamelessly stolen from ffmpeg. It probably doesn't work - you can debug it yourself.
* manpage: use the proper environment variable for CSIDL_APPDATAwm42014-10-251-4/+8
|
* tv: remove some differences between immediate/normal modewm42014-10-251-38/+23
| | | | | | | | | | | The immediate mode (which is the default) uses a tiny ringbuffer and doesn't grab timestamps. This leads to quite bad behavior due to the fact that there's an additional buffer between playloop and TV code (the demuxer thread, which doesn't exist in MPlayer). Always grab the timestamps and use a decently-sized buffer. I still have no clue what I'm doing, and hacked it until it appeared to work. Report regressions if you experience any.
* tv: reduce waiting loop from 10ms to 1mswm42014-10-251-2/+2
| | | | | | | | | | | | I can't believe how shitty this (MPlayer-derived) code is. Maybe it should be fixed or be replaced with using libavdevice, but that doesn't seem worth the effort. Anyway, for now reduce the time it's blocking to wait for new frames from 10ms to 1ms, because 10ms might be a bit too tight: it could deliver the frame up to 10ms late - now it's only up to 1ms. (And yes, it does that instead of using condition variables. It also abuses volatile variables as atomics. It's hilarious.)
* lua: fix some more lua_tostring() mistakeswm42014-10-251-1/+3
| | | | Why can't it just raise an error?
* build: enable cdda:// by default againwm42014-10-251-1/+0
| | | | | | Apparently people want this. (???) See #1214.
* stream: fix --stream-dump dropping the file headerwm42014-10-251-10/+12
| | | | | | | | | | | | | | | | | | stream_rar.c peeks the first few bytes when trying to open, which means that opening any stream reads at least 2KB of data (internal buffer size) on opening. This broke --stream-dump, which saved only the data following this initial buffer. Hack it around by writing the current buffer to the capture file too, and move stream_capture_write() above stream_set_capture_file() for this purpose. Cleaner solutions might include: handling the terrible rar thing differently, or using the "proper" stream API for dumping. (The latter is not done, because --stream-dump shares code with the --stream-capture misfeature.) Fixes #1215.
* stream: remove duplicate messagewm42014-10-251-1/+1
|
* tv: remove duplicated crapwm42014-10-251-124/+76
| | | | | The logging functions already add a prefix. Original MPlayer devs must have liked code duplication a lot.
* tv: unqueue buffers correctly (maybe, maybe not)wm42014-10-251-5/+7
| | | | | I clue no idea what I'm doing, but at least it doesn't hang anymore when closing a tv:// stream using a v4l2 loopback device.
* lua: lua_tostring() on an error value can return NULLwm42014-10-241-2/+4
| | | | | Lua is so clever it allows values that can't be converted to strings, in which case lua_tostring() returns NULL. Trigger undefined behavior.
* command: finish hook execution if client failswm42014-10-243-6/+33
| | | | | Translation: if the (to be added) youtube-dl Lua script crashes, don't wait forever when opening something.
* input: resolve ~ and similar for --input-filewm42014-10-241-2/+3
| | | | Because why not.
* TOOLS/umpv: create FIFO in user directorywm42014-10-241-22/+2
| | | | Makes these security measures unnecessary.
* cocoa: perform VOCTRL_SET_UNFS_WINDOW_SIZE asyncronouslyStefano Pigozzi2014-10-241-3/+6
| | | | | | | | Apparently if resizing a NSWindow from a secondary thread Cocoa will automatically protect itself using NSViewHierarchyLock and in our case, cause a deadlock. Fixes #1210
* demux: don't access stream while lock is heldwm42014-10-241-22/+30
| | | | | | | | | | Although this is fine when the stream cache is active (which caches these and returns the result immediately), it seems cleaner not to rely on this detail. Remove the update_cache() call from demux_thread(), because it's sort of in the way. I forgot why it exists, and there's probably no good reason for it to exist anyway.
* demux: cache STREAM_CTRL_GET_BASE_FILENAMEwm42014-10-241-0/+18
| | | | | | | | It's needed for some obscure feature in combination with .rar reading. However, it's unconditionally used by the subtitle loader code, so take care of not blocking the main thread unnecessarily. (Untested.)
* command: add vo-configured propertywm42014-10-242-1/+15
| | | | | | | | | So a client API user can know when a window is created or destroyed. Also might be useful for the OSC: it could disable itself if video is disabled. Before this commit, there were only indirect ways of detecting this.
* player: disable --force-window if VO failswm42014-10-241-1/+5
| | | | Otherwise, it'd retry creating the window all the time.
* video: send MPV_EVENT_VIDEO_RECONFIG on uninitwm42014-10-241-0/+1
| | | | | This event basically means "something about video changed", and uninit is certainly an important change.
* player: adjust uninit order of componentswm42014-10-241-6/+7
| | | | | | | | Most things should be allowed to access the client API unconditionally (for example for sending events), so move destroying the client API down. Also, mp_uninit_ipc() should happen before the point at which all clients are shutdown, or there will be a small time window in which new clients can be created after destroying them all.
* command: fix debug outputwm42014-10-242-3/+3
| | | | It was a bit ugly/annoying.
* osc: make text squuezing layout dependentChrisK22014-10-241-31/+48
| | | | | | | | | | | Wether and when the text of a button should be squeezed when it gets too long can now be configured in the layout: lo.button.maxchars = <number> nil = no squeezing (default) If the button text has more than <maxchars> characters, it will be squeezed to the estimated width of <maxchars>.
* osc: make tooltip_an default propertyChrisK22014-10-241-2/+3
|
* terminal: drop ncurses/terminfo/termcap supportwm42014-10-233-405/+3
| | | | | | It was disabled since the last release, and nobody complained loudly. Further details see commit 4b5c3ea7.
* terminal: strictly don't read terminal input if stdout is not a terminalwm42014-10-232-9/+8
| | | | | | | | | | | | | Doing that doesn't make sense anyway: it's meant for interactive input, and if the output of the player is not on the terminal, how will you interact with it? It was also quite in the way when trying to read verbose output with e.g. less while the player was running, because the player would grab half of all input meant for less (simply because stdin is still connected to the terminal). Remove the now redundant special-casing of pipe input.
* player: fix exiting if both audio and video fail initializingwm42014-10-234-8/+22
| | | | | | | | | | | | | The player was supposed to exit playback if both video and audio failed to initialize (or if one of the streams was not selected when the other stream failed). This didn't work; for one this check was missing from one of the failure paths. And more importantly, both checked the current_track array incorrectly. Fix these issues, and move the failure handling code into a common function. CC: @mpv-player/stable
* ao_alsa: move parameter append code to a functionwm42014-10-231-16/+27
| | | | | Why not. (I thought I needed this, but my other experiments failed. So this is merely a minor cleanup.)
* lua: fix non-sensewm42014-10-231-1/+1
| | | | Let's actually test our code next time.
* client API: print properties set with -vwm42014-10-231-0/+7
| | | | | Useful for debugging. Considered doing this in command.c, but it's easier here.
* m_option: format mpv_node as jsonwm42014-10-231-1/+7
| | | | | Useful for debugging and informational purposes. Not sure if it's sane in any form.
* command: print executed commands with -vwm42014-10-233-0/+25
|
* osd: slightly change default styleMartin Herkt2014-10-232-6/+6
| | | | | Wider vertical margins, slightly thicker border and larger font size should be an improvement.
* command: add a "cached" mode to sub_addwm42014-10-233-2/+30
| | | | | This avoids reloading a subtitle if it was already added. In all cases, the subtitle is selected.
* osc.lua: add “bottombar” and “topbar” layoutsMartin Herkt2014-10-231-5/+281
|
* command: return error on invalid/absent IDs with ff-sid/ff-aidwm42014-10-231-2/+6
| | | | | | Instead of just disabling the stream. Also, check if the selected track has the right type, or we'd crash.
* manpage: ipc: comment about invalid UTF-8wm42014-10-231-0/+12
| | | | | | | | | | | | | | | | | | | | Some rationale for the documented/suggested behavior: It's not really clear what to do with invalid UTF-8, since JSON simply can't transport this information. Maybe you could transfer such strings as byte arrays, but that would be very verbose and inconvenient, and would pose the problem that it's hard to distinguish between strings encoded in this way and actual arrays. There are many other ways how this could be handled. For example, you could replace invalid sequences with '?'. Or you could do it like Python, and use certain reserved unicode codepoints to "tunnel" through invalid bytes. Which of these works really depends on the application. And since this can be done entirely on the byte level (invalid UTF-8 sequences can appear only in strings in our case), it's best to leave this to the receiver.
* win32: change config path prioritieswm42014-10-232-2/+31
| | | | | | | | | | | | | | | | | Assume mpv.exe is located in $mpv_exe_dir, then config files were preferably loaded from "$mpv_exe_dir/mpv". This was mostly traditional, and inherited from MPlayer times. Reverse the config path priority order, and prefer $CSIDL_APPDATA/mpv as main config path. This also fixes behavior when writing watch_later configs, and mpv is installed in a not-writable path. It's possible that this will cause regressions for some users, if the change in preference suddenly prefers stale config files (which may happen to longer around in the appdata config dir) over the user's proper config. Also explicitly document the behavior.
* rename ao_coreaudio_device.c -> ao_coreaudio_exclusive.cStefano Pigozzi2014-10-232-1/+1
| | | | This is so that the source file name matches the AO name
* reflect recent coreaudio changes in the manualStefano Pigozzi2014-10-231-11/+4
|
* coreaudio: redirect IEC61937 to coreaudio_exclusiveStefano Pigozzi2014-10-232-1/+7
|
* audio/out: add redirection-on-init mechanismwm42014-10-222-14/+47
| | | | | Looks like this will help us with making --audio-device and spdif work as expected on OSX. To be used ina following commit.
* audio/out: missing error checkwm42014-10-221-0/+2
| | | | Oops.
* audio/out: don't add special devices to --audio-device listwm42014-10-221-2/+2
| | | | | | | | | | | | | | | | | | Since the list associated with --audio-device is supposed to enable simple user-selection, it doesn't make much sense to include overly special things like ao_pcm or ao_null in the list. Specifically, ao_pcm is harmful, because it will just dump all audio to a file named audiodump.wav in the current working directory. The user can't choose the filename (it can be customized, but not through this option), and the working directory might be essentially random, especially if this is used from a GUI. Exclude "strange" entries. We reuse the fact that there's already a simple list ordered by auto-probe priority in order to avoid having to add an additional flag. This is also why coreaudio_exclusive was moved above ao_null: ao_null ends auto-probing and marks the start of "special" outputs, which don't show up on the device, but we want coreaudio_exclusive to be selectable (I think).
* audio/out: include coreaudio_exclusive in auto-probingwm42014-10-221-3/+3
| | | | | | | Move it above ao_null, so that it can be selected during auto-probing (even if it's only last). I see no reason why it should not be included, and it makes the following commit slightly more elegant. (See explanations there.)
* player: show busy symbol on OSD if seeking takes too longwm42014-10-221-2/+7</