Skip to content
This repository was archived by the owner on Jun 24, 2023. It is now read-only.

Commit

Permalink
Minor cleanups
Browse files Browse the repository at this point in the history
No change in behavior.
  • Loading branch information
DemiMarie committed May 10, 2021
1 parent dcf731a commit 01d2a84
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions ui/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def parameters(self) -> list[int, int, int]:
"""
Compute the parameters. Return a (width, height, fps) tuple.
"""
raise NotImplementedError('parameters')
raise NotImplementedError("Pure virtual method called!")

def quit(self) -> None:
if self._quitting:
Expand All @@ -71,7 +71,6 @@ def quit(self) -> None:
Gtk.main_quit()

def msg_handler(self, bus: Gst.Bus, msg: Gst.Message) -> None:
elemnt = self._element
if msg.type == Gst.MessageType.EOS:
print('End of stream, exiting', file=sys.stderr)
self.quit()
Expand All @@ -80,8 +79,8 @@ def msg_handler(self, bus: Gst.Bus, msg: Gst.Message) -> None:
self.quit()
elif msg.type == Gst.MessageType.CLOCK_LOST:
print('Clock lost, resetting', file=sys.stderr)
element.set_state(Gst.State.PAUSED)
element.set_state(Gst.State.PLAYING)
self._element.set_state(Gst.State.PAUSED)
self._element.set_state(Gst.State.PLAYING)

def start_transmission(self) -> None:
"""
Expand Down Expand Up @@ -115,6 +114,5 @@ def main(self) -> NoReturn:
print('Invalid remote qube name %r, failing' % remote_domain,
file=sys.stderr)
sys.exit(1)
s = self(target_domain, remote_domain)
s.start_transmission()
self(target_domain, remote_domain).start_transmission()
Gtk.main()

0 comments on commit 01d2a84

Please sign in to comment.