npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@astronautlabs/rtp

v1.0.1

Published

An RTP implementation for Node.js and the browser

Downloads

25

Readme

@/rtp

📜 IETF RFC 3550
RTP: A Transport Protocol for Real-Time Applications

📘 Attribution
Based on JRTPLIB by Jori Liesenborgs, originally developed at the Expertise Centre for Digital Media (EDM), a research institute of the Hasselt University

📺 Part of the Astronaut Labs Broadcast Suite
@/is04 | @/rfc8331 | @/rtp | @/scte104 | @/scte35 | @/st2010 | @/st291

Release Quality
This package is ready for production


An RTP implementation in C++ based on JRTPLib. Native bindings for Node.js coming soon.

Installing

You must have cmake available to build this package (even at runtime):

choco install cmake  # windows
apt install cmake    # linux
brew install cmake   # mac

Then, add a dependency to it:

npm install @astronautlabs/rtp

Contributing

We welcome contributions, feel free to raise issues or file pull requests. Make sure to review and abide by the Code of Conduct.

Development

C++ Defines

  • RTP_HAVE_SYS_FILIO: Set if <sys/filio.h> exists.
  • RTP_HAVE_SYS_SOCKIO: Set if <sys/sockio.h> exists.
  • RTP_BIG_ENDIAN: If set, assume big-endian byte ordering.
  • RTP_SOCKLENTYPE_UINT: Indicates that getsockname used an unsigned int as its third parameter.
  • RTP_HAVE_SOCKADDR_LEN: Indicates that struct sockaddr has an sa_len field.
  • RTP_SUPPORT_IPV4MULTICAST: Enables support for IPv4 multicasting.
  • RTP_SUPPORT_THREAD: Enables support for JThread.
  • RTP_SUPPORT_SDESPRIV: Enables support for RTCP SDES private items.
  • RTP_SUPPORT_PROBATION: If set, a few consecutive RTP packets are needed to validate a member.
  • RTP_SUPPORT_GETLOGINR: If set, the library will use getlogin_r instead of getlogin.
  • RTP_SUPPORT_IPV6: If set, IPv6 support is enabled.
  • RTP_SUPPORT_IPV6MULTICAST: If set, IPv6 multicasting support is enabled.
  • RTP_SUPPORT_SENDAPP: If set, sending of RTCP app packets is enabled.
  • RTP_SUPPORT_MEMORYMANAGEMENT: If set, the memory management system is enabled.
  • RTP_SUPPORT_RTCPUNKNOWN: If set, sending of unknown RTCP packets is enabled.
  • RTPDEBUG: Enables some memory tracking functions and some debug routines.

Cross-compilation of JThread & JRTPLIB for Android

Warning: When cross-compiling, the configuration defaults to big-endian. But since most Android systems are little-endian, you should probably change this setting in the CMake configuration.

The approach I follow for cross-compiling these libraries for the Android platform is sketched below. The following lines are stored in a file called toolchain.cmake (for example):

set(CMAKE_SYSTEM_NAME Android)
set(CMAKE_SYSTEM_VERSION 21) # API level
set(CMAKE_ANDROID_ARCH_ABI armeabi-v7a)
set(CMAKE_ANDROID_NDK /path/to/ndk-bundle/)
set(CMAKE_ANDROID_STL_TYPE gnustl_static)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

When starting CMake, first for JThread and afterwards for JRTPLIB, I then manually add the following entries:

CMAKE_TOOLCHAIN_FILE /path/to/toolchain.cmake
CMAKE_INSTALL_PREFIX /path/to/installation/directory
CMAKE_FIND_ROOT_PATH /path/to/installation/directory

For example, I like to use the ccmake program, which would yield the following command line:

ccmake -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain.cmake \
       -DCMAKE_INSTALL_PREFIX=/path/to/installation/directory \
       -DCMAKE_FIND_ROOT_PATH=/path/to/installation/directory \
       /path/to/main/CMakeLists.txt

After configuring JThread this way, just build and install it. The same CMake procedure for JRTPLIB should then automatically detect the correct JThread (so the one that's installed in your cross-compilation installation directory), after which you can again build and install the RTP library.