Giter VIP home page Giter VIP logo

python-spoutgl's Introduction

SpoutGL for Python

An unofficial Python wrapper for Spout using pybind11

Key features compared to some previous wrappers:

  • Covers more of the SpoutGL API, including sendImage/receiveImage, setFrameSync/waitFrameSync and data sharing
  • pybind11 instead of Boost Python which should make it easier to build for multiple Python versions
  • pip/wheel support for Python 3.7+ on both 64-bit and 32-bit Windows
  • No external dependencies

Installation

pip install SpoutGL

Documentation

For now, refer to the Spout SDK C++ documentation and the examples in the examples directory.

Extras

These helper utilities are not part of the Spout SDK but added for convenience and performance.

SpoutGL.helpers

Adds several functions that are useful in Blender and other environments

  • getBytesPerPixel
  • isBufferEmpty
  • copyToFloat32
  • copyToByteBuffer

SpoutGL.enums

Exports supported GL format enums as integers:

  • GL_RGBA
  • GL_BGRA_EXT
  • GL_RGB
  • GL_BGR_EXT

License & Disclaimer

Licensed under the BSD license. See the LICENSE file for details.

This is not an officially supported Google product.

python-spoutgl's People

Contributors

cansik avatar dependabot[bot] avatar jlai avatar worosom avatar

Stargazers

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

Watchers

 avatar  avatar

python-spoutgl's Issues

SendImage is broken since v0.0.3 (Spout 2.006)

With the update from Spout 2.006 to 2.007h the sendImage command is broken, only texture sharing is possible. The sender is created correctly, but the following method does not go in either of the two if statements. At the end just returns false, because texture sharing and cpu sharing is not available.

if (m_bTextureShare) {
	// Texture share compatible
	return WriteGLDXpixels(pixels, width, height, glformat, bInvert, HostFBO);
}
else if (m_bCPUshare) {
	// Auto share enabled for DirectX CPU backup
	return WriteDX11pixels(pixels, width, height, glformat, bInvert);
}

I am currently not sure how fix this, playing around with auto-share and cpu-share flags did not help:

sender.setCPUshare(True)
sender.setAutoShare(False)

Do you have an idea what could be the problem here?

If I just force the CPUShare code (by copying it out of the if statement), the sharing works as expected.

Get Senders

Hello! I'm trying to get availible senders. But I didn't found solution fot it. Thank you in advance)

How to cleanly exit spout?

Hi I have been using the package to great success, but have been increasingly seeing errors around memory when exiting.
I think it is due to name issues with the sender name as well as spout not exiting cleanly.
How can I exit as clean as possible to remove all the memory, etc. before the program exits?

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.