Dear Forum,
I would like your help in a issue I am having. I am using the libvlc in a small c++ program in Ubuntu . I am trying to play 2 videos in a raw , first the a.mp4 video and when it finishes to play b.mp4 . I can do this but the libvlc creates 2 separate windows.
I want on the same window to load my choices of videos. I saw that there is the command
libvlc_media_player_set_xwindow (mp, xid) is this what I can do to maintain on play window? If yes how do I get the xid?
here is my code :
int main(int argc, char* argv[])
{
libvlc_instance_t * inst;
libvlc_media_player_t *mp;
libvlc_media_t *m;
libvlc_instance_t * inst1;
libvlc_media_player_t *mp1;
libvlc_media_t *m1;
int idpl;
/* Load the VLC engine */
inst = libvlc_new (0, NULL);
m = libvlc_media_new_path (inst, "/home/ioannis/a.mp4");
/* Create a media player playing environement */
mp = libvlc_media_player_new_from_media (m);
/* No need to keep the media now */
libvlc_media_release (m);
#if 0
/* This is a non working code that show how to hooks into a window,
* if we have a window around */
libvlc_media_player_set_xwindow (mp, xid);
/* or on windows */
libvlc_media_player_set_hwnd (mp, hwnd);
/* or on mac os */
libvlc_media_player_set_nsobject (mp, view);
#endif
libvlc_media_player_play (mp);
sleep (3); /* Let it play a bit */
m = libvlc_media_new_path (inst, "/home/ioannis/b.mp4");
mp = libvlc_media_player_new_from_media (m);
libvlc_media_player_next_chapter(mp);
libvlc_media_player_play (mp);
sleep (20);
return 0;
}
Thank you in advance
Waiting for any answer