Skip to content
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

Add getter methods for mid and paused in TrackLocalContext #640

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

h3poteto
Copy link
Contributor

@h3poteto h3poteto commented Dec 5, 2024

Dear maintainers,
Thank you for your efforts in maintaining this project.

I have added two getter methods to retrieve the mid and paused fields from the TrackLocalContext struct.

In my project, I am implementing a custom TrackLocal similar to TrackLocalStaticRTP. The bind method provides a TrackLocalContext, but currently, I am unable to access all its fields because they are marked as pub(crate).

async fn bind(&self, t: &TrackLocalContext) -> Result<RTCRtpCodecParameters> {

To address this, I have introduced getter methods for the mid and paused fields, ensuring that these values can be accessed outside the crate while maintaining encapsulation.

I hope this change aligns with the project's design principles and proves helpful for others with similar use cases. Please let me know if there are any concerns or adjustments needed.

Thank you for considering this contribution.

@rainliu rainliu merged commit aaaba24 into webrtc-rs:master Dec 5, 2024
4 of 5 checks passed
@h3poteto h3poteto deleted the feat/track_local_getter branch December 6, 2024 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants