@@ -27,43 +27,49 @@ def get_qualities(self):
27
27
("mid" , "video/x-h264,width=1280,height=720,framerate=15/2" ),
28
28
("high" , "video/x-h264,width=1920,height=1080,framerate=10/1" ),
29
29
])
30
- if match == (0x046d , 0x0892 ):
30
+ elif match == (0x046d , 0x0892 ):
31
31
return ("mid" , [
32
32
("low" , "image/jpeg,width=640,height=360,framerate=5/1" ),
33
33
("mid" , "image/jpeg,width=1280,height=720,framerate=15/2" ),
34
34
("high" , "image/jpeg,width=1920,height=1080,framerate=10/1" ),
35
35
])
36
- if match == (0x046d , 0x08e5 ): # Logitech HD Pro Webcam C920
36
+ elif match == (0x046d , 0x08e5 ): # Logitech HD Pro Webcam C920
37
37
return ("mid" , [
38
38
("low" , "image/jpeg,width=640,height=360,framerate=5/1" ),
39
39
("mid" , "image/jpeg,width=1280,height=720,framerate=15/2" ),
40
40
("high" , "image/jpeg,width=1920,height=1080,framerate=10/1" ),
41
41
])
42
- if match == (0x1224 , 0x2825 ): # LogiLink UA0371
42
+ elif match == (0x1224 , 0x2825 ): # LogiLink UA0371
43
43
return ("mid" , [
44
44
("low" , "image/jpeg,width=640,height=480,framerate=30/1" ),
45
45
("mid" , "image/jpeg,width=1280,height=720,framerate=30/1" ),
46
46
("high" , "image/jpeg,width=1920,height=1080,framerate=30/1" ),
47
47
])
48
- if match == (0x05a3 , 0x9331 ): # WansView Webcam 102
48
+ elif match == (0x05a3 , 0x9331 ): # WansView Webcam 102
49
49
return ("mid" , [
50
50
("low" ,"video/x-h264,width=640,height=360,framerate=30/1" ),
51
51
("mid" ,"video/x-h264,width=1280,height=720,framerate=30/1" ),
52
52
("high" ,"video/x-h264,width=1920,height=1080,framerate=30/1" ),
53
53
])
54
- if match == (0x534d , 0x2109 ): # MacroSilicon
54
+ elif match == (0x534d , 0x2109 ): # MacroSilicon
55
55
return ("mid" , [
56
56
("low" , "image/jpeg,width=720,height=480,framerate=10/1" ),
57
57
("mid" , "image/jpeg,width=1280,height=720,framerate=10/1" ),
58
58
("high" , "image/jpeg,width=1920,height=1080,framerate=10/1" ),
59
59
])
60
- if match == (0x1d6c , 0x0103 ): # HD 2MP WEBCAM
60
+ elif match == (0x1d6c , 0x0103 ): # HD 2MP WEBCAM
61
61
return ("mid" , [
62
62
("low" , "video/x-h264,width=640,height=480,framerate=25/1" ),
63
63
("mid" , "video/x-h264,width=1280,height=720,framerate=25/1" ),
64
64
("high" , "video/x-h264,width=1920,height=1080,framerate=25/1" ),
65
65
])
66
- if match == (0x0c45 , 0x636d ): # AUKEY PC-LM1E
66
+ elif match == (0x0c45 , 0x636b ): # LogiLink UA0379 / Microdia
67
+ return ("mid" , [
68
+ ("low" , "image/jpeg,width=640,height=480,pixel-aspect-ratio=1/1,framerate=30/1" ),
69
+ ("mid" , "image/jpeg,width=1280,height=720,pixel-aspect-ratio=1/1,framerate=30/1" ),
70
+ ("high" , "image/jpeg,width=1920,height=1080,pixel-aspect-ratio=1/1,framerate=30/1" ),
71
+ ])
72
+ elif match == (0x0c45 , 0x636d ): # AUKEY PC-LM1E
67
73
return ("mid" , [
68
74
("low" , "image/jpeg,width=640,height=480,pixel-aspect-ratio=1/1,framerate=30/1" ),
69
75
("mid" , "image/jpeg,width=864,height=480,pixel-aspect-ratio=1/1,framerate=30/1" ),
@@ -108,6 +114,9 @@ def get_pipeline(self, path, caps, controls=None):
108
114
elif match == (0x1d6c , 0x0103 ):
109
115
controls = controls or "focus_auto=1"
110
116
inner = "h264parse"
117
+ elif match == (0x0c54 , 0x636b ):
118
+ controls = controls or "focus_auto=1"
119
+ inner = None # just forward the jpeg frames
111
120
elif match == (0x0c54 , 0x636d ):
112
121
controls = controls or "focus_auto=1"
113
122
inner = None # just forward the jpeg frames
@@ -130,8 +139,7 @@ def stream(self, caps_hint=None, controls=None):
130
139
131
140
tx_cmd = self .video .command_prefix + ["gst-launch-1.0" , "-q" ]
132
141
tx_cmd += pipeline .split ()
133
- rx_cmd = ["gst-launch-1.0" ]
134
- rx_cmd += "playbin3 buffer-duration=0 uri=fd://0" .split ()
142
+ rx_cmd = ["gst-launch-1.0" , "playbin3" , "buffer-duration=0" , "uri=fd://0" ]
135
143
136
144
tx = subprocess .Popen (
137
145
tx_cmd ,
0 commit comments