Skip to content

Commit fbf26c5

Browse files
fixup! core: services: recoder_extractor: Add first version
1 parent 1aef10a commit fbf26c5

File tree

1 file changed

+9
-9
lines changed
  • core/services/recorder_extractor

1 file changed

+9
-9
lines changed

core/services/recorder_extractor/main.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,9 @@ async def build_thumbnail_bytes(path: Path) -> bytes:
105105
stderr=asyncio.subprocess.PIPE,
106106
text=False,
107107
)
108-
stdout, stderr = await discover_proc.communicate()
109-
stdout = stdout.decode("utf-8", "ignore")
110-
stderr = stderr.decode("utf-8", "ignore")
108+
stdout_bytes, stderr_bytes = await play_proc.communicate()
109+
stdout = stdout_bytes.decode("utf-8", "ignore")
110+
stderr = stderr_bytes.decode("utf-8", "ignore")
111111
if discover_proc.returncode != 0:
112112
logger.error(f"gst-discoverer-1.0 failed for {path}: {stderr.strip()}")
113113
raise HTTPException(
@@ -146,9 +146,9 @@ async def build_thumbnail_bytes(path: Path) -> bytes:
146146
stderr=asyncio.subprocess.PIPE,
147147
text=False,
148148
)
149-
stdout, stderr = await play_proc.communicate()
150-
stdout = stdout.decode("utf-8", "ignore")
151-
stderr = stderr.decode("utf-8", "ignore")
149+
stdout_bytes, stderr_bytes = await play_proc.communicate()
150+
stdout = stdout_bytes.decode("utf-8", "ignore")
151+
stderr = stderr_bytes.decode("utf-8", "ignore")
152152
if play_proc.returncode != 0 or not stdout:
153153
logger.error(f"gst-play-1.0 failed for {path} (code={play_proc.returncode}): {stderr}")
154154
raise HTTPException(
@@ -191,9 +191,9 @@ async def extract_mcap_recordings() -> None:
191191
stderr=asyncio.subprocess.PIPE,
192192
text=False,
193193
)
194-
stdout, stderr = await process.communicate()
195-
stdout = stdout.decode("utf-8", "ignore")
196-
stderr = stderr.decode("utf-8", "ignore")
194+
stdout_bytes, stderr_bytes = await play_proc.communicate()
195+
stdout = stdout_bytes.decode("utf-8", "ignore")
196+
stderr = stderr_bytes.decode("utf-8", "ignore")
197197
if process.returncode != 0:
198198
logger.error(
199199
f"MCAP extract failed for {mcap_path} (code={process.returncode}): {stderr}",

0 commit comments

Comments
 (0)