This is what I see, take vlcj out of the equation, my "C" skills are not so great but I think this is correct:
Code: Select all
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <vlc/vlc.h>
int main(void) {
printf("Starting...\n");
const char* libvlcArgs[] = {};
libvlc_instance_t* libvlc;
libvlc = libvlc_new(sizeof libvlcArgs / sizeof *libvlcArgs, libvlcArgs);
libvlc_media_player_t* mediaPlayer = libvlc_media_player_new(libvlc);
libvlc_media_t* media = libvlc_media_new_path(libvlc, "movie.iso");
libvlc_media_player_set_media(mediaPlayer, media);
printf("Before play...\n");
sleep(5);
libvlc_media_player_play(mediaPlayer);
printf("Playing...");
sleep(10);
libvlc_media_player_stop(mediaPlayer);
libvlc_media_release(media);
libvlc_media_player_release(mediaPlayer);
libvlc_release(libvlc);
printf("All done.\n");
return EXIT_SUCCESS;
}
As soon as libvlc_media_player_play() is called, xdg-screensaver appears *twice* in the process list:
Code: Select all
me 14028 1 0 14:24 ? 00:00:00 /bin/sh /usr/bin/xdg-screensaver suspend 0x03e00000
me 14036 1 0 14:24 ? 00:00:00 /bin/sh /usr/bin/xdg-screensaver suspend 0x03e00000
As soon as the application terminates, one of the processes goes, but the other remains:
Code: Select all
me 14028 1 0 14:24 ? 00:00:00 /bin/sh /usr/bin/xdg-screensaver suspend 0x03e00000
Some time later, maybe a minute or so, this remaining process does go too.
If I change the above test code to play another video before it exits, then each time libvlc_media_player_play() is called you get xdg-screensaver twice in the process list, and each time you stop you get one xdg-screensaver seemingly left over.
I do not know what the correct behaviour is, but I'm pretty sure vlcj is not the cause of what you described.