[gst-devel] trouble with playbin2 and audio track

kitone kitone at free.fr
Wed Dec 30 13:18:54 CET 2009


Hi everyone,

I'm using playbin2 to play video and I've add the ability to change
audio track in the player. This doesn't work very well. When I switch
to an other track there's little problem like no sound, need to seek to
have sound again or some little freeze.

So there's a best way to change track ?

Do I need to define the state of the pipeline to PAUSED, change the
audio track and replay again ? Or can I do this on the fly ?

code :
void Player::set_current_audio(int track) {
  g_object_set (playbin, "current-audio", track, NULL);
}

Best regards,
kitone




More information about the gstreamer-devel mailing list