Gst 1.22 gst-play.c looping a video
Arnaud Loonstra via gstreamer-devel <[email protected]> Wed, 6 Dec 2023 16:34:47 +0100
| Newsgroups | gmane.comp.video.gstreamer.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi all, I'm trying to use gst-play.c from https://github.com/GStreamer/gstreamer/blob/1.22/subprojects/gst-plugins-base/tools/gst-play.c as a base for looping a video. I am using gstreamer 1.22 on a Linux x86_64 Debian trixie machine. At first I thought I'd use the play_about_to_finish callback to issue a play_do_seek to 0. However that didn't really work. https://github.com/GStreamer/gstreamer/blob/a89f33c86c8ba6731a8177721de90b6e07dbc25c/subprojects/gst-plugins-base/tools/gst-play.c#L819 Second attempt was to use GST_MESSAGE_EOS to issue the `play_do_seek (play, 0, play->rate, play->trick_mode);` https://github.com/GStreamer/gstreamer/blob/a89f33c86c8ba6731a8177721de90b6e07dbc25c/subprojects/gst-plugins-base/tools/gst-play.c#L451 This works a bit better but still not very reliable. Some files just freeze at the end and if it does work it sometimes freezes randomly. Stracktrace points to play_timeout being handled. But what would be the best approach to loop the playing video preferably gapless/seamless? Any pointers appreciated. Rg, Arnaud