mpv/TOOLS/lua
wm4 f061befb33 audio: add device change notification for hotplugging
Not very important for the command line player; but GUI applications
will want to know about this.

This only adds the internal API; support for specific audio outputs
comes later.

This reuses the ao struct as context for the hotplug event listener,
similar to how the "old" device listing API did. This is probably a bit
unclean and confusing. One argument got reusing it is that otherwise
rewriting parts of ao_pulse would be required (because the PulseAudio
API requires so damn much boilerplate). Another is that --ao-defaults is
applied to the hotplug dummy ao struct, which automatically applies such
defaults even to the hotplug context.

Notification works through the property observation mechanism in the
client API. The notification chain is a bit complicated: the AO notifies
the player, which in turn notifies the clients, which in turn will
actually retrieve the device list. (It still has the advantage that it's
slightly cleaner, since the AO stuff doesn't need to know about client
API issues.)

The weird handling of atomic flags in ao.c is because we still don't
require real atomics from the compiler. Otherwise we'd just use atomic
bitwise operations.
2015-02-12 17:17:41 +01:00
..
README.md audio: add device change notification for hotplugging 2015-02-12 17:17:41 +01:00
audio-hotplug-test.lua audio: add device change notification for hotplugging 2015-02-12 17:17:41 +01:00
autocrop.lua options: deprecate 'lua' based options/dirs for 'script' 2014-12-15 04:39:56 +01:00
autodeint.lua options: deprecate 'lua' based options/dirs for 'script' 2014-12-15 04:39:56 +01:00
autoload.lua TOOLS/lua/autoload: fix behavior with network URLs 2015-01-03 14:48:33 +01:00
cycle-deinterlace-pullup.lua TOOLS/lua: remove tabs from some lua scripts 2014-10-21 00:55:15 +02:00
drc-control.lua TOOLS/lua: remove tabs from some lua scripts 2014-10-21 00:55:15 +02:00
observe-all.lua TOOLS/lua/observe-all: add a warning 2015-01-03 14:49:48 +01:00
pause-when-minimize.lua TOOLS/lua: add script that pauses playback when minimizing the window 2014-11-29 00:03:46 +01:00
status-line.lua Move status-line.lua 2014-08-11 17:08:32 +02:00

README.md

mpv lua scripts

The lua scripts in this folder can be loaded on a one-time basis by adding the option

--script=/path/to/script.lua

to mpv's command line.

Where appropriate, they may also be placed in ~/.config/mpv/scripts/ from where they will be automatically loaded when mpv starts.

Some of these are just for testing mpv internals.