Using 'dshow://' resulting in 'can't open video device' error

This forum is about all development around libVLC.
whatsnawfix
New Cone
New Cone
Posts: 2
Joined: 02 May 2017 17:34

Using 'dshow://' resulting in 'can't open video device' error

Postby whatsnawfix » 02 May 2017 18:37

Hi guys,

Unsure how active these forums are, but yesterday I spent some time looking for why this may be happening. Unfortunately I didn't come across anything solid.

Here's a snippet from the log I am seeing. It's finding the device I want it to, but failing to open it. Launching VLC media player with just 'dshow://' works fine.
core input debug: `dshow://' gives access `dshow' demux `any' path `'
core input source debug: creating demux: access='dshow' demux='any' location='' file='(null)'
core demux debug: looking for access_demux module matching "dshow": 14 candidates
dshow demux debug: dshow-vdev:
dshow demux debug: dshow-adev:
dshow demux debug: found device: HD Pro Webcam C920
dshow demux debug: asking for default device: HD Pro Webcam C920
dshow demux debug: asked for HD Pro Webcam C920, binding to HD Pro Webcam C920
dshow demux debug: using device: HD Pro Webcam C920
dshow demux debug: EnumDeviceCaps: output pin: Capture
dshow demux debug: EnumDeviceCaps: input pin: Video Camera Terminal
dshow demux debug: EnumDeviceCaps: trying pin Capture
dshow demux debug: EnumDeviceCaps: input pin default format configured
dshow demux debug: EnumDeviceCaps: input pin accepts chroma: YUY2, width:2304, height:1536, fps:2.000001
filter demux debug: CaptureFilter::JoinFilterGraph
dshow demux debug: connecting filters
filter demux debug: CaptureFilter::EnumPins
filter demux debug: CapturePin::QueryDirection
filter demux debug: CapturePin::ConnectedTo [not connected]
filter demux debug: CaptureFilter::SetSyncSource
filter demux debug: CaptureFilter::JoinFilterGraph
filter demux debug: CaptureFilter::GetState 0
filter demux debug: CaptureFilter::~CaptureFilter
filter demux debug: CapturePin::~CapturePin
dshow demux error: can't open video device
This is using the VLC media plugin for UE4: https://github.com/ue4plugins/VlcMedia. It's a little hard to follow, since I'm not the original author, but as far as I can tell the code boils down to this (pseudo'ish code):

Code: Select all

char * Args[] = { "--plugin-path=D:/.../Engine/Plugins/VlcMedia/ThirdParty/vlc/Win64/plugins", "--aout", "amem", "--drop-late-frames", "--ignore-config", "--intf", "dummy", "--no-disable-screensaver", "--no-snapshot-preview", "--no-video-title-show", "--text-renderer", "dummy", "--verbose=0", "--vout", "vmem" }; VlcInstance = libvlc_new(15, Args); Media = libvlc_media_new_location(VlcInstance, "dshow://"); Player = libvlc_media_player_new_from_media(Media); // cannot initialize COM (error 0x80010106) MediaEventManager = libvlc_media_event_manager(Media); PlayerEventManager = libvlc_media_player_event_manager(Player); libvlc_event_attach(MediaEventManager, libvlc_MediaParsedChanged, &StaticEventCallback, this); libvlc_event_attach(PlayerEventManager, libvlc_MediaPlayerEndReached, &StaticEventCallback, this); libvlc_event_attach(PlayerEventManager, libvlc_MediaPlayerPlaying, &StaticEventCallback, this); libvlc_event_attach(PlayerEventManager, libvlc_MediaPlayerPositionChanged, &StaticEventCallback, this); libvlc_media_player_set_rate(Player, 1.0); if (libvlc_media_player_get_state(Player) != PLAYING) { libvlc_media_player_play(Player); } State = libvlc_media_player_get_state(Player); if (State == PLAYING) { ... // doesn't get in here yet } // ERROR triggered: can't open video device
Using the "screen://" MRL works fine (though I still see the 'cannot initialize COM' error - I am ignoring this error for now).

Any helpful hints on how to figure out what's failing here would be nice. Since I'm new to libVLC, nothing in the log is jumping out at me.

whatsnawfix
New Cone
New Cone
Posts: 2
Joined: 02 May 2017 17:34

Re: Using 'dshow://' resulting in 'can't open video device' error

Postby whatsnawfix » 02 May 2017 20:38

Looking at the source, and following along with the debug log, it seems like ConnectFilters() in dshow.cpp may be failing... digging in there.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 23 guests