For some reason, that doesn’t give access to the obvious playing state or EOS signal! However, for some other unknown reason it looks like the actual PlayBin is public. That doesn’t make a lot of sense, but it is useful - you should be able to use something like (not tested!) -
if (!storyscene.playbin.isPlaying()) {
// handle state change
}
@kesson be a little wary of using duration() and time() for anything, and definitely don’t use ==.
Method Movie::hasBufferSink() isn’t invoked anywhere within the whole library.
And quite frankly, I’ve never seen any1 call this method and neither can’t see any need for it!
Therefore, as long as field playing isn’t public, or at least until the library give us a getter for that field, re-purposing a totally useless public method is the easiest workaround to go!
Well, I didn’t! On the basis that I have maintained this code for years. I’m just saying that accessing the PlayBin API this way is safer than the other options above. I agree that the Movie API needs improving to expose this stuff. There’s an active GSoC project working on the library at the moment. Maybe suggest what’s missing?
Fair enough! Added a comment on the issue. The other thing that’s missing in the Video library, although can be done with the PlayBin reference, is being able to set the file. This can all be done in GStreamer with one PlayBin, including seamless switching.