librespot icon indicating copy to clipboard operation
librespot copied to clipboard

add gstreamer as audio backend

Open psych0d0g opened this issue 8 years ago • 9 comments

https://github.com/arturoc/gstreamer1.0-rs

Since portaudio has some bugs on mipsel i would like to request the addition of gstreamer,

Pros: LGPL lib. X-Platform: Linux, Android, Windows, Max OS X, iOS, as well as most BSDs, commercial Unixes, Solaris, and Symbian X-Architecture: x86, ARM, MIPS, SPARC and PowerPC, on 32-bit as well as 64-bit, and little endian or big endian Complete debugging system for both core and plugin/app developers

List of applications gstreamer is used in: https://gstreamer.freedesktop.org/apps/

And now: Open for discussion :)

psych0d0g avatar Mar 13 '16 22:03 psych0d0g

GStreamer is a powerful but pretty big dependency, both in terms of size and complexity. I'd rather avoid it if possible. Nevertheless, I've refactored the Audio Output code to use a Sink trait. This makes it easier to add new backends for different platforms. There's an initial ALSA implementation on the alsa branch. It is only used on linux, other platforms still use portaudio.

plietar avatar Mar 14 '16 03:03 plietar

It's good news that you add an audio backend. Gstreamer is not applicable for low-end embedded devices, but I am glad about the ALSA implementation. I'd like to give it a try.

joerg-krause avatar Mar 14 '16 05:03 joerg-krause

@joerg-krause what is a low-end embedded device by your definition? for me my VU+ Ultimo applies as one (400mhz mips dualcode sock) and all of its multimedia features are based on gstreamer, which works just fine here.

psych0d0g avatar Mar 14 '16 11:03 psych0d0g

@psych0d0g I mean something like the Carambola 2 with 16 MB Flash and 64 MB RAM.

joerg-krause avatar Mar 14 '16 12:03 joerg-krause

well now with the sink api i would vote for gstreamer as additional sink backend

psych0d0g avatar Mar 15 '16 13:03 psych0d0g

so now after some more research from my side: this is an example pipeline that works on enigma2 mipsel: gst-launch-1.0 -v -m audiotestsrc ! audioconvert ! dvbaudiosink

the issues im facing are not mipsel specific but completely enigma2 specific. I would like to have a feature switch introduced: --with-features enigma2 which enables the audio output via gstreamer on compile time.

psych0d0g avatar Mar 17 '16 20:03 psych0d0g

i pushed my work so far here: https://github.com/psych0d0g/librespot/tree/alsa the build switch is working, aswell as the inclusiong of gstreamer rust bindings. whats not working is the gstreamer audio backend itself so far. i cant figure out what needs to be returned from the gstreamer function in order to accept audio data

psych0d0g avatar Mar 17 '16 20:03 psych0d0g

so with a little help from @plietar and https://github.com/astro , there is now a basic working gstreamer branch: https://github.com/plietar/librespot/tree/gst compile with --features enigma2 for now

psych0d0g avatar Mar 18 '16 15:03 psych0d0g

See my comment there https://github.com/plietar/librespot/issues/63#issuecomment-198417728 This will have to wait until I reorganise the audio backends

plietar avatar Mar 18 '16 15:03 plietar