tolga9009 / elgato-gchd

DISCONTINUED. Reverse engineering the Elgato Game Capture HD to make it work under Linux.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple card support

pwnorbitals opened this issue · comments

As explained in the title, can I use two cards at the same time ?
Is it planned to be supported soon ?
If not, is such a task possible to develop with my limited C/C++ experience within a few weeks ?

Thank you

Hi there!

If you have 2 Elgatos, which both are supported by the driver, it should be fairly trivial to get them working simultaneously. You need to make changes to the code, so gchd can be run multiple times at once and they all output to their own files, e.g. /tmp/gchd_1.ts and /tmp/gchd_2.ts. If both your devices share the same PID, you might also need to find a way to avoid instances of the driver from trying to bind the same device via libusb. If both your devices have different PIDs, you might get away with hardcoding PIDs into the driver.

If you're a bit more experienced, you might also work on something like a DeviceManager and only use a single instance of the driver, which takes care of both devices at once. This involves multi-threading. Example from one of my other projects: https://github.com/tolga9009/sidewinderd/blob/master/src/core/device_manager.cpp. This would be more ideal than the first solution, but it's also more challenging.

I wish you best of luck!

Cheers,
Tolga

I will try diving into the code and experiment with how I can implement one of the two solutions - thanks :)

Unfortunately, I couldn't get anything to work as I didn't have time to dig really far.
If anyone manages to do it, It really would be awesome

Thank you very much