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

Adding more functionalities currently unimplemented in Java bindings #161

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

singlerr
Copy link

Created JNI bridges for functionalities that exists in native WebRTC but not webrtc java bindings

added RTCPeerConnection#setBitrate
added extra constructors for AudioProcessing that allows users to pass over audio settings(samplerates, stereo .etc)
added AudioTrackSource#addSink

...

for more informations please checkout the commits

@singlerr singlerr changed the title Adding More functionalities unimplemented before Adding more functionalities unimplemented before Feb 28, 2025
@singlerr singlerr changed the title Adding more functionalities unimplemented before Adding more functionalities currently unimplemented in Java bindings Feb 28, 2025
@kinsleykajiva
Copy link

@singlerr Hi buddy, I am still new to JNI and I'm struggling to set it up locally so I can add more functionality as you've done. Well done!
I also wanted to know if, in this PR, you added functionality to set a custom audio source, say from an audio file (e.g. WAV, MP3, etc.), to override the audio source in the onData() method to push data chunks. Because, on my end, I've been struggling with setting it up on Windows and it's been a mess.

@singlerr
Copy link
Author

singlerr commented Mar 5, 2025

Hi! @kinsleykajiva , there is no way to set custom audio source instance in this pr. But, fortunately the author wrote some audio source implementations which can extract audio data from wav file. I planned it to my further commits. Also you can create jni yourself.

@kinsleykajiva
Copy link

ok noted , well I will have to keep on trying to set this up .

But, fortunately the author wrote some audio source implementations which can extract audio data from wav file.
What did you mean or can you share reference or example ?

@singlerr
Copy link
Author

singlerr commented Mar 5, 2025

What did you mean or can you share reference or example ?

See WavAudioFileSource.cpp in meda/audio directory

@kinsleykajiva
Copy link

Ok, noted. I have looked at the code in that area, but I seem to see that it is for playback cases. Correct me if I am wrong. The goal, in the end, is to send audio chunks to that's the use case. But if this is going over my head, can you help me understand how to use this from the exposed Java APIs?

@singlerr
Copy link
Author

@kinsleykajiva create wav audio source instance and attatch it to track by setAudioSource

@kinsleykajiva
Copy link

@devopvoid any update on adding this PR

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