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

win-dshow: Check for custom placeholder.png #4446

Closed
wants to merge 24 commits into from

Conversation

pedanticdan
Copy link
Contributor

@pedanticdan pedanticdan commented Apr 3, 2021

Description

win-dshow: Check for custom placeholder.png file. This will enable the user to have a custom placeholder.png file that will not get replaced every time OBS is updated. A similar
change has already been made to mac-virtualcam and accepted into the base under PR #4232. That change plus this change will make it possible for a plugin to provide a simple interface for the user to select a custom PNG file. [https://github.com/pedanticdan/obs-placeholder]

This is the Windows version of PR #4232

The only modification is to placeholder.cpp in the source for the virtualcam-module for the win-dshow plugin. This change looks for %APPDATA%\obs-studio\plugin_config\win-dshow\placeholder.png ... If this custom file is found, the virtualcam-module will use it instead of the default placeholder.png file.

Motivation and Context

The virtual camera a is a very useful addition to OBS, but it is frustrating to have to replace the default placeholder.png file every time OBS Studio is upgraded. It would be quite useful to be able to create a custom placeholder.png file ONCE and not have to track down the default file over and over and over.

How Has This Been Tested?

I've tested on a 2015 MacBookPro running Windows 10 using BOOTCAMP. I've tested with Skype and Zoom:

Installed this update over OBS 26.1.1
Used virtual cam, no problems
Stopped virtual cam, verified default image shows in Skype or Zoom
Created custom placeholder.png in %APPDATA%\obs-studio\plugin_config\win-dshow\placeholder.png
Verified custom image shows in Skype or Zoom
Start virtual cam, verified OBS output appears in Skype or Zoom
Stop virtual cam, verified custom image shows in Skype fo Zoom
Remove custom placeholder.png
Verified default image shows in Skype or Zoom

Types of changes

  • New feature (non-breaking change which adds functionality)

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.

@pedanticdan pedanticdan changed the title Win win-dshow: Check for custom placeholder.png win-dshow: Check for custom placeholder.png Apr 3, 2021
@RytoEX
Copy link
Member

RytoEX commented Apr 3, 2021

You don't need to keep closing pull requests and opening new ones. To keep up with changes on the master branch, you can use git rebase and force push to your remote branch instead of making merge commits. If you're just changing the approach to the problem, you can just change your code locally, force push to your remote branch, and explain the changes in the PR comments. Closing PRs and opening new ones makes it hard to keep track of feedback or discussion that has occurred along the way.

@pedanticdan
Copy link
Contributor Author

pedanticdan commented Apr 3, 2021

Sorry, I didn't see any way to change the source branch of an existing PR.

I would have reopened #4389, but don't see any way to reopen a PR. #4426 was closed because it was mistake ... shouldn't have closed #4389 in the first place.

If there's a way tor reopen #4389, I'd be happy to do that.

[EDIT: apparently, I didn't scroll down far enough to see the "Reopen Pull Request" button .... let me know if you want me to reopen #4389 ]
]

@dodgepong
Copy link
Member

Sorry, I didn't see any way to change the source branch of an existing PR

You don't change the source branch, you forcefully overwrite the content of the existing branch with new content (force push).

@pedanticdan
Copy link
Contributor Author

pedanticdan commented Apr 3, 2021

Sorry, I didn't see any way to change the source branch of an existing PR

You don't change the source branch, you forcefully overwrite the content of the existing branch with new content (force push).

Yes, I got that.

The question remains: Should I reopen #4389?

That's the original PR that includes the discussion and all the commits from pulling later code updates.

@WizardCM WizardCM added the Enhancement Improvement to existing functionality label Apr 4, 2021
This will enabled the user have a custom placeholder.png file
that will not get replaced every time OBS is updated. A similar
cahnge has already been made to mac-virtualcam. That change plus
this change will make it possible for a UI plugin to pprovide a
simple interface for the user to select a custom PNG file.
https://github.com/pedanticdan/obs-placeholder
This will enabled the user have a custom placeholder.png file
that will not get replaced every time OBS is updated. A similar
cahnge has already been made to mac-virtualcam. That change plus
this change will make it possible for a UI plugin to pprovide a
simple interface for the user to select a custom PNG file.
https://github.com/pedanticdan/obs-placeholder
This will enabled the user have a custom placeholder.png file
that will not get replaced every time OBS is updated. A similar
cahnge has already been made to mac-virtualcam. That change plus
this change will make it possible for a UI plugin to pprovide a
simple interface for the user to select a custom PNG file.
https://github.com/pedanticdan/obs-placeholder
Merge remote-tracking branch 'obs/master' into win-dshow2
win-dshow: Check for custom placeholder.png file
Merge remote-tracking branch 'obs/master' into win-dshow2
Merge remote-tracking branch 'obs/master' into win-dshow2
Merge remote-tracking branch 'obs/master' into win-dshow2
Merge remote-tracking branch 'obs/master' into win-dshow2
Merge remote-tracking branch 'obs/master' into win-dshow2
@pedanticdan
Copy link
Contributor Author

The MacOS version of this change was accepted into OBS months ago, and is in OBS 27 for MacOS. I don't use Windows, but attempted to provide the matching function for Windows users.

This PR is necessary for this plugin to work on Windows:

https://github.com/pedanticdan/obs-placeholder

@WizardCM WizardCM added the Windows Affects Windows label Jun 7, 2021
Merge remote-tracking branch 'obs/master' into win-dshow2
@wackerm
Copy link

wackerm commented Jul 28, 2021

it would be great to have this PR merged, especially since the same changes on the macOS side are already merged...

Merge remote-tracking branch 'obs/master' into win-dshow2
Merge remote-tracking branch 'obs/master' into win-dshow2
@pedanticdan
Copy link
Contributor Author

pedanticdan commented Nov 2, 2021

I only implemented this for Windows because I was asked to when my implementation for this was accepted in the Mac version. But, I will upgrade to an M1 Mac soon, and will no longer have access to Boot Camp, and thus, no Windows dev environment. I will delete my obs-studio repository at that time.

Since this PR hasn't even been reviewed, I don't expect anyone to notice ... just keeping this PR up to date.

@Fenrirthviti
Copy link
Member

This PR isn't being ignored, we're aware it's here and just haven't had time to devote to review it, as it's a fairly low priority thing. Replacing the placeholder image is a bit simpler on Windows and easier to get to, so it's not as critical. There's a ton of open issues, PRs, and not a lot of resources to go around. We'll get to this when we can, thanks for understanding!

@pedanticdan
Copy link
Contributor Author

Sure, I understand it's a low priority, and not a critical feature. Just letting you know I can't maintain my repo much longer. The code change is simple, and anyone is welcome to take it.

miaulightouch pushed a commit to miaulightouch/obs-virtual-cam that referenced this pull request Jul 19, 2023
@PatTheMav
Copy link
Member

@derrod What do you think of this? I think Roaming is the correct location for this and while I'd have structured the functions differently it seems fine overall?

@derrod
Copy link
Member

derrod commented Jan 10, 2024

@derrod What do you think of this? I think Roaming is the correct location for this and while I'd have structured the functions differently it seems fine overall?

Yeah seems fine overall, a couple nits for the code goes but I don't see anything particularly wrong.

@PatTheMav
Copy link
Member

@RytoEX wanna test this?

@gxalpha
Copy link
Member

gxalpha commented Jan 10, 2024

Is this change worth making in the first place? Originally the PR was there to provide feature parity with macOS - now we (somewhat involuntarily) removed the functionality from macOS.

I'm also of the opinion that if such a change is made, there should be a UI for it. We have a dialog for virtual camera settings where it might fit, that'd be a UX discussion. (That would have the benefit that we might even be able to reintroduce it to macOS via custom CMIO properties? In theory we can pass arbitrary NSData, but that's for a different conversation.)

@pedanticdan
Copy link
Contributor Author

pedanticdan commented Jan 11, 2024

I also wrote a plugin to go with this to provide the UI, but since the capability was removed from OBS on the Mac, I don't really see any point. I only created a Windows dev environment for this and lost it when I moved to an M1 Mac.

@pedanticdan
Copy link
Contributor Author

Is there any reason I shouldn't close this pull request?

I'd like to delete my fork of obs-studio. I assume It would be best to close this pull request first.

@RytoEX
Copy link
Member

RytoEX commented Nov 22, 2024

Deleting your fork should automatically close the pull request.

@pedanticdan pedanticdan closed this by deleting the head repository Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement to existing functionality Windows Affects Windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants