-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
Description
Expected behavior of the wanted feature
I'd like to upstream the C plugin part of mpv-menu-plugin to mpv.
See also: #5500 (comment)
Things need to be do in mpv:
- Add a new property or command to update the menu
- Add a new command to show the context menu
The reference implementation for win32 can be found in menu.c.
Benefits
- Less core menu logic in C, support for macOS/Linux can be added later
- menu conf syntax can be implemented with scripts
dyn_menu.lua is a lua script with support for reading menu from input.conf
, and support dynamic menu items like tracks/chapters/...
Additional information
menu data property structure used by mpv-menu-plugin:
MPV_FORMAT_NODE_ARRAY
MPV_FORMAT_NODE_MAP (menu item)
"type" MPV_FORMAT_STRING (supported type: separator, submenu)
"title" MPV_FORMAT_STRING (required if type is not separator)
"cmd" MPV_FORMAT_STRING (optional)
"state" MPV_FORMAT_NODE_ARRAY[MPV_FORMAT_STRING] (supported state: checked, disabled, hidden)
"submenu" MPV_FORMAT_NODE_ARRAY[menu item] (required if type is submenu)
If this RFC is not accepted, I would request #13163 to be resolved (to make mpv-menu-plugin possible on macOS).
Andarwinux, zhongfly, dyphire, Sneakpeakcss, kasper93 and 1 morellyyr and christoph-heinrich