Commit 4b55e52c authored by Stephen Thompson's avatar Stephen Thompson

Issue #7 changed GX (obsolete) to TX, and set Aurora 008 to use TX.

BX seems to work with 008 with py2.7 but has utf encoding errors in py3.6
parent e05a9fe9
Pipeline #1549 passed with stages
in 20 minutes and 20 seconds
......@@ -52,7 +52,7 @@ setup(
install_requires=[
'six>=1.10',
'numpy>=1.11',
'ndicapi>=3.2.2',
'ndicapi>=3.2.3',
],
entry_points={
......
......@@ -13,7 +13,7 @@ from ndicapy import (ndiDeviceName, ndiProbe, ndiOpen, ndiClose,
ndiGetPHSRNumberOfHandles, ndiGetPHSRHandle,
ndiGetPHRQHandle, ndiPVWRFromFile,
ndiGetBXTransform, ndiGetBXFrame,
ndiGetGXTransform, ndiGetGXFrame,
ndiGetTXTransform, ndiGetTXFrame,
ndiCommand, NDI_OKAY, ndiGetError, ndiErrorString,
NDI_115200, NDI_8N1, NDI_NOHANDSHAKE,
ndiVER)
......@@ -85,6 +85,11 @@ class NDITracker:
self._use_bx_transforms = True
if self._device_firmware_version == ' AURORA Rev 007':
self._use_bx_transforms = False
return
if self._device_firmware_version == ' AURORA Rev 008':
self._use_bx_transforms = False
return
return
def _get_firmware_version(self):
"""
......@@ -397,7 +402,7 @@ class NDITracker:
if self._use_bx_transforms:
frame = self._get_frame_bx()
else:
frame = self._get_frame_gx()
frame = self._get_frame_tx()
return frame
......@@ -424,19 +429,19 @@ class NDITracker:
return return_array
def _get_frame_gx(self):
def _get_frame_tx(self):
return_array = full((len(self._tool_descriptors), 11), nan)
timestamp = time()
if not self._tracker_type == "dummy":
ndiCommand(self._device, "GX:0801")
ndiCommand(self._device, "TX:0801")
for i in range(len(self._tool_descriptors)):
return_array[i, 0] = self._tool_descriptors[i].get(
"port handle")
return_array[i, 1] = timestamp
return_array[i, 2] = ndiGetGXFrame(
return_array[i, 2] = ndiGetTXFrame(
self._device,
self._tool_descriptors[i].get("c_str port handle"))
transform = ndiGetGXTransform(
transform = ndiGetTXTransform(
self._device,
self._tool_descriptors[i].get("c_str port handle"))
if not transform == "MISSING" and not transform == "DISABLED":
......@@ -447,7 +452,6 @@ class NDITracker:
return return_array
def get_tool_descriptions(self):
""" Returns the port handles and tool descriptions """
descriptions = full((len(self._tool_descriptors), 2), "empty",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment