Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add voctolights support for voctomix 2 #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions voctolight.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ def handler(self, response):
print('LED has been switched off')
actor.tally_off()

def handle_composite(self, composite_mode):
"""Parse `sbs(a,b)` into mode=sbs, cam_a=a, cam_b=b"""
mode, rest = composite_mode.split('(', 1)
cam_a, cam_b = rest.rstrip(')').split(',', 1)
self.handle_video_status([cam_a, cam_b])
self.handle_composite_mode(mode)

def handle_video_status(self, cams):
mycam = self.config.get('light', 'cam')
if mycam in cams:
Expand All @@ -95,11 +102,11 @@ def handle_video_status(self, cams):

def handle_composite_mode(self, mode_list):
mode = mode_list[0]
if mode == 'fullscreen':
if mode in ('fullscreen', 'fs'):
self.composite_mode = CompositeModes.fullscreen
elif mode == 'side_by_side_equal':
elif mode in ('side_by_side_equal', 'sbs'):
self.composite_mode = CompositeModes.side_by_side_equal
elif mode == 'side_by_side_preview':
elif mode in ('side_by_side_preview', 'lec'):
self.composite_mode = CompositeModes.side_by_side_preview
elif mode == 'picture_in_picture':
self.composite_mode = CompositeModes.picture_in_picture
Expand Down