Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update NDI SDK to v6.0.0 #3

Merged
merged 7 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ jobs:
pip install pytest psutil
- name: Install Project
run: pip install -e .
env:
CYNDILIB_BUILD_PARALLEL: auto
- name: Compile tests
run: |
pip install cython>=0.29.32
Expand All @@ -61,8 +63,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: macos-latest
arch: universal2
- os: macos-13
arch: x86_64
python-version: "cp3{7,8,9,10,11}"
- os: macos-14
arch: arm64
python-version: "cp3{7,8,9,10,11}"
- os: ubuntu-latest
arch: x86_64
Expand Down Expand Up @@ -112,7 +117,7 @@ jobs:

- name: Build wheels
id: build_wheel
uses: pypa/cibuildwheel@v2.11.2
uses: pypa/cibuildwheel@v2.17
env:
CIBW_BUILD: ${{ matrix.python-version }}-*
CIBW_ARCHS: ${{ matrix.arch }}
Expand Down
19 changes: 10 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
cyndilib
########

A Python wrapper for `Newtek NDI®`_ written in `Cython`_
A Python wrapper for `NDI®`_ written in `Cython`_


Description
***********

NDI® allows video and audio to be reliably sent and received over IP with
minimal latency and very high quality. For more information see https://ndi.tv/.
minimal latency and very high quality. For more information see https://ndi.video.

This project aims to wrap most functionality of the `NDI® SDK`_ for use in
Python. Due to the real-time nature of audio and video, nearly all of this
Expand Down Expand Up @@ -80,16 +80,16 @@ License

cyndilib is licensed under the MIT license. See included `LICENSE`_ file.

NDI® is a registered trademark of NewTek, Inc. Its associated license
information can be found in `libndi_licenses.rst`_.
NDI® is a registered trademark of Vizrt NDI AB. Its associated license
information can be found in `libndi_licenses.txt`_.


⚠ Distribution Considerations ⚠
===============================

Before distributing or including this in your own projects it is **important**
that you have read and understand the "Licensing" section included in the
`NDI® SDK`_ Documentation.
`NDI® SDK Documentation`_.

There are specific requirements listed for branding, trademark use and URLs to
be displayed, etc. To the best of my knowledge this project is following the
Expand All @@ -99,9 +99,10 @@ Liability for derivative works, etc falls under the responsibility of their auth



.. _Newtek NDI®: https://ndi.tv/
.. _NDI® SDK: https://ndi.tv/sdk/
.. _NDI®: https://ndi.video
.. _NDI® SDK: https://ndi.video/for-developers/ndi-sdk/
.. _NDI® SDK Documentation: https://docs.ndi.video/docs
.. _Cython: https://cython.org
.. _PyPI: https://pypi.org/
.. _LICENSE: license.rst
.. _libndi_licenses.rst: libndi_licenses.rst
.. _LICENSE: LICENSE
.. _libndi_licenses.txt: libndi_licenses.txt
7 changes: 7 additions & 0 deletions doc/source/LICENSE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:orphan:

LICENSE
#######

.. literalinclude:: ../../LICENSE
:language: none
7 changes: 7 additions & 0 deletions doc/source/libndi_licenses.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
:orphan:

libndi_licenses
###############

.. literalinclude:: ../../libndi_licenses.txt
:language: none
11 changes: 11 additions & 0 deletions doc/source/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,14 @@ Overview

.. include:: ../../README.rst
:start-line: 2
:end-before: .. _NDI®



.. _NDI®: https://ndi.video
.. _NDI® SDK: https://ndi.video/for-developers/ndi-sdk/
.. _NDI® SDK Documentation: https://docs.ndi.video/docs
.. _Cython: https://cython.org
.. _PyPI: https://pypi.org/
.. _LICENSE: LICENSE.html
.. _libndi_licenses.txt: libndi_licenses.html
114 changes: 76 additions & 38 deletions libndi_licenses.txt
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
********************************************************************************************************
NewTek NDI
Copyright (C) 2014-2021, NewTek, inc.
********************************************************************************************************
********************************************************************************
NDI
Copyright (C) 2023-2024 Vizrt NDI AB. All rights reserved.
********************************************************************************

The NDI SDK license available at:
http://new.tk/ndisdk_license/
http://ndi.link/ndisdk_license

The NDI Embedded SDK license is available at
http://new.tk/ndisdk_embedded_license/
The NDI Embedded SDK license is available at
http://ndi.link/ndisdk_embedded_license

For more information about NDI please visit:
http://ndi.tv/
http://ndi.video/

This file should be included with all distribution of the binary files included with the NDI SDK.

We are truly thankful for the NDI community and the amazing support that it has shown us over the years.

********************************************************************************************************
********************************************************************************
NDI gratefully uses the following third party libraries.

********************************************************************************************************
RAPIDJSON (https://rapidjson.org/)
********************************************************************************
RapidJSON (https://rapidjson.org)

Tencent is pleased to support the open source community by making RapidJSON available.

Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip. All rights reserved.

Licensed under the MIT License (the "License"); you may not use this file except
in compliance with the License. You may obtain a copy of the License at

http://opensource.org/licenses/MIT
Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.

****************************************************
SPEEX (https://www.speex.org/), resampling code only.
SpeexDSP (https://www.speex.org), resampling code only.

© 2002-2003, Jean-Marc Valin/Xiph.Org Foundation

Redistribution and use in source and binary forms, with or without modification, are permitted provided
Redistribution and use in source and binary forms, with or without modification, are permitted provided
that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the
Redistributions of source code must retain the above copyright notice, this list of conditions and the
following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or
Neither the name of the Xiph.org Foundation nor the names of its contributors may be used to endorse or
promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

********************************************************************************************************
RapidXML (http://rapidxml.sourceforge.net/)
********************************************************************************
RapidXML (http://rapidxml.sourceforge.net)

Copyright (c) 2006, 2007 Marcin Kalicinski

Expand All @@ -87,7 +87,7 @@ FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

********************************************************************************************************
********************************************************************************
CxxUrl (https://github.com/chmike/CxxUrl)

The MIT License (MIT)
Expand All @@ -112,8 +112,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

********************************************************************************************************
ASIO (non Boost version) https://think-async.com/Asio/
********************************************************************************
ASIO (https://think-async.com)

Boost Software License - Version 1.0 - August 17th, 2003

Expand Down Expand Up @@ -141,7 +141,9 @@ DEALINGS IN THE SOFTWARE.

Copyright (c) Microsoft Corporation.

********************************************************************************************************
********************************************************************************
MsQuic (https://github.com/microsoft/msquic)

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -162,8 +164,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

********************************************************************************************************
Opus Interactive Audio Codec (https://opus-codec.org/)
********************************************************************************
Opus Interactive Audio Codec (https://opus-codec.org)

Copyright 2001-2011 Xiph.Org, Skype Limited, Octasic,
Jean-Marc Valin, Timothy B. Terriberry,
Expand Down Expand Up @@ -208,4 +210,40 @@ Microsoft Corporation:
https://datatracker.ietf.org/ipr/1914/

Broadcom Corporation:
https://datatracker.ietf.org/ipr/1526/
https://datatracker.ietf.org/ipr/1526/

********************************************************************************
Updated to C++, zedwood.com 2012
Based on Olivier Gay's version
See Modified BSD License below:

FIPS 180-2 SHA-224/256/384/512 implementation
Issue date: 04/30/2005
http://www.ouah.org/ogay/sha2/

Copyright (C) 2005, 2007 Olivier Gay <olivier.gay@a3.epfl.ch>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the project nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test-command = [
"py.test {project}/tests/",
]
test-skip = "cp37-*"
environment = {CI= "true"}
environment = {CI= "true", CYNDILIB_BUILD_PARALLEL= "auto"}

[tool.cibuildwheel.linux]
before-all = "yum install -y avahi-libs"
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ long_description_content_type = text/x-rst
license = MIT
license_files =
LICENSE
libndi_licenses.txt

classifiers =
Development Status :: 3 - Alpha
Expand Down
22 changes: 22 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import json
from pathlib import Path
from setuptools import setup, find_packages
from setuptools.command.build_ext import build_ext
from distutils.extension import Extension
from distutils.sysconfig import get_python_inc
from distutils.errors import CCompilerError
Expand Down Expand Up @@ -160,6 +161,24 @@ def __str__(self):
compiler_directives=compiler_directives,
)

# From https://github.com/scikit-learn/scikit-learn/blob/3ee60a720aab3598668af3a3d7eb01d6958859be/setup.py#L106-L117
class build_ext_subclass(build_ext):
def finalize_options(self):
build_ext.finalize_options(self)

if self.parallel is None:
# Do not override self.parallel if already defined by
# command-line flag (--parallel or -j)

parallel = os.environ.get("CYNDILIB_BUILD_PARALLEL")
if parallel == 'auto':
self.parallel = os.cpu_count()
elif parallel:
self.parallel = int(parallel)
if self.parallel:
print("setting parallel=%d " % self.parallel)


def build_annotate_index(extensions):
root = AnnotateIndex('', root_dir=PROJECT_PATH / 'src')
for ext in extensions:
Expand All @@ -172,6 +191,9 @@ def build_annotate_index(extensions):
build_annotate_index(ext_modules)

setup(
cmdclass={
'build_ext':build_ext_subclass,
},
ext_modules=ext_modules,
include_package_data=True,
package_data=PACKAGE_DATA,
Expand Down
Binary file modified src/cyndilib/wrapper/bin/Processing.NDI.Lib.DirectShow.x64.dll
Binary file not shown.
10 changes: 5 additions & 5 deletions src/cyndilib/wrapper/bin/Processing.NDI.Lib.Licenses.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
********************************************************************************
NewTek NDI
Copyright (C) 2014-2022, NewTek, inc.
NDI
Copyright (C) 2023-2024 Vizrt NDI AB. All rights reserved.
********************************************************************************

The NDI SDK license available at:
http://new.tk/ndisdk_license/
http://ndi.link/ndisdk_license

The NDI Embedded SDK license is available at
http://new.tk/ndisdk_embedded_license/
http://ndi.link/ndisdk_embedded_license

For more information about NDI please visit:
http://ndi.tv/
http://ndi.video/

This file should be included with all distribution of the binary files included with the NDI SDK.

Expand Down
Binary file modified src/cyndilib/wrapper/bin/Processing.NDI.Lib.UWP.x64.dll
Binary file not shown.
Binary file modified src/cyndilib/wrapper/bin/Processing.NDI.Lib.x64.dll
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Loading
Loading