Skip to content

Commit 584bdf1

Browse files
committed
A little bit of change
1 parent 708ce17 commit 584bdf1

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

BabbleApp/camera_widget.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ def render(self, window, event, values):
268268
"http" not in value
269269
and ".mp4" not in value
270270
and "udp" not in value
271+
and "COM" not in value
272+
and "/dev/tty" not in value
271273
and value not in self.camera_list
272274
): # If http is not in camera address, add it.
273275
self.config.capture_source = f"http://{values[self.gui_camera_addr]}/"

BabbleApp/utils/misc_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
from pygrabber.dshow_graph import FilterGraph
44

55
is_nt = True if os.name == "nt" else False
6+
graph = FilterGraph()
67

78

89
def list_camera_names():
9-
graph = FilterGraph()
1010
cam_list = graph.get_input_devices()
1111
cam_names = []
1212
for index, name in enumerate(cam_list):
@@ -15,7 +15,6 @@ def list_camera_names():
1515

1616

1717
def get_camera_index_by_name(name):
18-
graph = FilterGraph()
1918
cam_list = graph.get_input_devices()
2019

2120
for i, device_name in enumerate(cam_list):

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ pyserial
1111
colorama
1212
winotify
1313
poetry
14+
pygrabber

0 commit comments

Comments
 (0)