aboutsummaryrefslogtreecommitdiffhomepage
Commit message (Collapse)AuthorAge
* client API: fix playloop thread wakeupGravatar wm42014-03-01
| | | | | | | | | | | | | | The playloop usually waits in select(), using a timeout needed for refilling audio and video buffers. This means the client API needs a separate mechanism to interrupt the select() call. This mechanism exists, but I forgot to use it. This commit fixes it. If it works, this will make the client API react faster, epsecially in audio-only mode. If video is enabled, the reaction time is capped to 50ms (or somewhat faster if the framerate is >20 fps), because the playloop stops reacting to anything in order to render and time the next video frame. (This will be fixed later by moving the VO to its own thread.)
* vo_opengl: minor simplificationGravatar wm42014-03-01
| | | | I think this is easier to follow.
* vo_opengl: Include :icc-approx-gamma option in the 3DLUT cache headerGravatar Niklas Haas2014-03-01
| | | | | This makes sure the ICC cache is recomputed when the :icc-approx-gamma option is changed, since it affects the output quite a lot.
* sd_ass: add a very simple and evil way to override ASS subtitle stylesGravatar wm42014-03-01
| | | | | | --ass-style-override=force now attempts to override the 'Default' style. May or may not work. In some situations it will work, but also mess up seemingly unrelated things like signs typeset with ASS.
* lua: set a proper chunk name for builtin modulesGravatar wm42014-03-01
| | | | | | | | luaL_loadstring(), which was used until now, uses the start of the Lua code itself as chunk name. Since the chunk name shows up even with runtime errors triggered by e.g. Lua code loaded from user scripts, this looks a but ugly. Switch to luaL_loadbuffer(), which is almost the same as luaL_loadstring(), but allows setting a chunk name.
* lua: fix add_key_binding()Gravatar wm42014-03-01
| | | | | add_key_binding() didn't work, because it passed a flag that was renamed. add_forced_key_binding() worked, but did the wrong thing.
* lua: fix format string in luaL_error()Gravatar wm42014-03-01
|
* client API: fix timeout handlingGravatar wm42014-03-01
| | | | | | (Again.) Fixed Lua timers as well.
* lua: fix use of renamed functionGravatar wm42014-03-01
| | | | Apparently this was overlooked when get_timer was renamed to get_time.
* timer: add utility function to get relative timeGravatar wm42014-02-28
|
* msg: add --msgtime option to add timestamps to each output messageGravatar wm42014-02-28
| | | | | | | Will be helpful to track down strange wait times and such issues, as well when you have develop something timing related. (Then you may print timestamps in your debug output, and the --msgtime timestamps will help giving context.)
* lua: add option to disable auto-loading of lua scriptsGravatar wm42014-02-28
|
* config: don't load global config files with --config-dirGravatar wm42014-02-28
| | | | This sidestepped the usual logic by hardcoding the path.
* config: fix --config-dir logic for global config filesGravatar wm42014-02-28
| | | | | Global config files should be loaded only when --no-config is missing _and_ --config-dir is not set.
* manpage: document properties added in previous commitGravatar wm42014-02-28
|
* client API: add two properties, 'time-start' and 'seekable'Gravatar xylosper2014-02-28
|
* client APIs: fix some typosGravatar xylosper2014-02-28
|
* audio: add enum name for speaker idGravatar xylosper2014-02-28
|
* manpage: lua: fix typoGravatar wm42014-02-28
|
* manpage: lua: update from previous commitGravatar wm42014-02-28
| | | | I forgot about this.
* client API: rename MPV_EVENT_PLAYBACK_START, add MPV_EVENT_SEEKGravatar wm42014-02-28
| | | | | | Rename MPV_EVENT_PLAYBACK_START to MPV_EVENT_FILE_LOADED. Add MPV_EVENT_SEEK and MPV_EVENT_PLAYBACK_RESTART.
* client API: wait for remaining asynchronous requests before terminatingGravatar wm42014-02-28
| | | | | | Sending an asynchronous request and then calling mpv_destroy() would crash the player when trying to send the reply to the removed client. Fix this by waiting until all remaining replies have been sent.
* ao: document some functionsGravatar wm42014-02-28
|
* DOCS: kill the rest of the old mplayer tech documentationGravatar wm42014-02-28
| | | | Not really useful anymore, other than confusing everyone.
* command: use the step size for "add volume" commandsGravatar wm42014-02-27
| | | | | | | | | | | | The step argument for "add volume <step>" was ignored until now. Fix it. There is one problem: by defualt, "add volume" should use the value set with --volstep. This value is 3 by default. Since the default volue for the step argument is always 1 (and we don't really want to make the generic code more complicated by introducing custom step sizes), we simply multiply the step argument with --volstep to keep it compatible. The --volstep option should probably be just removed in the future.
* command: format volume property as integer for OSDGravatar wm42014-02-27
| | | | | | | The value range is 0-100, so fractional values don't make much sense. But the underlying data type is probably float to avoid getting "stuck" when doing small volume increments. So step this around and pretend it's an integer just on display.
* vo_opengl: change gamma suboption to take a valueGravatar wm42014-02-27
| | | | | | | | | | | | The previous version of the gamma suboption was pretty useless. It could be used to disable delayed gamma enabling, which is a mechanism to avoid having to adjust gamma in the shader by default. Repurpose the suboption and allow setting an exact gamma value with it. You can already override gamma with the --gamma option as well as the gamma input property, but these use a weird curve to create the impression of a linear perceived brightness change when changing the value. This suboption now allows setting an exact gamma value.
* vo_opengl: Change the default icc-intent to relative colorimetricGravatar Niklas Haas2014-02-26
| | | | | | | | | | | | | | | | This used to be absolute colorimetric, but relative colorimetric is a saner default due to the arguments presented in issue #595. A short summary: In general it doesn't affect much because our eyes adapt to the white point either way, but if running in windowed mode it would make the whites seem inconsistent/tinted. For fullscreen projection it's also undesirable since it reduces the dynamic range without much benefit (again, since our eyes adapt either way) and it also breaks calibration against ambient lighting. This shouldn't change much, since most profile types that aren't 3DLUTs aren't capable of either of those transforms, and most displays are calibrated against D65 (same as BT.709 source) either way.
* lua: add set_property_native functionGravatar wm42014-02-26
| | | | | | Probably completely useless, at least for now. Also not very well tested, but initial test seems successful.
* lua: mark table values returned by get_property_native with their typeGravatar wm42014-02-26
| | | | | | | Lua doesn't distinguish between arrays and maps on the language level; there are just tables. Use metatables to mark these tables with their actual types. In particular, it allows distinguishing empty arrays from empty tables.
* m_option: make converting mpv_node to string always failGravatar wm42014-02-26
|
* lua: implement mp.get_opt() in LuaGravatar wm42014-02-26
| | | | | | Will be more expensive if used very often, but it's probably ok. Reduce the dependency of lua.c on MPContext a bit further.
* m_option: fix key/value list string conversionGravatar wm42014-02-26
| | | | Meh.
* client API: don't send MPV_EVENT_IDLE when not entering idle modeGravatar wm42014-02-26
| | | | | | For simplicity, this was sent before actually checking the idle condition, which meant that we'd send it even of the idle loop is never entered.
* threads: fix wait time overflow checkGravatar wm42014-02-26
| | | | | | | | | | | | | When passing a very large timeout to mpthread_cond_timed_wait(), the calculations could overflow, setting tv_sec to a negative value, and making the pthread_cond_timed_wait() call return immediately. This accidentally made Lua support poll and burn CPU for no reason. The existing overflow check was ineffective on 32 bit systems. tv_sec is usually a long, so adding INT_MAX to it will usually not overflow on 64 bit systems, but on 32 bit systems it's guaranteed to overflow. Simply fix by clamping against a relatively high value. This will work until 1 week before the UNIX time wraps around in 32 bits.
* client API: don't explode when destroying uninitialized mpv_handleGravatar wm42014-02-26
|
* client API: accept NULL as mpv_destroy() argumentGravatar wm42014-02-26
|
* options: fix --list-options outputGravatar wm42014-02-26
| | | | This was a bit damaged by commit f3c933e5.
* client API: treat MPV_FORMAT_STRING differently in mpv_set_propertyGravatar wm42014-02-26
| | | | | | | | | | | | | | Always map MPV_FORMAT_STRING to setting property value directly through M_PROPERTY_SET_STRING, instead of trying to go through M_PROPERTY_SET_NODE. This treats a direct MPV_FORMAT_STRING query differently from a MPV_FORMAT_STRING wrapped in a mpv_node. This was already the case in mpv_get_property(). The reason for all this is that mpv_node is supposed to be the exact type, while a direct MPV_FORMAT_STRING goes through all possible conversions. Not sure if these semantics are good.
* m_property: fix confused error codeGravatar wm42014-02-26
| | | | This broke the client API.
* m_option: don't make "unset" string and string list return NULL stringsGravatar wm42014-02-26
| | | | | | | | | | This is a bit weird: m_option_string types (i.e. char*) can be NULL. But they're supposed to be treated just like empty strings. So don't make the m_option_type.print function return NULL for these values. Returning NULL would mean failure. This didn't matter much before, but was quite visible through the client API.
* client API: fix broken property/option functionsGravatar xylosper2014-02-26
| | | | | | | | | | | | | | | | | | 1. Cannot set option after initialized: it seems that this bug has existed since libmpv was introduced first. Maybe just a typo. 2. Crash when setting property with native format: mpv_set_property just causes a crash when using a native format. I found an invalid casting and fixed it. 3. Wrong error value for mpv_get_property: when an error occurred, mpv_get_property always returns wrong format error because every error for property except M_PROPERTY_NOT_IMPLEMENTED is just ignored. Signed-off-by: wm4 <wm4@nowhere> Closes pull request #593. Does not incldue the first fix, which was not correct. The underlying bug will be fixed by a later commit. Commit message extracted from pull request and slightly edited.
* osd: override user bindings for OSC inputGravatar wm42014-02-26
| | | | | | | | | E.g. binding MOUSE_BTN0 always used the user defined binding. While it is ok that the user can override mouse_move and mouse_leave (for whatever reasons), we want to strictly override the bindings when input is sent to the OSC itself. Regression since 03624a1.
* options: allow changing options at runtimeGravatar wm42014-02-25
| | | | | Allow changing all options at runtime, except some cherry-picked options, which are disabled with M_OPT_FIXED.
* client API: change description of format conversionsGravatar wm42014-02-25
| | | | | | | This changed during the time between writing the comment, and finishing up the implementation. Although I'm still unsure about this.
* config: when writing resume config, read options, not propertiesGravatar wm42014-02-25
| | | | | | | | | | | This lowers the number of data stored in the resume config a bit further, because some properties can't be read at program start and when e.g. the VO wasn't created yet. Some fields still need to be read from a property (actually only "volume-restore-data", a hack to save the full volume information). So abuse the "options/" property, and make use of the fact that changing things at runtime also changes the options.
* config: don't save options to resume-config that didn't changeGravatar wm42014-02-25
| | | | | | | | | | | | | | | | This is approximate: we read each option value on program start (before starting playback of a file), and when writing the resume config, compare each value to the current state. This also means when a value is changed and then changed back, it's not stored. In particular, option values set in config files and on the command line are considered the default. This should help reducing the numbers of options overridden by the resume config. If too much is overridden, it becomes an inconvenience, because changes in config files will apparently have no effect when resuming a file. Also see github issue #574.
* input: allow input.conf bindings to be declared as builtinGravatar wm42014-02-25
| | | | | | This might be helpful if we ever want cascading config files. Also, we will probably need it if we change the default input.conf bindings, and want to provide compatibility input.conf files.
* config: always print resolved config paths in verbose modeGravatar wm42014-02-25
| | | | | Restructure the code to make that easier. There should be no functional changes, other than the log call at the end of each function.
* manpage: remove unused environment variableGravatar wm42014-02-25
| | | | We removed gettext (which was disabled by default) a while ago.