mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 19:06:11 +00:00
Let the device listing match ffmpeg 8's bracket prefix
The dshow parser pinned the bracketed prefix to the `[dshow @ ...]` the older builds print, and ffmpeg 8 writes `[in#0 @ ...]` there instead: on a current install every line fell through the anchors, the device list came back empty, and a dictation with no microphone picked could not start at all. The prefix is now any bracketed tag, which the anchors and the quoted name still keep apart from the error lines. Pinned with a listing taken verbatim from ffmpeg 8.1.2 on Windows 11, third kind marker `(none)` included. Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5
parent
aef33585c1
commit
11a4058e16
+5
-3
@@ -874,11 +874,13 @@ def _avfoundation_default_output():
|
||||
# this listing in. Newer builds mark each device `(audio)` or `(video)`; older
|
||||
# ones print no marker and group the devices under a heading instead. Both are
|
||||
# anchored at each end, so that the error lines the command ends with, which
|
||||
# quote the device name that was not found, are not read as devices.
|
||||
# quote the device name that was not found, are not read as devices. The
|
||||
# bracketed prefix is not pinned to a spelling: ffmpeg 8 writes `[in#0 @ ...]`
|
||||
# where the versions before it wrote `[dshow @ ...]`.
|
||||
_DSHOW_ENTRY = re.compile(
|
||||
r'^(?:\[dshow @ [^\]]*\]\s*)?"([^"]+)"\s*(?:\(([^)]*)\))?\s*$')
|
||||
r'^(?:\[[^\]]*\]\s*)?"([^"]+)"\s*(?:\(([^)]*)\))?\s*$')
|
||||
_DSHOW_ALTERNATIVE = re.compile(
|
||||
r'^(?:\[dshow @ [^\]]*\]\s*)?Alternative name\s+"([^"]+)"\s*$')
|
||||
r'^(?:\[[^\]]*\]\s*)?Alternative name\s+"([^"]+)"\s*$')
|
||||
_DSHOW_HEADING = re.compile(r'DirectShow (audio|video) devices')
|
||||
|
||||
# The last listing taken, so that a dictation does not pay for one of its own.
|
||||
|
||||
Reference in New Issue
Block a user