Skip to content

Commit

Permalink
bump livekit-ffi to 0.12.6 (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
typester authored Jan 9, 2025
1 parent 61cf8df commit ea9205f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 13 deletions.
5 changes: 1 addition & 4 deletions examples/room_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ def on_track_subscribed(
print(f"participant identity: {participant.identity}")
print(f"participant name: {participant.name}")
print(f"participant kind: {participant.kind}")
print(
f"participant track publications: {
participant.track_publications}"
)
print(f"participant track publications: {participant.track_publications}")
for tid, publication in participant.track_publications.items():
print(f"\ttrack id: {tid}")
print(f"\t\ttrack publication: {publication}")
Expand Down
3 changes: 1 addition & 2 deletions examples/video-stream/audio_wave.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
import cv2
except ImportError:
raise RuntimeError(
"cv2 is required to run this example, "
"install with `pip install opencv-python`"
"cv2 is required to run this example, install with `pip install opencv-python`"
)

# ensure LIVEKIT_URL, LIVEKIT_API_KEY, and LIVEKIT_API_SECRET are set
Expand Down
2 changes: 1 addition & 1 deletion examples/video-stream/video_play.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ async def _log_fps(av_sync: rtc.AVSynchronizer):
first_video_frame, video_timestamp = await video_stream.__anext__()
first_audio_frame, audio_timestamp = await audio_stream.__anext__()
logger.info(
f"first video duration: {1/media_info.video_fps:.3f}s, "
f"first video duration: {1 / media_info.video_fps:.3f}s, "
f"first audio duration: {first_audio_frame.duration:.3f}s"
)
await av_sync.push(first_video_frame, video_timestamp)
Expand Down
9 changes: 4 additions & 5 deletions livekit-rtc/livekit/rtc/synchronizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,15 @@ async def wait_next_process(self) -> None:
# check if significantly behind schedule
if -sleep_time > self._max_delay_tolerance_secs:
logger.warning(
f"Frame capture was behind schedule for "
f"{-sleep_time * 1000:.2f} ms"
f"Frame capture was behind schedule for {-sleep_time * 1000:.2f} ms"
)
self._next_frame_time = time.perf_counter()

def after_process(self) -> None:
"""Update timing information after processing a frame."""
assert (
self._next_frame_time is not None
), "wait_next_process must be called first"
assert self._next_frame_time is not None, (
"wait_next_process must be called first"
)

# update timing information
self._send_timestamps.append(time.perf_counter())
Expand Down

0 comments on commit ea9205f

Please sign in to comment.