Commit graph

117 commits

Author SHA1 Message Date
Jonas Birmé
cf06fe6ed1
0.8.2 2023-11-20 10:48:54 +01:00
yaruno
bec9609f70
fix: add event emitter to async class (#64) 2023-11-20 10:37:53 +01:00
Jonas Birmé
04ce7d238b 0.8.1 2023-09-19 23:05:46 +02:00
neoxpert
b40d4a3c8c Update srt-enums.h
Updated enum definition to take new values into account aswell as reserved spaces.
2023-09-18 21:16:25 +02:00
Jonas Birmé
23407cea60 0.8.0 2023-09-18 14:18:38 +02:00
Jonas Birmé
23efbb8501 feat: bump to libsrt 1.5.2 2023-09-04 09:01:34 +02:00
Jonas Birmé
ed0e4913a6 0.7.1 2023-08-10 15:53:12 +02:00
Max van den Bosch
c3e77b11dd
Fixed Windows build: using"diff" instead of patch (#57) 2023-08-10 15:38:46 +02:00
Jonas Birmé
03fd1f7f37 chore: test build on node v18 2023-08-10 15:36:03 +02:00
Max van den Bosch
9e9a6bddce
Fix for build directories that contain spaces (#59) 2023-08-09 20:15:56 +02:00
dependabot[bot]
79fb0548c5
Bump json5 from 2.1.3 to 2.2.3 (#50)
Bumps [json5](https://github.com/json5/json5) from 2.1.3 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.1.3...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-10 09:38:19 +01:00
dependabot[bot]
05d3cf5dd1
Bump lodash from 4.17.19 to 4.17.21 (#48)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

---
updated-dependencies:
- dependency-name: lodash
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 12:56:30 +01:00
dependabot[bot]
3a90057bc5
Bump decode-uri-component from 0.2.0 to 0.2.2 (#47)
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-07 12:53:30 +01:00
Jonas Birmé
be273dd94e 0.7.0 2022-11-11 13:58:23 +01:00
dependabot[bot]
69b41ac787
Bump minimist from 1.2.5 to 1.2.7 (#44)
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 13:56:18 +01:00
dependabot[bot]
3928186d2a
Bump minimatch from 3.0.4 to 3.1.2 (#45)
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 13:56:04 +01:00
dependabot[bot]
3dbe737fdc
Bump ansi-regex from 4.1.0 to 4.1.1 (#46)
Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](https://github.com/chalk/ansi-regex/compare/v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-11 13:55:51 +01:00
Jonas Birmé
3ecb83ba6b
feat: update to SRT lib version 1.4.4 (#43)
Including:
- Updated SRT lib version to 1.4.4
- Building on Darwin arm64
- Obtain OPENSSL root using brew --prefix openssl
- Updated to latest node-addon-api and node-gyp
2022-11-10 16:50:48 +01:00
dependabot[bot]
d9fd701dd9
Bump json-schema and jsprim (#42)
Bumps [json-schema](https://github.com/kriszyp/json-schema) and [jsprim](https://github.com/joyent/node-jsprim). These dependencies needed to be updated together.

Updates `json-schema` from 0.2.3 to 0.4.0
- [Release notes](https://github.com/kriszyp/json-schema/releases)
- [Commits](https://github.com/kriszyp/json-schema/compare/v0.2.3...v0.4.0)

Updates `jsprim` from 1.4.1 to 1.4.2
- [Release notes](https://github.com/joyent/node-jsprim/releases)
- [Changelog](https://github.com/TritonDataCenter/node-jsprim/blob/v1.4.2/CHANGES.md)
- [Commits](https://github.com/joyent/node-jsprim/compare/v1.4.1...v1.4.2)

---
updated-dependencies:
- dependency-name: json-schema
  dependency-type: indirect
- dependency-name: jsprim
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:43:47 +02:00
dependabot[bot]
c98529f3ae
Bump node-notifier from 8.0.0 to 8.0.1 (#18)
Bumps [node-notifier](https://github.com/mikaelbr/node-notifier) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/mikaelbr/node-notifier/releases)
- [Changelog](https://github.com/mikaelbr/node-notifier/blob/v8.0.1/CHANGELOG.md)
- [Commits](https://github.com/mikaelbr/node-notifier/compare/v8.0.0...v8.0.1)

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:43:36 +02:00
dependabot[bot]
64c0d06541
Bump y18n from 4.0.0 to 4.0.1 (#22)
Bumps [y18n](https://github.com/yargs/y18n) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/yargs/y18n/releases)
- [Changelog](https://github.com/yargs/y18n/blob/master/CHANGELOG.md)
- [Commits](https://github.com/yargs/y18n/commits)

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:43:23 +02:00
dependabot[bot]
e8dfa3ac44
Bump lodash from 4.17.19 to 4.17.21 (#23)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.19 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.19...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:43:11 +02:00
dependabot[bot]
a18d038172
Bump hosted-git-info from 2.8.8 to 2.8.9 (#24)
Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
- [Release notes](https://github.com/npm/hosted-git-info/releases)
- [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
- [Commits](https://github.com/npm/hosted-git-info/compare/v2.8.8...v2.8.9)

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:42:57 +02:00
dependabot[bot]
2dc4dc28f0
Bump glob-parent from 5.1.1 to 5.1.2 (#26)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:42:40 +02:00
dependabot[bot]
c4e80fe6d7
Bump path-parse from 1.0.6 to 1.0.7 (#29)
Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:42:25 +02:00
dependabot[bot]
f63ee34132
Bump tar from 6.0.2 to 6.1.11 (#31)
Bumps [tar](https://github.com/npm/node-tar) from 6.0.2 to 6.1.11.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v6.0.2...v6.1.11)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:42:10 +02:00
dependabot[bot]
155f4405ae
Bump tmpl from 1.0.4 to 1.0.5 (#32)
Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

---
updated-dependencies:
- dependency-name: tmpl
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:41:56 +02:00
dependabot[bot]
050635e78c
Bump ajv from 6.12.2 to 6.12.6 (#35)
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.12.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:41:42 +02:00
dependabot[bot]
a71c2f37b3
Bump minimist from 1.2.5 to 1.2.6 (#36)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:41:27 +02:00
dependabot[bot]
12d3894096
Bump jsdom from 16.4.0 to 16.7.0 (#40)
Bumps [jsdom](https://github.com/jsdom/jsdom) from 16.4.0 to 16.7.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/16.4.0...16.7.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-18 23:41:07 +02:00
Jonas Birmé
ed280c120c chore(docs): added support section 2022-09-26 16:02:15 +02:00
birme
b4aa55328c 0.6.0 2022-05-13 15:51:02 +02:00
birme
5fd35863cb chore: also test on node 14 2022-05-13 15:29:28 +02:00
birme
a64648b1e2 chore: use newer lockfile version 2022-05-13 15:26:15 +02:00
Stephan Hesse
8e2090a900
node-src.cc: fix erratic value passed to srt_setsockflag for length argument (#37)
(SRT API params are typeless, and for strings it expects the string **length** obviously,
while what was put there is some random constant related to the allocated size of platform specific string container class!! :D)
& compiler warning regarding std::string/c_str-pointer lifecycles,
std::string needs to stay on stack until srt_setsockflag call to be safe indeed.
+ add JS-exception thrown for unexpected value type passed
+ SRT_SOCKOPT cast general style fixes
2022-04-28 17:04:07 +02:00
Morpheus235
12fd413117
Add support for SRTO_STREAMID (#34)
* Update node-srt.cc

add SRTO_STREAMID in NodeSRT::GetSockOpt

* Add SRTO_STREAM to SOCKET_OPTIONS Enum

* fix typo

* Add Test ffor SRTO_STREAMID

* finished SRTO_STREAMID implementation

added String as possible Value to setSockOpt
added test for normal SRT API

removed double SRTO_STREAMID from srt-enums.h

Co-authored-by: Daniel Soßnowski <d.sossnowski@systempiloten.de>
2022-01-21 18:07:20 +01:00
Stephan Hesse
a6b655b5d0
Fix #17 (work with SRT v1.4.2): Set proper sockaddr_in alloc size & resolve deprecation warning (use srt_create_socket instead srt_socket) (#21)
* fixes #17: we set this 0 since not using their_addr output by accept call,
but SRT v1.4.2 is checking for this size to be large enough to write into it
the actual address in the first place. anyhow, wether we read it or not,
it doesn't matter, the allocated size of sockaddr_in is always the same
(per any platform).

* fix deprecation warning on usage of srt_socket, replaced by srt_create_socket
+ fix newline-chars
2021-03-23 18:24:34 +01:00
J. Oliva
f03db7b8a7
Add support for SRT stats (#20) 2021-03-18 08:54:35 +01:00
birme
53855bacac 0.5.2 2020-10-26 16:54:59 +01:00
Stephan Hesse
ef2795cb52
Fix node-gyp rebuild script on Windows (#13)
* build-srt-sdk: add console log line about platform detection

* node-gyp rebuild: rm -j with num-cpus eval'd from shell (breaks Windows)
2020-10-26 16:54:20 +01:00
birme
b7d33bb431 0.5.1 2020-10-26 16:53:04 +01:00
Stephan Hesse
bee401cce9
fix macOS Catalina build: the CMake config on previous versions doesn't (#14)
find the XCode/Clang SDK anymore, this however works fine with latest
SRT v1.4.2.
Now this however breaks support for the SRTO_TSBPDDELAY sock opt flag.
2020-10-26 16:49:39 +01:00
birme
27e3494337 0.5.0 2020-10-21 13:12:20 +02:00
Stephan Hesse
bf60795889
Async API server/streams impl & functional tests + Allow to use local SRT source repo instead of remote (#9)
* replace stream module by improved version of readable/writable impl

* rm server.js

* async api improvments:
- better tracing of calls from worker back and forth
- fix transferrable handling to avoid copying buffers for r/w
- optional debug logs
- completed jsdocs annotations
- add dispose method
- add setLogLevel method (analoguous to added binding)

* node-srt C bindings:
- add SetLogLevel to get libSRT log output if desired
- add OK static member
- add #define EPOLL_EVENTS_NUM_MAX 1024
- improve error string thrown in Read (add that it comes from srt_recvmsg)
- improve error string thrown in Write (add that it comes from srt_sendmsg2)
- misc isofunctional improvements (var names) and comments

* add SRT logging related JS-side helper

* rewrite flat TypeScript decl files without "module" keyword

* add ts enum decl for all libSRT enums

* async-worker: enable using transferrable for zero-copy
+ allow better debugging (like in api/dispatcher side)
+ misc improvements on code quality

* add async-helpers: various functions to help dealing with transferrables
+ tracing calls to native bindings in debug output

* add async read/write modes functions + async-reader-writer class
- these will allow for performing high-level r/w operations conveniently
at optimum throughput for larger pieces of payload i.e list of packets.

* add srt-server and srt-connection (can manage multiple clients),
- based on async-api
- can be used with reader/writer (i.e the underlying modes)

* srt-server/connection typings

* async srt spec: add dispose method usage (but commented out as crashing atm)

* async srt spec: rm redundant checks on SRT static members (they are done
in other spec already)

* promises api spec: formal fixes

* stream spec: add dummy test

* package.json:
- put gyp toolchain in runtime deps (since the build happens on install)
- add JEST test runner
- shorten check-tsc script
- rebuild script: check & use all CPU cores available
- run rebuild actually on install, not preinstall (fixes deps not being there)
- remove preinstall and thus "npm install git-clone" in the package scripts

* update package lock

* update typings index not to need triple-slashs anymore

* in srt.ts example: check for read return value type

* build-srt-sdk script:
- allow to use any local libSRT code repo
- when using make: use all amount of cores available for build
- isolate better code running on different platforms

* update package main index with new things

* add enum typings index

* add jest config

* add "use strict" on async-srt-await example

* add integration/smoke testing for client-to-server one-way burst write

* readme: add note on build prerequisites

* readme: add infos on new components SRTServer/Connection & AsyncReaderWriter
2020-10-21 13:09:52 +02:00
Llorx
bf8745b66f
const to fit compiler errors (#11)
const to fit compiler errors
2020-09-14 12:02:38 +02:00
birme
0438ffccfb 0.4.0 2020-08-03 12:14:45 +02:00
birme
de9bab0ba2 Added the async API to the docu 2020-08-03 12:12:25 +02:00
birme
9633c6bff3 Added spec files for async srt library (wip) 2020-08-03 11:50:23 +02:00
Stephan Hesse
0df89c0187
ReadableStream performance improvements (#7)
* various fixes to readable-stream implementation using blocking srt calls.
- refactor reading/pushing routine in order to allow higher througput:
* call srt read() in the same tick/stack as the class _read impl call
* schedule a timer only as needed if no connection yet or socket buffer empty
* blocking loop to push all bytes requested, or until push returns false
or until no more data is in the socket buffer
* generally, handle case properly where no data is yet available from srt-socket read()
* in case no more data, retains the currently requested value remainder
from last _read call
-> this will allow for getting as much data as requested (if socket delivers
it) within the tick where it was requested or any next one in a best effort
manner. it will block the main-thread with "too long" execution frames/ticks
eventually as the data-demand from the _read calls becomes high
in amout/frequency.
but that is simply a consequence of the fact the SRT calls here are
blocking I/O. the previous implementation was also resulting in this
congestion of the main loop queue as read calls would block it, but at best
there was a 100ms lag between a request for read and its actual fulfillment.
one further improvement of this fix could be to split up the requested bytes
amount onto several ticks (executing one partial read directly, and further
ones in further timer scheduled calls, in order to avoid blocking ticks).
- use 50ms timer default for read continuation retry timer
- use 50ms interval for initial connection epoll'ing
- use consts for all timeout values
- implement base class _destroy method & refactor close() in consequence
- trigger Stream base class "readable" event on connection and first packet

* server: add an event for when a client was accepted to pass the fd
2020-08-03 09:58:35 +02:00
Stephan Hesse
074da05097
Worker-based Async API with await/Promise support (or plain callbacks) (#6)
* fix lint errors in eslint config :)

* index.d.s: add /* eslint-disable @typescript-eslint/triple-slash-reference */

* improve eslint calling script

* add async-worker version of the SRT JS API with await/Promise support
+ potentially out-of-order RPC-back/result-dequeuing is possible
with a type of call-ID generator and callback-map that we prototyped
(but not used atm since the worker is only doing sync/blocking internally
with the current SRT lib binding).

* add various examples for async API ("classic" callbacks / Promise / await)

* add .eslintignore (should go with commit where we just call "eslint .")

* index.js: add missing semi

* async.js: fix method name litteral in epollUWait

* async.js: allow for accept method to use a timeout opt (defaults to false),
and a custom timeout value option (default to default timeout),
which can potentially be set differently than the general default timeout.
+ make the timeout value a static class property so that it can be
user-defined module-load wide. defaults to constant in module top scope.

* async.js: fix for a rejected promise, make sure we don't resolve anymore
+ add a custom timeout value argument to _createAsyncWorkPromise

* async.js: rm an experiment

* fix a lint error in example

* add types for async api and fix some details on binding API types

* export async API to index

* async.js: add some missing docs for private methods

* include async types in index
2020-08-03 09:54:26 +02:00