Right now I'm able to select which track to read with libvlc_video_set_track and save frames in memory by setting my own callbacks with libvlc_video_set_callbacks
My question is how can I read both tracks at the same time ?
Do I have to set different callbacks for each track or are they handled by one callback ? I tried both cases without success.
1. Different callbacks for each track (pseudo code):
Code: Select all
libvlc_video_set_track(0)
libvlc_video_set_callbacks(lock_cb0, display_cb_0, unlock_cb0)
libvlc_video_set_track(1)
libvlc_video_set_callbacks(lock_cb1, display_cb_1, unlock_cb1)
2. One set of callbacks for both tracks (pseudo code):
Code: Select all
display_cb(void *opaque, void *picture)
{
print libvlc_video_get_track() // always returns the same track id.
myfifo.push(picture)
}
Any help is appreciated, thanks !