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

I have a question about AudioTrackInterface. #11

Open
hsnks100 opened this issue Dec 13, 2017 · 2 comments
Open

I have a question about AudioTrackInterface. #11

hsnks100 opened this issue Dec 13, 2017 · 2 comments

Comments

@hsnks100
Copy link

hsnks100 commented Dec 13, 2017

First, I appreciate you reason why I got your help about my project.

I am going to implementation webrtc-h264capturer with Audio.

I additionally am going to implementation following code.

#if 0
    rtc::scoped_refptr<webrtc::AudioTrackInterface> audio_track(
            peer_connection_factory_->CreateAudioTrack(
                kAudioLabel, peer_connection_factory_->CreateAudioSource(NULL)));
#endif
...
    //stream->AddTrack(audio_track);

I searched about CreateAudioSource, but I can't found this issue.
We have some audio codes such as "g711a", "g711u", "adpcm", "g726", "pcm".

How do I implementation CreateAudioSource's param? I now assume that it can implementation capturer like what I combine between h264encoder, ffmpeg. right?

I am waiting to your help. If You can't help me directly, I just want to get some links.

Thank you in advance.

@hsnks100 hsnks100 changed the title I have a question. I have a question about AudioTrackInterface. Dec 13, 2017
@nicotyze
Copy link
Owner

Unfortunately, I've never explored the audio side and I don't have time to do it so far. It would be great if you could share your achievements on that.

@hsnks100
Copy link
Author

hsnks100 commented Dec 19, 2017

Thank you for answering about my issue.
Do you have more information about audio codecs? I have hard try to implementation audio communication in bidirection. But I have no even achivement.

My device environment is embedded, It has't available audio device. I just want to get audio track in binary data because my device has external audio encoder/audio decoder.

Some devices have available audio device, When I execute "gn gen" gn gen args='... rtc_use_dummy_audio_file_devices=false', I can get audio stream in callback function called OnData(...)

But in rtc_use_dummy_audio_file_devices=true, I can't get audio stream. And I got following logs.

...
(audio_device_impl.cc:1161): SetPlayoutDevice(0)
(audio_device_alsa_linux.cc:803): number of available audio output devices is 0
(audio_device_impl.cc:515): InitSpeaker
(audio_device_alsa_linux.cc:1780): GetDevicesInfo - Could not find device name or numbers
(audio_mixer_manager_alsa_linux.cc:145): AudioMixerManagerLinuxALSA::OpenSpeaker(name=)
(audio_mixer_manager_alsa_linux.cc:190): snd_mixer_attach(_outputMixerHandle, )
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL 
(audio_mixer_manager_alsa_linux.cc:196): snd_mixer_attach(_outputMixerHandle, ) error: No such file or directory
(webrtcvoiceengine.cc:703): webrtc: Init() failed to initialize the speaker (error=9005)
(audio_device_impl.cc:1256): SetRecordingDevice(0)
(audio_device_alsa_linux.cc:887): number of availiable audio input devices is 0
(audio_device_impl.cc:525): InitMicrophone
(audio_device_alsa_linux.cc:1780): GetDevicesInfo - Could not find device name or numbers
(audio_mixer_manager_alsa_linux.cc:230): AudioMixerManagerLinuxALSA::OpenMicrophone(name=)
(audio_mixer_manager_alsa_linux.cc:280): snd_mixer_attach(_inputMixerHandle, )
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL 
(audio_mixer_manager_alsa_linux.cc:286): snd_mixer_attach(_inputMixerHandle, ) error: No such file or directory
(webrtcvoiceengine.cc:703): webrtc: Init() failed to initialize the microphone (error=9004)
(audio_device_impl.cc:970): StereoPlayoutIsAvailable
(audio_device_alsa_linux.cc:1780): GetDevicesInfo - Could not find device name or numbers
(audio_mixer_manager_alsa_linux.cc:145): AudioMixerManagerLinuxALSA::OpenSpeaker(name=)
(audio_mixer_manager_alsa_linux.cc:190): snd_mixer_attach(_outputMixerHandle, )
ALSA lib control.c:909:(snd_ctl_open_noupdate) Invalid CTL 
(audio_mixer_manager_alsa_linux.cc:196): snd_mixer_attach(_outputMixerHandle, ) error: No such file or directory
(audio_device_alsa_linux.cc:999): InitSpeaker() failed
(audio_device_alsa_linux.cc:1780): GetDevicesInfo - Could not find device name or numbers
(audio_device_alsa_linux.cc:1022): InitPlayout open ()
...

Thank you for reading my problems.

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

No branches or pull requests

2 participants