Libnymphcast is a library containing the core functionality for a NymphCast client. This includes:
- Streaming media files to a remote NymphCast receiver.
- Playing a media file via a URL provided to a NymphCast receiver.
- Communication with remote NymphCast Apps.
- Multi-casting media content.
- Interact with NymphCast MediaServers.
- Built-in C++ and C APIs.
- Additional bindings for compatibility with Ada and other languages. See Bindings section.
Binary releases of libnymphrpc are available for the following platforms:
Alpine-based: libnymphcast
FreeBSD: FreshPorts - nymphcastlib
For the C language API there is an example C application in bindings/c/example. After building and installing the libnymphcast library following the below instructions, or installing a binary version (see above), the Makefile in the bindings/c/example/ folder can be used to build the example client.
In order to use the C API, the nymphcast_client_c.h header should be included as it contains the C-style API. The library itself is compiled as C++ and both are linked into the final binary.
An Ada and Java binding are in progress. They'll be available in the bindings/ folder as they're being developed.
To compile libnymphcast from source, the following dependencies must be installed:
- NymphRPC
- LibPOCO (1.5+)
After this, the project can be compiled using a C++11 capable GCC compiler and make.
After calling make in the root of the project folder, the library can be found in the lib/ folder in a platform-specific sub-folder. Installation of the library and headers is performed with sudo make install or make install (MSYS2).
Note 1: When building on FreeBSD make sure to use gmake.
Note 2: To use clang instead of gcc specify the toolchain on the command to make/gmake:
make TOOLCHAIN=clang
Note 3: The CXX environment variable is used by default. The fallback is g++.
For MSVC-based installation, an automated setup script using vcpkg is provided. This supports MSVC 2017, 2019 and 2022. Execute it from an x64 native MSVC shell:
Setup-NMake-vcpkg.bat
By default this installs the compiled library to D:\Libraries\LibNymphCast.
In order to compile for Android platforms, ensure that the Clang-based cross-compiler is accessible on the system PATH, and that libPoco has been compiled & made available. The use of the POCO-build project is recommended here.
With these dependencies in place, compiling for any of the specific Android platforms is done by adding any of the following behind the make command:
- ANDROID=1 for targeting ARMv7-based (32-bit) Android.
- ANDROID64=1 for targeting ARMv8-based (64-bit) Android.
- ANDROIDX86=1 for targeting x86-based (32-bit) Android.
- ANDROIDX64=1 for targeting x86_64 (64-bit) Android.
On supported platforms (Linux-based), installation of the library can be performed using:
sudo make install