summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* ao_rsound: fix compilationwm42016-09-071-1/+1
| | | | Probably fixes #3501.
* sub: fix previous commit with older libass releaseswm42016-09-071-0/+2
|
* sub: actually apply text alignment options to non-ASS subtitleswm42016-09-071-0/+2
| | | | | | | | | | | This is a bug fix, and the text alignment functionality probably got lost sometime along the way. For ASS subtitles, this could have unintended consequences, so it's hard to get right - thus it's not applied to ASS subtitles. For other text subtitles, this should be fine, though. It still works on ASS subtitles as promised by the manpage if --no-sub-ass is used.
* manpage: remove more references to deprecated sub-option syntaxwm42016-09-075-72/+54
| | | | Fixes #3497.
* ao_pcm: remove some useless messageswm42016-09-071-2/+0
| | | | | | The first one is printed even if the user disabled video (or there's no video), so just remove it. The second one uses deprecated sub-option syntax, so remove that as well.
* osdep: rename atomics.h to atomic.hwm42016-09-0716-17/+16
| | | | | The standard header is stdatomic.h, so the extra "s" freaks me out every time I look at it.
* atomics: readd some emulationwm42016-09-063-2/+53
| | | | | | | | | | | This time it's emulation that's supposed to work (not just dummied out). Unlike the previous emulation, no mpv code has to be disabled, and everything should work (albeit possibly a bit slowly). On the other hand, it's not possible to implement this kind of emulation without compiler support. We use GNU statement expressions and __typeof__ in this case. This code is inactive if stdatomic.h is available.
* DOCS/interface-changes.rst: list exact sub-option replacementswm42016-09-061-0/+2
| | | | | Actually, only link to a wiki page doing that, because these are too many options.
* demux: do not access global optionswm42016-09-0613-168/+241
| | | | | | | | | | | | | | | | | Don't access MPOpts directly, and always use the new m_config.h functions for accessing them in a thread-safe way. The goal is eventually removing the mpv_global.opts field, and the demuxer/stream-layer specific hack that copies MPOpts to deal with thread-safety issues. This moves around a lot of options. For one, we often change the physical storage location of options to make them more localized, but these changes are not user-visible (or should not be). For shared options on the other hand it's better to do messy direct access, which is worrying as in that somehow renaming an option or changing its type would break code reading them manually, without causing a compilation error.
* input, demux_tv: remove some older option access methodswm42016-09-062-7/+8
|
* demux_mkv: don't crash if --ordered-chapters-files failswm42016-09-061-1/+1
| | | | It just crashed.
* vo_vdpau: rename some sub-optionswm42016-09-062-5/+8
| | | | | Since the sub-options have been deprecated very recently, and are redirected to global options, we don't need to document this change.
* common: use char array for version stringwm42016-09-062-4/+4
| | | | | Use a char array instead of a pointer, which allows using the version variables in a constant context.
* vo_opengl: simplify option handlingwm42016-09-063-45/+37
| | | | | | | | | | | | | Instead of copying the options around... just don't. video.c now has full control over when options are updated. (It still gets notified from outside, but it decides when the updated options are copied: when m_config_cache_update() is called.) So there's no need for tricky stuff, and it can be simplified a bit. Also change lcms.c. We could do it like video.c, and get the options from the global config store. But it seems simpler to just provide a pointer to an option struct, which is arbitrarily mutated from the outside (from the perspective of lcms.c).
* vo_opengl: fix --icc-profile initial behaviorwm42016-09-061-0/+1
| | | | | | | | | Setting --icc-profile had no effect, until a vo_opengl option was changed at runtime. We must initialize the renderer for the initial option state too. For some reason, the ICC profile gets loaded twice. The next commit happens to fix this.
* wscript: fix typopavelxdd2016-09-061-1/+1
|
* m_config: avoid accidentally causing deprecation warningswm42016-09-051-41/+52
| | | | | | | | | It has to copy each option, whether it's deprecated or not. This would print a warning on every deprecated sub-option, even if it's not used. Yep, this is very stupid. At least m_config_get_co() gets actually slightly cleaner, because it separates the search and the deprecation handling.
* audio/out: deprecate "exclusive" sub-optionswm42016-09-059-2/+29
| | | | | | | And introduce a global option which does this. Or more precisely, this deprecates the global wasapi and coreaudio options, and adds a new one that merges their functionality. (Due to the way the sub-option deprecation mechanism works, this is simpler.)
* audio/out: deprecate device sub-optionswm42016-09-0511-24/+32
| | | | | We have --audio-device, which can force the device. Also add something describing to this extent to the manpage.
* options: deprecate suboptions for the remaining AO/VOswm42016-09-0523-74/+136
|
* options: add automagic hack for handling sub-option deprecationswm42016-09-056-5/+60
| | | | | | | | | | | | | | | | | I decided that it's too much work to convert all the VO/AOs to the new option system manually at once. So here's a shitty hack instead, which achieves almost the same thing. (The only user-visible difference is that e.g. --vo=name:help will list the sub-options normally, instead of showing them as deprecation placeholders. Also, the sub-option parser will verify each option normally, instead of deferring to the global option parser.) Another advantage is that once we drop the deprecated options, converting the remaining things will be easier, because we obviously don't need to add the compatibility hacks. Using this mechanism is separate in the next commit to keep the diff noise down.
* vo_direct3d: deprecate direct3d_shaders aliaswm42016-09-054-32/+13
| | | | | And remove the difference between the aliases. This is needed to make the sub-option changes less painful.
* vo_image: move to global optionswm42016-09-055-37/+72
| | | | | This is a bit "special", because the config tree wants unique m_sub_options pointers in the whole thing.
* ao_jack: move to global optionswm42016-09-052-28/+50
|
* options: add a mechanism to make sub-option replacement slightly easierwm42016-09-0511-16/+33
| | | | | | | | Instead of requiring each VO or AO to manually add members to MPOpts and the global option table, make it possible to register them automatically via vo_driver/ao_driver.global_opts members. This avoids modifying options.c/options.h every time, including having to duplicate the exact ifdeffery used to enable a driver.
* m_config: move parts of m_config_add_option into its own functionwm42016-09-051-26/+36
| | | | Preparation for the next commit.
* dispatch: improve recent locking changes slightlywm42016-09-051-14/+20
| | | | | | | | | | | | | | Instead of adding a lock_frame to the list when mp_dispatch_lock() is called, just set a simple flag. This uses the fact that the lock is not recursive, and can happen once per mp_dispatch_queue_process(). It avoids the dynamic allocation, and makes error checking slightly stricter. Again, this is actually redundant and exists only for error-checking. It'd actually need only a counter, because the actual locking is done by "parking" the target thread in mp_dispatch_queue_process() and then setting queue->idling=false. Only when mp_dispatch_unlock() sets it to true again other work can proceed again. Document this too.
* dispatch: redo locking, and allow reentrant processingwm42016-09-041-70/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | A deadlock bug was reported with the following test program: mpv_handle *mpv = mpv_create(); mpv_set_option_string(mpv, "ytdl", "yes"); mpv_initialize(mpv); mpv_terminate_destroy(mpv); The cause of this is loading the ytdl.lua script, which triggers a certain code path that calls mp_dispatch_queue_process() recursively. It does so to wait until the script is loaded, and we want to keep that. Reentrancy was not supported by mp_dispatch, which leads to the deadlock. Rewrite the locking so that it does. We mainly get rid of the "exclusive_lock" mutex. Instead we use the existing lock/condition variable to wait until we can grab a logical lock. Note that the lock_frame business can be replaced with a simple counter. Instead of checking the lock_frame address, it'd simply increment and store the counter when entering mp_dispatch_queue_process(), and then compare the counter to decide whether or not to wait. But I think the additional error checking done by the lock_frame list is valuable. Fixes #3489.
* client API: implement mpv_suspend/resume slightly differentlywm42016-09-045-10/+20
| | | | | | | | Why do these API calls even still exist? I don't know, and maybe they don't make any sense anymore. But whether they should be removed or not is not a decision I want to make now. I want to get rid of mp_dispatch_suspend/resume(), though. So implement the client APIs slightly differently.
* travis: trigger website rebuild only on docs changesRicardo Constantino2016-09-041-0/+5
|
* travis: rebuild website for updated docs on pushStefano Pigozzi2016-09-042-0/+27
|
* client API: more option/property updateswm42016-09-031-2/+11
|
* sd_lavc: enable teletextwm42016-09-034-0/+18
| | | | | | | | | | | | Whitelisting supported codecs is (probably) still better than just allowing everything, given the weird FFmpeg API. I'm also assuming Libav doesn't even have the codec ID, but I didn't check. Also add a --teletext-page option, since otherwise it decodes every teletext page and shows them in succession. And yes, we can't use av_opt_set_int() - instead we have to set it as string. Because FFmpeg's option system is terrible.
* command: try selecting the next track if track switching failswm42016-09-031-3/+4
| | | | | | | | | | | | This affects the "cycle" command. If we switched to the next track, and it failed to initialize, we just deselected everything. Change it so that if initialization fails early (typically decoder selection), we try to continue with the track after that. (Even if nothing can be selected, the loop will terminate when trying to select nothing. Fixes #3446.
* player: remove opengl-es=no flag from opengl-hq profilewm42016-09-031-1/+0
| | | | | | | | This was mistakenly added. It was removed from the vo_opengl_hq defaults at an earlier time, but the documentation was not updated, which is why it made it back into the profile. Fixes #3485.
* manpage: document another option/property inconsistencewm42016-09-031-0/+13
|
* config: deprecate ao and vo auto-profileswm42016-09-032-0/+3
| | | | | | | | | 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.
* manpage: mention how to apply/view opengl-hq profilewm42016-09-021-1/+2
|
* ao_alsa: change sub-options to global optionswm42016-09-028-99/+117
| | | | | | Same deal as with vo_opengl. Also edit the outdated information about multichannel output a little.
* config: allow profile forward-references in default profilewm42016-09-023-10/+19
| | | | | | | | This works by first parsing a config file into the default profile, and applying it once parsing the whole file is finished. This won't work across config files (not even if you include other config files via "include=file.conf").
* m_config: make sure profile values are never NULLwm42016-09-021-5/+4
| | | | | | | | | | Apparently this was supposed to be handled - but badly at best. Make unset values always have the value "" instead of NULL to avoid special-cases. In particular, this fixes passing NULL to a %s format specifier to printf in show_profile(). Glibc prints this as "(null)", but it's undefined behavior, and other libcs can crash.
* w32_common: initialize playback status as soon as possiblewm42016-09-021-16/+25
| | | | | | | | On a VOCTRL_UPDATE_PLAYBACK_STATE store the state, and use it to initialize the next time the task list becomes available. This actually fixes #3482. Revert commit f2e25e9e because it's not needed anymore.
* command: remove vo-cmdlinewm42016-09-026-26/+2
| | | | | | With the recent vo_opengl changes it doesn't do anything anymore. I don't think a deprecation period is necessary, because the command was always marked as experimental.
* options: deprecate --vo-defaultswm42016-09-024-10/+15
| | | | | | With the conversion from sub-options to global options, this becomes useless. This change also comes slightly too soon, because not all VOs have been changed yet.
* vo_opengl: deprecate sub-options, add them as global optionswm42016-09-0217-1101/+1139
| | | | | | | | | | | | | | | | | | | | | | | | vo_opengl sub-option were always rather annoying to handle. It seems better to make them global options instead. This is simpler and easier to use. The only disadvantage we are aware of is that it's not clear that many/all of these new global options work with vo_opengl only. --vo=opengl-hq is also deprecated. There is extensive compatibility with the old behavior. One exception is that --vo-defaults will not apply to opengl-hq (though with opengl it still works). vo-cmdline is also dysfunctional and will be removed in a following commit. These changes also affect opengl-cb. The update mechanism is still rather inefficient: it requires syncing with the VO after each option change, rather than batching updates. There's also no granularity (video.c just updates "everything", and if auto-ICC profiles are enabled, vo_opengl.c will fetch them on each update). Most of the manpage changes were done by Niklas Haas <git@haasn.xyz>.
* vo_opengl: rename 3dlut-size to icc-3dlut-sizewm42016-09-021-1/+2
| | | | | Not documenting this yet, because a later commit will change all the options anyway.
* m_config: add some convenience functionswm42016-09-022-0/+35
| | | | To be used by the following commits.
* vo: use new option update mechanismwm42016-09-025-4/+25
| | | | | | | | | | | | | | | | This is still rather basic. run_reconfig() and run_control() update the options because it's needed for panscan (and other video scaling options), and fullscreen, border, ontop updates. In the old model, these options could be accessed only while both playback thread and VO threads were locked (i.e. during synchronous calls like vo_control()), so this should be sufficient in order not to miss any updates. In the future, a more fine-grained update mechanism could be added to handle these updates "exactly". x11_common.c contains an evil hack, as I see no reasonable way to handle this properly. The VO thread can't "lock" the main thread, so this is not simple.
* m_config: introduce basic mechanism to synchronize global option updateswm42016-09-025-5/+264
| | | | | | | | | | | | | | | | | | The way option runtime changes are handled is pretty bad in the current codebase. There's a big option struct (MPOpts), which contains almost everything, and for which no synchronization mechanism exists. This was handled by either making some options read-only after initialization, duplicating the option struct, using sub-options (in the VO), and so on. Introduce a mechanism that creates a copy of the global options (or parts of it), and provides a well-defined way to update them in a thread-safe way. Most code can remain the same, just that all the component glue code has to explicitly make use of it first. There is still lots of room for improvement. For example, the update mechanism could be better.
* player: don't send win32 taskbar update before window is createdwm42016-09-021-1/+1
| | | | | | | | | | | | | | | | | | If the win32 taskbar progress update is sent before the VO window is created, then w32_common.c will ignore it because the actual taskbar object was not created yet. (At least this is what I suspect happens. The window is already created at this point, but not mapped.) Hopefully fix this is fixed by creating until after the window is created, i.e. the VO has been configured at least once. Untested (who wants to boot into Windows just to wait until it has applied all of its stupid updates). Also not explicit is whether update_vo_playback_state() will actually be called soon enough in all cases. It probably is. Probably fixes #3482.
* vo_opengl: minor renderer option access refactorwm42016-09-023-5/+17
| | | | | | | | | | | | | Reduce accesses to the renderer opts in vo_opengl.c, and instead add accessors for them to video.c. I suppose gamma and maybe icc-auto could be moved to vo_opengl.c options. Also, the output colorspace could probably be adjusted to what is really used, not just the options (although it's possible that this commit changes this, due to video.c mutating its own copy of the options according to actual renderer capapbilities). But don't deal with this now.
* m_config: add helper function for initializing af/ao/vf/vo suboptionswm42016-09-026-25/+37
| | | | | | | | Normally I'd prefer a bunch of smaller functions with fewer parameters over a single function with a lot of parameters. But future changes will require messing with the parameters in a slightly more complex way, so a combined function will be needed anyway. The now-unused "global" parameter is required for later as well.
* charset_conv: Use CP949 instead of EUC-KRJeong Woon Choi2016-09-021-0/+5
| | | | | | | | | | iconv distinguishes between euc-kr and cp949, while libguess and libuchardet doesn't (only returns euc-kr). EILSEQ occurs when the input encoding of iconv is set to euc-kr and if the subs contain letters not included in euc-kr. Since cp949 is a extension of euc-kr, choose cp949 instead. Signed-off-by: wm4 <wm4@nowhere>
* DOCS: move libmpv stub to manpagewm42016-09-023-22/+17
| | | | | | | And replace the sort-of duplicated explanations. (It's a bit funny to use weblinks to the generated web version of itself instead of proper RST links, but I think I don't care.)
* manpage: mention the client API/interface change logswm42016-09-022-3/+8
| | | | | Also, I'm seeing that we still have mplayer-changes.rst - add a warning that it's outdated.
* command: deprecate "cache" property, replace with "cache-percent"wm42016-09-023-7/+6
| | | | | | The --cache option and cache property conflict, so one of them has to be renamed. The option is probably used frequently, so initiate deprecation/rename of the property.
* vo_opengl: remove pre/post/scale-shadersNiklas Haas2016-09-024-133/+20
| | | | | | | | | | Deprecated in favor of user-shaders, which are functionally equivalent but superior. (Except in the case of scaler-shader, which has no direct replacement, but it turned out to be a very unpopular feature either way - most custom scalers don't fit into the mpv kernel infrastructure and are therefore implemented as user shaders either way) Signed-off-by: wm4 <wm4@nowhere>
* client API: create core thread at an earlier timewm42016-09-014-55/+50
| | | | | | | | | | | | | Create the core thread right in mpv_create(), and reduce what mpv_initialize() does further. This is simpler, and allows the API user to do more before calling mpv_initialize(). The latter is not the real goal, rather we'd like mpv_intialize() reduced to do almost nothing. It still does a lot, but nothing truly special anymore that is absolutely required for basic mpv workings. One thing we want the user to be able to do is changing properties before mpv_initialize() to reduce the special status of mpv_set_option().
* command: fix or document some property/option consistency issueswm42016-09-015-26/+61
| | | | | | | | | | | | | Make some existing properties behave more like options. This mostly means they don't deny access if the associated component is not active, but redirects to the option. One kind of fishy change is that we apply --brightness etc. only if they're not set to the default value. This won't necessarily work with --vo=xv, but affects only cases where 1. the Xv adapter has been changed to non-defaults, and 2. the user tries to reset them with mpv by passing e.g. --brightness=0. We don't care about Xv, and the noted use-case is dumb, so this change is acceptable.
* command: remove 2 deprecated propertieswm42016-09-013-68/+1
| | | | | They were delcared to be removed in mpv 0.20.0, and the next release will be 0.21.0.
* command: rename/deprecate some conflicting property nameswm42016-09-013-6/+21
|