jkevin / PS3EyeDirectShow

DirectShow source filter for PS3 Eye via WinUSB
GNU General Public License v3.0
327 stars 45 forks source link

[Feature Request] Windows Media Foundation Source #25

Open Megamouse opened 1 year ago

Megamouse commented 1 year ago

Hi, I'm a developer of RPCS3, the PS3 emulator.

Sadly we are not able to connect the PS-Eye to our camera utility on Windows anymore, due to the recent change to Qt6, which seems to have dropped DirectShow support.

I was wondering if you could provide a Windows Media Foundation Source instead. It seems to have been on your mind already, looking at the Readme section. It would certainly be great for compatibility in general, since I expect that more and more applications will drop DirectShow sooner or later in favor of newer alternatives.

I noticed there hasn't been any changes to this project in a while, so I hope this reaches someone. I would also be glad if someone happened to know a different driver for the PS-Eye in case this doesn't work out.

Thanks, Megamouse

mirh commented 1 year ago

The driver is very much abandoned, and barely even working really. IIRC one workaround people use to rely on is OBS-VirtualCam to loop back the video feed, but of course it's very subpar.

The only half-way "not decrepit" thing that I know is https://github.com/opentrack/opentrack/issues/1331, but it goes through libusb (which to be extremely fair, isn't probably as much of a downside as it may seem in this case, given a ps3 should come itself with a driver.. so you could take advantage of that to have some kind of passthrough mode like I believe dolphin also has for some device)

Megamouse commented 1 year ago

OBS actually doesn't work either since it also seems to use DirectShow xD

mirh commented 1 year ago

Duh, right.. I guess that just made it from "buggy directshow" to "usable directshow". github.com\/marcel303\/PS3EYEDriver\/commit\/1c4143b07e2657699c9d25815cb97896a079dcfb Anyway, if you were to explore that idea I pitched above, there's this intriguing hardware mystery that I found to still be unsolved.

AllanCat commented 1 year ago

From the info here https://alax.info/blog/2245 Windows Media Foundation's virtual camera is only supported from Windows 11 (Windows Build 22000). I think it might not be practical to implement at this point.

You can try to communicate device directly via libusb-win32+PS3EyeDriver (like opentrack and my fork of this repo).

mirh commented 1 year ago

OBS virtual camera has nothing to do with W11 virtual camera (or whatever that meant before). And this is a physical camera that we are talking about, so it's not like you would need anything else if you could get MF right.. (assuming that's even supporting all the camera features, not all the developers I found in my searchings were enthusiastic with it)

Anyway, not that it's any eminent downside, but is there any particular reason that you switched to libusb?

AllanCat commented 1 year ago

My reasons for libusb:

  1. It's opensource.
  2. It's used by other ps3eye projects and I want to have compatibility.
  3. Previous implementations were already using libusb, I just kept it up to date.

And because the architecture is based on libusb-win32 driver, it's not recognized as camera class and thus we need to regist a virtual camera layer to communicate between ps3eye and virtual camera. I haven't did much researches about writing a camera driver from ground up, it's basically a whole new project, and if it's kernel driver then it needs to get digital signed. And it breaks the compatibility with other ps3eye projects.

mirh commented 1 year ago

You do have a point.

You aren't really forced to make a kernel driver though. I mean, both in the sense that there's probably a lot that you can freeload out of winusb, but also that UMDF exists too (both of these paths would be viable with just self-signing). In particular, I wonder (just like the similarly aged DS3 which is just a minifilter away from having proper USB HID descriptors) how far the OV534 could be from exposing a valid USB UVC interface. After all, the microphone is already conforming to UAC. But these are just my uneducated ramblings.

p.s. if you are going to stick with libsusb, then you should edit that odd flex mid-way through your readme