Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-v4l2: add support for controls #1815

Merged
merged 1 commit into from Dec 18, 2019
Merged

Conversation

grimmy
Copy link
Contributor

@grimmy grimmy commented Apr 8, 2019

Video4Linux exposes controls for capture devices. This commit adds
those controls to the properties window for v4l2-input devices.

Few things to mention here. This dynamically adds properties and as far as I can tell, this isn't something that's been done in OBS before, so it's kind of hacky. Also, right now properties don't get cleared if you switch devices which leads to all sorts of issues. I'm working on that, but it's going to be hacky too, requiring a hidden setting to the device or something.

This also means that I can't mark the strings for translation, as they're coming from the v4l driver. There might be a way to load in the v4l get text domain and do it that way, but I haven't investigated that yet.

@grimmy
Copy link
Contributor Author

grimmy commented Apr 8, 2019

Additional controls from my HDMI capture card
image

Additional controls from my Webcam (i grayed out the image fwiw). Note that the scroll bar shows that there are more controls than displayed.
image

@WizardCM WizardCM added the Enhancement Improvement to existing functionality label Oct 17, 2019
@WizardCM WizardCM added the Linux Affects Linux label Nov 26, 2019
@jp9000 jp9000 force-pushed the v4l-controls branch 2 times, most recently from f12e201 to bbf13c9 Compare December 18, 2019 16:37
Video4Linux exposes controls for capture devices.  This commit adds
those controls to the properties window for v4l2-input devices.
@jp9000 jp9000 merged commit 73e62a2 into obsproject:master Dec 18, 2019
@jp9000
Copy link
Member

jp9000 commented Mar 24, 2020

Wasn't worth. Been having too many problems with this code.

@grimmy
Copy link
Contributor Author

grimmy commented Mar 27, 2020

I asked for input months ago, and it was merged without ever giving that input. That is, how to handle dynamic controls. It looked like it could maybe be delete with an API that I can't recall at the moment, but yeah, if there's a way I'm totally down to finishing this up...

@kkartaltepe
Copy link
Collaborator

You can see an example of a seemingly perfectly functional v4l2 controls implementation in guvcview (GPLv3)

https://sourceforge.net/p/guvcview/git-master/ci/master/tree/gview_v4l2core/v4l2_controls.c

@grimmy
Copy link
Contributor Author

grimmy commented Mar 27, 2020

The problem with this is that when you change a device in the obs drop down it queries the new device and add the properties for it. This is problematic because the old device and new device may share property names so everything becomes a jumbled mess.

The other alternative that I was asking about, is if it'd make more sense to have a separate window for the properties like there is on windows (i think?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality Linux Affects Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants