Add fallback for getting device path. #31

Open
dcnieho wants to merge 1 commit from dcnieho/devicePath_fallback into master
dcnieho commented 2021-05-14 14:22:11 -05:00 (Migrated from github.com)

Description

For various software devices i have, the devicePath remains empty upon DShow::Device::EnumVideoDevices(). I have implemented a fallback method for getting the devicepath.

Motivation and Context

I'd like to have device paths for as many devices, software or hardware, as possible.

How Has This Been Tested?

I have run enumDevices, called from my own application, and devicePaths for software devices are now created.
DShow::Device.SetVideoConfig() also works fine for a software device with this now non-empty path.

Types of changes

Unclear to me, seems to be a new feature.

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the master branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.
<!--- Please fill out the following template, which will help other contributors review your Pull Request. --> <!--- Make sure you’ve read the contribution guidelines here: https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst --> ### Description For various software devices i have, the devicePath remains empty upon `DShow::Device::EnumVideoDevices()`. I have implemented a fallback method for getting the devicepath. ### Motivation and Context I'd like to have device paths for as many devices, software or hardware, as possible. ### How Has This Been Tested? I have run enumDevices, called from my own application, and devicePaths for software devices are now created. DShow::Device.SetVideoConfig() also works fine for a software device with this now non-empty path. ### Types of changes Unclear to me, seems to be a new feature. ### Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [x] My code has been run through [clang-format](https://github.com/obsproject/obs-studio/blob/master/.clang-format). - [x] I have read the [**contributing** document](https://github.com/obsproject/obs-studio/blob/master/CONTRIBUTING.rst). - [x] My code is not on the master branch. - [x] The code has been tested. - [x] All commit messages are properly formatted and commits squashed where appropriate. - [x] I have included updates to all appropriate documentation.
WizardCM commented 2021-05-29 07:11:12 -05:00 (Migrated from github.com)

Are there specific devices where you ran into issues that we could verify with?

Are there specific devices where you ran into issues that we could verify with?
dcnieho commented 2021-05-30 01:55:46 -05:00 (Migrated from github.com)

I have observed this with two devices, both https://obsproject.com/forum/resources/obs-virtualcam.949/, and the directshow adapter for Basler machine vision cameras (part of their Pylon runtime)--the latter you can't test without having a Basler camera i think. These are both software devices i guess.

I have observed this with two devices, both https://obsproject.com/forum/resources/obs-virtualcam.949/, and the directshow adapter for Basler machine vision cameras (part of their Pylon runtime)--the latter you can't test without having a Basler camera i think. These are both software devices i guess.
dcnieho commented 2022-12-27 16:19:43 -06:00 (Migrated from github.com)

Ping on this one. Its also how ffmpeg's dshow gets their device paths

Ping on this one. Its also how ffmpeg's dshow gets their device paths
dcnieho commented 2022-12-27 16:21:39 -06:00 (Migrated from github.com)

And sorry to canabalize this PR, but i can't post issues to this repo. Is it being considered to re-apply github.com/obsproject/libdshowcapture@8f2ef910ba? I would love to have this functionality. Anything i can do to help?

And sorry to canabalize this PR, but i can't post issues to this repo. Is it being considered to re-apply https://github.com/obsproject/libdshowcapture/commit/8f2ef910bae88163abd904dd0eeaf027fd09c10a? I would love to have this functionality. Anything i can do to help?
This pull request is broken due to missing fork information.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'dcnieho/devicePath_fallback:dcnieho/devicePath_fallback'
git switch 'dcnieho/devicePath_fallback'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'master'
git merge --no-ff 'dcnieho/devicePath_fallback'
git switch 'dcnieho/devicePath_fallback'
git rebase 'master'
git switch 'master'
git merge --ff-only 'dcnieho/devicePath_fallback'
git switch 'dcnieho/devicePath_fallback'
git rebase 'master'
git switch 'master'
git merge --no-ff 'dcnieho/devicePath_fallback'
git switch 'master'
git merge --squash 'dcnieho/devicePath_fallback'
git switch 'master'
git merge --ff-only 'dcnieho/devicePath_fallback'
git switch 'master'
git merge 'dcnieho/devicePath_fallback'
git push origin 'master'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-obsproject/libdshowcapture!31
No description provided.