-
Notifications
You must be signed in to change notification settings - Fork 12
add participant to pcm #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughAdded a Changes
Sequence Diagram(s)sequenceDiagram
participant Writer as AudioStreamTrack.write()
participant Queue as InternalQueue
participant Logger as Logger
participant PCM as PcmData
Writer->>PCM: receive pcm (has .participant, .duration_ms)
alt queue full
Writer->>Logger: warn("queue overflow", max_queue_size, pcm.duration_ms)
Writer-->>Queue: drop/skip pcm
else enqueue
Writer-->>Queue: push pcm
end
sequenceDiagram
participant Source as PcmData (source)
participant Transform as to_float32 / resample / copy / head / tail
participant Result as PcmData (result)
Source->>Transform: transform(samples, ...)
Transform->>Result: construct PcmData(..., participant=Source.participant)
note right of Result: participant propagated
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Disabled knowledge base sources:
📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (7)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
getstream/video/rtc/track_util.py (1)
101-101: Consider initializingparticipantin__init__for clarity.The class-level attribute definition works but may be confusing since it's not explicitly set in
__init__. While Python allows this pattern (instance assignments shadow the class attribute), initializing it in__init__would be more explicit and maintainable.Apply this diff to initialize in
__init__:- participant: Any = None - def __init__( self, sample_rate: int, @@ -111,6 +110,7 @@ time_base: Optional[float] = None, channels: int = 1, ): + self.participant: Any = None """ Initialize PcmData.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
getstream/video/rtc/audio_track.py(1 hunks)getstream/video/rtc/track_util.py(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
getstream/video/rtc/audio_track.py (1)
getstream/video/rtc/track_util.py (1)
duration_ms(236-238)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: Tests (3.13)
- GitHub Check: Tests (3.10)
- GitHub Check: Tests (3.11)
- GitHub Check: Tests (3.12)
🔇 Additional comments (1)
getstream/video/rtc/audio_track.py (1)
94-94: LGTM! Enhanced logging provides valuable context.The addition of
max_queue_sizeandpcm.duration_msto the overflow warning improves debugging by showing both the queue limit and the duration of the PCM data being processed.
@tbarbugli
Summary by CodeRabbit