From 5216168cdee4b29fc5f197607413bfec84bdb4d2 Mon Sep 17 00:00:00 2001 From: Alex Andres Date: Thu, 22 Oct 2026 23:21:33 +0200 Subject: [PATCH 1/2] docs: group the README features and link them to the guides --- README.md | 57 +++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index dfbb534b..4de67bbb 100644 --- a/README.md +++ b/README.md @@ -13,35 +13,50 @@ The library provides a comprehensive set of Java classes that map to the WebRTC ## Features -- **Complete WebRTC API implementation** - Includes peer connections, media devices, data channels, and more -- **Client API** - A high-level layer that negotiates by itself, keeps your code off WebRTC's threads, and closes everything with one call; with WHIP and WHEP sessions, and video views for Swing and, with the `webrtc-java-javafx` module, JavaFX -- **Cross-platform support** - Works on Windows, macOS, and Linux (x64, ARM, ARM64) -- **Media capabilities** - Audio and video capture from cameras and microphones -- **Desktop capture** - Screen and application window sharing -- **Video processing** - Change camera and desktop frames before they are sent, e.g. to blur a background, draw an overlay or blank out part of the screen -- **Hardware video codecs** - Encode and decode H.264, H.265, VP9 and AV1 on the GPU with NVENC/NVDEC, Media Foundation, VA-API and VideoToolbox, falling back to software -- **Custom video codecs** - Plug video encoders and decoders written in Java into WebRTC next to the built-in ones, or limit the codecs a factory offers -- **Media file playback** - Send video and audio files over a peer connection in place of a camera and microphone, with the optional FFmpeg-based `webrtc-java-media` module -- **Call recording** - Record what a peer connection sends or receives into MKV, WebM or MP4 files, without re-encoding, with the `webrtc-java-media` module -- **Encoded transforms** - Read, change or drop encoded audio and video frames on their way through a sender or receiver, e.g. for end-to-end encryption, like insertable streams in the browser -- **Encoded frame injection** - Send audio and video that is already encoded, such as a camera's H.264 stream or a recording, through a sender without re-encoding it -- **Data channels** - Bidirectional peer-to-peer data exchange -- **Statistics API** - Detailed metrics for monitoring connection quality -- **Simple integration** - Available as a Maven dependency -- **Native performance** - Thin JNI layer with minimal overhead +**Calls and data** + +- **[Client API](https://jrtc.dev/guide/client-api)** - High-level calls that negotiate by themselves, keep your code off WebRTC's threads and close with one call +- **[WHIP and WHEP](https://jrtc.dev/guide/client-api#whip-and-whep)** - Publish to and play from streaming servers +- **[Peer connections](https://jrtc.dev/guide/networking/peer-connection-config)** - The full native API, modeled on the W3C JavaScript API +- **[Data channels](https://jrtc.dev/guide/data/data-channels)** - Reliable or unreliable peer-to-peer messaging +- **[Statistics](https://jrtc.dev/guide/monitoring/rtc-stats)** - Detailed metrics on connection quality + +**Audio and video** + +- **[Cameras and microphones](https://jrtc.dev/guide/media/media-devices)** - Capture from any local device +- **[Screen sharing](https://jrtc.dev/guide/video/desktop-capture)** - Share the full desktop or single application windows +- **[Video processing](https://jrtc.dev/guide/video/camera-capture#changing-frames-before-they-are-sent)** - Blur a background, draw an overlay or blank out part of the screen before frames are sent +- **[Video views](https://jrtc.dev/guide/client-api#handlers-on-the-ui-thread)** - Ready-made components that show video in Swing, or in JavaFX with the `webrtc-java-javafx` module + +**Codecs and encoded media** + +- **[Hardware codecs](https://jrtc.dev/guide/advanced/video-codecs#hardware-encoding)** - H.264, H.265, VP9 and AV1 on the GPU with NVENC/NVDEC, Media Foundation, VA-API and VideoToolbox, falling back to software +- **[Custom codecs](https://jrtc.dev/guide/advanced/video-codecs#adding-a-codec)** - Plug in video encoders and decoders written in Java, or limit the codecs a factory offers +- **[End-to-end encryption](https://jrtc.dev/guide/advanced/encoded-transforms)** - Read, change or drop encoded audio and video frames, like insertable streams in the browser +- **[Pre-encoded media](https://jrtc.dev/guide/advanced/encoded-transforms#injecting-encoded-frames)** - Send a camera's H.264 stream or a recording without re-encoding it + +**Optional modules** + +- **[Media playback](https://jrtc.dev/guide/media/media-files)** (`webrtc-java-media`) - Stream video and audio files or RTSP sources into a call, decoded with FFmpeg +- **[Call recording](https://jrtc.dev/guide/media/media-recording)** (`webrtc-java-media`) - Save what a call sends or receives into MKV, WebM or MP4 files, without re-encoding + +**Platforms** + +Prebuilt native libraries behind a thin JNI layer: + +| OS | x64 | arm64 | arm32 | +|---------|:---:|:-----:|:-----:| +| Windows | ✓ | ✓ | | +| macOS | ✓ | ✓ | | +| Linux | ✓ | ✓ | ✓ | ## Getting Started For more detailed information, check out the documentation: - [Quickstart](https://jrtc.dev/guide/get-started) - Get up and running quickly with webrtc-java -- [Client API](https://jrtc.dev/guide/client-api) - Calls, media and data channels without the threading pitfalls - [Guides](https://jrtc.dev/guide/) - Comprehensive documentation on using the library - [Examples](https://jrtc.dev/guide/examples) - Sample code demonstrating various features -- [Media Files](https://jrtc.dev/guide/media/media-files) - Sending video and audio files with the media module -- [Media Recording](https://jrtc.dev/guide/media/media-recording) - Recording calls into media files with the media module -- [Encoded Transforms](https://jrtc.dev/guide/advanced/encoded-transforms) - Reading and changing encoded frames, e.g. for end-to-end encryption -- [Video Codecs](https://jrtc.dev/guide/advanced/video-codecs) - Adding video codecs implemented in Java, or limiting the built-in ones - [Build Notes](https://jrtc.dev/guide/build) - Instructions for building the library from source - [Unreleased Docs](https://jrtc.dev/next/) - Documentation of the main branch, including features not released yet From 8cd149aa878dc57b87ce2495cd6a7bae6e18f9ca Mon Sep 17 00:00:00 2001 From: Alex Andres Date: Thu, 22 Oct 2026 23:21:33 +0200 Subject: [PATCH 2/2] build: ship LICENSE and NOTICE in every jar Also extends the copyright to 2019-2026. --- NOTICE | 2 +- README.md | 2 +- pom.xml | 46 +++++++++++++++++++ webrtc-java-media/src/main/cpp/CMakeLists.txt | 10 ++++ webrtc-jni/src/main/cpp/CMakeLists.txt | 9 ++++ 5 files changed, 67 insertions(+), 2 deletions(-) diff --git a/NOTICE b/NOTICE index 4fe94daf..a8f8fa73 100644 --- a/NOTICE +++ b/NOTICE @@ -1,5 +1,5 @@ webrtc-java -Copyright 2019 Alex Andres +Copyright 2019-2026 Alex Andres EXTERNAL COMPONENTS diff --git a/README.md b/README.md index 4de67bbb..5db7d781 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ For more detailed information, check out the documentation: ## License -Copyright (c) 2019 Alex Andres +Copyright (c) 2019-2026 Alex Andres Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/pom.xml b/pom.xml index ceb73471..aa031f06 100644 --- a/pom.xml +++ b/pom.xml @@ -249,6 +249,23 @@ central-publishing-maven-plugin + + + + src/main/resources + + + + ${project.basedir}/.. + META-INF + + LICENSE + NOTICE + + + @@ -264,6 +281,35 @@ org.apache.maven.plugins maven-javadoc-plugin + + + org.apache.maven.plugins + maven-resources-plugin + + + javadoc-licenses + prepare-package + + copy-resources + + + ${project.build.directory}/reports/apidocs/META-INF + + + ${project.basedir}/.. + + LICENSE + NOTICE + + + + + + + org.apache.maven.plugins maven-gpg-plugin diff --git a/webrtc-java-media/src/main/cpp/CMakeLists.txt b/webrtc-java-media/src/main/cpp/CMakeLists.txt index 2bc9807d..35c763aa 100644 --- a/webrtc-java-media/src/main/cpp/CMakeLists.txt +++ b/webrtc-java-media/src/main/cpp/CMakeLists.txt @@ -144,6 +144,16 @@ foreach(RUNTIME_LIB ${FFMPEG_RUNTIME_LIBS}) COMMENT "Collecting ${RUNTIME_LIB} for the platform jar") endforeach() +# The project's own license and notice go along as well, at the top of +# META-INF as in the Java jars. +add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E make_directory "${NATIVES_DIR}/META-INF" + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${CMAKE_CURRENT_SOURCE_DIR}/../../../../LICENSE" + "${CMAKE_CURRENT_SOURCE_DIR}/../../../../NOTICE" + "${NATIVES_DIR}/META-INF" + COMMENT "Collecting the webrtc-java license and notice for the platform jar") + # # The LGPL asks for its text to travel with the FFmpeg libraries, along with # a notice saying what they are and where their source is. Both go under diff --git a/webrtc-jni/src/main/cpp/CMakeLists.txt b/webrtc-jni/src/main/cpp/CMakeLists.txt index 0b22045c..1befe80b 100644 --- a/webrtc-jni/src/main/cpp/CMakeLists.txt +++ b/webrtc-jni/src/main/cpp/CMakeLists.txt @@ -178,6 +178,15 @@ install(FILES COMPONENT Runtime ) +# The project's own license and notice go along as well, at the top of +# META-INF as in the Java jars. +install(FILES + "${CMAKE_CURRENT_SOURCE_DIR}/../../../../LICENSE" + "${CMAKE_CURRENT_SOURCE_DIR}/../../../../NOTICE" + DESTINATION "${CMAKE_INSTALL_PREFIX}/META-INF" + COMPONENT Runtime +) + if(WIN32 OR LINUX) install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/dependencies/nvenc/LICENSE"