Hello all,<br><br>    I'm a newbie in VLC and libVLC and I need to get and set the audio/video PID in a stream played by libVLC in my application, I read the code from Qt4 gui to know how it works and I saw that it does a var_Set() on "video-es" and "audio-es" variables, but the Qt4 gui acts as a plugin, but I need to do the same thing in an "normal" (not a plugin) application using libVLC (bellow a snippet of my code) . I noticed that var_Set() needs vlc_object_t * as parameter and I try to get the vlc_object_t * using libvlc_get_vlc_instance() call, I'm using a stream in my test code that I know has audio pids 514 and 517 and swapping in each 4 seconds but the test code doesn't works, it never change the PID.<br>
    I believe the problem is because libvlc_get_vlc_instance() is not returning the correct vlc_object_t * but I don't know how to get the correct object.<br><br>    There's some way to get the correct object containing the "audio-es" ("video-es" too) variables to use var_Set in a regular application ?<br>
    There's some way to do this in regular libVLC API ?<br><br>Thanks for all help<br><br>Flavio Alberto Lopes Soares<br><br>Player::Player()<br>{<br>.<br>.<br>.<br>_vlcinstance=libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args,&_vlcexcep); <br>
.<br>.<br>.<br>_vlcobj = libvlc_get_vlc_instance(_vlcinstance);<br>.<br>.<br>.<br>}<br><br>void Player::changeaudio()<br>{<br>   /*let's change the audio pid of a stream... */<br>   /*I know this stream has audio pids 514 (portuguese), 517 (Spanish)*/<br>
<br>
    if (val.i_int == 517)<br>        val.i_int = 514;<br>    else<br>      val.i_int = 517;<br><br>    var_Set( _vlcobj, "audio-es", val );<br>}<br><br>