We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8fdc22c + 254defe commit ad5dfb4Copy full SHA for ad5dfb4
2 files changed
doc/configuration.rst
@@ -2239,9 +2239,12 @@ Arguments:
2239
Although the driver can be used from Python code by calling the `stream()`
2240
method, it is currently mainly useful for the ``video`` subcommand of
2241
``labgrid-client``.
2242
-It supports the `Logitech HD Pro Webcam C920` with the USB ID 046d:082d, but
2243
-other cameras can be added to `get_qualities()` in
+It supports the `Logitech HD Pro Webcam C920` with the USB ID 046d:082d and a
+few others.
2244
+More cameras can be added to `get_qualities()` and `get_pipeline()` in
2245
``labgrid/driver/usbvideodriver.py``.
2246
+Appropriate configuration parameters can be determined by using the GStreamer
2247
+``gst-device-monitor-1.0`` command line utility.
2248
2249
USBAudioInputDriver
2250
~~~~~~~~~~~~~~~~~~~
labgrid/driver/usbvideodriver.py
@@ -40,6 +40,12 @@ def get_qualities(self):
40
("mid", "image/jpeg,width=1280,height=720,framerate=10/1"),
41
("high", "image/jpeg,width=1920,height=1080,framerate=10/1"),
42
])
43
+ if match == (0x1d6c, 0x0103): # HD 2MP WEBCAM
44
+ return ("mid", [
45
+ ("low", "video/x-h264,width=640,height=480,framerate=25/1"),
46
+ ("mid", "video/x-h264,width=1280,height=720,framerate=25/1"),
47
+ ("high", "video/x-h264,width=1920,height=1080,framerate=25/1"),
48
+ ])
49
raise InvalidConfigError("Unknown USB video device {:04x}:{:04x}".format(*match))
50
51
def select_caps(self, hint=None):
@@ -65,6 +71,9 @@ def get_pipeline(self, path, caps, controls=None):
65
71
inner = None
66
72
elif match == (0x534d, 0x2109):
67
73
inner = None # just forward the jpeg frames
74
+ elif match == (0x1d6c, 0x0103):
75
+ controls = controls or "focus_auto=1"
76
+ inner = "h264parse"
68
77
else:
69
78
70
79
0 commit comments