Giter Site home page Giter Site logo

cientista / ps3eyedirectshow Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jkevin/ps3eyedirectshow

0.0 0.0 0.0 3 MB

DirectShow source filter for PS3 Eye via WinUSB

License: GNU General Public License v3.0

C 2.56% C++ 97.22% Objective-C 0.22%

ps3eyedirectshow's Introduction

PS3EyeDirectShow

Windows DirectShow source filter for the PS3 Eye Camera via WinUSB (32 / 64 bit)

This package is an extension of https://github.com/inspirit/PS3EYEDriver/, which is itself a port of the PS3 Eye Linux driver to Windows. This project wraps that code into a DirectShow source filter so that it behaves like a USB camera with a native Windows driver. Any application that goes through the standard DirectShow API to connect to a webcam should (in theory) be able to use this driver. This code has only had limited testing so there may be compatibility issues with some apps.

User Space WinUSB Based Driver

This project makes use of the generic WinUSB driver to communicate with the camera. This has several advantages and disadvantages compared to a native camera driver. The biggest advantage is all of the code runs in user space instead of kernel space. This means any flaws in this driver will only affect the program that's using the camera instead of crashing the entire operating system. The part that runs in kernel space is the WinUSB driver and it's a stable component provided by Microsoft. It provides a generic way for user space programs to communicate with the device.

Another big advantage of a user space driver is it's much easier to directly make use of other libraries such as libusb and the github project that this driver is based on.

On the other hand native camera drivers have slightly better performance. Also Windows will automatically make those cameras available via the DirectShow API (both 32 and 64 bit) as well as Windows Media Foundation. There isn't any need to provide a custom DirectShow or WMF source for a native camera.

32 / 64 bit

This project provides both a 32 bit and 64 bit source filter. Every application that uses a DirectShow camera must load its source filter library (usually a wrapper to a native camera provided by Microsoft). 32 bit applications require 32 bit libraries, and 64 bit applications require 64 bit libraries. Thus if the source filter is only provided as a 32 bit library the camera can only be used by 32 bit applications.

There's another PS3 Eye driver by Code Laboratories that seems to take a similar approach to this driver in that it provides a custom DirectShow source filter instead of using the default wrapper. That driver is more mature and well tested than this one, but it only provides a 32 bit source filter and won't work with 64 bit apps.

Some examples of 64 bit DirectShow applications:

Installing

The easiest way to get started with this driver is to head to the releases section and download the installer. It will install the DirectShow filters as well as a generic WinUSB driver. If it detects that the Code Laboratories driver is already installed it will only install a 64 bit DirectShow filter. The driver component provided by Code Laboratories is WinUSB compatible so there isn't any need to install another one.

Compiling From Source

Requirements:

  • Visual Studio 2017
  • Windows 10 SDK
  • WIX

First clone the repo and init the submodules:

$ git clone https://github.com/jkevin/PS3EyeDirectShow.git
$ cd PS3EyeDirectShow
$ git submodule init
$ git submodule update

Open libusb/msvc/libusb_2017.sln in Visual Studio 2017. If you don't have the Windows 8.1 SDK, change the SDK target to Windows 10 in all of the libusb project properties. Build the solution with all desired configurations. Next open PS3EyeDriverMSVC.sln and build the desired configs again.

If you would like to make the compiled DirectShow filters available to other applications, run c:\windows\system32\regsvr32.exe <path to filter dll> from an administrator command prompt. If you have run the installer make sure to uninstall the package before doing this. Use c:\windows\system32\regsvr32.exe /u <path to filter dll> to unregister the filter.

If the DLL was built with a debug configuration it's possible to use WinDBG to set a breakpoint in the filter code which will be hit when using the camera with any DirectShow application.

To build the installer, first build the 32 and 64 bit release configurations of the solution. Then right click on the PS3EyeInstaller project in the solution explorer and click build.

TODO

  • Manual exposure and white balance controls
  • Windows Media Foundation source?

ps3eyedirectshow's People

Contributors

jkevin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.