summaryrefslogtreecommitdiffstats
path: root/DOCS/man/libmpv.rst
Commit message (Collapse)AuthorAgeFilesLines
* cplugin: allow loading mpv_* symbols dynamicallyKacper Michajłow2023-09-201-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Defining MPV_CPLUGIN_DYNAMIC_SYM during plugin compilation will replace mpv_* functions with function pointers. Those pointer will be initialized when loading the plugin. It is recommended to use this symbol table when targeting Windows. The loader does not have notion of global symbols. Loading cplugin into mpv process will not allow this plugin to call any of the symbols that may be available in other modules. Instead cplugin has to link explicitly to specific PE binary, libmpv-2.dll/mpv.exe or any other binary that may have linked mpv statically. This limits portability of cplugin as it would need to be compiled separately for each of target PE binary that includes mpv's symbols. Which in practice is unrealictis, as we want one cplugin to be loaded without those restrictions. Instead of linking to any PE binary, we create function pointer for all mpv's exported symbols. For convinience names of entrypoints are redefined to those pointer so no changes are required in cplugin source code, except defining MPV_CPLUGIN_DYNAMIC_SYM. Those function pointer are exported to make them available for mpv to init with correct values during runtime, before calling `mpv_open_cplugin`. Note that those pointer are decorated with `selectany` attribute, so no need to worry about multiple definitions, linker will keep only single instance. This fixes cplugin usability on Windows. Without any API changes, only recompilation with -DMPV_CPLUGIN_DYNAMIC_SYM is needed.
* DOCS/libmpv: fix typo in linkage section257924312022-09-031-1/+1
|
* DOCS: convert mpv.io and github links to httpsLaserEyess2021-08-171-3/+3
| | | | | | | | | Discovered with: find . -type f \( -name '*.md' -o -name '*.rst' \) -exec grep -n 'http://' {} + All links to mpv.io or github.com/mpv-player that were http were converted to https.
* DOCS: fix cplugins information in libmpv.rst.Érico Rolim2021-02-121-2/+2
|
* manpage: define stricter rules for C plugin return valueswm42017-01-141-2/+5
| | | | Just in case.
* manpage: fix a typowm42017-01-131-1/+1
|
* player: add experimental C plugin interfacewm42017-01-121-0/+56
| | | | | | | | | | | | | | | | | This basically reuses the scripting infrastructure. Note that this needs to be explicitly enabled at compilation. For one, enabling export for certain symbols from an executable seems to be quite toolchain-specific. It might not work outside of Linux and cause random problems within Linux. If C plugins actually become commonly used and this approach is starting to turn out as a problem, we can build mpv CLI as a wrapper for libmpv, which would remove the requirement that plugins pick up host symbols. I'm being lazy, so implementation/documentation are parked in existing files, even if that stuff doesn't necessarily belong there. Sue me, or better send patches.
* DOCS: move libmpv stub to manpagewm42016-09-021-0/+16
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.)