ponkan-python 0.1.2__py3-none-any.whl → 0.2.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ponkan/__init__.py +36 -4
- ponkan/capture.py +24 -9
- ponkan/devices/discovery.py +397 -0
- ponkan/devices/n3dsxl_ftd3.py +1 -1
- ponkan/errors.py +101 -4
- ponkan/layouts.py +170 -0
- ponkan/profiles.py +95 -0
- ponkan/protocol/n3dsxl.py +3 -3
- ponkan/streaming/engine.py +14 -8
- ponkan/tools/list_devices.py +35 -34
- ponkan/transport/d3xx_backend.py +12 -4
- ponkan/transport/ftd3_pipe.py +1 -1
- {ponkan_python-0.1.2.dist-info → ponkan_python-0.2.1.dist-info}/METADATA +8 -5
- {ponkan_python-0.1.2.dist-info → ponkan_python-0.2.1.dist-info}/RECORD +18 -15
- {ponkan_python-0.1.2.dist-info → ponkan_python-0.2.1.dist-info}/WHEEL +1 -1
- {ponkan_python-0.1.2.dist-info → ponkan_python-0.2.1.dist-info}/entry_points.txt +0 -0
- {ponkan_python-0.1.2.dist-info → ponkan_python-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {ponkan_python-0.1.2.dist-info → ponkan_python-0.2.1.dist-info}/licenses/NOTICE.md +0 -0
ponkan/__init__.py
CHANGED
|
@@ -1,14 +1,33 @@
|
|
|
1
1
|
"""Python helpers for new 3DS XL capture board frame acquisition.
|
|
2
2
|
|
|
3
|
-
The package exposes the
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
submodules.
|
|
3
|
+
The package root exposes the high-level reader, supported profile/layout
|
|
4
|
+
metadata, safe device discovery helpers, and size constants needed by typical
|
|
5
|
+
callers. Lower-level decode, transport, and streaming APIs live in their
|
|
6
|
+
dedicated submodules.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
9
|
from importlib.metadata import PackageNotFoundError, version
|
|
10
10
|
|
|
11
11
|
from ponkan.capture import CaptureConfig, CaptureOutput, CaptureReader, open_capture
|
|
12
|
+
from ponkan.devices.discovery import (
|
|
13
|
+
CaptureDeviceDiscovery,
|
|
14
|
+
CaptureDeviceInfo,
|
|
15
|
+
list_capture_devices,
|
|
16
|
+
)
|
|
17
|
+
from ponkan.layouts import (
|
|
18
|
+
CaptureLayout,
|
|
19
|
+
CompositeOutputInfo,
|
|
20
|
+
ScreenInfo,
|
|
21
|
+
UnknownCaptureLayout,
|
|
22
|
+
get_capture_layout,
|
|
23
|
+
list_capture_layouts,
|
|
24
|
+
)
|
|
25
|
+
from ponkan.profiles import (
|
|
26
|
+
CaptureProfile,
|
|
27
|
+
UnknownCaptureProfile,
|
|
28
|
+
get_capture_profile,
|
|
29
|
+
list_capture_profiles,
|
|
30
|
+
)
|
|
12
31
|
from ponkan.protocol.sizes import (
|
|
13
32
|
ACCEPTED_N3DSXL_PRODUCT_IDS,
|
|
14
33
|
ACCEPTED_N3DSXL_PRODUCT_STRINGS,
|
|
@@ -27,10 +46,23 @@ __all__ = [
|
|
|
27
46
|
"ACCEPTED_N3DSXL_PRODUCT_STRINGS",
|
|
28
47
|
"N3DSXL_VENDOR_ID",
|
|
29
48
|
"CaptureConfig",
|
|
49
|
+
"CaptureDeviceDiscovery",
|
|
50
|
+
"CaptureDeviceInfo",
|
|
51
|
+
"CaptureLayout",
|
|
30
52
|
"CaptureOutput",
|
|
53
|
+
"CaptureProfile",
|
|
31
54
|
"CaptureReader",
|
|
32
55
|
"CaptureSizes",
|
|
56
|
+
"CompositeOutputInfo",
|
|
57
|
+
"ScreenInfo",
|
|
58
|
+
"UnknownCaptureLayout",
|
|
59
|
+
"UnknownCaptureProfile",
|
|
33
60
|
"__version__",
|
|
34
61
|
"capture_sizes",
|
|
62
|
+
"get_capture_layout",
|
|
63
|
+
"get_capture_profile",
|
|
64
|
+
"list_capture_devices",
|
|
65
|
+
"list_capture_layouts",
|
|
66
|
+
"list_capture_profiles",
|
|
35
67
|
"open_capture",
|
|
36
68
|
]
|
ponkan/capture.py
CHANGED
|
@@ -8,6 +8,7 @@ from enum import StrEnum
|
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
from typing import TYPE_CHECKING, Literal, Protocol, cast, overload
|
|
10
10
|
|
|
11
|
+
from ponkan.devices.discovery import resolve_backend_preference
|
|
11
12
|
from ponkan.errors import (
|
|
12
13
|
DecodeError,
|
|
13
14
|
DeviceNotFound,
|
|
@@ -15,6 +16,7 @@ from ponkan.errors import (
|
|
|
15
16
|
UnsupportedOperation,
|
|
16
17
|
)
|
|
17
18
|
from ponkan.image.frame import CaptureFrame, ColorSpace, RGB8Array
|
|
19
|
+
from ponkan.layouts import get_capture_layout
|
|
18
20
|
from ponkan.streaming.policies import DropPolicy
|
|
19
21
|
from ponkan.streaming.stats import StreamStats
|
|
20
22
|
|
|
@@ -37,6 +39,7 @@ _OUTPUT_QUEUE_SIZE_CONFIG_ERROR = "output_queue_size must be positive"
|
|
|
37
39
|
_POLL_INTERVAL_CONFIG_ERROR = "poll_interval must be positive"
|
|
38
40
|
_RAW_SLOTS_CONFIG_ERROR = "raw_slots must be positive"
|
|
39
41
|
_READ_TIMEOUT_CONFIG_ERROR = "read_timeout must be non-negative or None"
|
|
42
|
+
_N3DSXL_LAYOUT_ID = "3ds_dual_screen"
|
|
40
43
|
|
|
41
44
|
|
|
42
45
|
class _ReadTimeoutUnset:
|
|
@@ -336,9 +339,11 @@ def _validate_config(config: CaptureConfig) -> None:
|
|
|
336
339
|
|
|
337
340
|
|
|
338
341
|
def _coerce_output(output: CaptureOutput | str) -> CaptureOutput:
|
|
339
|
-
if isinstance(output, CaptureOutput)
|
|
340
|
-
|
|
341
|
-
|
|
342
|
+
selected = output if isinstance(output, CaptureOutput) else CaptureOutput(output)
|
|
343
|
+
supported_outputs = {item.id for item in get_capture_layout(_N3DSXL_LAYOUT_ID).outputs}
|
|
344
|
+
if selected.value not in supported_outputs:
|
|
345
|
+
raise ValueError
|
|
346
|
+
return selected
|
|
342
347
|
|
|
343
348
|
|
|
344
349
|
def _validate_colorspace(colorspace: str) -> None:
|
|
@@ -347,17 +352,27 @@ def _validate_colorspace(colorspace: str) -> None:
|
|
|
347
352
|
|
|
348
353
|
|
|
349
354
|
def _open_hardware_engine(config: CaptureConfig) -> CaptureReaderEngine:
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
355
|
+
resolved_backend = resolve_backend_preference(config.backend)
|
|
356
|
+
if resolved_backend == "libusb":
|
|
357
|
+
raise UnsupportedOperation(
|
|
358
|
+
profile="n3dsxl",
|
|
359
|
+
backend=resolved_backend,
|
|
360
|
+
reason="unsupported_backend",
|
|
361
|
+
)
|
|
362
|
+
native = resolved_backend == "d3xx-native"
|
|
363
|
+
return _open_d3xx_engine(config, native=native, resolved_backend=resolved_backend)
|
|
354
364
|
|
|
355
365
|
|
|
356
|
-
def _open_d3xx_engine(
|
|
366
|
+
def _open_d3xx_engine(
|
|
367
|
+
config: CaptureConfig,
|
|
368
|
+
*,
|
|
369
|
+
native: bool,
|
|
370
|
+
resolved_backend: str,
|
|
371
|
+
) -> CaptureReaderEngine:
|
|
357
372
|
backend = _new_d3xx_backend()
|
|
358
373
|
candidates = backend.iter_device_candidates()
|
|
359
374
|
if not candidates:
|
|
360
|
-
raise DeviceNotFound
|
|
375
|
+
raise DeviceNotFound(profile="n3dsxl", backend=resolved_backend)
|
|
361
376
|
d3xx_candidate = candidates[0]
|
|
362
377
|
handle = backend.open(d3xx_candidate)
|
|
363
378
|
try:
|
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
"""Public capture device discovery model."""
|
|
2
|
+
|
|
3
|
+
import sys
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from typing import TYPE_CHECKING, Literal, Protocol, cast
|
|
6
|
+
|
|
7
|
+
from ponkan.errors import CaptureReason, DependencyUnavailableError
|
|
8
|
+
from ponkan.profiles import UnknownCaptureProfile, get_capture_profile
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ponkan.transport.libusb_backend import LibusbBackend, UsbDeviceInfo
|
|
12
|
+
|
|
13
|
+
BackendPreference = Literal["auto", "d3xx", "d3xx-native", "libusb"]
|
|
14
|
+
BackendStatus = Literal["available", "unavailable", "unsupported"]
|
|
15
|
+
ConnectionStatus = Literal["available", "rejected", "unsupported", "unknown"]
|
|
16
|
+
IdStability = Literal["stable", "session", "unknown"]
|
|
17
|
+
ProductStringStatus = Literal["accepted", "unreadable", "rejected", "unknown"]
|
|
18
|
+
|
|
19
|
+
_VALID_BACKENDS = frozenset(("auto", "d3xx", "d3xx-native", "libusb"))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class _LibusbDiscoveryBackend(Protocol):
|
|
23
|
+
def iter_devices(self) -> tuple["_UsbInfo", ...]:
|
|
24
|
+
"""Return descriptor-like USB device records without opening them."""
|
|
25
|
+
...
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class _D3xxDiscoveryBackend(Protocol):
|
|
29
|
+
def iter_devices(self) -> tuple[object, ...]:
|
|
30
|
+
"""Return D3XX descriptor-like device records without opening them."""
|
|
31
|
+
...
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class _UsbInfo(Protocol):
|
|
35
|
+
bus_number: int | None
|
|
36
|
+
address: int | None
|
|
37
|
+
vendor_id: int | None
|
|
38
|
+
product_id: int | None
|
|
39
|
+
product_string: str | None
|
|
40
|
+
serial_number: str | None
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class _CandidateInfo(Protocol):
|
|
44
|
+
info: _UsbInfo
|
|
45
|
+
product_string: str | None
|
|
46
|
+
product_string_status: ProductStringStatus
|
|
47
|
+
model: str
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
class _RejectedInfo(Protocol):
|
|
51
|
+
info: _UsbInfo
|
|
52
|
+
reason: str
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
class _D3xxDeviceInfo(Protocol):
|
|
56
|
+
usb_info: _UsbInfo
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
@dataclass(frozen=True, slots=True)
|
|
60
|
+
class CaptureDeviceInfo:
|
|
61
|
+
"""Public descriptor and classification state for one visible device."""
|
|
62
|
+
|
|
63
|
+
id: str
|
|
64
|
+
display_name: str
|
|
65
|
+
profile_id: str
|
|
66
|
+
model: str
|
|
67
|
+
backend: str
|
|
68
|
+
backend_preference: BackendPreference
|
|
69
|
+
vendor_id: int | None
|
|
70
|
+
product_id: int | None
|
|
71
|
+
serial_number: str | None
|
|
72
|
+
product_string: str | None
|
|
73
|
+
product_string_status: ProductStringStatus
|
|
74
|
+
connection_status: ConnectionStatus
|
|
75
|
+
id_stability: IdStability
|
|
76
|
+
reason: CaptureReason = "available"
|
|
77
|
+
remediation: str | None = None
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
@dataclass(frozen=True, slots=True)
|
|
81
|
+
class CaptureDeviceDiscovery:
|
|
82
|
+
"""Public discovery result for one profile/backend request."""
|
|
83
|
+
|
|
84
|
+
profile_id: str
|
|
85
|
+
backend_preference: BackendPreference
|
|
86
|
+
resolved_backend: str
|
|
87
|
+
backend_status: BackendStatus
|
|
88
|
+
reason: CaptureReason = "available"
|
|
89
|
+
remediation: str | None = None
|
|
90
|
+
devices: tuple[CaptureDeviceInfo, ...] = ()
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
def resolve_backend_preference(
|
|
94
|
+
backend: BackendPreference,
|
|
95
|
+
*,
|
|
96
|
+
sys_platform: str | None = None,
|
|
97
|
+
) -> str:
|
|
98
|
+
"""Resolve the concrete backend used by discovery and high-level open."""
|
|
99
|
+
if backend != "auto":
|
|
100
|
+
return backend
|
|
101
|
+
platform = sys.platform if sys_platform is None else sys_platform
|
|
102
|
+
if platform == "win32":
|
|
103
|
+
return "d3xx-native"
|
|
104
|
+
return "d3xx"
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def list_capture_devices(
|
|
108
|
+
*,
|
|
109
|
+
profile: str = "n3dsxl",
|
|
110
|
+
backend: BackendPreference | str = "auto",
|
|
111
|
+
include_rejected: bool = False,
|
|
112
|
+
_libusb_backend: object | None = None,
|
|
113
|
+
_d3xx_backend: object | None = None,
|
|
114
|
+
_sys_platform: str | None = None,
|
|
115
|
+
) -> CaptureDeviceDiscovery:
|
|
116
|
+
"""Return structured capture device discovery state without opening devices."""
|
|
117
|
+
backend_preference = cast("BackendPreference", backend)
|
|
118
|
+
if backend not in _VALID_BACKENDS:
|
|
119
|
+
return CaptureDeviceDiscovery(
|
|
120
|
+
profile_id=profile,
|
|
121
|
+
backend_preference=backend_preference,
|
|
122
|
+
resolved_backend=str(backend),
|
|
123
|
+
backend_status="unsupported",
|
|
124
|
+
reason="unsupported_backend",
|
|
125
|
+
)
|
|
126
|
+
try:
|
|
127
|
+
profile_metadata = get_capture_profile(profile)
|
|
128
|
+
except UnknownCaptureProfile:
|
|
129
|
+
return CaptureDeviceDiscovery(
|
|
130
|
+
profile_id=profile,
|
|
131
|
+
backend_preference=backend_preference,
|
|
132
|
+
resolved_backend=resolve_backend_preference(
|
|
133
|
+
backend_preference,
|
|
134
|
+
sys_platform=_sys_platform,
|
|
135
|
+
),
|
|
136
|
+
backend_status="unsupported",
|
|
137
|
+
reason="unsupported_profile",
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
resolved_backend = resolve_backend_preference(
|
|
141
|
+
backend_preference,
|
|
142
|
+
sys_platform=_sys_platform,
|
|
143
|
+
)
|
|
144
|
+
if profile_metadata.id != "n3dsxl":
|
|
145
|
+
return CaptureDeviceDiscovery(
|
|
146
|
+
profile_id=profile_metadata.id,
|
|
147
|
+
backend_preference=backend_preference,
|
|
148
|
+
resolved_backend=resolved_backend,
|
|
149
|
+
backend_status="unsupported",
|
|
150
|
+
reason="unsupported_profile",
|
|
151
|
+
)
|
|
152
|
+
if resolved_backend == "libusb":
|
|
153
|
+
return _discover_libusb(
|
|
154
|
+
profile_id=profile_metadata.id,
|
|
155
|
+
backend_preference=backend_preference,
|
|
156
|
+
resolved_backend=resolved_backend,
|
|
157
|
+
include_rejected=include_rejected,
|
|
158
|
+
backend=_libusb_backend,
|
|
159
|
+
)
|
|
160
|
+
if resolved_backend in ("d3xx", "d3xx-native"):
|
|
161
|
+
return _discover_d3xx(
|
|
162
|
+
profile_id=profile_metadata.id,
|
|
163
|
+
backend_preference=backend_preference,
|
|
164
|
+
resolved_backend=resolved_backend,
|
|
165
|
+
include_rejected=include_rejected,
|
|
166
|
+
backend=_d3xx_backend,
|
|
167
|
+
)
|
|
168
|
+
return CaptureDeviceDiscovery(
|
|
169
|
+
profile_id=profile_metadata.id,
|
|
170
|
+
backend_preference=backend_preference,
|
|
171
|
+
resolved_backend=resolved_backend,
|
|
172
|
+
backend_status="unsupported",
|
|
173
|
+
reason="unsupported_backend",
|
|
174
|
+
)
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
def _discover_libusb(
|
|
178
|
+
*,
|
|
179
|
+
profile_id: str,
|
|
180
|
+
backend_preference: BackendPreference,
|
|
181
|
+
resolved_backend: str,
|
|
182
|
+
include_rejected: bool,
|
|
183
|
+
backend: object | None,
|
|
184
|
+
) -> CaptureDeviceDiscovery:
|
|
185
|
+
from ponkan.devices.n3dsxl_ftd3 import ( # noqa: PLC0415
|
|
186
|
+
DeviceCandidate,
|
|
187
|
+
RejectedDevice,
|
|
188
|
+
list_n3dsxl_devices,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
actual_backend = _new_libusb_backend() if backend is None else backend
|
|
192
|
+
listing = list_n3dsxl_devices(cast("LibusbBackend", actual_backend))
|
|
193
|
+
devices: list[CaptureDeviceInfo] = [
|
|
194
|
+
_info_from_candidate(
|
|
195
|
+
cast("_CandidateInfo", candidate),
|
|
196
|
+
profile_id=profile_id,
|
|
197
|
+
backend_preference=backend_preference,
|
|
198
|
+
resolved_backend=resolved_backend,
|
|
199
|
+
)
|
|
200
|
+
for candidate in listing.candidates
|
|
201
|
+
if isinstance(candidate, DeviceCandidate)
|
|
202
|
+
]
|
|
203
|
+
if include_rejected:
|
|
204
|
+
devices.extend(
|
|
205
|
+
_info_from_rejected(
|
|
206
|
+
cast("_RejectedInfo", rejected),
|
|
207
|
+
profile_id=profile_id,
|
|
208
|
+
backend_preference=backend_preference,
|
|
209
|
+
resolved_backend=resolved_backend,
|
|
210
|
+
)
|
|
211
|
+
for rejected in listing.rejected
|
|
212
|
+
if isinstance(rejected, RejectedDevice)
|
|
213
|
+
)
|
|
214
|
+
return _available_result(
|
|
215
|
+
profile_id=profile_id,
|
|
216
|
+
backend_preference=backend_preference,
|
|
217
|
+
resolved_backend=resolved_backend,
|
|
218
|
+
devices=tuple(devices),
|
|
219
|
+
accepted_count=len(listing.candidates),
|
|
220
|
+
)
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
def _discover_d3xx(
|
|
224
|
+
*,
|
|
225
|
+
profile_id: str,
|
|
226
|
+
backend_preference: BackendPreference,
|
|
227
|
+
resolved_backend: str,
|
|
228
|
+
include_rejected: bool,
|
|
229
|
+
backend: object | None,
|
|
230
|
+
) -> CaptureDeviceDiscovery:
|
|
231
|
+
from ponkan.devices.n3dsxl_ftd3 import ( # noqa: PLC0415
|
|
232
|
+
DeviceCandidate,
|
|
233
|
+
RejectedDevice,
|
|
234
|
+
classify_n3dsxl_device,
|
|
235
|
+
)
|
|
236
|
+
|
|
237
|
+
try:
|
|
238
|
+
actual_backend = cast(
|
|
239
|
+
"_D3xxDiscoveryBackend",
|
|
240
|
+
_new_d3xx_backend() if backend is None else backend,
|
|
241
|
+
)
|
|
242
|
+
d3xx_devices = actual_backend.iter_devices()
|
|
243
|
+
except DependencyUnavailableError as exc:
|
|
244
|
+
return CaptureDeviceDiscovery(
|
|
245
|
+
profile_id=profile_id,
|
|
246
|
+
backend_preference=backend_preference,
|
|
247
|
+
resolved_backend=resolved_backend,
|
|
248
|
+
backend_status="unavailable",
|
|
249
|
+
reason=exc.reason or "unknown",
|
|
250
|
+
remediation=exc.remediation,
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
devices: list[CaptureDeviceInfo] = []
|
|
254
|
+
accepted_count = 0
|
|
255
|
+
for d3xx_device in d3xx_devices:
|
|
256
|
+
usb_info = cast("_D3xxDeviceInfo", d3xx_device).usb_info
|
|
257
|
+
classified = classify_n3dsxl_device(cast("UsbDeviceInfo", usb_info))
|
|
258
|
+
if isinstance(classified, DeviceCandidate):
|
|
259
|
+
accepted_count += 1
|
|
260
|
+
devices.append(
|
|
261
|
+
_info_from_candidate(
|
|
262
|
+
cast("_CandidateInfo", classified),
|
|
263
|
+
profile_id=profile_id,
|
|
264
|
+
backend_preference=backend_preference,
|
|
265
|
+
resolved_backend=resolved_backend,
|
|
266
|
+
)
|
|
267
|
+
)
|
|
268
|
+
elif include_rejected and isinstance(classified, RejectedDevice):
|
|
269
|
+
devices.append(
|
|
270
|
+
_info_from_rejected(
|
|
271
|
+
cast("_RejectedInfo", classified),
|
|
272
|
+
profile_id=profile_id,
|
|
273
|
+
backend_preference=backend_preference,
|
|
274
|
+
resolved_backend=resolved_backend,
|
|
275
|
+
)
|
|
276
|
+
)
|
|
277
|
+
return _available_result(
|
|
278
|
+
profile_id=profile_id,
|
|
279
|
+
backend_preference=backend_preference,
|
|
280
|
+
resolved_backend=resolved_backend,
|
|
281
|
+
devices=tuple(devices),
|
|
282
|
+
accepted_count=accepted_count,
|
|
283
|
+
)
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
def _available_result(
|
|
287
|
+
*,
|
|
288
|
+
profile_id: str,
|
|
289
|
+
backend_preference: BackendPreference,
|
|
290
|
+
resolved_backend: str,
|
|
291
|
+
devices: tuple[CaptureDeviceInfo, ...],
|
|
292
|
+
accepted_count: int,
|
|
293
|
+
) -> CaptureDeviceDiscovery:
|
|
294
|
+
reason: CaptureReason = "available" if accepted_count else "device_not_found"
|
|
295
|
+
return CaptureDeviceDiscovery(
|
|
296
|
+
profile_id=profile_id,
|
|
297
|
+
backend_preference=backend_preference,
|
|
298
|
+
resolved_backend=resolved_backend,
|
|
299
|
+
backend_status="available",
|
|
300
|
+
reason=reason,
|
|
301
|
+
devices=devices,
|
|
302
|
+
)
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
def _info_from_candidate(
|
|
306
|
+
candidate: _CandidateInfo,
|
|
307
|
+
*,
|
|
308
|
+
profile_id: str,
|
|
309
|
+
backend_preference: BackendPreference,
|
|
310
|
+
resolved_backend: str,
|
|
311
|
+
) -> CaptureDeviceInfo:
|
|
312
|
+
info = candidate.info
|
|
313
|
+
return CaptureDeviceInfo(
|
|
314
|
+
id=_device_id(resolved_backend, info),
|
|
315
|
+
display_name=candidate.product_string or "new 3DS XL",
|
|
316
|
+
profile_id=profile_id,
|
|
317
|
+
model=candidate.model,
|
|
318
|
+
backend=resolved_backend,
|
|
319
|
+
backend_preference=backend_preference,
|
|
320
|
+
vendor_id=info.vendor_id,
|
|
321
|
+
product_id=info.product_id,
|
|
322
|
+
serial_number=info.serial_number,
|
|
323
|
+
product_string=candidate.product_string,
|
|
324
|
+
product_string_status=candidate.product_string_status,
|
|
325
|
+
connection_status="available",
|
|
326
|
+
id_stability=_id_stability(info),
|
|
327
|
+
)
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
def _info_from_rejected(
|
|
331
|
+
rejected: _RejectedInfo,
|
|
332
|
+
*,
|
|
333
|
+
profile_id: str,
|
|
334
|
+
backend_preference: BackendPreference,
|
|
335
|
+
resolved_backend: str,
|
|
336
|
+
) -> CaptureDeviceInfo:
|
|
337
|
+
info = rejected.info
|
|
338
|
+
return CaptureDeviceInfo(
|
|
339
|
+
id=_device_id(resolved_backend, info),
|
|
340
|
+
display_name=info.product_string or "Rejected FTDI device",
|
|
341
|
+
profile_id=profile_id,
|
|
342
|
+
model="unknown",
|
|
343
|
+
backend=resolved_backend,
|
|
344
|
+
backend_preference=backend_preference,
|
|
345
|
+
vendor_id=info.vendor_id,
|
|
346
|
+
product_id=info.product_id,
|
|
347
|
+
serial_number=info.serial_number,
|
|
348
|
+
product_string=info.product_string,
|
|
349
|
+
product_string_status="rejected" if info.product_string else "unknown",
|
|
350
|
+
connection_status="rejected",
|
|
351
|
+
id_stability=_id_stability(info),
|
|
352
|
+
reason="device_rejected",
|
|
353
|
+
remediation=rejected.reason,
|
|
354
|
+
)
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
def _device_id(backend: str, info: _UsbInfo) -> str:
|
|
358
|
+
if info.serial_number:
|
|
359
|
+
return f"{backend}:{info.serial_number}"
|
|
360
|
+
if info.bus_number is not None and info.address is not None:
|
|
361
|
+
return f"{backend}:bus{info.bus_number}:address{info.address}"
|
|
362
|
+
if info.vendor_id is not None and info.product_id is not None:
|
|
363
|
+
return f"{backend}:vid{info.vendor_id:04x}:pid{info.product_id:04x}"
|
|
364
|
+
return f"{backend}:unknown"
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
def _id_stability(info: _UsbInfo) -> IdStability:
|
|
368
|
+
if info.serial_number:
|
|
369
|
+
return "stable"
|
|
370
|
+
if info.bus_number is not None and info.address is not None:
|
|
371
|
+
return "session"
|
|
372
|
+
return "unknown"
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
def _new_libusb_backend() -> object:
|
|
376
|
+
from ponkan.transport.libusb_backend import Usb1Backend # noqa: PLC0415
|
|
377
|
+
|
|
378
|
+
return Usb1Backend()
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
def _new_d3xx_backend() -> _D3xxDiscoveryBackend:
|
|
382
|
+
from ponkan.transport.d3xx_backend import D3xxBackend # noqa: PLC0415
|
|
383
|
+
|
|
384
|
+
return D3xxBackend()
|
|
385
|
+
|
|
386
|
+
|
|
387
|
+
__all__ = [
|
|
388
|
+
"BackendPreference",
|
|
389
|
+
"BackendStatus",
|
|
390
|
+
"CaptureDeviceDiscovery",
|
|
391
|
+
"CaptureDeviceInfo",
|
|
392
|
+
"ConnectionStatus",
|
|
393
|
+
"IdStability",
|
|
394
|
+
"ProductStringStatus",
|
|
395
|
+
"list_capture_devices",
|
|
396
|
+
"resolve_backend_preference",
|
|
397
|
+
]
|
ponkan/devices/n3dsxl_ftd3.py
CHANGED
|
@@ -162,7 +162,7 @@ class N3DSXLDevice:
|
|
|
162
162
|
final close fails through the backend.
|
|
163
163
|
"""
|
|
164
164
|
if not isinstance(candidate, DeviceCandidate):
|
|
165
|
-
raise UnsupportedDevice
|
|
165
|
+
raise UnsupportedDevice(profile="n3dsxl")
|
|
166
166
|
handle = backend.open(candidate.info)
|
|
167
167
|
claimed_interfaces: list[int] = []
|
|
168
168
|
try:
|
ponkan/errors.py
CHANGED
|
@@ -1,6 +1,23 @@
|
|
|
1
1
|
"""Project exception hierarchy."""
|
|
2
2
|
|
|
3
3
|
from dataclasses import dataclass
|
|
4
|
+
from typing import ClassVar, Literal
|
|
5
|
+
|
|
6
|
+
CaptureReason = Literal[
|
|
7
|
+
"available",
|
|
8
|
+
"missing_package",
|
|
9
|
+
"missing_driver",
|
|
10
|
+
"missing_runtime",
|
|
11
|
+
"unsupported_platform",
|
|
12
|
+
"unsupported_backend",
|
|
13
|
+
"unsupported_profile",
|
|
14
|
+
"device_not_found",
|
|
15
|
+
"device_rejected",
|
|
16
|
+
"open_failed",
|
|
17
|
+
"read_failed",
|
|
18
|
+
"decode_failed",
|
|
19
|
+
"unknown",
|
|
20
|
+
]
|
|
4
21
|
|
|
5
22
|
|
|
6
23
|
class CaptureError(Exception):
|
|
@@ -10,6 +27,52 @@ class CaptureError(Exception):
|
|
|
10
27
|
matching individual USB, decode, or optional-dependency errors.
|
|
11
28
|
"""
|
|
12
29
|
|
|
30
|
+
DEFAULT_CODE: ClassVar[str] = "capture_error"
|
|
31
|
+
DEFAULT_REASON: ClassVar[CaptureReason | None] = None
|
|
32
|
+
DEFAULT_RECOVERABLE: ClassVar[bool] = False
|
|
33
|
+
|
|
34
|
+
code: str
|
|
35
|
+
profile: str | None
|
|
36
|
+
backend: str | None
|
|
37
|
+
reason: CaptureReason | None
|
|
38
|
+
recoverable: bool
|
|
39
|
+
remediation: str | None
|
|
40
|
+
|
|
41
|
+
def __init__(
|
|
42
|
+
self,
|
|
43
|
+
message: str | None = None,
|
|
44
|
+
*,
|
|
45
|
+
code: str | None = None,
|
|
46
|
+
profile: str | None = None,
|
|
47
|
+
backend: str | None = None,
|
|
48
|
+
reason: CaptureReason | None = None,
|
|
49
|
+
recoverable: bool | None = None,
|
|
50
|
+
remediation: str | None = None,
|
|
51
|
+
) -> None:
|
|
52
|
+
"""Create a package error with machine-readable context."""
|
|
53
|
+
if message is None:
|
|
54
|
+
super().__init__()
|
|
55
|
+
else:
|
|
56
|
+
super().__init__(message)
|
|
57
|
+
self.code = self.DEFAULT_CODE if code is None else code
|
|
58
|
+
self.profile = profile
|
|
59
|
+
self.backend = backend
|
|
60
|
+
self.reason = self.DEFAULT_REASON if reason is None else reason
|
|
61
|
+
self.recoverable = self.DEFAULT_RECOVERABLE if recoverable is None else recoverable
|
|
62
|
+
self.remediation = remediation
|
|
63
|
+
|
|
64
|
+
def to_dict(self) -> dict[str, object]:
|
|
65
|
+
"""Return JSON-friendly structured error fields."""
|
|
66
|
+
return {
|
|
67
|
+
"message": str(self),
|
|
68
|
+
"code": self.code,
|
|
69
|
+
"profile": self.profile,
|
|
70
|
+
"backend": self.backend,
|
|
71
|
+
"reason": self.reason,
|
|
72
|
+
"recoverable": self.recoverable,
|
|
73
|
+
"remediation": self.remediation,
|
|
74
|
+
}
|
|
75
|
+
|
|
13
76
|
|
|
14
77
|
class UnsupportedDevice(CaptureError): # noqa: N818
|
|
15
78
|
"""Raised when a USB device is not an accepted capture target.
|
|
@@ -18,10 +81,17 @@ class UnsupportedDevice(CaptureError): # noqa: N818
|
|
|
18
81
|
session API was not an accepted candidate.
|
|
19
82
|
"""
|
|
20
83
|
|
|
84
|
+
DEFAULT_CODE: ClassVar[str] = "device_rejected"
|
|
85
|
+
DEFAULT_REASON: ClassVar[CaptureReason | None] = "device_rejected"
|
|
86
|
+
|
|
21
87
|
|
|
22
88
|
class DeviceNotFound(CaptureError): # noqa: N818
|
|
23
89
|
"""Raised when no accepted capture device is visible to the selected backend."""
|
|
24
90
|
|
|
91
|
+
DEFAULT_CODE: ClassVar[str] = "device_not_found"
|
|
92
|
+
DEFAULT_REASON: ClassVar[CaptureReason | None] = "device_not_found"
|
|
93
|
+
DEFAULT_RECOVERABLE: ClassVar[bool] = True
|
|
94
|
+
|
|
25
95
|
|
|
26
96
|
class DeviceOpenError(CaptureError):
|
|
27
97
|
"""Raised when opening or configuring a USB device fails.
|
|
@@ -30,6 +100,10 @@ class DeviceOpenError(CaptureError):
|
|
|
30
100
|
interface claim failures, and cleanup failures during close.
|
|
31
101
|
"""
|
|
32
102
|
|
|
103
|
+
DEFAULT_CODE: ClassVar[str] = "open_failed"
|
|
104
|
+
DEFAULT_REASON: ClassVar[CaptureReason | None] = "open_failed"
|
|
105
|
+
DEFAULT_RECOVERABLE: ClassVar[bool] = True
|
|
106
|
+
|
|
33
107
|
|
|
34
108
|
class InterfaceClaimError(DeviceOpenError):
|
|
35
109
|
"""Raised when claiming a required USB interface fails.
|
|
@@ -75,7 +149,12 @@ class Ftd3CommandError(CaptureError):
|
|
|
75
149
|
Args:
|
|
76
150
|
context: Structured command details captured at the failure point.
|
|
77
151
|
"""
|
|
78
|
-
super().__init__(
|
|
152
|
+
super().__init__(
|
|
153
|
+
context.command_name,
|
|
154
|
+
code="ftd3_command_failed",
|
|
155
|
+
reason="read_failed",
|
|
156
|
+
recoverable=True,
|
|
157
|
+
)
|
|
79
158
|
self.context = context
|
|
80
159
|
|
|
81
160
|
|
|
@@ -86,6 +165,8 @@ class UnsupportedOperation(CaptureError): # noqa: N818
|
|
|
86
165
|
to 2D new 3DS XL frame acquisition.
|
|
87
166
|
"""
|
|
88
167
|
|
|
168
|
+
DEFAULT_CODE: ClassVar[str] = "unsupported_operation"
|
|
169
|
+
|
|
89
170
|
|
|
90
171
|
class TransferOverflow(CaptureError): # noqa: N818
|
|
91
172
|
"""Raised when a transfer length is outside the accepted capture bounds.
|
|
@@ -94,6 +175,9 @@ class TransferOverflow(CaptureError): # noqa: N818
|
|
|
94
175
|
allows.
|
|
95
176
|
"""
|
|
96
177
|
|
|
178
|
+
DEFAULT_CODE: ClassVar[str] = "transfer_overflow"
|
|
179
|
+
DEFAULT_REASON: ClassVar[CaptureReason | None] = "read_failed"
|
|
180
|
+
|
|
97
181
|
|
|
98
182
|
class DecodeError(CaptureError):
|
|
99
183
|
"""Raised when raw frame data cannot be decoded.
|
|
@@ -102,6 +186,9 @@ class DecodeError(CaptureError):
|
|
|
102
186
|
color-space requests, and unsupported screen selection.
|
|
103
187
|
"""
|
|
104
188
|
|
|
189
|
+
DEFAULT_CODE: ClassVar[str] = "decode_failed"
|
|
190
|
+
DEFAULT_REASON: ClassVar[CaptureReason | None] = "decode_failed"
|
|
191
|
+
|
|
105
192
|
|
|
106
193
|
class DependencyUnavailableError(CaptureError):
|
|
107
194
|
"""Raised when a runtime dependency required by a selected path is missing.
|
|
@@ -110,6 +197,10 @@ class DependencyUnavailableError(CaptureError):
|
|
|
110
197
|
optional-extra dependencies.
|
|
111
198
|
"""
|
|
112
199
|
|
|
200
|
+
DEFAULT_CODE: ClassVar[str] = "dependency_unavailable"
|
|
201
|
+
DEFAULT_REASON: ClassVar[CaptureReason | None] = "missing_package"
|
|
202
|
+
DEFAULT_RECOVERABLE: ClassVar[bool] = True
|
|
203
|
+
|
|
113
204
|
@classmethod
|
|
114
205
|
def for_backend_dependency(
|
|
115
206
|
cls,
|
|
@@ -117,11 +208,16 @@ class DependencyUnavailableError(CaptureError):
|
|
|
117
208
|
backend: str,
|
|
118
209
|
) -> "DependencyUnavailableError":
|
|
119
210
|
"""Create an error for a dependency required by one backend."""
|
|
120
|
-
|
|
121
|
-
f"{dependency} is required for the {backend} backend. "
|
|
211
|
+
remediation = (
|
|
122
212
|
"Install ponkan-python with dependencies for this platform, or select a "
|
|
123
213
|
"backend supported by this environment."
|
|
124
214
|
)
|
|
215
|
+
return cls(
|
|
216
|
+
f"{dependency} is required for the {backend} backend. {remediation}",
|
|
217
|
+
backend=backend,
|
|
218
|
+
reason="missing_package",
|
|
219
|
+
remediation=remediation,
|
|
220
|
+
)
|
|
125
221
|
|
|
126
222
|
|
|
127
223
|
class OptionalDependencyError(DependencyUnavailableError):
|
|
@@ -137,4 +233,5 @@ class OptionalDependencyError(DependencyUnavailableError):
|
|
|
137
233
|
dependency: Human-readable dependency name.
|
|
138
234
|
extra: Project extra that installs the dependency.
|
|
139
235
|
"""
|
|
140
|
-
|
|
236
|
+
remediation = f"Install {dependency} or use the {extra} extra."
|
|
237
|
+
super().__init__(remediation, reason="missing_package", remediation=remediation)
|
ponkan/layouts.py
ADDED
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"""Public capture layout metadata registry."""
|
|
2
|
+
|
|
3
|
+
from collections.abc import Mapping
|
|
4
|
+
from dataclasses import dataclass
|
|
5
|
+
from types import MappingProxyType
|
|
6
|
+
from typing import Literal
|
|
7
|
+
|
|
8
|
+
from ponkan.errors import CaptureError
|
|
9
|
+
from ponkan.protocol.sizes import BOTTOM_WIDTH_3DS, HEIGHT_3DS, RGB8_CHANNELS, TOP_WIDTH_3DS
|
|
10
|
+
|
|
11
|
+
ScreenRole = Literal["primary", "touch"]
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@dataclass(frozen=True, slots=True)
|
|
15
|
+
class ScreenInfo:
|
|
16
|
+
"""Public metadata for one logical screen in a capture layout."""
|
|
17
|
+
|
|
18
|
+
id: str
|
|
19
|
+
display_name: str
|
|
20
|
+
width: int
|
|
21
|
+
height: int
|
|
22
|
+
channels: int
|
|
23
|
+
colorspace: str
|
|
24
|
+
coordinate_space: str
|
|
25
|
+
role: ScreenRole
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def ndarray_shape(self) -> tuple[int, int, int]:
|
|
29
|
+
"""Return the image shape exposed by public frame APIs."""
|
|
30
|
+
return (self.height, self.width, self.channels)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@dataclass(frozen=True, slots=True)
|
|
34
|
+
class CompositeOutputInfo:
|
|
35
|
+
"""Public metadata for one output returned by ``CaptureReader.read``."""
|
|
36
|
+
|
|
37
|
+
id: str
|
|
38
|
+
display_name: str
|
|
39
|
+
width: int
|
|
40
|
+
height: int
|
|
41
|
+
channels: int
|
|
42
|
+
screens: tuple[str, ...]
|
|
43
|
+
placement: str
|
|
44
|
+
default: bool = False
|
|
45
|
+
|
|
46
|
+
@property
|
|
47
|
+
def ndarray_shape(self) -> tuple[int, int, int]:
|
|
48
|
+
"""Return the ndarray shape produced for this output."""
|
|
49
|
+
return (self.height, self.width, self.channels)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@dataclass(frozen=True, slots=True)
|
|
53
|
+
class CaptureLayout:
|
|
54
|
+
"""Public screen and output metadata for one capture profile layout."""
|
|
55
|
+
|
|
56
|
+
id: str
|
|
57
|
+
display_name: str
|
|
58
|
+
screens: tuple[ScreenInfo, ...]
|
|
59
|
+
outputs: tuple[CompositeOutputInfo, ...]
|
|
60
|
+
aspect_hints: Mapping[str, object]
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class UnknownCaptureLayout(CaptureError): # noqa: N818
|
|
64
|
+
"""Raised when a capture layout id is not present in the runtime registry."""
|
|
65
|
+
|
|
66
|
+
def __init__(self, layout_id: str) -> None:
|
|
67
|
+
"""Create an error for an unknown layout id."""
|
|
68
|
+
super().__init__(
|
|
69
|
+
f"unknown capture layout: {layout_id}",
|
|
70
|
+
code="unsupported_layout",
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
_N3DSXL_LAYOUT = CaptureLayout(
|
|
75
|
+
id="3ds_dual_screen",
|
|
76
|
+
display_name="3DS Dual Screen",
|
|
77
|
+
screens=(
|
|
78
|
+
ScreenInfo(
|
|
79
|
+
id="top",
|
|
80
|
+
display_name="Top Screen",
|
|
81
|
+
width=TOP_WIDTH_3DS,
|
|
82
|
+
height=HEIGHT_3DS,
|
|
83
|
+
channels=RGB8_CHANNELS,
|
|
84
|
+
colorspace="RGB",
|
|
85
|
+
coordinate_space="top_pixels",
|
|
86
|
+
role="primary",
|
|
87
|
+
),
|
|
88
|
+
ScreenInfo(
|
|
89
|
+
id="bottom",
|
|
90
|
+
display_name="Bottom Screen",
|
|
91
|
+
width=BOTTOM_WIDTH_3DS,
|
|
92
|
+
height=HEIGHT_3DS,
|
|
93
|
+
channels=RGB8_CHANNELS,
|
|
94
|
+
colorspace="RGB",
|
|
95
|
+
coordinate_space="bottom_pixels",
|
|
96
|
+
role="touch",
|
|
97
|
+
),
|
|
98
|
+
),
|
|
99
|
+
outputs=(
|
|
100
|
+
CompositeOutputInfo(
|
|
101
|
+
id="top",
|
|
102
|
+
display_name="Top Screen",
|
|
103
|
+
width=TOP_WIDTH_3DS,
|
|
104
|
+
height=HEIGHT_3DS,
|
|
105
|
+
channels=RGB8_CHANNELS,
|
|
106
|
+
screens=("top",),
|
|
107
|
+
placement="single",
|
|
108
|
+
),
|
|
109
|
+
CompositeOutputInfo(
|
|
110
|
+
id="bottom",
|
|
111
|
+
display_name="Bottom Screen",
|
|
112
|
+
width=BOTTOM_WIDTH_3DS,
|
|
113
|
+
height=HEIGHT_3DS,
|
|
114
|
+
channels=RGB8_CHANNELS,
|
|
115
|
+
screens=("bottom",),
|
|
116
|
+
placement="single",
|
|
117
|
+
),
|
|
118
|
+
CompositeOutputInfo(
|
|
119
|
+
id="both_vertical",
|
|
120
|
+
display_name="Both Screens Vertical",
|
|
121
|
+
width=TOP_WIDTH_3DS,
|
|
122
|
+
height=HEIGHT_3DS * 2,
|
|
123
|
+
channels=RGB8_CHANNELS,
|
|
124
|
+
screens=("top", "bottom"),
|
|
125
|
+
placement="top_above_bottom_centered",
|
|
126
|
+
default=True,
|
|
127
|
+
),
|
|
128
|
+
),
|
|
129
|
+
aspect_hints=MappingProxyType(
|
|
130
|
+
{
|
|
131
|
+
"pixel_aspect": "square",
|
|
132
|
+
"bottom_horizontal_offset": (TOP_WIDTH_3DS - BOTTOM_WIDTH_3DS) // 2,
|
|
133
|
+
"stereo_3d": "unsupported",
|
|
134
|
+
}
|
|
135
|
+
),
|
|
136
|
+
)
|
|
137
|
+
|
|
138
|
+
_LAYOUTS = (_N3DSXL_LAYOUT,)
|
|
139
|
+
_LAYOUT_INDEX = {layout.id: layout for layout in _LAYOUTS}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def list_capture_layouts() -> tuple[CaptureLayout, ...]:
|
|
143
|
+
"""Return implemented capture layouts without touching hardware."""
|
|
144
|
+
return _LAYOUTS
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def get_capture_layout(layout_id: str) -> CaptureLayout:
|
|
148
|
+
"""Return one capture layout by stable id.
|
|
149
|
+
|
|
150
|
+
Args:
|
|
151
|
+
layout_id: Stable layout id such as ``"3ds_dual_screen"``.
|
|
152
|
+
|
|
153
|
+
Raises:
|
|
154
|
+
UnknownCaptureLayout: The id is not in the runtime registry.
|
|
155
|
+
"""
|
|
156
|
+
try:
|
|
157
|
+
return _LAYOUT_INDEX[layout_id]
|
|
158
|
+
except KeyError as exc:
|
|
159
|
+
raise UnknownCaptureLayout(layout_id) from exc
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
__all__ = [
|
|
163
|
+
"CaptureLayout",
|
|
164
|
+
"CompositeOutputInfo",
|
|
165
|
+
"ScreenInfo",
|
|
166
|
+
"ScreenRole",
|
|
167
|
+
"UnknownCaptureLayout",
|
|
168
|
+
"get_capture_layout",
|
|
169
|
+
"list_capture_layouts",
|
|
170
|
+
]
|
ponkan/profiles.py
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"""Public capture profile metadata registry."""
|
|
2
|
+
|
|
3
|
+
from dataclasses import dataclass
|
|
4
|
+
from typing import Literal
|
|
5
|
+
|
|
6
|
+
from ponkan.errors import CaptureError
|
|
7
|
+
|
|
8
|
+
SupportStatus = Literal["stable", "experimental"]
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@dataclass(frozen=True, slots=True)
|
|
12
|
+
class CaptureProfile:
|
|
13
|
+
"""Public metadata describing one implemented capture profile."""
|
|
14
|
+
|
|
15
|
+
id: str
|
|
16
|
+
display_name: str
|
|
17
|
+
model: str
|
|
18
|
+
family: str
|
|
19
|
+
provider: str
|
|
20
|
+
support_status: SupportStatus
|
|
21
|
+
default_output: str
|
|
22
|
+
default_colorspace: str
|
|
23
|
+
supported_colorspaces: tuple[str, ...]
|
|
24
|
+
native_fps: float | None
|
|
25
|
+
screen_layout: str
|
|
26
|
+
supported_outputs: tuple[str, ...]
|
|
27
|
+
supports_3d: bool
|
|
28
|
+
supports_audio: bool
|
|
29
|
+
supports_recording: bool
|
|
30
|
+
aliases: tuple[str, ...] = ()
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class UnknownCaptureProfile(CaptureError): # noqa: N818
|
|
34
|
+
"""Raised when a profile id or alias is not present in the runtime registry."""
|
|
35
|
+
|
|
36
|
+
def __init__(self, profile: str) -> None:
|
|
37
|
+
"""Create an error for an unknown capture profile id or alias."""
|
|
38
|
+
super().__init__(
|
|
39
|
+
f"unknown capture profile: {profile}",
|
|
40
|
+
code="unsupported_profile",
|
|
41
|
+
reason="unsupported_profile",
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
_N3DSXL_PROFILE = CaptureProfile(
|
|
46
|
+
id="n3dsxl",
|
|
47
|
+
display_name="new 3DS XL",
|
|
48
|
+
model="new_3ds_xl",
|
|
49
|
+
family="3ds",
|
|
50
|
+
provider="ponkan-python",
|
|
51
|
+
support_status="stable",
|
|
52
|
+
default_output="both_vertical",
|
|
53
|
+
default_colorspace="RGB",
|
|
54
|
+
supported_colorspaces=("RGB", "BGR"),
|
|
55
|
+
native_fps=59.8,
|
|
56
|
+
screen_layout="3ds_dual_screen",
|
|
57
|
+
supported_outputs=("top", "bottom", "both_vertical"),
|
|
58
|
+
supports_3d=False,
|
|
59
|
+
supports_audio=False,
|
|
60
|
+
supports_recording=False,
|
|
61
|
+
aliases=("new_3ds_xl",),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
_PROFILES = (_N3DSXL_PROFILE,)
|
|
65
|
+
_PROFILE_INDEX = {key: profile for profile in _PROFILES for key in (profile.id, *profile.aliases)}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def list_capture_profiles() -> tuple[CaptureProfile, ...]:
|
|
69
|
+
"""Return implemented runtime capture profiles without touching hardware."""
|
|
70
|
+
return _PROFILES
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def get_capture_profile(profile: str) -> CaptureProfile:
|
|
74
|
+
"""Return one capture profile by stable id or alias.
|
|
75
|
+
|
|
76
|
+
Args:
|
|
77
|
+
profile: Stable profile id or alias such as ``"n3dsxl"`` or
|
|
78
|
+
``"new_3ds_xl"``.
|
|
79
|
+
|
|
80
|
+
Raises:
|
|
81
|
+
UnknownCaptureProfile: The id or alias is not in the runtime registry.
|
|
82
|
+
"""
|
|
83
|
+
try:
|
|
84
|
+
return _PROFILE_INDEX[profile]
|
|
85
|
+
except KeyError as exc:
|
|
86
|
+
raise UnknownCaptureProfile(profile) from exc
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
__all__ = [
|
|
90
|
+
"CaptureProfile",
|
|
91
|
+
"SupportStatus",
|
|
92
|
+
"UnknownCaptureProfile",
|
|
93
|
+
"get_capture_profile",
|
|
94
|
+
"list_capture_profiles",
|
|
95
|
+
]
|
ponkan/protocol/n3dsxl.py
CHANGED
|
@@ -135,7 +135,7 @@ class N3DSXLProtocol:
|
|
|
135
135
|
``DeviceCandidate``.
|
|
136
136
|
"""
|
|
137
137
|
if not isinstance(device.candidate, DeviceCandidate):
|
|
138
|
-
raise UnsupportedDevice
|
|
138
|
+
raise UnsupportedDevice(profile="n3dsxl")
|
|
139
139
|
self.device = device
|
|
140
140
|
self.pipe = pipe
|
|
141
141
|
|
|
@@ -151,7 +151,7 @@ class N3DSXLProtocol:
|
|
|
151
151
|
Ftd3CommandError: Any FTD3 setup command or transfer fails.
|
|
152
152
|
"""
|
|
153
153
|
if mode_3d:
|
|
154
|
-
raise UnsupportedOperation
|
|
154
|
+
raise UnsupportedOperation(profile="n3dsxl")
|
|
155
155
|
|
|
156
156
|
self.pipe.create_pipe()
|
|
157
157
|
self._drain_data()
|
|
@@ -181,7 +181,7 @@ class N3DSXLProtocol:
|
|
|
181
181
|
TransferOverflow: The backend reports more than the 2D capture size.
|
|
182
182
|
"""
|
|
183
183
|
if mode_3d:
|
|
184
|
-
raise UnsupportedOperation
|
|
184
|
+
raise UnsupportedOperation(profile="n3dsxl")
|
|
185
185
|
transfer_size = capture_size(mode_3d=False)
|
|
186
186
|
expected_video_size = video_size(mode_3d=False)
|
|
187
187
|
payload = b""
|
ponkan/streaming/engine.py
CHANGED
|
@@ -63,6 +63,7 @@ class StreamingEngine:
|
|
|
63
63
|
self._stats = StreamStats()
|
|
64
64
|
self._completion_queue: queue.Queue[RawFrameResult] = queue.Queue(maxsize=raw_slots)
|
|
65
65
|
self._running = False
|
|
66
|
+
self._released = False
|
|
66
67
|
self._next_sequence = 0
|
|
67
68
|
self._timing = StreamTimingCollector() if collect_timing else None
|
|
68
69
|
|
|
@@ -72,6 +73,9 @@ class StreamingEngine:
|
|
|
72
73
|
The method is idempotent while already running. Each slot is checked out
|
|
73
74
|
and submitted once.
|
|
74
75
|
"""
|
|
76
|
+
if self._released:
|
|
77
|
+
message = "streaming backend has already been released"
|
|
78
|
+
raise RuntimeError(message)
|
|
75
79
|
if self._running:
|
|
76
80
|
return
|
|
77
81
|
self._running = True
|
|
@@ -86,16 +90,18 @@ class StreamingEngine:
|
|
|
86
90
|
shutdown drains using the backend's own semantics.
|
|
87
91
|
"""
|
|
88
92
|
_ = timeout
|
|
89
|
-
if
|
|
93
|
+
if self._released:
|
|
90
94
|
return
|
|
91
|
-
self._running
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
95
|
+
if self._running or self.buffer_pool.in_use_count():
|
|
96
|
+
self._running = False
|
|
97
|
+
self._stats.cancelled += self.buffer_pool.in_use_count()
|
|
98
|
+
self.backend.cancel_all()
|
|
99
|
+
self.backend.drain()
|
|
100
|
+
for slot in self.buffer_pool.slots:
|
|
101
|
+
if slot.in_use:
|
|
102
|
+
self.buffer_pool.release(slot.index)
|
|
98
103
|
self.backend.release()
|
|
104
|
+
self._released = True
|
|
99
105
|
|
|
100
106
|
def process_completed(self, *, limit: int | None = None) -> int:
|
|
101
107
|
"""Decode completed raw results outside the callback.
|
ponkan/tools/list_devices.py
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
1
|
"""List N3DSXL USB device candidates."""
|
|
2
2
|
|
|
3
|
-
from ponkan.devices.
|
|
4
|
-
from ponkan.transport.libusb_backend import LibusbBackend
|
|
3
|
+
from ponkan.devices.discovery import CaptureDeviceDiscovery, list_capture_devices
|
|
4
|
+
from ponkan.transport.libusb_backend import LibusbBackend
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
def format_device_listing(
|
|
7
|
+
def format_device_listing(discovery: CaptureDeviceDiscovery) -> str:
|
|
8
8
|
"""Format candidates and rejected FTDI devices for humans.
|
|
9
9
|
|
|
10
10
|
Args:
|
|
11
|
-
|
|
11
|
+
discovery: Public discovery result from ``list_capture_devices``.
|
|
12
12
|
|
|
13
13
|
Returns:
|
|
14
14
|
Multi-line text containing accepted candidates and rejected FTDI-family
|
|
15
15
|
devices, or a single empty-state line.
|
|
16
16
|
"""
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
f"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"
|
|
35
|
-
f"{
|
|
36
|
-
f"{
|
|
37
|
-
f"product={info.product_string or '-'} reason={rejected.reason}"
|
|
17
|
+
header = (
|
|
18
|
+
f"profile={discovery.profile_id} "
|
|
19
|
+
f"backend={discovery.resolved_backend} "
|
|
20
|
+
f"status={discovery.backend_status} "
|
|
21
|
+
f"reason={discovery.reason}"
|
|
22
|
+
)
|
|
23
|
+
if not discovery.devices:
|
|
24
|
+
return f"{header}\nNo capture devices found."
|
|
25
|
+
|
|
26
|
+
lines: list[str] = [header]
|
|
27
|
+
lines.extend(
|
|
28
|
+
(
|
|
29
|
+
f"{device.connection_status} "
|
|
30
|
+
f"id={device.id} "
|
|
31
|
+
f"{_format_vid_pid(device.vendor_id, device.product_id)} "
|
|
32
|
+
f"product={device.product_string or '-'} "
|
|
33
|
+
f"product_status={device.product_string_status} "
|
|
34
|
+
f"serial={device.serial_number or '-'} "
|
|
35
|
+
f"reason={device.reason} "
|
|
36
|
+
f"remediation={device.remediation or '-'}"
|
|
38
37
|
)
|
|
38
|
+
for device in discovery.devices
|
|
39
|
+
)
|
|
39
40
|
return "\n".join(lines)
|
|
40
41
|
|
|
41
42
|
|
|
@@ -49,18 +50,18 @@ def main(backend: LibusbBackend | None = None) -> int:
|
|
|
49
50
|
Returns:
|
|
50
51
|
Process status code. Zero means the listing was printed.
|
|
51
52
|
"""
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
discovery = list_capture_devices(
|
|
54
|
+
backend="libusb",
|
|
55
|
+
include_rejected=True,
|
|
56
|
+
_libusb_backend=backend,
|
|
57
|
+
)
|
|
58
|
+
print(format_device_listing(discovery))
|
|
54
59
|
return 0
|
|
55
60
|
|
|
56
61
|
|
|
57
|
-
def
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return f"bus={bus} address={address_text}"
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
def _format_vid_pid(vendor_id: int, product_id: int) -> str:
|
|
62
|
+
def _format_vid_pid(vendor_id: int | None, product_id: int | None) -> str:
|
|
63
|
+
if vendor_id is None or product_id is None:
|
|
64
|
+
return "vidpid=-"
|
|
64
65
|
return f"0x{vendor_id:04x}:0x{product_id:04x}"
|
|
65
66
|
|
|
66
67
|
|
ponkan/transport/d3xx_backend.py
CHANGED
|
@@ -10,7 +10,7 @@ from types import ModuleType
|
|
|
10
10
|
from typing import Any, Literal, Protocol, cast
|
|
11
11
|
|
|
12
12
|
from ponkan.devices.n3dsxl_ftd3 import DeviceCandidate, classify_n3dsxl_device
|
|
13
|
-
from ponkan.errors import CaptureError, DependencyUnavailableError
|
|
13
|
+
from ponkan.errors import CaptureError, CaptureReason, DependencyUnavailableError
|
|
14
14
|
from ponkan.protocol.sizes import N3DSXL_VENDOR_ID
|
|
15
15
|
from ponkan.transport.libusb_backend import UsbDeviceInfo
|
|
16
16
|
|
|
@@ -187,6 +187,7 @@ class D3xxBackendError(CaptureError):
|
|
|
187
187
|
status: int | None = None,
|
|
188
188
|
*,
|
|
189
189
|
field_name: str | None = None,
|
|
190
|
+
reason: CaptureReason = "open_failed",
|
|
190
191
|
) -> None:
|
|
191
192
|
"""Create a structured D3XX backend failure.
|
|
192
193
|
|
|
@@ -194,9 +195,16 @@ class D3xxBackendError(CaptureError):
|
|
|
194
195
|
function: D3XX function or parser step associated with the failure.
|
|
195
196
|
status: Optional native status code.
|
|
196
197
|
field_name: Optional detail field that was missing or invalid.
|
|
198
|
+
reason: Shared machine-readable failure reason.
|
|
197
199
|
"""
|
|
198
200
|
message = _d3xx_error_message(function, status, field_name)
|
|
199
|
-
super().__init__(
|
|
201
|
+
super().__init__(
|
|
202
|
+
message,
|
|
203
|
+
code="d3xx_backend_failed",
|
|
204
|
+
backend="d3xx",
|
|
205
|
+
reason=reason,
|
|
206
|
+
recoverable=True,
|
|
207
|
+
)
|
|
200
208
|
self.function = function
|
|
201
209
|
self.status = status
|
|
202
210
|
self.field_name = field_name
|
|
@@ -211,7 +219,7 @@ class D3xxBackendError(CaptureError):
|
|
|
211
219
|
Returns:
|
|
212
220
|
Structured backend error.
|
|
213
221
|
"""
|
|
214
|
-
return cls("missing field", field_name=field_name)
|
|
222
|
+
return cls("missing field", field_name=field_name, reason="read_failed")
|
|
215
223
|
|
|
216
224
|
@classmethod
|
|
217
225
|
def invalid_integer(cls, field_name: str) -> "D3xxBackendError":
|
|
@@ -223,7 +231,7 @@ class D3xxBackendError(CaptureError):
|
|
|
223
231
|
Returns:
|
|
224
232
|
Structured backend error.
|
|
225
233
|
"""
|
|
226
|
-
return cls("invalid integer", field_name=field_name)
|
|
234
|
+
return cls("invalid integer", field_name=field_name, reason="read_failed")
|
|
227
235
|
|
|
228
236
|
@classmethod
|
|
229
237
|
def invalid_candidate(cls) -> "D3xxBackendError":
|
ponkan/transport/ftd3_pipe.py
CHANGED
|
@@ -162,7 +162,7 @@ class Ftd3Pipe:
|
|
|
162
162
|
UnsupportedDevice: ``session`` is not an ``N3DSXLDevice``.
|
|
163
163
|
"""
|
|
164
164
|
if not isinstance(session, N3DSXLDevice):
|
|
165
|
-
raise UnsupportedDevice
|
|
165
|
+
raise UnsupportedDevice(profile="n3dsxl")
|
|
166
166
|
self.session = session
|
|
167
167
|
self._next_command_id = first_command_id
|
|
168
168
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: ponkan-python
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A Python capture library focused on new 3DS XL capture board frame acquisition.
|
|
5
5
|
Project-URL: Documentation, https://github.com/niart120/ponkan-python/blob/master/docs/api.md
|
|
6
6
|
Project-URL: Homepage, https://github.com/niart120/ponkan-python
|
|
@@ -44,7 +44,8 @@ Description-Content-Type: text/markdown
|
|
|
44
44
|
- raw frame の保存と metadata 記録
|
|
45
45
|
- RGB8 `numpy.ndarray` への変換
|
|
46
46
|
- Pillow 互換出力
|
|
47
|
-
-
|
|
47
|
+
- profile / layout / device discovery metadata の提供
|
|
48
|
+
- D3XX / D3XX native backend による streaming MVP
|
|
48
49
|
|
|
49
50
|
詳細は次の仕様書を参照してください。
|
|
50
51
|
|
|
@@ -59,7 +60,7 @@ Python 3.12 以上を対象にしています。現在の検証基準は Python
|
|
|
59
60
|
pip install ponkan-python
|
|
60
61
|
```
|
|
61
62
|
|
|
62
|
-
Windows の FTDI D3XX backend では、通常依存として PyD3XX を利用します。PNG 変換には Pillow extra を追加します。
|
|
63
|
+
Windows の FTDI D3XX backend では、通常依存として PyD3XX を利用します。D3XX 用の optional extra はありません。PNG 変換には Pillow extra を追加します。
|
|
63
64
|
|
|
64
65
|
```console
|
|
65
66
|
pip install "ponkan-python[image]"
|
|
@@ -87,6 +88,8 @@ with open_capture(output=CaptureOutput.TOP, colorspace="BGR") as cap:
|
|
|
87
88
|
top_bgr = cap.read()
|
|
88
89
|
```
|
|
89
90
|
|
|
91
|
+
`backend="auto"` は Windows では `d3xx-native` に解決されます。従来の sequential D3XX path を使う場合は `backend="d3xx"` を明示します。`libusb` は discovery / lower-level path では使われますが、high-level `open_capture()` では現在未対応です。
|
|
92
|
+
|
|
90
93
|
3DS 固有の上画面・下画面・sequence などが必要な場合は `read_frame()` を使います。
|
|
91
94
|
|
|
92
95
|
```python
|
|
@@ -112,7 +115,7 @@ ponkan-raw-to-png captures/n3dsxl/raw_2d_001.bin --metadata captures/n3dsxl/raw_
|
|
|
112
115
|
ponkan-stream-n3dsxl --duration 10 --stats
|
|
113
116
|
```
|
|
114
117
|
|
|
115
|
-
|
|
118
|
+
`ponkan-list-devices` は libusb descriptor path で FTDI-family device を分類し、N3DSXL command は送信しません。実機へ N3DSXL command を送る操作は、事前に device identity と安全境界を確認してから実行してください。
|
|
116
119
|
|
|
117
120
|
## Development
|
|
118
121
|
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
ponkan/__init__.py,sha256=
|
|
1
|
+
ponkan/__init__.py,sha256=0Fa3QyRssF_6HYBa1irYWokG6sJmpbnfT_BzeAOn0V8,1746
|
|
2
2
|
ponkan/artifacts.py,sha256=E5C63HfEnkQBeXH0E-oQ1_NhhzJYcYYNUrw5S-OtUL8,1961
|
|
3
|
-
ponkan/capture.py,sha256=
|
|
4
|
-
ponkan/errors.py,sha256=
|
|
3
|
+
ponkan/capture.py,sha256=0QqqGyzvAwwfP8lNNK-R3guQ1f0vuyTHUuOJRZZrrRE,20824
|
|
4
|
+
ponkan/errors.py,sha256=vNYU_v7kAZUqfxynbuxA1aHWoh1Rx2xrtg1bq-8ddMs,7574
|
|
5
5
|
ponkan/hardware_gate.py,sha256=1f6WP2rDTNTo35IRLjeK8S7cJeVUDFZ5aVoJ88oo8Qw,4828
|
|
6
|
+
ponkan/layouts.py,sha256=QdcU3kkG6dmlEJGN3Cx5hDjsq7_tgJSQ0oG4zsWev_Y,4639
|
|
7
|
+
ponkan/profiles.py,sha256=it0IvfSiDYVrby1JffePO-dzDnXYjAzWq9ULOiAjTAA,2590
|
|
6
8
|
ponkan/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
7
9
|
ponkan/devices/__init__.py,sha256=uYvgYIgcwciikPR23c_p674XuJDKTamUH0PKV3ECXiE,30
|
|
8
|
-
ponkan/devices/
|
|
10
|
+
ponkan/devices/discovery.py,sha256=KaCtIYXSud5toZagT8NMMXc0_Ar-sXQa0AcX-l3QH-A,12593
|
|
11
|
+
ponkan/devices/n3dsxl_ftd3.py,sha256=x2dRn75qkHX-r1dYjoBFCRGa0X1P3E3HjtHBI9Yi6-Y,8405
|
|
9
12
|
ponkan/image/__init__.py,sha256=-23f78dfqU2Q-WOIvYCqstSexYId_K3sP8pBn7tkUQU,38
|
|
10
13
|
ponkan/image/frame.py,sha256=_3FbgVXivKD94rmYq_oODyyk2Nh7_7nau7bhIzYFvjE,5788
|
|
11
14
|
ponkan/protocol/__init__.py,sha256=lCr27_-ula3CtVd5nzTFbhEARAoiMecGEv8n8Q_xH6I,48
|
|
12
15
|
ponkan/protocol/layout_3ds.py,sha256=30UcCFzYmfegPyTkAwwd52HB_aR1SG2v769Obo8sKtg,1950
|
|
13
|
-
ponkan/protocol/n3dsxl.py,sha256=
|
|
16
|
+
ponkan/protocol/n3dsxl.py,sha256=6IzTmTgyj1WUlzTUMxO89m4LoIRkMvKxIdZchgfN32E,8478
|
|
14
17
|
ponkan/protocol/sizes.py,sha256=AlI9Ge-Dk6Rx8UI4eF2VVRpxcZ_pCEuC46TVc-qmJxQ,4129
|
|
15
18
|
ponkan/streaming/__init__.py,sha256=30b10h-HyMhyGW0emIJ1Cc_189kolDxuNoYMfft05Hc,35
|
|
16
19
|
ponkan/streaming/buffers.py,sha256=03ku6ZWkWwo4b6q9gnYaJmoee7zqur9WEkEUyHe6tI8,4727
|
|
17
|
-
ponkan/streaming/engine.py,sha256=
|
|
20
|
+
ponkan/streaming/engine.py,sha256=J8N8qD0qeA8xkWckL5cw4fmX-i_ZAJ0ZbRK8rCUO3jo,10984
|
|
18
21
|
ponkan/streaming/policies.py,sha256=VUPdpJTDL4I2mgJC5qmrYOHQEGCSI8FjEjsjjOryM_g,4308
|
|
19
22
|
ponkan/streaming/stats.py,sha256=WT7q16CPtOel95xGn3uG6iXSzA15WOEMjlSWJ3hbzWY,8534
|
|
20
23
|
ponkan/tools/__init__.py,sha256=tMgzvLN5Tq0ia16r9UUMA6QOZ8NOHjwJRuS0KSk9LAg,28
|
|
21
24
|
ponkan/tools/capture_raw.py,sha256=SSGbvTxs_uirJ_UeIy9uIXVBem1pRTrs2DpHVezPxs8,1478
|
|
22
|
-
ponkan/tools/list_devices.py,sha256=
|
|
25
|
+
ponkan/tools/list_devices.py,sha256=EcMYznXhx6TEMjuP2XCMArSpkhQW9Q4e9Ui8DwY-AmQ,2130
|
|
23
26
|
ponkan/tools/raw_to_png.py,sha256=4MvD2J7IqKmHWabBAD1JSvDPdkxvSUS6pPXJLaq2sqM,8008
|
|
24
27
|
ponkan/tools/stream_n3dsxl.py,sha256=YzEVwgq_ul5H7N617JICyaTlFqK_yAxfH60T2ieEPbE,5317
|
|
25
28
|
ponkan/transport/__init__.py,sha256=zp3na4DRpaD2_RCvB5rGxdZW7xOahfhmJpdvvpPpBFI,29
|
|
26
|
-
ponkan/transport/d3xx_backend.py,sha256=
|
|
29
|
+
ponkan/transport/d3xx_backend.py,sha256=36UgiPFBIaFRJLMLMug0CXge7tlso9747RLOFefT3x0,27349
|
|
27
30
|
ponkan/transport/d3xx_native.py,sha256=-yBKecFENaYimGIgK2UoNgjoW8q6od4aMWGyMtdX5xM,9007
|
|
28
31
|
ponkan/transport/d3xx_native_streaming.py,sha256=4aa8FFbZxJJM9IrudWcDU_P7mOIr238VtWhRpJqRi50,10872
|
|
29
32
|
ponkan/transport/d3xx_streaming.py,sha256=cWC1cqcFejZavbBe-N8GisVm00H4UhMh0yW68ylWVWc,6669
|
|
30
33
|
ponkan/transport/ftd3_backend.py,sha256=wwQIQnW3Tkh02QkwPbeHzVtqiIK3zVGGMn1xpIc-SoE,7771
|
|
31
|
-
ponkan/transport/ftd3_pipe.py,sha256=
|
|
34
|
+
ponkan/transport/ftd3_pipe.py,sha256=BBS2qiCCXKggMMk7oMy4PwdlHKpMnwcvz-MOmu3DbRQ,12679
|
|
32
35
|
ponkan/transport/libusb_async.py,sha256=mghsycUK0XvnDYqQRDhu_brzDvj_ECEc0txN2RuBpSw,4129
|
|
33
36
|
ponkan/transport/libusb_backend.py,sha256=-FkZkEDHmBA0FLU3TwGKG1iVcH5dlu3Mu9sONuhpCak,11031
|
|
34
|
-
ponkan_python-0.1.
|
|
35
|
-
ponkan_python-0.1.
|
|
36
|
-
ponkan_python-0.1.
|
|
37
|
-
ponkan_python-0.1.
|
|
38
|
-
ponkan_python-0.1.
|
|
39
|
-
ponkan_python-0.1.
|
|
37
|
+
ponkan_python-0.2.1.dist-info/METADATA,sha256=cJIW7UDC6cxNl8MmvhiVrunIPBoyvLfGFYMEm4OBOqU,6281
|
|
38
|
+
ponkan_python-0.2.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
39
|
+
ponkan_python-0.2.1.dist-info/entry_points.txt,sha256=6C8SCtqa7D-Rvf4EIfXrdlxJ4pQHhjLiAwlS4OS5d4w,226
|
|
40
|
+
ponkan_python-0.2.1.dist-info/licenses/LICENSE,sha256=ikr_NtR46ZO2hvTX0LtCeb9wbRb19pCcY97Hw_6VA6c,1096
|
|
41
|
+
ponkan_python-0.2.1.dist-info/licenses/NOTICE.md,sha256=KZPWtflkTM1GTH5e5UP7OvP7D8xYJotWUxgiePabylc,445
|
|
42
|
+
ponkan_python-0.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|