Coder Social home page Coder Social logo

spout2's People

Contributors

cnschwarzer avatar jcelerier avatar keijiro avatar leadedge avatar lesha198a avatar mbechard avatar rawbengal avatar smokhov avatar vkedwardli avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spout2's Issues

how to send irregular sized texture ?

I'm trying to send a QOpenGLWidget framebuffer texture with spout.
Since this widget can be resized by the user, its size is uncommun, something like 652 x 519.

When I try to send this texture from Qt with

GLuint tex = defaultFramebufferObject();
if(tex && m_tex_width > 0 && m_tex_height > 0)
{
  m_spoutSender.SendTexture(tex, GL_TEXTURE_RECTANGLE, m_tex_width, m_tex_height);
}

Demo SpoutReceiver detect the sender but the screen remains black.

When I change GL_TEXTURE_RECTANGLE to GL_TEXTURE_2D I got error on sender side :

GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT - width-height problems?

Do you know guys how to solve this ?

Thanks

Cannot create DirectX/OpenGL interop

Hi
Can u tell me how to use SpoutCam , i can't use it.
first i'm install 32bit VLC(64bit don't detect SpoutCam)
in VLC , i'm choose SpoutCam , but it black.
I open SpoutSender.exe in DEMO , VLC tell me Cannot create DirectX/OpengGL interop.

Creating Spout sender without OpenGL context

Is it possible to create a Spout sender/receiver without an OpenGL context? I am trying to send video to a Spout buffer inside a Windows service.

Windows services are run in Session 0 (and hence have no OpenGL context).

How to compile examples in the sproutsdk directory

I used examples and modified part of the code. The compilation environment is vs2017. The compiler prompts "missing type specifier - assumed to be int. Note: the default int * d:\windows kits\10\include\10.0.17763.0\um\mmsyscom.h". Do you want to configure compiler selection or install reference libraries

image

Spout Panel does't display more that 10 Senders

Hi Lynn,

I think I have found a bug where there the Spout panel app can only handle up to 10 senders. This also seems to be apparent when getting the list of available senders from the SpoutSDK.

I've created an Openframeworks project which shows the problem. - https://goo.gl/MQVpgC it uses this Spout addon - https://github.com/ThomasMSondrup/ofxSpout2 with the latest Spout SDK version, there's a compiled version in the Bin folder. Once running press 'a' to add spout senders one at a time. If you check the Spout Panel after reaching 10+ running senders you should what I mean.

Thanks,
Harvey

SpoutCam

Hey there

Just discovered Spout today, I gotta say from what I've seen so far this looks like a really great piece of software!
I do however have a question relating to SpoutCam.

I saw this youtube video (https://www.youtube.com/watch?v=Vy6yyFjNATI) showing how to use it, however it looks like the video is for Spout1 and the files have changed (ie: no SpoutTray anymore). The only exe relating to SpoutCam i can see in this repo is SpoutCamSettings.exe, launching this shows a dialog box where i can select fps and resolution with an ok and cancel button. After clicking ok the dialog disappears and that's it, can't see any related process running. Am i missing something obvious? is there any 3rd party dependencies?

Finally is there any cli for SpoutCam?

Question : Mutable `char *` for channel names

Heya!

I noticed that you're passing char * as parameters for CreateSender, UpdateSender, etc.
Are you purposely choosing char * rather than const char * because you might return a different name than was passed in? Otherwise, what is the reason for not using const char *?

I end up having blocks of code looking like:

char * mutableName = new char[channelName.size() + 1];
strcpy_s(mutableName, channelName.size() + 1, channelName.c_str());
this->spoutSender->CreateSender(mutableName);
this->channelName = string(mutableName);
delete[] mutableName;

Or is it unnecessary? Should I just use a const_cast because the functions will never change the string? It seems strange that UpdateSender would ever need to change the name passed into it.

Thank you
Elliot

Build SpoutPanel.exe

Hi, I was trying to compile and build a new executable with the source code of SpoutPanel.

Not quite reaching anything with visual studio or Mingw

Any suggestion on how to re build it? thanks

Port spout to VK_External_memory

Currently there is no supported spout system on linux, and having a single cross-platform solution would be incredibly useful for a number of scenarios. We currently use linux servers for display in our studios and use it heavily in our virtual production workflow. We have solutions using spout but would love to have support on linux as well as for VJ related usings. This is why I bring up creating a version that supports Vulkan external memory to allow for copying of textures between processes without loosing the benefit of GPU texture sharing performance.

https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VK_KHR_external_memory.html

VS2012 Spout2 compile error

Hi

When compiling Spout on VS2012 I get this error:
"1>..\SpoutGLDXinterop.cpp(433): error C2664: 'errno_t wcstombs_s(size_t *,char *,size_t,const wchar_t *,size_t)' : cannot convert parameter 4 from 'CHAR [128]' to 'const wchar_t *'
1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast"

Can be solved with
MultiByteToWideChar(CP_ACP, 0, p, -1, (LPWSTR)pwcsName, nChars);
;
(But don't know if it is because a bad conversion to 2012 or not.

how to send a grayscale image ?

For performance reason I don't wan't to convert my grayscale image to RGBA color.
How can I send this image with Spout ?

I tried :

    QImage image(m_frame.data,
             m_frame.cols,
             m_frame.rows,
             QImage::Format_Grayscale8);
     m_spoutSender.SendImage(image.bits(), image.width(), image.height(), GL_LUMINANCE);

where m_frameè is a cv::Mat`.
My QImage is correctly displayed in Qt, but the Demo SpoutReceiver remains black while it does detect my sender.

When I remove GL_LUMINANCE I do have some image on SpoutReceiver, but look like it is expecting an RGBA.

How can I solve this ?

Thanks

BTW I tried both version 2.006 and 46924e3

where is the source code of demo program ?

I think it will be very valuable to release the source code of the Demo program since they don't rely on external framework like openFrameworks or Cinder.

Then it will be easier to debug custom application.

Allow DirectX11 Receiver on offscreen shared OpenGL context

Hi,

It could be great to allow DirectX11 Spout Receiver on offscreen shared OpenGL context.

Shared OpenGL context linked with wglShareLists and activated in offscreen rendering thread do not have any related HWND:
WindowFromDC(wglGetCurrentDC()) return NULL in this case.

spoutGLDXinterop::OpenDirectX only need an HWND for DirectX9 initialization.
DirectX11 initialization do not use any HWND.

Everywhere is spout code, the potential NULL value of hWnd or g_hWnd is forwarded silently except in SpoutSDK.cpp at line 1080

        if(g_hWnd == NULL) {
            return false;
        }

To made this possible, I modify this line like this:

        if(g_hWnd == NULL && interop.m_bUseDX9) {
            return false;
        }

After this modification, everything work perfectly.
Thanks for your concern about this.

SpoutDX11

Hi :-)

I'm using the SpoutDX to transfer a DX11 texture. This works just fine using the Demo receiver.
But, when I'm using the ofxSpout2 receiver (updated to the latest version of Spout2), then Spout::OpenReceiver() fails in line 1054 in SpoutSDK. I just did an quick and dirty change to the code: if((dwFormat!= DXGI_FORMAT_B8G8R8A8_UNORM)&&(!bMemory && !sharehandle))
return false;
And, then I'm able to receive the DX11 texture :-)

What is the best way to perform this type of check ?

Spout can't handle more than a certain number of Senders

Hi Lynn,

I tested Spout 2.006 on different machines and I found out that there is a limit related to the number of Senders that can be created before the SDK crashes.
After an extensive investigation I found out that the same limit applies in the case where Senders are created and destroyed progressively too (for instance: Sender1 created, Sender1 destroyed; Sender2 created, Sender2 destroyed; etc...).
The limit is the same in both cases and it's 156 on my machine.
In all these cases an exception is thrown inside the nvoglv64.dll because of an access violation reading location 0x000000000000000C (n.b.: this is only visible attaching the debugger to the processes). Moreover when a Receiver is created, after the limit has been reached, the following message is shown by the SDK:
Cannot create DirectX/OpenGL interop.
CreateDX11interop - error 1
CreateInterop - error 3

I've created two Openframeworks projects (open close senders and open n senders) which use the ofxXmlSettings and ofxSpout2 (only used to include the SpoutSDK) add-ons, to show the problem. There is an xml file in the bin/data folder through which is possible to set:

  • the amount of sender that will be created and destroyed one after another (this is the case of the first project);
  • the amount of sender that will be created (this is the case of the second project).

Thanks,
Stefano

x64 + OpenGL app + not USE_GLEW

in SpoutGLextensions.cpp lines 145 - 161 load extensions for FBO you have:
glBindFramebufferEXT = (glBindFramebufferEXTPROC)**(unsigned)**wglGetProcAddress("glBindFramebuffer");

unsigned=unsigned int - it's 32 bit type. It breaks address of x64 function.

DirectX usage with Spout?

I am wanting to share directx textures between CryEngine and OBS and was wanting to know if this documentation was updated for Spout2 http://spout.zeal.co/download/SpoutDirectXsdk4.pdf

I don't fully understand how the sending of the texture works. Is the shared texture handler something like a ID3D11RenderTargetView or ID3D11Texture2D? I am most likely going to have a texture with the format DXGI_FORMAT_R16G16B16A16_UNORM. Does OBS support DirectX 11 so I can use this texture?

loadFBOextension fail

I'm using SpoutSDK in Visual Studio. Creating a new instance of SpoutSender works and everything compiles and links properly. When I call CreateSender("senderName", 1280, 720); i get the error:

loadFBOextension fail
Spout::CreateSender - OpenSpout failed

Running on Windows 10 with a Nvidia 1070ti GPU which fully supports all openGL extensions through openGL 4.6.

Any advice on how to get this working?

2.006 and 2.007 beta compatibility issues

Hello,

What should I do if I want to integrate the d3d11 receiver into the old project (2.006)?

Replace all files with those in the 2.007 beta branch? Will the old opengl receiver still work?

Looking forward to your reply, thank you!

SpoutSDK For Mac OS

I need to compile the SDK to the MAC system, but there are a large number of DirectX uses inside the SDK, and I can't get started.
Is there an SDK version that only references the opengl support library?

Glitch error in resolume with spout from unity

Hi! First, thanks for creating this library, it's really useful.

I have an error when passing my interaction of unity to resolume on the screen, the frames freeze, and it seems an error, a kind of glitch, does not allow it to look the same as what is seen in the helmet (live htc).

Will they have any idea what is happening, or should I change some configuration in unity?

In resolume is within a layer without any effect, it seems that the error comes from unity, I do not know if it is compatibility of frames.

Hopefully you can support me, I send images, this is for an exhibition in Mexico that will be this week! uups

Thanks!

IMG_4806

SpoutReceiver.exe /// full screen

When using the SpoutReceiver.exe application, the full screen option will always use the 'main display' (determined in the Windows display settings).

Would it be possible to instead full screen to the monitor that the SpoutReceiver.exe window is currently located within?

  • I've searched extensively for a alternative Spout Receiver that can simply full screen a Spout stream to a specific monitor, but it doesn't exist on Github or such.
  • It would be particularly useful for performers that need a quick way to full screen a Spout stream, without needing to rely on Resolume or such mapping software. Also since multiple instances of the SpoutReceiver.exe can be running at once, then the user could full screen a unique Spout stream to each monitor/projector.

Access Violation

I've got an issue and I'm kind of lost here.

I'm using MemorySharedmode and DX11.

Process A owns a Sender, which is initialized in the constructor and updated if nessesary in my renderloop. So the update method is only called, when width or height of my image has changed.

Process B owns a receiver, which is initialized in my renderloop in process B and updated everytime if already initialized.

Most of the time it works well. But sometimes I get an access violation in Process A when writing the image to the shared mem in the method memcpy_sse2. (SpoutCopy.cpp Line 163) when calling _mm_stream_si128((__m128i *)(pDst), Reg0);:

Unhandled exception thrown: write access violation.
pDst was 0x1B42460D000.

It looks like the Process A grants always the access right to the mutex, even if it shouldn't ??
And Process B runs in the if clause in (SpoutSharedMemory.cpp Line 218) WaitForSingleObject(m_hMutex, 67) and gets stuck here i.e. returns always false.

The only way for me to temporarily resolve this is to reboot my machine. Until it happens the next time.

Any ideas?

Any help is much appreciated. Thanks in advance.

Noisy MessageBoxA

Hi,

On my AMD W9100 with last Windows 7 x64 drivers, wglDXRegisterObjectNV fail in the spoutGLDXinterop::LinkGLDXtextures function.
I presume it is due to AMD driver bad supports of of the NVidia NV_DX_interop OpenGL extension.
This let spoutGLDXinterop::CreateInterop call MessageBoxA(NULL,"Cannot create DirectX/OpenGL interop","ERROR",MB_OK|MB_ICONEXCLAMATION);

Enforcing memoryShare instead of directX11 or directX9 solve this issue.

I'm wondering if Spout's error reporting could rely on a less noisy function that MessageBoxA.
This by letting Spout functions return HRESULT, DWORD from GetLastError or a custom enumeration.

Maybe to avoid API compatibility problems, a callback should be passed to Spout class allowing client application to chose between printf, MessageBoxA or other custom callback functions.

This will help client application to call Spout in background task thread or rendering loop, and react according to error codes.

By the way, Thanks a lot for this great open source library.
Best Regards

DX11 Sender not working on Windows 8.1

No matter what I try (sending from DX9/DX11), I can't get sharing to work on Windows 8.1.
I'm using the Unity plugin from Ben Kuper (https://github.com/benkuper/Unity-Plugins), and, interestingly, sharing FROM Unity TO another instance of Unity does work. Only the SpoutSDK samples do not work, even after recompiling. I see them in the receiver list, but selecting just does nothing.

Here's the System Capabilites output:

Spout Receiver - DirectX 11
Windows 8 - 32bit
Intel(R) HD Graphics 5000
Driver : 39.60 (32 bpp)
Compatible hardware
NV_DX_interop extensions supported
Interop load successful
Texture sharing mode available
FBO blit available

FFGL Compile

Hey there,

So grateful for the pure awesomeness that is spout.

I'm attempting to compile and run the FFGL receiver. However when I define SpoutReceiver receiver; in my header the .dll no longer displays in the host. (There are no compile errors.)

I'm currently using the Spout.lib in my linker. I've also recompiled the lib, but no joy there. Should I try and use the dll version instead? #define SPOUT_IMPORT_DLL - If so where is the most sensible location for the dll?

Any help would be much appreciated,

Thankyou.

Does Spout work in Unity when using HDRP ?

Hello,
I am using Unity's Visual Effect Graph function,
To use this function, it must be under HDRP.

So I would like to ask if Spout can be executed in this situation?
Because I add the spout sender component on Camera (like the way we are familiar with),
However, the image cannot be transmitted.

So I would like to ask if Spout(Not even NDI) can run under HDRP? is there any other reason?

Thanks!

Using Spout with D3D11 directly ?

Hello,
Is there a guide / way to use Spout directly with an existing D3D11 texture ?

To give some context, I'm trying to add Spout support to https://github.com/OSSIA/score

The GPU pipeline is handled by the Qt RHI (https://www.qt.io/blog/qt-quick-on-vulkan-metal-direct3d) which is an abstraction over GL/DX11/Vulkan/Metal. If possible, I'd like to use DX11 on Windows - I already have it working with Spout under GL though so it's not a very big deal, but it could lead to some perf. improvement.

My understanding is that with DX11, I could set the shared ID3D11Texture2D as my render pipeline's final render target, and then notify Spout that rendering has been done, maybe with some level of locking before that. Thus there would be no copies of gl textures to D3D textures or things like that.

Is this something achievable somehow ?
Thanks !

Executable:xxx.exe Pid d24 Tid d24 1bb0. Module SpoutCam.ax, 2 object left active! At line 317 of dllentry.cpp

Hi , my friends
First i'm use SpoutCam as a capture card , when I close the program, I get this error:
ASSERT Failed
Executable:xxx.exe Pid d24 Tid 1bb0. Module SpoutCam.ax, 2 objects left active!
At line 317 of dllentry.cpp
I'm look for some things for this error . The conclusion is the object is Addref but no release.
so i want to know this error is dshow Baseclasses problem or SpoutCam problem.

Spout2 receiver with D3d11

Hello,
I want to use d3d11 to receive spout2 textures, how should I do that I did not find the relevant example. Thanks.

Spout SDK compatibility with C++/CLI

Unfortunately Spout SDK cannot be compiled with C++/CLI as it has using namespace std; at couple of places which will result in name collisions between managed types and std:: things. It's only a nuisance and it's only important if I'd like to avoid distributing the spout dll and p/invoking with it. I can report more once I test out the new beta again.

Using keyword in headers

It would be good to remove "using namespace std" from headers (SpoutSenderNames) to prevent collisions with other code.

Rare crash on spoutDirectX::SetAdapter()

Hi

I found a rare crash on spoutDirectX::SetAdapter()
In file SpoutDirectX.cpp at line 607
if CreateDX11device() fail, the if (pd3dDevice == NULL) is true and the following line crash:
pd3dDevice->Release();

This line could be removed because if CreateDX11device fail, nothing need to be released.

Thanks for your concern about this.

Receiver getting blank image

@leadedge I have a multiprocess Windows 8.1 C++ application sending either texture or frame in GL_RGB, not inverted, 1024x512. The receivers getting blank black frames; no errors, receiving dimensions are correct, but when I render no image is present. I am trying to determine the cause. Spout 2.004 SDK, VS2015. I've been eyeballing Spout SDK ref manual for a while to try to understand what may be wrong. I will add more instrumentation, but if you have any ideas of that's "something typical", it'd be appreciated.

Create a Receiver without Sender

Hello,
I like to create a Receiver without having the Sender initialized at that moment.

When I try to, the function CreateReceiver returns false and there is no Receiver created.

Is there a way to create the Receiver before the Sender is created?

not define GLEW_STATIC

Defining GLEW_STATIC kind of forces end user to use glew as a static library. I would remove this from SpoutGLextensions.h and let the programmer that uses the framework specify how to use GLEW in their projects.

using the FFGL plugin

I sometimes get an ERROR dialog, "Cannot create DirectX/OpenGL interop".
This error reopens if I click OK to close it.. and basically I am stuck.
Seems to occur sometimes when the Spout source has been closed and reopened during a Spout connection.
If this error is unavoidable, it would be better I think to fail quietly rather than locking up with the dialog.
Again, I don't know whats possible here, just letting you know about it.
If you want me to run some tests.. let me know.

fresh install on new Win 10 machine. Missing msvcp110.dll

Hi lynn.

I'm setting up a fresh machine.
Installing Spout 2.006 opened the installer for the x64 (missed the version) c++ redistributable as expected.
However, I am unable to open the included exe's (SpoutDXmode,exe or the Demo sender + receiver)
I get a dialog saying that msvcp110.dll is missing.

Like I said, brand new machine, so perhaps useful info.
Installing 'ONLY' the C++ Redistributable for Visual Studio 2012 update 4, x86
Solved the missing file issue, and exe's open as expected.

readme.pdf confusing for new users

Within the recently released Spout_2006_update-3.zip on download page, the readme.pdf puts much focus on how to upgrade from a prior Spout install. Over within the NestDrop community, we have new users which are installing Spout for the first time and are confused of how to correctly install Spout.

Would you consider splitting up the installation instructions into 2 sections (first-time install & upgrading) within the readme.pdf?

glCheckFrameBufferStatusEXT error in writeGLDtexture

We're using Spout 2.006 on a Intel Skull Canyon with Intel i7-6770 (skylake), Intel Iris Pro 580 1024MB, Windows 10 Pro. GPU driver version is 21.20.16.4534 October 2016, OpenGL 4.4 is supported. OpenGL extension viewer displays WGL_NV_DX_interop as supported.

When calling SpoutSender::SendImage() or SpoutSender::SendTexture() Spout outputs GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT (dec: 86182, hex: 0x8d56) in SpoutGLDXinterop.cpp at spoutGLDXinterop::WriteGLDtexture() after calling glCheckFramebufferStatusExt(). This happens on both of our used textures of size 512x424 and 1920x1080. This is with DX9 being used. In our program we create an OpenGL 3.2 context.

The code works on different computers with NVidia 1060 GTX and NVidia 750m.

If we try the Spout demo sender, the texture is shown in the window. Spout demo receiver does not get the texture. The demo receiver/sender use DX9.

Sometime SpoutSharedMemory::Unlock() assert(m_lockCount >= 0)

Hi
My application is multi-threaded (gui and opengl have different threads)
I'm also using shared multi opengl context.
I avoid Spout API concurrent calls with a custom global mutex.
I'm using the last Master branch version of Spout2

In very rare case, SpoutSharedMemory::Unlock() assert(m_lockCount >= 0)
in SpoutSharedMemory.cpp at line 235
This is because spoutMemoryShare::LockSenderMemory() call SpoutSharedMemory::Unlock() when SpoutSharedMemory::Lock() fail in SpoutSenderMemory.cpp at line 196.

As other Lock() callers, this function should not call Unlock() when Lock() fail. This made the m_lockCount value negative and introduce further problems...

From a general point of view, I'm not convicted about the needs of the m_lockCount variable:
MSDN ReleaseMutex documentation says that: A thread can specify a mutex that it already owns in a call to one of the wait functions without blocking its execution. This prevents a thread from deadlocking itself while waiting for a mutex that it already owns. However, to release its ownership, the thread must call ReleaseMutex one time for each time that it obtained ownership (either through CreateMutex or a wait function).

Thanks for your interest about this issue.

Regards,

FFGL 2.0

It would be great to have examples of how to use SpoutSender and SpoutReceiver in FFGL 2.0.

Is there anything that would prevent this? I was going to attempt it using the resolume/ffgl repo as a base. Happy to share if I get it working.

Thanks!

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.