var.add_callback usage
Posted: 20 Feb 2012 19:13
I am currently trying to do a lua extension that can almost precisely pause the video at 0.04s before the next second (e.g: pause at 4.96s before entering 5s).
My current method is keep on reading to the variable "time" and pause accordingly, but this is an iterative try method which requires a few tries before success.
I had read something about var.add_callback but not sure on how to use it. Can I use something like vlc.var.add_callback(vlc.object.input(), "time", pause, VAR) to initiate a callback to function "pause" when the time reaches 4.96? and what should I put for the VAR?
Thank you for your help, urgent reply needed, thanks a million!
My current method is keep on reading to the variable "time" and pause accordingly, but this is an iterative try method which requires a few tries before success.
I had read something about var.add_callback but not sure on how to use it. Can I use something like vlc.var.add_callback(vlc.object.input(), "time", pause, VAR) to initiate a callback to function "pause" when the time reaches 4.96? and what should I put for the VAR?
Thank you for your help, urgent reply needed, thanks a million!