Hello all,<br><br>I'm writing an application to watch Digital TV DVB system using libVLC in a C++ application, and in my application I need to set the video PID, audio PID and PCR pid when changing the channel, I'm using the following code to set this :<br>
<br>bool VLCPlayer::setVideoPid(int pid)<br>{<br>    char vlc_option[64];<br>    sprintf(vlc_option, "video-es=%d", pid);<br>    libvlc_media_add_option(_m, vlc_option);<br>    return true;<br>}<br><br>bool VLCPlayer::setAudioPid(int pid)<br>
{<br>    char vlc_option[64];<br>    sprintf(vlc_option, "audio-es=%d", pid);<br>    libvlc_media_add_option(_m, vlc_option);<br>    return true;<br>}<br><br>bool VLCPlayer::setPcrPid(int pid)<br>{<br>    char vlc_option[64];<br>
    sprintf(vlc_option, "pcr=%d", pid);<br>    libvlc_media_add_option(_m, vlc_option);<br>    return true;<br>}<br><br>after doing play using this code :<br><br>bool VLCPlayer::play(Source *src)<br>{<br>    if (is_paused) {<br>
        libvlc_media_player_play(_mp);<br>        is_paused = false;<br>        return true;<br>    }<br><br>    libvlc_media_add_option(_m, "dvb-initialize-frontend=0");<br>    libvlc_media_player_set_media(_mp, _m);<br>
    libvlc_media_player_play(_mp);<br><br>    this->src = src;<br>    return true;<br>}<br><br>But I noticed that despite passing the correct PIDs the channel is set to a random Service ID (Program ID) showing the wrong program, analyzing the VLC code I saw that the Program ID is controlled by  a variable called "program" and it is manipulated in vlc/src/input/es_out.c when changing the channel and I concluded that I need to set this variable "program" to my channel Service ID (Program ID) when changing the channel.<br>
<br>My questions are :<br><br>The way to set the video PID, audio PID and PCR PID in code above is the correct way to do this using libVLC ?<br>If not how to do this ?<br>To set Program ID in variable "program" I must to do in the same way ?<br>
<br>Thanks for all help<br><br>Flavio Alberto Lopes Soares<br>