From 265203286f94960c2379cb16f82f7c1fccf6d1ca Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Sat, 24 Oct 2026 07:44:14 -0700 Subject: [PATCH] fix(carla): stop calling the removed TrackProducer.flush #6595 removed media.TrackProducer.flush from the Python bindings, since the catalog now measures jitter from timestamps. The CARLA simulator bridge still called it, so its pyright check fails on main. The diff did not touch demo/carla/sim, so CI never selected the carla module. Co-Authored-By: Claude Opus 5.5 --- demo/carla/sim/moq_carla_sim/bridge.py | 2 -- demo/carla/sim/tests/test_bridge.py | 8 +------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/demo/carla/sim/moq_carla_sim/bridge.py b/demo/carla/sim/moq_carla_sim/bridge.py index 019e4ef13ab..98b8aa5c7aa 100644 --- a/demo/carla/sim/moq_carla_sim/bridge.py +++ b/demo/carla/sim/moq_carla_sim/bridge.py @@ -373,8 +373,6 @@ def publish(self, frame: Frame) -> None: self._origin_us = frame.timestamp_us timestamp = timedelta(microseconds=max(0, frame.timestamp_us - self._origin_us)) track.write_frame(frame.payload, timestamp) - # Live encoder output: records the handoff for the catalog's jitter. - track.flush(timestamp) self.published[frame.rendition] += 1 async def watch_demand(self, on_demand: Callable[[bool], None] | None = None) -> None: diff --git a/demo/carla/sim/tests/test_bridge.py b/demo/carla/sim/tests/test_bridge.py index 33c1566eb96..628f307751a 100644 --- a/demo/carla/sim/tests/test_bridge.py +++ b/demo/carla/sim/tests/test_bridge.py @@ -127,7 +127,6 @@ def __init__(self, init: bytes, name: str, hint) -> None: self.name = name self.hint = hint self.frames: list[tuple[bytes, int]] = [] - self.flushed: list[int] = [] self.finished = False self.demand_handle = FakeDemand() @@ -137,9 +136,6 @@ def demand(self) -> FakeDemand: def write_frame(self, payload: bytes, timestamp: timedelta) -> None: self.frames.append((payload, microseconds(timestamp))) - def flush(self, timestamp: timedelta) -> None: - self.flushed.append(microseconds(timestamp)) - def finish(self) -> None: self.finished = True @@ -230,8 +226,7 @@ async def scenario() -> None: broadcast.tracks["sd"].demand_handle.want(0) assert await _request(reader) == (0x03, struct.pack(" None: while stream.published != [1, 2]: await asyncio.sleep(0) assert broadcast.tracks["hd"].frames == [(b"idr", 0), (b"p", 33_333)] - assert broadcast.tracks["hd"].flushed == [0, 33_333] assert broadcast.tracks["sd"].frames == [(b"idr-sd", 0)] broadcast.tracks["hd"].demand_handle.want(None) assert await _request(reader) == (0x03, struct.pack("