[vlc-devel] set position when video is paused

Mehmet Kaplan mehmetkpln at gmail.com
Wed Apr 28 13:38:49 CEST 2010


Hi all,
I'm newbie in libvlc and using its methods.
I'm trying to seek when video is paused. I want that player will seek
to new position and stay paused. When i call
libvlc_media_player_set_position method after pausing the video with
libvlc_media_player_pause method, player doesn't show the frame at new
position. But after toggling pause it starts to play video from the
new position. To sum up, it sets the position but doesn't show the
frame at that position until playing again.

As a solution to this problem, i call pause method twice after seeking
when the video is paused. Because in that situation i expect that
player will start to play for showing new frame and pause again. But
sometimes it works, sometimes doesn't (probably according to operation
time of seek and pause which cause race condition). Also i try to call
play and pause in order, the result is the same.

Isn't there any stable solution for this problem, which will always
work, probably a method causes to wait to the end of
libvlc_media_player_set_position or libvlc_media_player_pause
operation? Also is libvlc_media_player_set_position operation useless
when media player is paused?



More information about the vlc-devel mailing list