rollback seek RTSP
Hey, I'm having a mysterious problem when I'm seeking.
So I'm using gstreamer 1.20.3 on Android.
I also had this problem with all other version.
Here is my custom Pipeline: "rtspsrc name=src protocols=4 buffer-mode=1 is-live=false latency=2000 src. ! queue ! rtph264depay ! avdec_h264 ! videoconvert ! capsfilter name=filter ! autovideosink sync=true src. ! queue ! rtpmp4gdepay ! aacparse ! avdec_aac ! audioconvert ! audioresample ! volume name=vol volume=0.00000001 ! autoaudiosink sync=false
"
To seek I use " gst_element_seek (data->pipeline, 1.0, GST_FORMAT_TIME, GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_ACCURATE, GST_SEEK_TYPE_SET, desired_position, GST_SEEK_TYPE_SET, GST_CLOCK_TIME_NONE);
"
I have no errors from Gstreamer in the log.
I got different type of "bug"
- if my first seek in the video is to 2:01 i will go back to 0:00 and then i seek again to 3:41 i will go to 2:01 etc i will always have one seek latethe thing is that the video I received is good but only the seekbar and the timer are wrong.
- sometimes it works perfectly
- My first seek work and then we go back to the first problem
I've tried a lot of different things but I can't figure out why sometimes it works and sometimes it doesn't.
When I look with wireshark on my network, I take a look at the packet. The packet I send is good (PLAY with range) and the packet I receive is (200 OK with a good range).So it can't come from a mistake in a packet.
I put a lot of debug inside my code to see if something wasn't good, but everything was fine.
I have no more ideas.When I'm using my url on VLC it works perfectly.
Disclaimer: Yes I know that rtsp isn't made for this. But I have no other choice.