Skip to content

Commit 85bd8ef

Browse files
committed
add participant to pcm
1 parent b9966c3 commit 85bd8ef

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

getstream/video/rtc/audio_track.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async def write(self, pcm: PcmData):
9191
break
9292

9393
logger.warning(
94-
"Audio queue overflow, dropped items",
94+
"Audio queue overflow, dropped items max is %d. pcm duration %s ms", self.max_queue_size, pcm.duration_ms,
9595
extra={
9696
"dropped_items": dropped_items,
9797
"queue_size": self._queue.qsize(),

getstream/video/rtc/track_util.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class PcmData:
9898
time_base: The time base for converting timestamps to seconds.
9999
channels: Number of audio channels (1=mono, 2=stereo)
100100
"""
101+
participant: Any = None
101102

102103
def __init__(
103104
self,
@@ -529,7 +530,9 @@ def resample(
529530
resampler = Resampler(
530531
format=self.format, sample_rate=target_sample_rate, channels=target_channels
531532
)
532-
return resampler.resample(self)
533+
pcm = resampler.resample(self)
534+
pcm.participant = self.participant
535+
return pcm
533536

534537
def to_bytes(self) -> bytes:
535538
"""Return interleaved PCM bytes.

0 commit comments

Comments
 (0)