GNOME Bugzilla – Bug 793726
gst-play-1.0 --videosink=fakesink : position gets confused
Last modified: 2018-11-03 12:03:41 UTC
Use case: "Let me listen to the music on this video file" gst-play-1.0 file.mp4 --videosink=fakesink The time counter at the bottom of gst-play-1.0 progresses much more quickly than the audio, I assume it progresses according to the fakesink. If I pause, the correct position is displayed, but then unpausing doesn't work. If I use --videosink="fakesink sync=true" it works fine.
Maybe we got it wrong in gst/gstbin.c. If you look at bin_query_position_fold() function, we always keep the highest position: if (position > fold->max) fold->max = position; If we change from max to min, and keep the lowest, you case will work. Though, if you have a dangling sink, like: videotestsrc ! fakesink sync=1 fakesink async=0 The position will never advance. A bit of thinking will be needed.
Thing is, there should be code in playsink that always routes position queries to the audiosink if there's audio, so I don't know why that doesn't do the right thing.
Think also about gst-play-1.0 file.mp4 --audiosink=fakesink (for instance, someone doesn't want to race with the "mute" key). IMHO that should not route position queries to the audiosink. It's confusing...
Well, playbin is made for playback. If you don't want audio you should disable audio via the API and not plug fakesinks :)
Created attachment 368784 [details] [review] playsink: route position queries to audio sink and video sink first Seems that code I was talking about was never pushed upstream, ahem. This patch solves the --videosink=fakesink problem. When using --audiosink=fakesink it doesn't alwyas seem to resume after pausing for some reason, unless we seek/flush. But that also happens without the patch, so don't think that's related.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/421.