libvlc direct show device selection not working

This forum is about all development around libVLC.
wolverine2009
New Cone
New Cone
Posts: 1
Joined: 09 Dec 2009 22:02

libvlc direct show device selection not working

Postby wolverine2009 » 09 Dec 2009 22:44

Hi,

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"
The log output displays:

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
But when trying the same options with libvlc it is always taking the default direct show devices and ignores the selected ones, code:

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);
log output:

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
It´s is selecting the "Logitech USB Headset" instead of the "Philips SPC 900NC PC Camera; Au" and it´s "asking for default device" instead of "asking for device" like the command line one.

Somebody knows what the problem could be? Thank you for helping.

Regards,
Peter

Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 31 guests