Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
engine
Commits
ca010c18
Commit
ca010c18
authored
4 years ago
by
David Trattnig
Browse files
Options
Downloads
Patches
Plain Diff
Allow connection outsite of player. #39
parent
5ba8519c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/core/engine.py
+10
-9
10 additions, 9 deletions
modules/core/engine.py
modules/core/liquidsoap/connector.py
+4
-3
4 additions, 3 deletions
modules/core/liquidsoap/connector.py
with
14 additions
and
12 deletions
modules/core/engine.py
+
10
−
9
View file @
ca010c18
...
@@ -80,7 +80,7 @@ class Engine():
...
@@ -80,7 +80,7 @@ class Engine():
"""
"""
self
.
event_dispatcher
=
EngineEventDispatcher
(
self
)
self
.
event_dispatcher
=
EngineEventDispatcher
(
self
)
self
.
eci
=
EngineControlInterface
(
self
,
self
.
event_dispatcher
)
self
.
eci
=
EngineControlInterface
(
self
,
self
.
event_dispatcher
)
self
.
playe
r
=
Player
(
self
.
config
,
self
.
event_dispatcher
)
self
.
connecto
r
=
Player
Connector
(
self
.
event_dispatcher
)
self
.
event_dispatcher
.
on_initialized
()
self
.
event_dispatcher
.
on_initialized
()
while
not
self
.
is_connected
():
while
not
self
.
is_connected
():
...
@@ -88,6 +88,7 @@ class Engine():
...
@@ -88,6 +88,7 @@ class Engine():
time
.
sleep
(
2
)
time
.
sleep
(
2
)
self
.
logger
.
info
(
SU
.
green
(
"
Engine Core ------[ connected ]-------- Liquidsoap
"
))
self
.
logger
.
info
(
SU
.
green
(
"
Engine Core ------[ connected ]-------- Liquidsoap
"
))
self
.
player
=
Player
(
self
.
connector
,
self
.
event_dispatcher
)
self
.
event_dispatcher
.
on_boot
()
self
.
event_dispatcher
.
on_boot
()
self
.
logger
.
info
(
EngineSplash
.
splash_screen
(
"
Engine Core
"
,
meta
.
__version__
))
self
.
logger
.
info
(
EngineSplash
.
splash_screen
(
"
Engine Core
"
,
meta
.
__version__
))
self
.
event_dispatcher
.
on_ready
()
self
.
event_dispatcher
.
on_ready
()
...
@@ -119,7 +120,7 @@ class Engine():
...
@@ -119,7 +120,7 @@ class Engine():
"""
"""
Retrieves the state of all inputs and outputs.
Retrieves the state of all inputs and outputs.
"""
"""
state
=
self
.
player
.
connector
.
send_lqc_command
(
"
engine
"
,
"
state
"
)
state
=
self
.
connector
.
send_lqc_command
(
"
engine
"
,
"
state
"
)
return
state
return
state
...
@@ -127,7 +128,7 @@ class Engine():
...
@@ -127,7 +128,7 @@ class Engine():
"""
"""
Get the version of Liquidsoap.
Get the version of Liquidsoap.
"""
"""
data
=
self
.
player
.
connector
.
send_lqc_command
(
"
version
"
,
""
)
data
=
self
.
connector
.
send_lqc_command
(
"
version
"
,
""
)
return
data
return
data
...
@@ -135,9 +136,9 @@ class Engine():
...
@@ -135,9 +136,9 @@ class Engine():
"""
"""
Retrieves the uptime of Liquidsoap.
Retrieves the uptime of Liquidsoap.
"""
"""
self
.
player
.
connector
.
enable_transaction
()
self
.
connector
.
enable_transaction
()
data
=
self
.
player
.
connector
.
send_lqc_command
(
"
uptime
"
,
""
)
data
=
self
.
connector
.
send_lqc_command
(
"
uptime
"
,
""
)
self
.
player
.
connector
.
disable_transaction
()
self
.
connector
.
disable_transaction
()
return
data
return
data
...
@@ -192,17 +193,17 @@ class Player:
...
@@ -192,17 +193,17 @@ class Player:
def
__init__
(
self
,
con
fig
,
event_dispatcher
):
def
__init__
(
self
,
con
nector
,
event_dispatcher
):
"""
"""
Constructor
Constructor
Args:
Args:
config (AuraConfig): The configuration
config (AuraConfig): The configuration
"""
"""
self
.
config
=
config
self
.
config
=
AuraConfig
.
config
()
self
.
logger
=
logging
.
getLogger
(
"
AuraEngine
"
)
self
.
logger
=
logging
.
getLogger
(
"
AuraEngine
"
)
self
.
event_dispatcher
=
event_dispatcher
self
.
event_dispatcher
=
event_dispatcher
self
.
connector
=
PlayerC
onnector
(
self
.
config
,
self
.
event_dispatcher
)
self
.
connector
=
c
onnector
self
.
channel_router
=
ChannelRouter
(
self
.
config
,
self
.
logger
)
self
.
channel_router
=
ChannelRouter
(
self
.
config
,
self
.
logger
)
self
.
mixer
=
Mixer
(
self
.
config
,
MixerType
.
MAIN
,
self
.
connector
)
self
.
mixer
=
Mixer
(
self
.
config
,
MixerType
.
MAIN
,
self
.
connector
)
self
.
mixer_fallback
=
Mixer
(
self
.
config
,
MixerType
.
FALLBACK
,
self
.
connector
)
self
.
mixer_fallback
=
Mixer
(
self
.
config
,
MixerType
.
FALLBACK
,
self
.
connector
)
...
...
This diff is collapsed.
Click to expand it.
modules/core/liquidsoap/connector.py
+
4
−
3
View file @
ca010c18
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
import
logging
import
logging
import
time
import
time
from
modules.base.config
import
AuraConfig
from
modules.base.utils
import
TerminalColors
,
SimpleUtil
as
SU
from
modules.base.utils
import
TerminalColors
,
SimpleUtil
as
SU
from
modules.base.exceptions
import
LQConnectionError
from
modules.base.exceptions
import
LQConnectionError
from
modules.core.liquidsoap.playerclient
import
LiquidSoapPlayerClient
from
modules.core.liquidsoap.playerclient
import
LiquidSoapPlayerClient
...
@@ -39,16 +40,16 @@ class PlayerConnector():
...
@@ -39,16 +40,16 @@ class PlayerConnector():
def
__init__
(
self
,
config
,
event_dispatcher
):
def
__init__
(
self
,
event_dispatcher
):
"""
"""
Constructor
Constructor
Args:
Args:
config (AuraConfig): The configuration
config (AuraConfig): The configuration
"""
"""
self
.
config
=
config
self
.
config
=
AuraConfig
.
config
()
self
.
logger
=
logging
.
getLogger
(
"
AuraEngine
"
)
self
.
logger
=
logging
.
getLogger
(
"
AuraEngine
"
)
self
.
client
=
LiquidSoapPlayerClient
(
config
,
"
engine.sock
"
)
self
.
client
=
LiquidSoapPlayerClient
(
self
.
config
,
"
engine.sock
"
)
self
.
event_dispatcher
=
event_dispatcher
self
.
event_dispatcher
=
event_dispatcher
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment