Reduce VLC CPU use (DerGenaue's code, adapted)
This commit is contained in:
parent
10089bb417
commit
69c03bdaa5
@ -2,9 +2,10 @@
|
|||||||
syncplay.lua: Syncplay interface module for VLC
|
syncplay.lua: Syncplay interface module for VLC
|
||||||
--[==========================================================================[
|
--[==========================================================================[
|
||||||
|
|
||||||
Author: Etoh
|
Principal author: Etoh
|
||||||
|
Other contributors: DerGenaue, jb
|
||||||
Project: http://syncplay.pl/
|
Project: http://syncplay.pl/
|
||||||
Version: 0.1.9
|
Version: 0.2.0
|
||||||
|
|
||||||
Note:
|
Note:
|
||||||
* This interface module is intended to be used in conjunction with Syncplay.
|
* This interface module is intended to be used in conjunction with Syncplay.
|
||||||
@ -85,8 +86,10 @@ else
|
|||||||
require "common"
|
require "common"
|
||||||
end
|
end
|
||||||
|
|
||||||
local connectorversion = "0.1.9"
|
local connectorversion = "0.2.0"
|
||||||
local durationdelay = 500000 -- Pause for get_duration command etc for increased reliability
|
local durationdelay = 500000 -- Pause for get_duration command etc for increased reliability (uses microseconds)
|
||||||
|
local loopsleepduration = 5000 -- Pause for every event loop (uses microseconds)
|
||||||
|
|
||||||
local host = "localhost"
|
local host = "localhost"
|
||||||
local port
|
local port
|
||||||
|
|
||||||
@ -526,6 +529,7 @@ while running == true do
|
|||||||
vlc.net.send( fd, responsebuffer )
|
vlc.net.send( fd, responsebuffer )
|
||||||
responsebuffer = ""
|
responsebuffer = ""
|
||||||
end
|
end
|
||||||
|
vlc.misc.mwait(vlc.misc.mdate() + loopsleepduration) -- Don't waste processor time
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ COMMANDS_ROOM = ["r", "room"]
|
|||||||
COMMANDS_HELP = ['help', 'h', '?', '/?', r'\?']
|
COMMANDS_HELP = ['help', 'h', '?', '/?', r'\?']
|
||||||
MPC_MIN_VER = "1.6.4"
|
MPC_MIN_VER = "1.6.4"
|
||||||
VLC_MIN_VERSION = "2.0.0"
|
VLC_MIN_VERSION = "2.0.0"
|
||||||
VLC_INTERFACE_MIN_VERSION = "0.1.9"
|
VLC_INTERFACE_MIN_VERSION = "0.2.0"
|
||||||
MPC_PATHS = [
|
MPC_PATHS = [
|
||||||
r"C:\Program Files (x86)\MPC-HC\mpc-hc.exe",
|
r"C:\Program Files (x86)\MPC-HC\mpc-hc.exe",
|
||||||
r"C:\Program Files\MPC-HC\mpc-hc.exe",
|
r"C:\Program Files\MPC-HC\mpc-hc.exe",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user