summaryrefslogtreecommitdiffstats
path: root/options/m_property.h
Commit message (Collapse)AuthorAgeFilesLines
* player: more option/property consistency fixeswm42016-09-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some properties had a different type from their equivalent options (such as mute, volume, deinterlace, edition). This wasn't really sane, as raw option values should be always within their bounds. On the other hand, these properties use a different type to reflect runtime limits (such as range of available editions), or simply to improve the "UI" (you don't want to cycle throuhg the completely useless "auto" value when cycling the "mute" property). Handle this by making them always return the option type, but also allowing them to provide a "constricted" type, which is used for UI purposes. All M_PROPERTY_GET_CONSTRICTED_TYPE changes are related to this. One consequence is that you can set the volume property to arbitrary high values just like with the --volume option, but using the "add" command it still restricts it to the --volume-max range. Also deprecate --chapter, as it is grossly incompatible to the chapter property. We pondered renaming it to --chapters, or introducing a more powerful --range option, but concluded that --start --end is actually enough. These changes appear to take care of the last gross property/option incompatibilities, although there might still be a few lurking.
* command: add options to property listwm42016-09-011-0/+3
| | | | | | | | | | | Now options are accessible through the property list as well, which unifies them to a degree. Not all options support runtime changes (meaning affected components need to be restarted for the options to take effects). Remove from the manpage those properties which are cleanly mapped to options anyway. From the user-perspective they're just options available through the property interface.
* vo_opengl: refactor performance data propertiesNiklas Haas2016-06-081-0/+2
| | | | | | | | | | | | | | | Instead of having 9 different properties, requiring 18 different VOCTRLs to read them all, they are now exposed as a single property. This is not only cleaner (since they're all together) but also allows querying all 9 of them with only a single VOCTRL (by using mp.get_property_native). (The extra factor of 2 was due to an extra query being needed to get the type, which is now also unnecessary) This makes it much easier to access performance metrics from within a lua script, and also makes it easier to just show a readable, formatted version via show-text.
* Various spelling fixesMarcin Kurczewski2015-06-181-1/+1
| | | | Signed-off-by: wm4 <wm4@nowhere>
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* command: export some option metadatawm42014-11-131-0/+2
| | | | | | | 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 flexiblewm42014-11-131-5/+5
| | | | | This makes it work with all kind of types, instead of just some simple ones.
* command: redo the property typewm42014-06-131-15/+20
| | | | | | | | | | | | | | | | | | | | | | | Instead of absuing m_option to store the property list, introduce a separate type for properties. m_option is still used to handle data types. The property declaration itself now never contains the option type, and instead it's always queried with M_PROPERTY_GET_TYPE. (This was already done with some properties, now all properties use it.) This also fixes that the function signatures did not match the function type with which these functions were called. They were called as: int (*)(const m_option_t*, int, void*, void*) but the actual function signatures were: int (*)(m_option_t*, int, void*, MPContext *) Two arguments were mismatched. This adds one line per property implementation. With additional the reordering of the parameters, this makes most of the changes in this commit.
* player: show "neutral" position markers for OSD barswm42014-06-081-0/+5
| | | | This commit implements them for volume and some video properties.
* command: add helper function to split property pathswm42014-03-301-0/+6
| | | | | | We've just checked whether a sub-path started with "name/", but that changes behavior whether the property name has a trailing '/' or not. Using a helper function to split of path components avoids this problem.
* m_property: add mechanism to access properties as mpv_nodewm42014-02-241-0/+11
| | | | | | | | Allows retrieving properties by their native values (or something close to it), rather than having to go through string conversion. The caller could actually just copy the value itself and then use the m_option functions to convert it to mpv_node, but maybe it's more flexible this way.
* m_property: add a mechanism to organize a list of sub-propertieswm42014-02-161-0/+12
| | | | | This automatically adds a "count" sub-property, and for each entry in the range [0, count), a numbered sub-property to access the item.
* m_property: add a sub-property mechanismwm42014-02-161-1/+27
| | | | | | | This adds a mechanism for easier export of sub-properties. The following commits will make use of it to export fine grained information about certain things. The sub-property mechanism reduces the amount of code needed to export a data value to 1 line.
* m_property: mp_msg conversionswm42013-12-211-3/+5
| | | | | Includes some semi-crappy hacks to avoid changing too much code for this conversion (allowing NULL log argument for m_property_do()).
* Move options/config related files from mpvcore/ to options/wm42013-12-171-0/+142
Since m_option.h and options.h are extremely often included, a lot of files have to be changed. Moving path.c/h to options/ is a bit questionable, but since this is mainly about access to config files (which are also handled in options/), it's probably ok.