summaryrefslogtreecommitdiffstats
path: root/player/configfiles.c
Commit message (Collapse)AuthorAgeFilesLines
* player: change default section when loading encoding-profiles.confwm42017-07-121-3/+3
| | | | | | | It used to use the "encoding" section. Change this to the default section to remove another small special case. encoding-profiles.conf didn't use this by default anyway. The previous revert could mitigate potential impacts of this a little.
* Revert "player: always load encoding-profiles.conf"wm42017-07-121-3/+3
| | | | | | | | | | This reverts commit 0dcb51c7fa2c676ec30f2bac216f904dfc4ffa6f. I randomly decided that this was better. It can be re-applied once it actually becomes necessary in some way. Note that this worked fine. My main gripe with this is that it can spam the log file with encoding stuff even if playback mode is used.
* player: document where the magic "encoding" section name is usedwm42017-06-261-0/+1
|
* player: always load encoding-profiles.confwm42017-06-261-3/+3
| | | | | | | | | | | This makes things like --show-profile=enc-v-h264 just work again. Currently I don't see a reason why we should not always load the encoding profiles. Although I guess this used to be different in the past. (It probably won't take long until I revert this again - seems like a fight you can't win for some reason.) Fixes #4551.
* player: change license of most core files to LGPLwm42017-06-231-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These files have all in common that they were fully or mostly taken from mplayer.c. (mplayer.c was a huge file that contains almost all of the playback core, until it was split into multiple parts.) This was probably the hardest part to relicense, because so much code was moved around all the time. player/audio.c still does not compile. We'll have to redo audio filtering. Once that is done, we can probably actually provide an actual LGPL configure switch. Here is a relatively detailed list of potential issues: 8d190244: author did not reply, parts were made GPL-only in a previous commit. 7882ea9b: author could not be reached, but the code is gone. wscript still has --datadir switch, but I don't think this is relevant to copyright. f197efd5: unclear origin, but I consider the code gone anyway (replaced with generic OSD mechanisms). 8337d9c2: author did not reply, but only the option still exists (under a different name), other code was removed. d8fd7131: did not reply. Disabled in a previous commit. 05258251: same author as above. Both fields actually seem to have vanished (even when tracking renames), so no action taken. d459e644, 268b2c1a: author did not reply, but we reuse only the options (with different names and slightly or fully different semantics, and completely different implementations), so I don't think this is relevant for copyright. 09e742fe, 17c39c4e: same as above. e8a173de, bff4b3ee: author could not be reached. The commands were reworked to properties, and the code outside of the TV code were moved back to the TV code. So I don't think copyright applies to the current command.c parts (mp_property_tv_color, mp_property_tv_freq, mp_property_tv_scan). The TV parts remain GPL. 0810e427: could not be reached. Disabled in a previous commit. 43744a2d: unknown author, but this was replaced by dynamic alloc (if the change is even copyrightable). 116ca0c7: unknown author; reasoning see input.c relicensing commit. e7e4d1d8: these semantics still exist, but as generic code, and this code was fully removed. f1175cd9: the author of the cited patch is unknown, and upon inspection it turns out that I was only using the idea to pause the player on EOF, so I claim it's not copyright relevant. 25affdcc: author could not be reached (yet) - but it's only a function rename, not copyrightable. 5728504c was committed by Arpi (who agreed), but hints that it might be by a different author. In fact it seems to be mostly this patch: http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2001-November/002041.html The author did not respond, but it all seems to have been removed later. It's a terrible mess though. Arpi reverted the A-V sync code at first, but left the RTC code for a while. The following commits remove these changes 100%: 14b35442, 7181a091, 31482783, 614f8475, df58e822. cehoyos did explicitly not agree to LGPL, but was involved in the following changes: c99d8fc8: applied a patch and didn't modify it, the original author agreed. 40ac0d31: author could not be reached, but all code is gone anyway. The "af" command has a similar function, but works completely different and actually reuses a mechanism older than this patch. 54350436: applied a patch, but didn't modify it, except for adding a German translation, which was removed later. a2dda036: same situation as above 240b743e: this was made GPL-only in a previous commit 7b25afd7: same as above (for now) kirijua could not be reached, but was a regular patch contributor: c2c997fd: video equalizer code move; probably not copyrightable. Is GPL due to Nick anyway. be54f481: technically, this became the audio track property later. But all what is left is the fact that you pass a track ID to it, so consider the original coypright non-relevant. 2f376d1b: this was rewritten in b7052b43, but for now we can afford to be careful, so this was marked as GPL only in a previous commit. 43844d09: remaining parts in main.c were reverted in a previous commit. anders has mostly disagreed with the LGPL relicensing. Does not want libaf to become LGPL, but made some concessions. In particular, he granted us permission to relicense 4943e9c52c and 242aa6ebd4. We also consider some of his changes remaining in mpv not relevant for copyright (such as 735de602 - we won't remove the this option completely). We will completely remove his other contributions, including the entire audio filter chain. For now, this stuff is marked as GPL only. The remaining question is how much code in player/audio.c (based on the former mplayer.c and dec_audio.c) is under his copyright. I made claims about this in a previous commit. Nick(ols) Kurshev, svn username "nick" and "nickols_k", could not be reached. He had a lot of changes in early MPlayer. It seems all of that was removed, at least in mpv. His main work, like VIDIX or libswscale work, does not exist in mpv anymore, but the changes to mplayer.c and other core parts still deserve attention: a4119f6b, fb927549, ad3529b8, e11b23dc, 5f2178be, 93c371d5: removed in b43d67e0, d1628d12, 24ed01fe, df58e822. 0a83c6ec, 104c125e, 4e067f62, aec5dcc8, b587a3d6, f3de6e6b: DR, VAA, and "tune" stuff was fully removed later on or replaced with other mechanisms. 340183b0: screenshots were redone later (the VOCTRL was even removed, with an independent implementation using the same VOCTRL a few years later), so not relevant anymore. Basically only the 's' shortcut remains (but not its implementation). 92c5c274, bffd4007, 555c6766: for now marked as GPL only in a previous commit. Might contain some trace amounts of "michael"'s copyright, who agreed to LGPL only once the core is relicensed. This will still be respected, but I don't think it matters at this in this case. (Some code touched by him was merged into mplayer.c, and then disappeared after heavy refactoring.) I tried to be as careful and as complete as possible. It can't be excluded that amends to this will be made later. This does not make the player LGPL yet.
* options: another missed --sub-ass-style-override usewm42017-06-071-1/+1
| | | | Dammit.
* player: fix potential segfault when playing dvd:// with DVD disabledwm42017-05-011-1/+1
| | | | | | | Tries to access the options, which are obviously not allocated if there is no DVD support compiled. Fixes #4393.
* player: fix previous commitwm42016-10-031-3/+3
| | | | ...
* player: remove some explicit options accesses when saving resume filewm42016-09-221-29/+26
| | | | | | | | | | | | | Basically, make use of all the new code. Unfortunately, the new code and it's "compromise semantics" with the old behavior before the options/properties merge bites back: this vid/aid/sid, deinterlace, and video-aspect properties have neutral default settings (such as "auto"), but return the current value during playback, so we would unnecessarily force this value when playback is resumed. So leave those as they are. Also, the colormatrix options were removed a long time ago.
* player: some M_SETOPT_RUNTIME cleanupswm42016-09-221-1/+2
| | | | | | | | | Add this flag where needed. You shouldn't be able to set e.g. config-dir in these situations. Remove the mpctx->initialized check from the property/option bridge, since it's in use strictly only after initialization. Likewise, the apply-profile command doesn't need to check this.
* player: add --watch-later-directory optionDavid Logie2016-09-221-2/+10
| | | | | | | This option allows the user to set the directory where "watch later" files are stored. Signed-off-by: wm4 <wm4@nowhere>
* player: Save sub-speed value when resuming playbackVladimir Panteleev2016-09-131-0/+1
|
* stream_dvd, stream_dvdnav: remove weird option parsing stuffwm42016-09-081-2/+2
| | | | | | Same deal as with stream_bluray. Untested because I don't give a fuck about your shitty DVDs.
* config: deprecate ao and vo auto-profileswm42016-09-031-0/+2
| | | | | | | | | These never made any sense. They checked the --vo/--ao option, and applied the profile corresponding to the first entry. So the only way to get any use of those was to use the --ao or --vo option explicitly. You can get the same functionality by making a manual profile, making these force the ao/vo, and then using --profile on command line instead of --vo/--ao.
* options: make mp_vo_opts options an actual sub-option groupwm42016-08-301-2/+2
| | | | | | | | | | | Just a minor refactor along the planned option change. This commit will make it easier to update (i.e. copy) the VO options without copying _all_ options. For now, behavior should be equivalent, though. (The VO options were put into a separate struct quite early - when all global variables were removed from the source code. It wasn't clear whether the separate struct would have any actual purpose, but it seems it will now. Awesome, huh.)
* audio: drop --softvol=no and --softvol=autowm42016-07-091-1/+2
| | | | | | | | | | | | | | Drop the code for switching the volume options and properties between af_volume and AO volume controls. interface-changes.rst mentions the changes in detail. Do this because this was exceedingly complex and had other problems as well. It was also very hard to test. It's just not worth the trouble. Some leftovers like AOCONTROL_HAS_PER_APP_VOLUME will be removed at a later point. Fixes #3322.
* mpv_talloc.h: rename from talloc.hDmitrij D. Czarkoff2016-01-111-1/+1
| | | | This change helps avoiding conflict with talloc.h from libtalloc.
* player: make watch later/resume work when "playing" directorieswm42016-01-061-9/+61
| | | | | | | | | | | | | | If you do "mpv /bla/", and then branch out into sub-directories using playlist navigation, and then used quit and watch later, then playing the same directory did not resume from the previous point. This was because resuming is based on the path hash, so a path prefix can't be detected when resuming the parent directory. Solve this by writing each path prefix when playing directories is involved. (This includes all parent paths, so interestingly, "mpv /" would also resume in the above example.) Something like this was requested multiple times, and I want it too.
* command: make time properties unavailable if timestamp is unknownwm42015-10-161-5/+3
| | | | | | Let's hope this doesn't confuse client API users too much. It's still the best solution to get rid of corner cases where it actually return the wrong timestamp on start, and then suddenly jump.
* options: fix --no-configwm42015-09-051-2/+0
| | | | | | | | | | | | | | | | | | This was completely broken. It was checked manually in some config loading paths, so it appeared to work. But the intention was always to completely disable reading from the normal config dir. This logic was broken in commit 2263f37d. The manual checks are actually redundant, and are not needed if --no-config is implemented properly - remove them. Additionally, the change to load the libmpv defaults from an embedded profile also failed to set "config=no". The option is marked as not being settable by a config file, and the libmpv default profile is parsed as a config file, so this option was rejected. Fix it by removing the CONF_NOCFG flag. (Alternatively, m_config_set_profile() could be changed not to set the "config file" flag by default, but I'm not bothering with this.)
* player: restore video-aspect on playback resumewm42015-05-291-0/+1
|
* player: reuse a functionwm42015-05-091-5/+1
| | | | | This has the side-effect that now all encoding-profiles.conf files are loaded. It's not clear if not doing this was intended or not.
* player: make resuming playlists less noisy in verbose modewm42015-05-091-13/+13
| | | | | | | | | | | | | | | | | | | mp_find_config_file() will print the filename lookup and its result in verbose mode. This is wanted, but gets inconvenient when it is done for every playlist entry (for resuming). Lookup the watch_later subdir only once and cache the result instead. This drops the logic for loading the resume file from other locations, which should generally be unnecessary, though might lead to confusion if the user has mixed old and new config paths (which the user shouldn't). Also add a mp_find_user_config_file() function for a more straightforward and reliable way to get actual local configpaths, instead of possibly global and unwritable locations. Also, for symmetry, check the resume option in mp_load_playback_resume() just like mp_check_playlist_resume() does.
* player: avoid undefined behavior when resumign DVD/BD playbackwm42015-05-091-3/+3
| | | | These device options can be NULL, and NULL can't be passed for %s.
* path: make mp_path_join accept normal C stringswm42015-05-091-2/+2
| | | | | Instead of bstr. Most callers of this function do not need bstr. The bstr version of this function is now mp_path_join_bstr().
* m_config: make m_config_set_profile() use a namewm42015-05-071-2/+2
| | | | Is simpler and avoids exposing profile structs to a degree.
* player: do not load encoding config files in non-encoding modewm42015-04-211-8/+6
| | | | | | | | It's annoying and unnecessary. They can be manually loaded if really needed (for things like previewing). Also remove the #if. It was for suppressing warnings, and we don't need to be so careful about this in the relatively obscure encoding mode.
* Update license headersMarcin Kurczewski2015-04-131-5/+4
| | | | Signed-off-by: wm4 <wm4@nowhere>
* player: fix seekability testwm42015-03-201-1/+1
| | | | | Commit 39ed9b7d9 got this wrong, because these shitty flags are so goddamn confusing.
* player: refuse to write resume file with unseekable fileswm42015-03-181-0/+6
| | | | | | | In fact this should happen on resume, not on saving, but it's simpler this way. Fixes #1701.
* sub: mess with styling defaults, change --ass-use-margins behaviorwm42015-02-161-1/+2
| | | | | | | | | | | | | | | | | | | Now --ass-use-margins doesn't apply to normal subtitles anymore. This is probably the inverse from the mpv behavior users expected so far, and thus a breaking change, so rename the option, that the user at least has a chance to lookup the option and decide whether the new behavior is wanted or not. The basic idea here is: - plain text subtitles should have a certain useful defalt behavior, like actually using margins - ASS subtitles should never be broken by default - ASS subtitles should look and behave like plaintext subtitles if the --ass-style-override=force option is used This also subtly changes --sub-scale-with-window and adds the --ass- scale-with-window option. Since this one isn't so important, don't bother with compatibility.
* osxbundle: config file special case isn't needed anymorewm42015-02-151-6/+0
| | | | | | The previous commit effectively fixes the mess caused by 'config' vs. 'mpv.conf', and the hack introduced by commit e01a6dac and extended by commit db167cd4 isn't needed anymore.
* player: undeprecate 'config' fileswm42015-02-151-22/+5
| | | | | | | Actually, it's pretty simple to look for multiple filenames at once, since mp_find_all_config_files() is already a bit "special" anyway. See #1569. Reverts most of commit db167cd4 (keeps osx-bundle.conf).
* Fix build on OSX broken by previous commitwm42015-02-131-1/+1
| | | | Hopefully.
* player: deprecate 'config' files (use mpv.conf), warn against clasheswm42015-02-131-5/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | Apparently there's at least one distro which ships a /etc/mpv/mpv.conf file (mpv doesn't install such a file). This breaks config files named 'config' located in the user's mpv config directory, because mpv first loads files named 'config' and then 'mpv.conf'. There is no mechanism for putting files with different names into the same config path order. (Even worse, that mpv.conf file only set an option to the default value. Why do distros always do very stupid things?) Print a warning on collisions. Although using 'config' was well-supported, supporting both names is starting to become messy, so deprecate 'config' and print a warning if one is found. At least we will be able to remove the whole mess once 'config' files are ignored... This also affects the osx-bundle, which intentionally used these not-so- optimal semantics. Solve it in a different way. (Unfortunately with an ifdef - it's not required, but having to explain everyone why mpv tries to load a osx-bundle.mpv file on Linux and Windows would consume energy.) Closes #1569.
* options: add option for ignoring patch in resume mechanismwm42014-12-131-4/+8
| | | | | | Whatever. Fixes #1281.
* player: restore ab-loop settings with playback resumewm42014-12-091-0/+2
| | | | Fixes #1324.
* Remove some superfluous NULL checkswm42014-11-211-1/+1
| | | | | | | | In all of these situations, NULL is logically not allowed, making the checks redundant. Coverity complained about accessing the pointers before checking them for NULL later.
* options: don't load per-file config files by defaultwm42014-10-171-11/+11
| | | | | | Generally useless feature, and might be slightly dangerous if paths can "escape" from the profile dir. (Normally this shouldn't be possible, though.)
* player: quote %-starting stringsshdown2014-10-161-0/+2
| | | | | Leading percent sign is a quote indicator so it needs to be quoted itself.
* player: don't let multiline filenames set options on resumewm42014-09-161-4/+7
| | | | | | | | | | | | | | | | | If --write-filename-in-watch-later-config is used, and the filename contains newline characters (as generally allowed on Unix), then the newline will be written to the resume file literally, and the parts after the newline character are interpreted as options. This is possibly security relevant. Change newline characters (and in fact any other special characters) to '_'. Reported as #1099 (this commit is a reimplementation of the proposed pull request). CC: @mpv-player/stable
* player: check for null in resume config searchJames Ross-Gowan2014-09-051-1/+2
| | | | | | Signed-off-by: wm4 <wm4@nowhere> CC: @mpv-player/stable
* Revert "Remove DVD and Bluray support"wm42014-07-151-0/+6
| | | | | | This reverts commit 4b93210e0c244a65ef10a566abed2ad25ecaf9a1. *shrug*
* Remove DVD and Bluray supportwm42014-07-141-6/+0
| | | | It never worked well. Just remux your DVD and BD images to mkv.
* Audit and replace all ctype.h useswm42014-07-011-2/+2
| | | | | | | | | | | | | | | | Something like "char *s = ...; isdigit(s[0]);" triggers undefined behavior, because char can be signed, and thus s[0] can be a negative value. The is*() functions require unsigned char _or_ EOF. EOF is a special value outside of unsigned char range, thus the argument to the is*() functions can't be a char. This undefined behavior can actually trigger crashes if the implementation of these functions e.g. uses lookup tables, which are then indexed with out-of-range values. Replace all <ctype.h> uses with our own custom mp_is*() functions added with misc/ctype.h. As a bonus, these functions are locale-independent. (Although currently, we _require_ C locale for other reasons.)
* config, player: avoid some temporary talloc contextswm42014-06-261-15/+10
| | | | | IMO a semi-bad concept, that the mpv code unfortunately uses way too much.
* player: create config dir if it doesn't existwm42014-06-261-0/+2
| | | | | | | This was dropped in the commit adding XDG support, probably accidentally. Also normalize some whitespace.
* player: remove some minor code duplication in config loader codewm42014-06-261-18/+14
| | | | | | | It's better to keep the logic in one place. Also drop that a broken config file aborts loading of the player. I don't see much reason for this, and it inflates the code slightly.
* Basic xdg directory implementationKenneth Zhou2014-06-261-14/+19
| | | | | | | | | | Search $XDG_CONFIG_HOME and $XDG_CONFIG_DIRS for config files. This also negates the need to have separate user and global variants of mp_find_config_file() Closes #864, #109. Signed-off-by: wm4 <wm4@nowhere>
* encode: make option struct localwm42014-06-111-1/+3
| | | | Similar to previous commits.
* Add more constwm42014-06-111-1/+1
| | | | | | | While I'm not very fond of "const", it's important for declarations (it decides whether a symbol is emitted in a read-only or read/write section). Fix all these cases, so we have writeable global data only when we really need.
* stream_dvd, stream_dvdnav, stream_bluray: remove global option variableswm42014-06-111-6/+4
|
* player: write file name to the watch later config fileAlessandro Ghedini2014-06-011-0/+2
| | | | | |