ponkan-python 0.2.0__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/streaming/engine.py +14 -8
- {ponkan_python-0.2.0.dist-info → ponkan_python-0.2.1.dist-info}/METADATA +2 -2
- {ponkan_python-0.2.0.dist-info → ponkan_python-0.2.1.dist-info}/RECORD +7 -7
- {ponkan_python-0.2.0.dist-info → ponkan_python-0.2.1.dist-info}/WHEEL +1 -1
- {ponkan_python-0.2.0.dist-info → ponkan_python-0.2.1.dist-info}/entry_points.txt +0 -0
- {ponkan_python-0.2.0.dist-info → ponkan_python-0.2.1.dist-info}/licenses/LICENSE +0 -0
- {ponkan_python-0.2.0.dist-info → ponkan_python-0.2.1.dist-info}/licenses/NOTICE.md +0 -0
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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: ponkan-python
|
|
3
|
-
Version: 0.2.
|
|
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
|
|
@@ -17,7 +17,7 @@ ponkan/protocol/n3dsxl.py,sha256=6IzTmTgyj1WUlzTUMxO89m4LoIRkMvKxIdZchgfN32E,847
|
|
|
17
17
|
ponkan/protocol/sizes.py,sha256=AlI9Ge-Dk6Rx8UI4eF2VVRpxcZ_pCEuC46TVc-qmJxQ,4129
|
|
18
18
|
ponkan/streaming/__init__.py,sha256=30b10h-HyMhyGW0emIJ1Cc_189kolDxuNoYMfft05Hc,35
|
|
19
19
|
ponkan/streaming/buffers.py,sha256=03ku6ZWkWwo4b6q9gnYaJmoee7zqur9WEkEUyHe6tI8,4727
|
|
20
|
-
ponkan/streaming/engine.py,sha256=
|
|
20
|
+
ponkan/streaming/engine.py,sha256=J8N8qD0qeA8xkWckL5cw4fmX-i_ZAJ0ZbRK8rCUO3jo,10984
|
|
21
21
|
ponkan/streaming/policies.py,sha256=VUPdpJTDL4I2mgJC5qmrYOHQEGCSI8FjEjsjjOryM_g,4308
|
|
22
22
|
ponkan/streaming/stats.py,sha256=WT7q16CPtOel95xGn3uG6iXSzA15WOEMjlSWJ3hbzWY,8534
|
|
23
23
|
ponkan/tools/__init__.py,sha256=tMgzvLN5Tq0ia16r9UUMA6QOZ8NOHjwJRuS0KSk9LAg,28
|
|
@@ -34,9 +34,9 @@ ponkan/transport/ftd3_backend.py,sha256=wwQIQnW3Tkh02QkwPbeHzVtqiIK3zVGGMn1xpIc-
|
|
|
34
34
|
ponkan/transport/ftd3_pipe.py,sha256=BBS2qiCCXKggMMk7oMy4PwdlHKpMnwcvz-MOmu3DbRQ,12679
|
|
35
35
|
ponkan/transport/libusb_async.py,sha256=mghsycUK0XvnDYqQRDhu_brzDvj_ECEc0txN2RuBpSw,4129
|
|
36
36
|
ponkan/transport/libusb_backend.py,sha256=-FkZkEDHmBA0FLU3TwGKG1iVcH5dlu3Mu9sONuhpCak,11031
|
|
37
|
-
ponkan_python-0.2.
|
|
38
|
-
ponkan_python-0.2.
|
|
39
|
-
ponkan_python-0.2.
|
|
40
|
-
ponkan_python-0.2.
|
|
41
|
-
ponkan_python-0.2.
|
|
42
|
-
ponkan_python-0.2.
|
|
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
|