aboutsummaryrefslogtreecommitdiffhomepage
path: root/options
Commit message (Collapse)AuthorAge
* Do not call strerror()Gravatar wm42014-11-26
| | | | | | | | | | | | | | | | | | | | | | | | | ...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.
* player: add option not to use OSD/fontconfigGravatar wm42014-11-25
| | | | | | | Makeshift-solution for working around certain fontconfig issues. With --use-text-osd=no, libass and fontconfig won't be initialized, and fontconfig won't block everything with scanning for fonts.
* parse_configfile: check quote termination properlyGravatar wm42014-11-21
| | | | | | This is some terrible code; I blame MPlayer legacy. Found by Coverity.
* m_property: fix a typoGravatar wm42014-11-21
| | | | | | The wrong value was checked for an error. Oops. Found by Coverity.
* Remove some unneeded NULL checksGravatar wm42014-11-21
| | | | Found by Coverity; also see commit 85fb2af3.
* options: add --ytdl-format option for youtube-dl formatGravatar Jaime Marquínez Ferrándiz2014-11-20
| | | | | | | | | It's passed with the '--format' option to youtube-dl. If it isn't set, we don't pass '--format best' so that youtube-dl can use the options from its configuration file. Signed-off-by: wm4 <wm4@nowhere>
* player: integrate ytdl_hook.luaGravatar wm42014-11-19
|
* demux_mkv: add an option for compatibility with HaaliGravatar wm42014-11-18
| | | | This was requested on IRC.
* command: initialize a-b loop options correctlyGravatar wm42014-11-18
| | | | | It was initialized as 0/0, which basically cleared the chapter marks by default.
* command: implement A-B loopsGravatar wm42014-11-18
| | | | | | | | | | | | | Probably needs to be polished a bit more. Also, might require a key binding that can set/clear the loop points in a more intuitive way. For now, something like this can be put into input.conf to use it: ctrl+y set ab-loop-a ${time-pos} # set A ctrl+x set ab-loop-b ${time-pos} # set B ctrl+c set ab-loop-a no # clear (mostly) Fixes #1241.
* demux_mkv: adjust subtitle preroll again (2)Gravatar wm42014-11-15
| | | | | | | | | | | | | | Make the changes started in commit c827ae5f more eloborate, and provide an option to control the amount of data read before the seek-target. To achieve this, rewrite the loop that finds the lowest still acceptable target cluster. It is now searched by time instead of file position. The behavior (both with and without preroll option) may be different from before this change, although it shouldn't be worse. The change demux_mkv_read_cues() fixes a bug: when seeking after playing normally, the code would erroneously assume that durations are set. This doesn't happen if the first operation after loading was a seek instead of playback.
* command: export some option metadataGravatar wm42014-11-13
| | | | | | | This might be interesting for GUIs and such. It's probably still a little bit insufficient. For example, the filter and audio/video output lists are not available through this.
* command: make sub-properties more flexibleGravatar wm42014-11-13
| | | | | This makes it work with all kind of types, instead of just some simple ones.
* command: fix weird stuffGravatar wm42014-11-13
| | | | | Happens to fix some aspects of some properties (especially reading "option-flags/x" as native value).
* win32: silence some warningsGravatar James Ross-Gowan2014-11-08
| | | | Signed-off-by: wm4 <wm4@nowhere>
* audio: add --audio-client-name optionGravatar wm42014-11-07
| | | | | | The main need I see for this is with libmpv - it would be confusing if some application showed up as "mpv" on whateverthehell PulseAudio uses it for (generally it does show up on various PA GUI tools).
* player: add --chapters-file optionGravatar wm42014-11-02
| | | | | | | | Note that you can't pass .cue or .edl files to it, at least not yet. Requested in context of allowing to specify custom chapters. For that to work well, we probably need to add some sort of chapter metadata pseudo-demuxer.
* player: add an option to abort playback on partial init failuresGravatar wm42014-10-28
| | | | | | This is probably what libmpv users want; and it also improves error reporting (or we'd have to add a way to communicate such mid-playback failures as events).
* Drop libquvi supportGravatar wm42014-10-25
| | | | | | | | | | | 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 supportGravatar wm42014-10-25
| | | | | Shamelessly stolen from ffmpeg. It probably doesn't work - you can debug it yourself.
* terminal: strictly don't read terminal input if stdout is not a terminalGravatar wm42014-10-23
| | | | | | | | | | | | | 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.
* m_option: format mpv_node as jsonGravatar wm42014-10-23
| | | | | Useful for debugging and informational purposes. Not sure if it's sane in any form.
* options: allow selecting track ID 0 tooGravatar wm42014-10-21
| | | | Blergh. Now needed for --ff-aid and friends.
* player: add stream selection by ffmpeg indexGravatar wm42014-10-21
| | | | | | | | | Apparently using the stream index is the best way to refer to the same streams across multiple FFmpeg-using programs, even if the stream index itself is rarely meaningful in any way. For Matroska, there are some possible problems, depending how FFmpeg actually adds streams. Normally they seem to match though.
* lua: strictly free memory on errorsGravatar wm42014-10-19
| | | | | | | Thanks to the recently introduced mp_lua_PITA(), this is "simple" now. It fixes leaks on Lua errors. The hack to avoid stack overflows manually isn't needed anymore, and the Lua error handler will take care of this.
* win32: get rid of mp_stat in the normal source codeGravatar wm42014-10-17
| | | | | | | | | | | mp_stat() instead of stat() was used in the normal code (i.e. even on Unix), because MinGW-w64 has an unbelievable macro-mess in place, which prevents solving this elegantly. Add some dirty workarounds to hide mp_stat() from the normal code properly. This now requires replacing all functions that use the struct stat type. This includes fstat, lstat, fstatat, and possibly others. (mpv currently uses stat and fstat only.)
* input: implement --input-file on unix using the IPC supportGravatar Alessandro Ghedini2014-10-17
|
* input: implement JSON-based IPC protocolGravatar Alessandro Ghedini2014-10-17
|
* sub: adjustments to --ass-style-override optionGravatar wm42014-10-17
| | | | | | | | | | Now requires newest libass git. Since this feature wasn't part of a libass release yet, I'm not bothering making the mpv code compatible with as how it was previously implemented (it will just be disabled with any older libass). CC: @mpv-player/stable (because mpv-build uses libass git, and this breaks the feature)
* audio: add device selection & listing with --audio-deviceGravatar wm42014-10-09
| | | | | | | Not sure how good of an idea this is. This commit doesn't add support for this to any AO yet; the AO implementations will follow later.
* m_config: add function to copy all optionsGravatar wm42014-10-06
| | | | Needed to copy the global option struct in the next commit.
* cocoa: remove --fs-missioncontrolGravatar Stefano Pigozzi2014-10-05
| | | | | | | This is the first of a series of commits that will change the Cocoa way in a way that is easily embeddable inside parent views. To reach that point common code must avoid referencing the parent NSWindow since that could be the host application's window.
* options: add --no-keepaspect-windowGravatar wm42014-10-04
| | | | Seems silly, but was requested.
* x11: stupid workaround for XMonadGravatar wm42014-10-04
| | | | | | | | --x11-netwm=yes now forces NetWM fullscreen, while --x11-netwm=auto (detect whether NetWM fullsctreen support is available) is the old behavior and still the default. See #888.
* audio: enable pitch correction by default when playing fastGravatar wm42014-10-02
| | | | | | | Apparently this is what users want. When playing with normal speed, nothing is done. When playing slower than normal, resampling is used instead, because scaletempo (which does the pitch correction) adds too many artifacts.
* audio: remove --audiodropGravatar wm42014-09-30
| | | | | | | | | | | | | | | This would play some silence in case video was slower than audio. If framedropping is already enabled, there's no other way to keep A/V sync, short of changing audio playback speed (which would give worse results). The --audiodrop option inserted silence if there was more than 500ms desync. This worked somewhat, but I think it was a silly idea after all. Whether the playback experience is really bad or slightly worse doesn't really matter. There also was a subtle bug with PTS handling, that apparently caused A/V desync anyway at ridiculous playback speeds. Just remove this feature; nobody is going to use it anyway.
* player: allow passing number of loops to --loop-fileGravatar wm42014-09-22
| | | | | | | | | | E.g. --loop-file=2 will play the file 3 times (one time normally, and 2 repeats). Minor syntax issue: "--loop-file 5" won't work, you have to use "--loop-file=5". This is because "--loop-file" still has to work for compatibility, so the "old" syntax with a space between option name and value can't work.
* options: remove --volstepGravatar wm42014-09-21
| | | | | | | It's just confusing; users are encouraged to edit input.conf instead (changing the argument to the "add" command). Update input.conf to keep the old behavior.
* player: allow overriding OSD message for all OSD levelsGravatar wm42014-09-18
| | | | | | | | | | | | | | | | | | Until now, you could override only level 3 with --osd-status-msg. Extend this, add add --osd-msg1 to --osd-msg3 (one for each OSD level). OSD level 0 always means disable OSD, so that isn't included. --osd-msg3 corresponds to --osd-status-msg, but they're not exactly the same. To allow more customization, --osd-msgN do not include the OSD symbol. The symbol can be manually added with "${osd-sym-cc}". We keep the "old" option for some short-term compatibility. --osd-msg1 should be particularly useful; for example you could do: --osd-msg1='${?pause==yes:${osd-sym-cc}}' to display a "paused" symbol when paused, and nothing during normal playback. (Although admittedly, the syntax is quite a bit of work.)
* options: change --volstep to 2Gravatar wm42014-09-16
| | | | | | | | | | With default settings, this allows you to hit the 100% mark (with default --softvol-max in the middle) even if you've reached min or max volume before. This is because 50 is not divisible by 3 (old default) but by 2 (new default). Not really sure why there still can be issues with higher --softvol-max and --volstep=1, but this is where I stop caring.
* options: add M_OPT_FILE flag to mark options that want a file(list)Gravatar Alessandro Ghedini2014-09-13
|
* m_config: fix theoretic undefined behaviorGravatar wm42014-09-13
| | | | | | | | | The memcpy() is actually not enough: the types are incompatible, and no memcpy, union, etc. will change that. (Although no real compiler will ever break this.) Attempt to make this theoretically correct by actually using a struct pointer. It's not the same struct type, but supposedly it's ok, because all struct pointers always have the same size and representation in standard C.
* audio: make buffer size configurableGravatar wm42014-09-05
| | | | Really only for testing.
* path: remove XDG bullshitGravatar wm42014-09-03
| | | | | | | | | | | | | Don't worry, your ~/.config/... paths are safe. This merely removes handling of $XDG_CONFIG_DIRS for global paths. Maybe there is a better solution for this, like still including the "traditional" config dir. But I will leave the fine reading of this (crappy) spec and fixing the code accordingly to someone else. So, if anyone has interest in getting this behavior back, you will have to write a patch. This patch should _also_ not break expected behavior. Fixes #1060.
* player: add --media-title optionGravatar wm42014-09-02
| | | | Requested by ChrisK2.
* player: add --osd-playing-msg optionGravatar wm42014-09-02
|
* player: simplistic HLS bitrate selectionGravatar wm42014-09-01
| | | | | | --hls-bitrate=min/max lets you select the min or max bitrate. That's it. Something more sophisticated might be possible, but is probably not even worth the effort.
* command: make m_property_strdup_ro with NULL mean unavailableGravatar wm42014-09-01
| | | | | | | | | | This catches a few cases which basically call: m_property_strdup_ro(..., ..., NULL) which would return NULL strings. This should generally be avoided (although it's allowed due to reasons), and it seems most callers actually intend this to mean M_PROPERTY_UNAVAILABLE.
* video: initial Matroska 3D supportGravatar wm42014-08-30
| | | | | | | | | | | | | | | | | | | | | This inserts an automatic conversion filter if a Matroska file is marked as 3D (StereoMode element). The basic idea is similar to video rotation and colorspace handling: the 3D mode is added as a property to the video params. Depending on this property, a video filter can be inserted. As of this commit, extending mp_image_params is actually completely unnecessary - but the idea is that it will make it easier to integrate with VOs supporting stereo 3D mogrification. Although vo_opengl does support some stereo rendering, it didn't support the mode my sample file used, so I'll leave that part for later. Not that most mappings from Matroska mode to vf_stereo3d mode are probably wrong, and some are missing. Assuming that Matroska modes, and vf_stereo3d in modes, and out modes are all the same might be an oversimplification - we'll see. See issue #1045.
* player: reduce default demuxer cacheGravatar wm42014-08-30
| | | | | | | A (hopefully) temporary hack to make stream switching delays tolerable. It's not clear how this should be handled (either executing a precise seek on track switching, or always enabling all streams), so get this issue out of the way for now by picking a rather low value.