Skip to content

Commit

Permalink
Prefer V4l2 to PipeWire source
Browse files Browse the repository at this point in the history
  • Loading branch information
hongquan committed Sep 11, 2021
1 parent f07e0ac commit 8582352
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cobang/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,9 +220,10 @@ def do_activate(self):
self.discover_webcam()
self.window.present()
logger.debug("Window {} is shown", self.window)
# If no webcam is selected, select the first one
# If no webcam is selected, select the first V4l2 one
if not self.webcam_combobox.get_active_iter():
self.webcam_combobox.set_active(0)
v4l2_idx = next((n for n, r in enumerate(self.webcam_store) if r[2] == 'v4l2src'), 0)
self.webcam_combobox.set_active(v4l2_idx)

def do_command_line(self, command_line: Gio.ApplicationCommandLine):
options = command_line.get_options_dict().end().unpack()
Expand Down

0 comments on commit 8582352

Please sign in to comment.