How to output the multiple video tracks?
Posted: 20 May 2011 16:02
I have some wmv files with multiple video tracks, and i need to make a player to play them in one window.
I have made a player by libvlc, after I use a simple code as:
It popup another window(vlc (direct3d output)).
so, how can i render the sencond track's video output to another widget(ui->mdiArea_2->winId()).
I know a way, let one libvlc_media_player_t do this:
and another do this:
But that wil cost double bandwidth if I use a url with rtsp or http.
Any help is very much appreciated.
Thanks
I have made a player by libvlc, after I use a simple code as:
Code: Select all
inst = libvlc_new (0, NULL);
m = libvlc_media_new_path (inst, "C:\\Users\\Administrator\\Desktop\\20100302-20100516-162804.wmv");
mp = libvlc_media_player_new_from_media (m);
libvlc_media_player_set_hwnd(mp,ui->mdiArea->winId());
libvlc_media_player_play(mp);
so, how can i render the sencond track's video output to another widget(ui->mdiArea_2->winId()).
I know a way, let one libvlc_media_player_t do this:
Code: Select all
libvlc_video_set_track(mp,-1);
libvlc_video_set_track(mp,1);
Code: Select all
libvlc_video_set_track(mp2,-1);
libvlc_video_set_track(mp2,2);
Any help is very much appreciated.
Thanks