libvlc and pause

This forum is about all development around libVLC.
blackmonster
New Cone
New Cone
Posts: 6
Joined: 02 May 2013 08:49

libvlc and pause

Postby blackmonster » 24 Jul 2013 10:15

Hi all. I'm developing an app for video editing and i need to pause the player just after play.

Code: Select all

libvlc_media_player_play(myPlayer); libvlc_media_player_set_pause(myPlayer,1);
this code doesn't work for some reason,
then i tried to do register a callback to pausableChanged and emit a signal from it (i'm using Qt).
in slot (handler goes from main thread) i call libvlc_media_player_set_pause(myPlayer,1) assuming that now i can pause the playback,
but again, nothing happens.
Then i try to register a callback to playbackStarted. Doing the same and finally pause works. But another problem is that player changes the position during calls, most likely because of buffering.
The question is what the pausableChanged callback is for if pause called from it doesn't work.
Regards, Victor

Rémi Denis-Courmont
Developer
Developer
Posts: 15272
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc and pause

Postby Rémi Denis-Courmont » 24 Jul 2013 17:09

The accuracy of pause depends on the input. For a media player, accurate pause does not make much sense, though there certainly is some room for improvements from a motivated developer.

For frame accuracy, you may be better off with a a lower-level library such as libavcodec.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 37 guests