I have a need to run libjitsi on my server and I do not want any playback,
notify, nor video rendering to be instanced or configured (consider it
headless and i suppose earless). I created my own audio and video devices
to pass to MediaStreams; similar to whats done with IVFMediaDevice and the
old hammer class for AudioSilenceDevice. I ran my app and I'm getting
errors with the jitsi trying to instance / configure PulseAudio (which I
dont need nor use). So to counter that I created my
own AudioNotifierService and set it using the system property. Heres the
source for that:
public class CustomAudioNotifierService implements AudioNotifierService {
public boolean audioOutAndNotificationsShareSameDevice() {
return true;
}
public SCAudioClip createAudio(String uri) {
return null;
}
public SCAudioClip createAudio(String uri, boolean playback) {
return null;
}
public boolean isMute() {
return true;
}
public void setMute(boolean isMute) {
}
}
Once I ran the app again, I see PulseAudio again and also an error with the
AWT renderer; see below: http://pastebin.com/nPAiv4k3
After all that when my bundled stream class tries to pass what is supposed
to be an opus audio format to my audio media stream it gets an NPE.
http://pastebin.com/qV87avAp
If anyone has a moment or knows how to run the library in a server-mode,
please let me know. Lastly, here are the first things I do only once when
my app starts:
// register our pseudo devices
FMJPluginInConfiguration.registerCustomPackages();
// init libjitsi without OSGI
jitsi = new LibJitsiImpl();
LibJitsiImpl.start();
And this is in my bundled stream setup:
// get the media service
MediaService mediaService = LibJitsi.getMediaService();
MediaFormatFactory factory = mediaService.getFormatFactory();
// create our a/v MediaDevice instances
MediaDevice audioDevice = new MyCustomAudioDevice();
MediaDevice videoDevice = new MyCustomVideoDevice();
// create the MediaFormat for each stream
MediaFormat audioFormat = factory.createMediaFormat("opus");
MediaFormat videoFormat = factory.createMediaFormat("vp8");
Thanks in advance..
Paul