I´ve some problem selecting the right direct show devices using the libvlc. For some reason the audio and video device selection options passed to the library are ignored and vlc will always select the default direct show devices. The command line variant is working:
Code: Select all
vlc -vvv --extraintf=logger --verbose=2 dshow:// :dshow-vdev="Philips SPC 900NC PC Camera" :dshow-adev="Philips SPC 900NC PC Camera; Au"
Code: Select all
dshow debug: dshow-vdev: Philips SPC 900NC PC Camera
dshow debug: dshow-adev: Philips SPC 900NC PC Camera; Au
...
dshow debug: found device: Philips SPC 900NC PC Camera
dshow debug: asking for device: Philips SPC 900NC PC Camera
dshow debug: asked for Philips SPC 900NC PC Camera, binding to Philips SPC 900NC PC Camera
dshow debug: using device: Philips SPC 900NC PC Camera
...
dshow debug: found device: Logitech USB Headset
dshow debug: found device: Philips SPC 900NC PC Camera; Au
dshow debug: found device: SigmaTel Audio
dshow debug: asking for device: Philips SPC 900NC PC Camera; Au
dshow debug: asked for Philips SPC 900NC PC Camera; Au, binding to Philips SPC 900NC PC Camera; Au
dshow debug: using device: Philips SPC 900NC PC Camera; Au
Code: Select all
.....
mVLCArgs.push_back(":dshow-vdev=Philips SPC 900NC PC Camera");
mVLCArgs.push_back(":dshow-adev=Philips SPC 900NC PC Camera; Au");
libvlc_exception_init (&mVLCException);
const char* vlc_args[MAX_VLC_ARGUMENTS];
for (unsigned int i=0; i<mVLCArgs.size(); i++)
{
vlc_args[i] = mVLCArgs[i].c_str();
}
mVLCInst = libvlc_new (mVLCArgs.size(), vlc_args, &mVLCException);
checkForException(&mVLCException);
mVLCMediaPlayer = libvlc_media_player_new(mVLCInst, &mVLCException);
checkForException(&mVLCException);
libvlc_media_player_retain(mVLCMediaPlayer);
/* Create a new media item */
mVLCMedia = libvlc_media_new (mVLCInst, "dshow://", &mVLCException);
checkForException(&mVLCException);
libvlc_media_player_set_media(mVLCMediaPlayer, mVLCMedia, &mVLCException);
checkForException(&mVLCException);
libvlc_media_release (mVLCMedia);
libvlc_media_player_play (mVLCMediaPlayer, &mVLCException);
Code: Select all
dshow debug: dshow-vdev:
dshow debug: dshow-adev:
dshow debug: found device: Philips SPC 900NC PC Camera
dshow debug: asking for default device: Philips SPC 900NC PC Camera
dshow debug: asked for Philips SPC 900NC PC Camera, binding to Philips SPC 900NC PC Camera
dshow debug: using device: Philips SPC 900NC PC Camera
...
dshow debug: found device: Logitech USB Headset
dshow debug: found device: Philips SPC 900NC PC Camera; Au
dshow debug: found device: SigmaTel Audio
dshow debug: asking for default device: Logitech USB Headset
dshow debug: asked for Logitech USB Headset, binding to Logitech USB Headset
dshow debug: using device: Logitech USB Headset
Somebody knows what the problem could be? Thank you for helping.
Regards,
Peter