A problem when play two rtsp streams at the same time
Posted: 27 Aug 2014 11:09
My English is not good,I hope you can know what i say.I want to play two rtsp streams in two different window,but vlclib only open one windows and overlaped two video on it . I use libvlc like this
My OS is window 7,this code just open one Direct3D windows and overlap two video on it.
Code: Select all
libvlc_instance_t *vlc_inst1,*vlc_inst2;
libvlc_media_player_t *media_player1,*media_player2;
vlc_inst1 = libvlc_new(0, NULL);
libvlc_media_t *media1;
media1 =libvlc_media_new_location(vlc_inst1,"rtsp://192.168.10.102:8086");
media_player1=libvlc_media_player_new_from_media(media1);
libvlc_media_release(media1);
//libvlc_media_player_set_hwnd(media_player1,m_hWnd);
libvlc_media_player_play(media_player1);
vlc_inst2 = libvlc_new(0, NULL);
libvlc_media_t *media2;
media2 =libvlc_media_new_location(vlc_inst2,"rtsp://192.168.10.112:8086");
media_player2=libvlc_media_player_new_from_media(media2);
libvlc_media_release(media2);
//libvlc_media_player_set_hwnd(media_player1,m_hWnd);
libvlc_media_player_play(media_player2);