stopping the player hangs during frame by frame iteration

This forum is about all development around libVLC.
Shmulik
New Cone
New Cone
Posts: 2
Joined: 23 Aug 2015 16:03

stopping the player hangs during frame by frame iteration

Postby Shmulik » 26 Aug 2015 11:40

Hello

Intro:
Reading single frame each time is achieved by 1. streaming to smem 2. in player event handler, read image and pause the player.
Very much like in http://stackoverflow.com/questions/2645 ... ay-a-frame
But with pausing the player in the event handler func.
LibVlc version is 2.2.2 .

The issue:
the purpose is doing a binary search in the video. So there is a need to seek back and forward all the time.
Jumping is done in the following way:

libvlc_media_player_stop(Player); // seeking back does not work without stopping first.
libvlc_media_player_play(Player);
Sleep(1000); // event handler is invoked and calls libvlc_media_player_pause(Player);
libvlc_media_player_set_time(Player, msec);
libvlc_media_player_play(Player);
Sleep(1000); // event handler is invoked again, reads the new image, and calls libvlc_media_player_pause(Player);

After tens of times, libvlc_media_player_stop hangs.
Video is a standard mp4 (h264) , placed on local drive.

Thanks

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: stopping the player hangs during frame by frame iteration

Postby Jean-Baptiste Kempf » 08 Oct 2015 16:11

Event handler cannot call libvlc_ functions in the callback.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 13 guests