зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1695784 - py3 updates for mochitest with --use-test-media-devices; r=jmaher
Allow for clib text/binary conversions under py3. Differential Revision: https://phabricator.services.mozilla.com/D106854
This commit is contained in:
Родитель
491520298a
Коммит
a8b25adc35
|
@ -768,7 +768,7 @@ def checkAndConfigureV4l2loopback(device):
|
|||
|
||||
VIDIOC_QUERYCAP = 0x80685600
|
||||
|
||||
fd = libc.open(device, O_RDWR)
|
||||
fd = libc.open(six.ensure_binary(device), O_RDWR)
|
||||
if fd < 0:
|
||||
return False, ""
|
||||
|
||||
|
@ -776,7 +776,7 @@ def checkAndConfigureV4l2loopback(device):
|
|||
if libc.ioctl(fd, VIDIOC_QUERYCAP, ctypes.byref(vcap)) != 0:
|
||||
return False, ""
|
||||
|
||||
if vcap.driver != "v4l2 loopback":
|
||||
if six.ensure_text(vcap.driver) != "v4l2 loopback":
|
||||
return False, ""
|
||||
|
||||
class v4l2_control(ctypes.Structure):
|
||||
|
@ -798,7 +798,7 @@ def checkAndConfigureV4l2loopback(device):
|
|||
libc.ioctl(fd, VIDIOC_S_CTRL, ctypes.byref(control))
|
||||
libc.close(fd)
|
||||
|
||||
return True, vcap.card
|
||||
return True, six.ensure_text(vcap.card)
|
||||
|
||||
|
||||
def findTestMediaDevices(log):
|
||||
|
|
Загрузка…
Ссылка в новой задаче