Commit graph

36 commits

Author SHA1 Message Date
4ac63ddfc6 feat(whip): wire WHIPHandler into API — struct field, MergedHooks, NewWHIPHandler, serverConfig, cleanup
Some checks failed
ci / vet + build (push) Failing after 5m0s
ci / race tests (push) Has been skipped
ci / WebRTC smoke (5-viewer fanout) (push) Has been skipped
ci / WebRTC latency p95 gate (push) Has been skipped
2026-05-09 16:46:49 -04:00
671f64ca56 feat(branding): Dragon Fork identity for v0.1.0-dragonfork release
Some checks failed
tests / build (push) Failing after 2s
tests / build (pull_request) Failing after 2s
M5 / final M2-stack work. The fork now identifies itself unambiguously
in logs, the API, and the README without changing the Go module path
(internal imports stay at github.com/datarhei/core/v16 — see NOTES.md
for the rationale).

Identity surfaces:

- app/version.go gains Variant ('dragonfork') and Fork ('Datarhei —
  Dragon Fork') as vars (overridable via -ldflags for downstream
  re-packagers).
- api.About + the /api endpoint expose 'variant' and 'fork' fields;
  Swagger docs regenerated.
- Startup banner logs 'variant' + 'fork' alongside the existing
  application + version fields, so a TrueNAS sysadmin tail-following
  /var/log can tell at a glance which fork is running.

Documentation:

- README.md rewritten with a Dragon Fork header and Quick start; the
  upstream feature surface is summarised in 'From upstream Datarhei'
  with a clear additivity statement. Sample process JSON, multi-input
  pipeline guidance, link to the design + testing docs.
- NOTICE: Apache 2.0 §4(d) attribution to upstream datarhei Core,
  Pion, Echo, FFmpeg.
- CREDITS: enumerated dependency list with licenses.
- CHANGELOG.md prepended with a 'Datarhei — Dragon Fork' section
  starting at v0.1.0-dragonfork; upstream's '# Core' history preserved
  below.

Module path stays github.com/datarhei/core/v16 by design — the fork is
distinguished by repo location and branch history, not import path.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 12:22:25 +00:00
83eaa28601 feat(webrtc): wire app/webrtc subsystem into Core lifecycle
Installs the WebRTC egress subsystem at Core boot when
cfg.WebRTC.Enable is true and the subsystem constructs cleanly:

- http.Config gains an optional WebRTC *appwebrtc.Handler field;
  server.setRoutesV3 mounts its WHEP routes on the JWT-protected
  /api/v3 group.
- api.start() constructs the Subsystem, registers its ProcessHooks
  with the restreamer, and builds a Handler. A construction failure
  is logged and Core continues without WebRTC — consistent with
  disabling the subsystem outright.
- api.stop() closes the Handler (tearing down active peers) before
  closing the Subsystem (releasing per-process UDP sockets), mirroring
  the RTMP/SRT teardown pattern.

Verified: go build ./... clean; go test ./app/webrtc/...
./core/webrtc/... ./restream/... ./http/... all pass.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-17 10:08:54 -04:00
Ingo Oppermann
d6a80c28e5
Add ConnectionIdleTimeout to RTMP server 2024-05-29 16:16:10 +02:00
Ingo Oppermann
c3b63c4480
Fix sized filesystem
If purging is enabled, overwriting a file with a file of the same
or smaller size will not result in an error.

It is now possible to change the purging mode on an existing sized
filesystem.
2023-09-22 14:16:46 +02:00
Ingo Oppermann
3149572a64
Fix freeing up S3 mounts 2023-03-17 18:40:20 +01:00
Ingo Oppermann
05a176370a
Fix missing filesystem metadata and middlewares 2023-02-14 16:16:35 +01:00
Ingo Oppermann
2a3288ffd0
Use abstract filesystem for stores 2023-02-01 16:09:20 +01:00
Ingo Oppermann
49b16f44a8
Add templates for s3 filesystems 2023-01-31 15:54:40 +01:00
Ingo Oppermann
f519acfd71
Add S3 storage support 2023-01-31 14:45:58 +01:00
Ingo Oppermann
0147651de6
Extend placeholders
1. Allow variables in placeholders for parameter values, e.g.
   {rtmp,name=$processid}. The variable starts with a $ letter.
   The recognized variables are provided with the Replace func.

2. The template func recieves the process config and the name of
   the section where this placeholder is located, i.e. "global",
   "input", or "output".
2023-01-20 13:38:33 +01:00
Ingo Oppermann
e374f83377
Fix config timestamps
created_at represents the time when the configuration has been persisted to disk.
loaded_at represents the time when the configuration has actually been used.

If created_at is larger than loaded_at, then the Core needs a reload in order
to apply the latest configuration.

if created_at is lower than laoded_at, then the Core applied the latest
configuration.

The value of updated_at is irrelevant and shouldn't be used.
2023-01-19 16:13:53 +01:00
Ingo Oppermann
17c9f6ef13
Test different standard location for config file
If no path is given in the environment variable CORE_CONFIGFILE, different
standard locations will be probed:
- os.UserConfigDir() + /datarhei-core/config.js
- os.UserHomeDir() + /.config/datarhei-core/config.js
- ./config/config.js
If the config.js doesn't exist in any of these locations, it will be
assumed at ./config/config.js
2023-01-03 07:55:55 +01:00
Ingo Oppermann
378a3cd9cf
Allow to set a soft memory limit for the binary itself
The setting debug.memory_limit_mbytes should not be used in conjuction
with debug.force_gc because the memory limit influences the garbage
collector.
2023-01-02 11:58:54 +01:00
Ingo Oppermann
0cd8be130c
Remove letsdebug module
This module has a dependency of a modules that requires cgo, that's a no-go.
2022-12-31 17:46:46 +01:00
Ingo Oppermann
8a1dc59a81
Set a default of 20ms for internal SRT latency 2022-12-27 13:46:02 +01:00
Ingo Oppermann
1a9ef8b7c9
Add Let's Debug auto TLS error diagnostic 2022-12-27 10:26:49 +01:00
Ingo Oppermann
18be75d013
Use new streamid format for {srt} placeholder 2022-11-22 21:25:54 +01:00
Ingo Oppermann
dfc81ac38f
Add ffmpeg migration tool, annotate process config with ffmpeg version constraint 2022-11-02 22:02:39 +01:00
Ingo Oppermann
4cc82dd333
Update dependencies 2022-10-28 17:24:57 +02:00
Ingo Oppermann
4d4e70571e
Fix proper version handling for uploading a new config 2022-10-10 16:19:45 +02:00
Ingo Oppermann
f896c1a9ac
Fix datarhei/restreamer#425 2022-10-10 14:54:35 +02:00
Ingo Oppermann
fe2e9d375c
Use LE porduction CA, allow to configure an email address 2022-09-30 12:12:36 +02:00
Ingo Oppermann
bbcf0ab1b1
Fix double slashes in RTMP URL 2022-09-30 09:25:29 +02:00
Ingo Oppermann
bc7faf9364
Replace x/crypto/acme/autocert with caddyserver/certmagic 2022-09-23 10:05:48 +02:00
Ingo Oppermann
6802830c62
Don't use deprecated functions from io/ioutil 2022-08-18 10:27:33 +03:00
Ingo Oppermann
b376fdc87d
Add compiler and arch to log output 2022-08-02 20:37:47 +02:00
Ingo Oppermann
273ca0abbc
Add cache block list for extensions not to cache 2022-08-02 19:10:28 +02:00
Ingo Oppermann
00c382262e
Add config migration from version 1 to version 2 2022-07-20 12:27:55 +02:00
Ingo Oppermann
76abe2c19d
Always register rtmp and srt replacer templates 2022-07-08 10:46:05 +02:00
Ingo Oppermann
971b8337fe
Add new placeholders and parameters for placeholder 2022-07-06 19:51:47 +02:00
Ingo Oppermann
fa3f8b9b57
Allow RTMP server if RTMPS server is enabled 2022-07-05 20:30:40 +02:00
Ingo Oppermann
2058554524
Allow to configure SRT logging 2022-07-01 18:39:39 +02:00
Ingo Oppermann
da039f4751
Add proper API of SRT log data 2022-07-01 15:31:07 +02:00
Jan Stabenow
eb1cc37456
Add GoSRT & improvements (repo-merge)
Commits (Ingo Oppermann):
- Add experimental SRT connection stats and logs
- Hide /config/reload endpoint in reade-only mode
- Add SRT server
- Create v16 in go.mod
- Fix data races, tests, lint, and update dependencies
- Add trailing slash for routed directories (datarhei/restreamer#340)
- Allow relative URLs in content in static routes

Co-Authored-By: Ingo Oppermann <57445+ioppermann@users.noreply.github.com>
2022-06-23 22:13:58 +02:00
Jan Stabenow
9c0b535199
Add v16.7.2 2022-05-13 19:26:45 +02:00