GNUnet Messenger API: July 2024

Hi there,

so this month I can show you the UI of the voice chat in current state. It might still not be perfect for all cases. But I think it’s a good compromise for desktop, mobile and overall consistency with other features. The discourse of any chat room can be opened as dialog above the main chat window to open and close a discourse. So this dialog will prevent texting to some degree. However it can be closed without leaving the discourse. So users can go back to chat texting and sending files, while being in active discourse over voice chat.

picture of dialog open in front of chat messages

It is possible to mute yourself via a button in the dialog. It is possible to adjust the overall volume of all audio. Also I have added some other buttons which are disabled for now for future functionality. All active members of a discourse are visually represented in the center grid of the dialog. All members of a chat room are visually listed in a sidebar. Maybe I will add some options to configure selected members locally for the discourse or to potentially invite them to active discussion.

picture of discourse dialog with contacts sidebar

In details I had to rearrange code multiple times to get everything working as in current state. The UI was obviously a part of this but other issues were caused by implementing everything using GStreamer. Overall it’s a pretty powerful tool but when it comes to details, the documentation is not perfect from my experience and debugging it can be quite confusing.

Technically there are two separate pipelines. One for sending own voice data via Linux pipe to the GNUnet Messenger service which will then exchange it with other members of the discourse. The other pipeline will open appsrc elements for each member and connects them via an audiomixer element to play one merged stream of audio. I also tried using a fdsrc element but it ended up blocking other threads or stopping the pipeline. I tried using RTP via rtpL16pay and rtpL16depay elements but the payload and metadata ended up causing artifacts in the audio stream which resulted in noise.

So it’s still possible that I need to adjust things. But for now I’m happy with the quality at least. It is transferring raw audio in 16bit PCM with 44100 as sample rate and for compatibility it is using network byte order for the 16bit values. That means there isn’t any intensive compression yet or some complex mechanism. Potentially I still need to adjust the appsrc element in regards of latency, dropping older received buffers in favor of newer ones. But that requires for detailed testing.

Because of the simplified pipeline using GStreamer it’s currently possible to decode audio files and stream them directly via GNUnet Messenger to members of a discourse. So it’s not just an implementation for voice chats and I might even add an explicit button with dialog to select files for streaming instead of streaming from your own microphone. Maybe it’s better to have dedicated software for this use case though. I haven’t made my decision yet about it.

picture of discourse dialog with another member

Next feature I’m going to work on is the implementation of streaming video besides audio. This will definitely require some form of compression or encoding. The goal will be to either stream video from a camera device or from a shared desktop.

Kind regards,
Jacki

Read original article

Popular posts from this blog

GNUnet Messenger API: March

GNUnet Messenger API: September

GNUnet Messenger API: February