Search code examples
c++vlclibvlc

how to control video output type with the vlc sdk in my c++ codes


I write a simple test case with libvlc to play a video, now i want to select the "windows GDI video output" when play media like what we do when use vlc player, select the "windows GDI video output" in the tools->preferences->Video->Output item, then it can play the video on multi-screens smoothly, how can i implement it to select ""windows GDI video output" with libvlc sdk? can someone give me some help or example? Thanks.


Solution

  • This works for me

    const char * const vlc_args[] = {
      "--verbose", "1",
      "--vout", "wingdi",
      "-I", "dummy",
      "--ignore-config"
    };
    libvlc_instance_t *vlcInstance = libvlc_new(sizeof(vlc_args) / sizeof(vlc_args[0]), vlc_args);