leadedge / Spout2

A video frame sharing system for Microsoft Windows
BSD 2-Clause "Simplified" License
760 stars 138 forks source link

Questions about SpoutDX and SPoutDX12 #116

Closed whiteeat closed 3 months ago

whiteeat commented 3 months ago

When I compile the SpoutDX12.h and SpoutDX12.cpp, it gives me the following error: image

The fix is simple, just change it to nullptr. Will this error be fixed in the future at this repo?

Also, I discovered that each SpoutDX object contains its own spoutSenderNames, which seems problematic when setting multiple senders in my application. Should I write custom code to manage multiple senders using a single Spout sender?

leadedge commented 3 months ago

Yes that's a typo and will be corrected. Strange that Visual Studio shows no errors for this even with All warnings enabled.

Sender names are independently held as a set in shared memory and each instance of spoutSenderNames will access this same memory map using it's named mutex. Mutliple senders require multiple SpoutDX objects. There can't be more than one sender per object.

whiteeat commented 3 months ago

Thanks for the information! I studied the code further, and you are correct.

leadedge commented 3 months ago

FYI Following up on further interest in this, I have made CMake changes to create a SpoutDX12 library and an example project which seems to work OK. Let me know if this is of any use for you or if there are any problems with the idea.

whiteeat commented 3 months ago

FYI Following up on further interest in this, I have made CMake changes to create a SpoutDX12 library and an example project which seems to work OK. Let me know if this is of any use for you or if there are any problems with the idea.

That's really helpful! Now I don't need to provide additional explanations to my team on how to use Spout with DirectX12!

leadedge commented 3 months ago

That's good news. It's useful for me to know your application and Does it work!

I am updating the TUTORIAL04 example for a dll/static library which will be common process for all the libraries.