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

gapless: Make play/next/previous gapless #1306

Open
adamcik opened this Issue Oct 6, 2015 · 4 comments

Comments

3 participants
@adamcik
Member

adamcik commented Oct 6, 2015

This involves using EOS events to trigger all track changes, or no longer using playbin. Since we don't want to ditch playbin just now it basically works out to having to trigger an EOS in audio, and then just expand our about-to-finish logic to handle play/next/previous cases. Additionally we will need to flush any queues by doing a flushing seek without start or end set.

Once this is solved we will have true gapless with respect to streaming.

@adamcik adamcik added this to the v1.2 - Gapless milestone Oct 6, 2015

@fortaa

This comment has been minimized.

fortaa commented Oct 15, 2015

I would suggest reconsidering whether sticking to playbin is optimal wrt expected and consistent behaviour across various platforms. Right now, it seems to me current implementation of this class can choose audio output parameters quite frivolously, e.g. cut bit depth of audio track (like 24->16). That's what happens on Raspbian (but not on i386). Of course you might apply some dirty workaround like this one:

player = gst.element_factory_make("playbin2", "player")
outbin = gst.Bin('audio-out-sink')
dac = gst.element_factory_make("alsasink")
dac.set_property("device", "hw:1,0")
converter = gst.element_factory_make("audioconvert")
outbin.add(converter,dac)
capfilter = gst.caps_from_string('audio/x-raw-int, depth=(int)24')
converter.link(dac,capfilter)
binsink = gst.GhostPad("binsink", converter.get_pad("sink"))
outbin.add_pad(binsink) 
player.set_property("audio-sink", outbin)

But as mentioned earlier it's ugly. IMO bitperfect and gapless playback are the two most critical aspects of any reasonable hi-fi player, and RPi+Mopidy has a great potential to become a reference setup in hi-fi community. So this issue deserves at least rethinking. Thx.

@adamcik

This comment has been minimized.

Member

adamcik commented Oct 19, 2015

To be honest I don't disagree, and way back when we did have a non-playbin solution for all of this.

However, we have enough changes in flight in this area between converting to gapless and switching to off gst 0.10. So for the very short term I would like to postpone the idea, and then in a release or two we should revisit this. Could you open a new bug for switching off playbin?

@adamcik

This comment has been minimized.

Member

adamcik commented Dec 5, 2015

We should also add pause to the list of things to check. Likely we need to change track back and then pause, and also not emit any track change related events.

@adamcik

This comment has been minimized.

Member

adamcik commented Feb 3, 2016

I've checked this, and pressing next still breaks streams. So it being fixed by gst1 must have been something else or me testing incorrectly. So we still need to fake this using EOS, or see if something like #1316 can work around it.

@jodal jodal modified the milestones: v1.2 - Gapless and GStreamer 1.x, v1.2.1, v1.3 - The rest of v1.2 Feb 5, 2016

@jodal jodal added C-enhancement and removed 0 - Backlog labels Mar 26, 2016

@jodal jodal modified the milestones: v2.1 - The rest of v2.0, v2.2 - The rest of v2.1 Oct 24, 2016

@jodal jodal removed this from the v2.2 milestone Mar 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment