spotify: implement as a pushsrc
My comment at #204 (comment 1404674) shows when starting a pipeline containing SpotifyAudioSrc
we get multiple calls to setup()
, each doing a potentially slow Spotify session login. It seems we can avoid the first of these setup()
calls by implementing PushSrc
rather than BaseSrc
.
I'd love to fully understand why it calls setup()
so many times. I am guessing that being a BaseSrc
means it needs one call to work out if it is a push or pull source, and that's what we can eliminate by subclassing PushSrc
instead.
I implemented a PushSrc
version at https://gitlab.freedesktop.org/kingosticks/gst-plugins-rs/-/commit/0108dce05e20a0aca50b635f8060bf048b18913f and having been using it without issues for months. If we do more work on SpotifyAudioSrc can we please make this change also? I can create a PR if this is interesting, else I am happy to keep using (and soon distributing) my own fork.