I am writing a video player. My application uses playbin2.
It constructs the following pipeline: player.png.
As can be seen from the pipeline, it uses Fluendo MPEG PS demuxer from gst-plugins-bad.
I am trying to implement the "Go end" command, which would position the player to the last frame.
The problem is that that last frame is not displayed, neither in paused, nor in playing state.
I perform this command in the following way
I tried different combinations of flags, also with _KEY_UNIT, tried subtracting a small amount of time from
m_stream_duration (40ms) - nothing helps.
The sound from the headphones suggests, that the pipeline has positioned to the end of file, but the last frame is not displayed.
But, this simple seeking to the end of file perfectly worked for OGG files.
I was studying the details of the video-sink and MPEG-2 demuxing and decoding plugins for already two weeks. From what I've studied, it can be seen, that when the seek issued, the mpeg2 demuxer processes some data and gives them further, mpeg2dec also tries decoding something but seems to drop frames. Videosink simply doesn't receive a video buffer.
I've also tried to set up a backward playing from the end of file:
However, there's another problem.
If I press play button, which triggers call
I see some frames which are before the latest displayed frame in a movie file.
This, probably, caused by that the pipeline has prerolled some data for playing backwards from the movie end. This is wrong for my case. How can I flush the pipeline after seeking to the latest frame?