entry : sdpFmtp.entrySet()) {
- if (!first) {
- sb.append(", ");
- }
- sb.append(entry.getKey()).append("=").append(entry.getValue());
- first = false;
- }
- sb.append("}");
- }
-
- System.out.println(sb);
- }
- }
-}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/DesktopVideoExample.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/DesktopVideoExample.java
deleted file mode 100644
index ee95938..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/DesktopVideoExample.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import dev.onvoid.webrtc.PeerConnectionFactory;
-import dev.onvoid.webrtc.PeerConnectionObserver;
-import dev.onvoid.webrtc.RTCConfiguration;
-import dev.onvoid.webrtc.RTCDataChannel;
-import dev.onvoid.webrtc.RTCIceCandidate;
-import dev.onvoid.webrtc.RTCIceConnectionState;
-import dev.onvoid.webrtc.RTCIceGatheringState;
-import dev.onvoid.webrtc.RTCIceServer;
-import dev.onvoid.webrtc.RTCPeerConnection;
-import dev.onvoid.webrtc.RTCPeerConnectionState;
-import dev.onvoid.webrtc.RTCRtpReceiver;
-import dev.onvoid.webrtc.RTCRtpTransceiver;
-import dev.onvoid.webrtc.RTCSignalingState;
-import dev.onvoid.webrtc.media.MediaStream;
-import dev.onvoid.webrtc.media.MediaStreamTrack;
-import dev.onvoid.webrtc.media.video.VideoDesktopSource;
-import dev.onvoid.webrtc.media.video.VideoTrack;
-import dev.onvoid.webrtc.media.video.desktop.DesktopSource;
-import dev.onvoid.webrtc.media.video.desktop.ScreenCapturer;
-import dev.onvoid.webrtc.media.video.desktop.WindowCapturer;
-
-/**
- * Example demonstrating how to set up a peer connection with a desktop video source.
- *
- * This example shows how to:
- *
- * - Create a PeerConnectionFactory
- * - Get available desktop sources (screens and windows)
- * - Create a VideoDesktopSource for capturing screen or window content
- * - Configure the VideoDesktopSource properties
- * - Create a video track with the desktop source
- * - Set up a peer connection
- *
- *
- * Note: This example focuses only on setting up the local peer connection with
- * a desktop video source for bidirectional media transfer. In a real application,
- * you would need to establish a connection with a remote peer through a signaling
- * channel (e.g., WebSocket).
- *
- * @author Alex Andres
- */
-public class DesktopVideoExample {
-
- public static void main(String[] args) {
- // Create a PeerConnectionFactory, which is the main entry point for WebRTC.
- PeerConnectionFactory factory = new PeerConnectionFactory();
-
- try {
- LocalPeer localPeer = new LocalPeer(factory);
-
- // Keep the application running to observe state changes.
- System.out.println("Press Enter to exit...");
- System.in.read();
-
- // Clean up.
- localPeer.dispose();
- }
- catch (Exception e) {
- Logger.getLogger(DesktopVideoExample.class.getName())
- .log(Level.SEVERE, "Error in DesktopVideoExample", e);
- }
- finally {
- // Dispose the factory when done.
- factory.dispose();
- }
- }
-
- /**
- * Represents a peer connection with audio and desktop video tracks.
- */
- private static class LocalPeer implements PeerConnectionObserver {
-
- private final RTCPeerConnection peerConnection;
- private final VideoDesktopSource videoSource;
-
-
- public LocalPeer(PeerConnectionFactory factory) {
- // Create a basic configuration for the peer connection.
- RTCConfiguration config = new RTCConfiguration();
-
- // Add a STUN server to help with NAT traversal.
- RTCIceServer iceServer = new RTCIceServer();
- iceServer.urls.add("stun:stun.l.google.com:19302");
- config.iceServers.add(iceServer);
-
- // Create the peer connection.
- peerConnection = factory.createPeerConnection(config, this);
-
- // Get available desktop sources.
- System.out.println("Getting available desktop sources...");
-
- // Get available screens.
- ScreenCapturer screenCapturer = new ScreenCapturer();
- List screens = screenCapturer.getDesktopSources();
- System.out.println("\nAvailable screens:");
- for (DesktopSource screen : screens) {
- System.out.printf(" Screen: %s (ID: %d)%n", screen.title, screen.id);
- }
-
- // Get available windows.
- WindowCapturer windowCapturer = new WindowCapturer();
- List windows = windowCapturer.getDesktopSources();
- System.out.println("\nAvailable windows:");
- for (DesktopSource window : windows) {
- System.out.printf(" Window: %s (ID: %d)%n", window.title, window.id);
- }
-
- // Clean up the capturers as we only needed them to get the sources.
- screenCapturer.dispose();
- windowCapturer.dispose();
-
- // Create a desktop video source.
- videoSource = new VideoDesktopSource();
-
- // Configure the desktop video source.
- // Set frame rate (e.g., 30 fps).
- videoSource.setFrameRate(30);
-
- // Set maximum frame size (e.g., 1920x1080).
- videoSource.setMaxFrameSize(1920, 1080);
-
- // Select a source to capture.
- // For this example; we'll use the first available screen if there is one.
- if (!screens.isEmpty()) {
- DesktopSource selectedScreen = screens.get(0);
- System.out.printf("%nSelected screen for capture: %s (ID: %d)%n",
- selectedScreen.title, selectedScreen.id);
- videoSource.setSourceId(selectedScreen.id, false);
- }
- // Otherwise, use the first available window if there is one.
- else if (!windows.isEmpty()) {
- DesktopSource selectedWindow = windows.get(0);
- System.out.printf("%nSelected window for capture: %s (ID: %d)%n",
- selectedWindow.title, selectedWindow.id);
- videoSource.setSourceId(selectedWindow.id, true);
- }
- // If no sources are available, fall back to a default (primary screen).
- else {
- System.out.println("\nNo desktop sources found. Using default (primary screen).");
- videoSource.setSourceId(0, false);
- }
-
- // Start capturing.
- videoSource.start();
-
- // Create a video track with the desktop source.
- VideoTrack videoTrack = factory.createVideoTrack("video0", videoSource);
-
- // Add the tracks to the peer connection.
- List streamIds = new ArrayList<>();
- streamIds.add("stream1");
- peerConnection.addTrack(videoTrack, streamIds);
-
- System.out.println("LocalPeer: Created with a desktop video track");
- }
-
- /**
- * Closes the peer connection and releases resources.
- */
- public void dispose() {
- if (videoSource != null) {
- // Stop capturing before disposing.
- videoSource.stop();
- videoSource.dispose();
- }
- if (peerConnection != null) {
- peerConnection.close();
- }
- }
-
- // PeerConnectionObserver implementation.
-
- @Override
- public void onIceCandidate(RTCIceCandidate candidate) {
- System.out.println("LocalPeer: New ICE candidate: " + candidate.sdp);
- // In a real application, you would send this candidate to the remote peer
- // through your signaling channel.
- }
-
- @Override
- public void onConnectionChange(RTCPeerConnectionState state) {
- System.out.println("LocalPeer: Connection state changed to: " + state);
- }
-
- @Override
- public void onIceConnectionChange(RTCIceConnectionState state) {
- System.out.println("LocalPeer: ICE connection state changed to: " + state);
- }
-
- @Override
- public void onIceGatheringChange(RTCIceGatheringState state) {
- System.out.println("LocalPeer: ICE gathering state changed to: " + state);
- }
-
- @Override
- public void onSignalingChange(RTCSignalingState state) {
- System.out.println("LocalPeer: Signaling state changed to: " + state);
- }
-
- @Override
- public void onDataChannel(RTCDataChannel dataChannel) {
- System.out.println("LocalPeer: Data channel created: " + dataChannel.getLabel());
- }
-
- @Override
- public void onRenegotiationNeeded() {
- System.out.println("LocalPeer: Renegotiation needed");
- // In a real application, you would create an offer and set it as the local description.
- }
-
- @Override
- public void onAddTrack(RTCRtpReceiver receiver, MediaStream[] mediaStreams) {
- System.out.println("LocalPeer: Track added: " + receiver.getTrack().getKind());
- }
-
- @Override
- public void onRemoveTrack(RTCRtpReceiver receiver) {
- System.out.println("LocalPeer: Track removed: " + receiver.getTrack().getKind());
- }
-
- @Override
- public void onTrack(RTCRtpTransceiver transceiver) {
- MediaStreamTrack track = transceiver.getReceiver().getTrack();
-
- System.out.println("LocalPeer: Transceiver track added: " + track.getKind());
- }
- }
-}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/PeerConnectionExample.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/PeerConnectionExample.java
deleted file mode 100644
index 2c670cd..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/PeerConnectionExample.java
+++ /dev/null
@@ -1,283 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import dev.onvoid.webrtc.PeerConnectionFactory;
-import dev.onvoid.webrtc.PeerConnectionObserver;
-import dev.onvoid.webrtc.RTCConfiguration;
-import dev.onvoid.webrtc.RTCDataChannel;
-import dev.onvoid.webrtc.RTCIceCandidate;
-import dev.onvoid.webrtc.RTCIceConnectionState;
-import dev.onvoid.webrtc.RTCIceGatheringState;
-import dev.onvoid.webrtc.RTCIceServer;
-import dev.onvoid.webrtc.RTCPeerConnection;
-import dev.onvoid.webrtc.RTCPeerConnectionState;
-import dev.onvoid.webrtc.RTCRtpReceiver;
-import dev.onvoid.webrtc.RTCRtpTransceiver;
-import dev.onvoid.webrtc.RTCSignalingState;
-import dev.onvoid.webrtc.media.MediaStream;
-import dev.onvoid.webrtc.media.MediaStreamTrack;
-import dev.onvoid.webrtc.media.audio.AudioOptions;
-import dev.onvoid.webrtc.media.audio.AudioTrack;
-import dev.onvoid.webrtc.media.audio.AudioTrackSink;
-import dev.onvoid.webrtc.media.audio.AudioTrackSource;
-import dev.onvoid.webrtc.media.video.VideoDeviceSource;
-import dev.onvoid.webrtc.media.video.VideoFrame;
-import dev.onvoid.webrtc.media.video.VideoTrack;
-import dev.onvoid.webrtc.media.video.VideoTrackSink;
-
-/**
- * Example demonstrating how to set up a peer connection with audio and video tracks
- * to be able to send and receive media.
- *
- * This example shows how to:
- *
- * - Create a PeerConnectionFactory
- * - Create audio and video tracks
- * - Set up a peer connection
- * - Add tracks to the peer connection for sending media
- * - Implement callbacks to receive incoming audio and video frames
- *
- *
- * Note: This example focuses only on setting up the local peer connection with
- * audio and video tracks for bidirectional media transfer. In a real application,
- * you would need to establish a connection with a remote peer through a signaling
- * channel (e.g., WebSocket).
- *
- * @author Alex Andres
- */
-public class PeerConnectionExample {
-
- public static void main(String[] args) {
- // Create a PeerConnectionFactory, which is the main entry point for WebRTC.
- PeerConnectionFactory factory = new PeerConnectionFactory();
-
- try {
- LocalPeer localPeer = new LocalPeer(factory);
-
- // Keep the application running to observe state changes.
- System.out.println("Press Enter to exit...");
- System.in.read();
-
- // Clean up.
- localPeer.dispose();
- }
- catch (Exception e) {
- Logger.getLogger(PeerConnectionExample.class.getName())
- .log(Level.SEVERE, "Error in PeerConnectionExample", e);
- }
- finally {
- // Dispose the factory when done
- factory.dispose();
- }
- }
-
- /**
- * Represents a peer connection with audio and video tracks.
- */
- private static class LocalPeer implements PeerConnectionObserver {
-
- private final RTCPeerConnection peerConnection;
- private final AudioTrack audioTrack;
- private final VideoTrack videoTrack;
- private final AudioFrameLogger audioFrameLogger = new AudioFrameLogger();
- private final VideoFrameLogger videoFrameLogger = new VideoFrameLogger();
-
-
- public LocalPeer(PeerConnectionFactory factory) {
- // Create a basic configuration for the peer connection.
- RTCConfiguration config = new RTCConfiguration();
-
- // Add a STUN server to help with NAT traversal.
- RTCIceServer iceServer = new RTCIceServer();
- iceServer.urls.add("stun:stun.l.google.com:19302");
- config.iceServers.add(iceServer);
-
- // Create the peer connection.
- peerConnection = factory.createPeerConnection(config, this);
-
- // Create an audio source with options.
- AudioOptions audioOptions = new AudioOptions();
- audioOptions.echoCancellation = true;
- audioOptions.autoGainControl = true;
- audioOptions.noiseSuppression = true;
-
- AudioTrackSource audioSource = factory.createAudioSource(audioOptions);
- audioTrack = factory.createAudioTrack("audio0", audioSource);
-
- VideoDeviceSource videoSource = new VideoDeviceSource();
- videoTrack = factory.createVideoTrack("video0", videoSource);
-
- // Add the tracks to the peer connection.
- List streamIds = new ArrayList<>();
- streamIds.add("stream1");
- peerConnection.addTrack(audioTrack, streamIds);
- peerConnection.addTrack(videoTrack, streamIds);
-
- System.out.println("LocalPeer: Created with audio and video tracks");
- }
-
- /**
- * Closes the peer connection and releases resources.
- */
- public void dispose() {
- if (audioTrack != null) {
- audioTrack.removeSink(audioFrameLogger);
- }
- if (videoTrack != null) {
- videoTrack.removeSink(videoFrameLogger);
- }
- if (peerConnection != null) {
- peerConnection.close();
- }
- }
-
- // PeerConnectionObserver implementation.
-
- @Override
- public void onIceCandidate(RTCIceCandidate candidate) {
- System.out.println("LocalPeer: New ICE candidate: " + candidate.sdp);
- // In a real application, you would send this candidate to the remote peer
- // through your signaling channel.
- }
-
- @Override
- public void onConnectionChange(RTCPeerConnectionState state) {
- System.out.println("LocalPeer: Connection state changed to: " + state);
- }
-
- @Override
- public void onIceConnectionChange(RTCIceConnectionState state) {
- System.out.println("LocalPeer: ICE connection state changed to: " + state);
- }
-
- @Override
- public void onIceGatheringChange(RTCIceGatheringState state) {
- System.out.println("LocalPeer: ICE gathering state changed to: " + state);
- }
-
- @Override
- public void onSignalingChange(RTCSignalingState state) {
- System.out.println("LocalPeer: Signaling state changed to: " + state);
- }
-
- @Override
- public void onDataChannel(RTCDataChannel dataChannel) {
- System.out.println("LocalPeer: Data channel created: " + dataChannel.getLabel());
- }
-
- @Override
- public void onRenegotiationNeeded() {
- System.out.println("LocalPeer: Renegotiation needed");
- // In a real application, you would create an offer and set it as the local description.
- }
-
- @Override
- public void onAddTrack(RTCRtpReceiver receiver, MediaStream[] mediaStreams) {
- System.out.println("LocalPeer: Track added: " + receiver.getTrack().getKind());
- }
-
- @Override
- public void onRemoveTrack(RTCRtpReceiver receiver) {
- System.out.println("LocalPeer: Track removed: " + receiver.getTrack().getKind());
- }
-
- @Override
- public void onTrack(RTCRtpTransceiver transceiver) {
- MediaStreamTrack track = transceiver.getReceiver().getTrack();
- String kind = track.getKind();
-
- if (kind.equals(MediaStreamTrack.AUDIO_TRACK_KIND)) {
- AudioTrack audioTrack = (AudioTrack) track;
- audioTrack.addSink(audioFrameLogger);
- }
- if (kind.equals(MediaStreamTrack.VIDEO_TRACK_KIND)) {
- VideoTrack videoTrack = (VideoTrack) track;
- videoTrack.addSink(videoFrameLogger);
- }
-
- System.out.println("LocalPeer: Transceiver track added: " + kind);
- }
- }
-
-
-
- /**
- * A simple implementation of VideoTrackSink that logs information about received frames.
- */
- private static class VideoFrameLogger implements VideoTrackSink {
-
- private static final long LOG_INTERVAL_MS = 1000; // Log every second
- private int frameCount = 0;
- private long lastLogTime = System.currentTimeMillis();
-
-
- @Override
- public void onVideoFrame(VideoFrame frame) {
- frameCount++;
-
- long now = System.currentTimeMillis();
- if (now - lastLogTime >= LOG_INTERVAL_MS) {
- System.out.printf("Received %d video frames in the last %.1f seconds%n",
- frameCount, (now - lastLogTime) / 1000.0);
- System.out.printf("Last frame: %dx%d, rotation: %d, timestamp: %dms%n",
- frame.buffer.getWidth(), frame.buffer.getHeight(), frame.rotation,
- frame.timestampNs / 1000000);
-
- frameCount = 0;
- lastLogTime = now;
- }
-
- // Release the native resources associated with this frame to prevent memory leaks.
- frame.release();
- }
- }
-
-
-
- /**
- * A simple implementation of AudioTrackSink that logs information about received audio data.
- */
- private static class AudioFrameLogger implements AudioTrackSink {
-
- private static final long LOG_INTERVAL_MS = 1000; // Log every second
- private int frameCount = 0;
- private long lastLogTime = System.currentTimeMillis();
-
-
- @Override
- public void onData(byte[] data, int bitsPerSample, int sampleRate, int channels, int frames) {
- frameCount++;
-
- long now = System.currentTimeMillis();
- if (now - lastLogTime >= LOG_INTERVAL_MS) {
- System.out.printf("Received %d audio frames in the last %.1f seconds%n",
- frameCount, (now - lastLogTime) / 1000.0);
- System.out.printf("Last audio data: %d bytes, %d bits/sample, %d Hz, %d channels, %d frames%n",
- data.length, bitsPerSample, sampleRate, channels, frames);
-
- frameCount = 0;
- lastLogTime = now;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/WhepExample.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/WhepExample.java
deleted file mode 100644
index 46a49c9..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/WhepExample.java
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples;
-
-import java.net.URI;
-import java.net.http.HttpClient;
-import java.net.http.HttpRequest;
-import java.net.http.HttpResponse;
-import java.time.Duration;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
-import dev.onvoid.webrtc.*;
-import dev.onvoid.webrtc.media.MediaStream;
-import dev.onvoid.webrtc.media.MediaStreamTrack;
-import dev.onvoid.webrtc.media.video.VideoDeviceSource;
-import dev.onvoid.webrtc.media.video.VideoTrack;
-
-/**
- * Example implementation of WebRTC HTTP Egress Protocol (WHEP) client.
- *
- * This class demonstrates:
- *
- * - Setting up a WebRTC peer connection
- * - Creating and sending an SDP offer to a WHEP endpoint
- * - Receiving and processing an SDP answer
- * - Establishing media streaming over WebRTC
- *
- *
- * The example creates a receive-only peer connection that can accept
- * incoming video streams from a WHEP-compatible server.
- *
- * @see WHEP Specification
- *
- * @author Alex Andres
- */
-public class WhepExample {
-
- private static final String WHEP_ENDPOINT_URL = "http://localhost:8889/mystream/whep";
-
- /** Factory for creating peer connections and media objects. */
- private PeerConnectionFactory factory;
-
- /** The WebRTC peer connection that handles media communication. */
- private RTCPeerConnection peerConnection;
-
- /** The local SDP offer to be sent to the remote endpoint. */
- private RTCSessionDescription localOffer;
-
- // Synchronization objects for async operations.
- private final CountDownLatch offerCreatedLatch = new CountDownLatch(1);
- private final CountDownLatch localDescriptionSetLatch = new CountDownLatch(1);
- private final CountDownLatch remoteDescriptionSetLatch = new CountDownLatch(1);
-
-
- public static void main(String[] args) {
- WhepExample example = new WhepExample();
-
- try {
- example.run();
- }
- catch (Exception e) {
- Logger.getLogger("WHEPExample").log(Level.SEVERE, "Error running WHEP example", e);
- }
- finally {
- example.cleanup();
- }
- }
-
- public void run() throws Exception {
- System.out.println("Starting WebRTC Peer Connection Example");
-
- initializePeerConnectionFactory();
- createPeerConnection();
- createOffer();
-
- // Wait for the offer to be created.
- if (!offerCreatedLatch.await(5, TimeUnit.SECONDS)) {
- throw new IllegalStateException("Timeout waiting for offer creation.");
- }
-
- // Set the local description (the offer).
- setLocalDescription(localOffer);
-
- // Wait for the local description to be set.
- if (!localDescriptionSetLatch.await(5, TimeUnit.SECONDS)) {
- throw new IllegalStateException("Timeout waiting for local description to be set.");
- }
-
- System.out.println("Local offer created and set.");
- //System.out.println("SDP Offer: " + localOffer.sdp);
- System.out.println("Sending local offer to the remote endpoint.");
-
- String answerSdp = sendOfferEndpoint(localOffer.sdp);
-
- //System.out.println("SDP Answer: " + answerSdp);
-
- // Set the remote description (the answer).
- setRemoteDescription(new RTCSessionDescription(RTCSdpType.ANSWER, answerSdp));
-
- // Wait for the remote description to be set.
- if (!remoteDescriptionSetLatch.await(5, TimeUnit.SECONDS)) {
- throw new IllegalStateException("Timeout waiting for remote description to be set.");
- }
-
- System.out.println("Remote answer set. Peer connection established!");
- System.out.println("Media should now be exchanged between peers.");
-
- // Wait a bit to see connection state changes.
- Thread.sleep(10000);
-
- System.out.println("WebRTC Peer Connection Example completed.");
- }
-
- private void initializePeerConnectionFactory() {
- System.out.println("Initializing PeerConnectionFactory.");
- factory = new PeerConnectionFactory();
- }
-
- private void createPeerConnection() {
- System.out.println("Creating peer connection.");
-
- // Create ICE servers configuration.
- RTCConfiguration config = new RTCConfiguration();
-
- // Add Google's public STUN server.
- RTCIceServer iceServer = new RTCIceServer();
- iceServer.urls.add("stun:stun.l.google.com:19302");
- config.iceServers.add(iceServer);
-
- // Create the peer connection with our observer.
- peerConnection = factory.createPeerConnection(config, new PeerConnectionObserverImpl());
-
- // Create a video track from a video device source (e.g., webcam).
- // Since we are only receiving video in this example, the source will be a dummy video source.
- VideoDeviceSource videoSource = new VideoDeviceSource();
- VideoTrack videoTrack = factory.createVideoTrack("videoTrack", videoSource);
- videoTrack.addSink(videoFrame -> System.out.println("Received video frame: " + videoFrame));
-
- // Only interested in receiving video, so we set up a transceiver for that.
- RTCRtpTransceiverInit transceiverInit = new RTCRtpTransceiverInit();
- transceiverInit.direction = RTCRtpTransceiverDirection.RECV_ONLY;
-
- // Add the transceiver to the peer connection with the video track.
- RTCRtpTransceiver transceiver = peerConnection.addTransceiver(videoTrack, transceiverInit);
-
- // Set up a sink to handle incoming video frames.
- MediaStreamTrack track = transceiver.getReceiver().getTrack();
- if (track instanceof VideoTrack vTrack) {
- vTrack.addSink(videoFrame -> {
- System.out.println("Received video frame: " + videoFrame);
-
- // IMPORTANT: Always release the frame when done to prevent memory leaks
- videoFrame.release();
- });
- }
- }
-
- private void createOffer() {
- System.out.println("Creating offer.");
-
- // Create offer options (use default options).
- RTCOfferOptions options = new RTCOfferOptions();
-
- // Create the offer.
- peerConnection.createOffer(options, new CreateSessionDescriptionObserver() {
- @Override
- public void onSuccess(RTCSessionDescription description) {
- System.out.println("Offer created successfully.");
- localOffer = description;
- offerCreatedLatch.countDown();
- }
-
- @Override
- public void onFailure(String error) {
- System.err.println("Failed to create offer: " + error);
- offerCreatedLatch.countDown();
- }
- });
- }
-
- private void setLocalDescription(RTCSessionDescription description) {
- System.out.println("Setting local description.");
-
- peerConnection.setLocalDescription(description, new SetSessionDescriptionObserver() {
- @Override
- public void onSuccess() {
- System.out.println("Local description set successfully.");
- localDescriptionSetLatch.countDown();
- }
-
- @Override
- public void onFailure(String error) {
- System.err.println("Failed to set local description: " + error);
- localDescriptionSetLatch.countDown();
- }
- });
- }
-
- private String sendOfferEndpoint(String sdpOffer) throws Exception {
- HttpClient client = HttpClient.newBuilder()
- .connectTimeout(Duration.ofSeconds(10))
- .build();
-
- HttpRequest request = HttpRequest.newBuilder()
- .uri(URI.create(WHEP_ENDPOINT_URL))
- .header("Content-Type", "application/sdp")
- .POST(HttpRequest.BodyPublishers.ofString(sdpOffer))
- .timeout(Duration.ofSeconds(30))
- .build();
-
- HttpResponse response = client.send(request, HttpResponse.BodyHandlers.ofString());
-
- if (response.statusCode() == 200 || response.statusCode() == 201) {
- System.out.println("WHEP request successful");
- return response.body();
- }
- else {
- throw new RuntimeException("WHEP request failed with status: " + response.statusCode());
- }
- }
-
- private void setRemoteDescription(RTCSessionDescription description) {
- System.out.println("Setting remote description.");
-
- peerConnection.setRemoteDescription(description, new SetSessionDescriptionObserver() {
- @Override
- public void onSuccess() {
- System.out.println("Remote description set successfully.");
- remoteDescriptionSetLatch.countDown();
- }
-
- @Override
- public void onFailure(String error) {
- System.err.println("Failed to set remote description: " + error);
- remoteDescriptionSetLatch.countDown();
- }
- });
- }
-
- private void cleanup() {
- System.out.println("Cleaning up resources.");
-
- if (peerConnection != null) {
- peerConnection.close();
- peerConnection = null;
- }
-
- if (factory != null) {
- factory.dispose();
- factory = null;
- }
- }
-
-
-
- /**
- * Implementation of PeerConnectionObserver to handle events from the peer connection.
- */
- private static class PeerConnectionObserverImpl implements PeerConnectionObserver {
-
- @Override
- public void onIceCandidate(RTCIceCandidate candidate) {
- System.out.println("ICE candidate: " + candidate.sdp);
- // In a real application, we would send this candidate to the remote peer
- }
-
- @Override
- public void onConnectionChange(RTCPeerConnectionState state) {
- System.out.println("Connection state changed: " + state);
- }
-
- @Override
- public void onIceConnectionChange(RTCIceConnectionState state) {
- System.out.println("ICE connection state changed: " + state);
- }
-
- @Override
- public void onIceGatheringChange(RTCIceGatheringState state) {
- System.out.println("ICE gathering state changed: " + state);
- }
-
- @Override
- public void onSignalingChange(RTCSignalingState state) {
- System.out.println("Signaling state changed: " + state);
- }
-
- @Override
- public void onDataChannel(RTCDataChannel dataChannel) {
- System.out.println("Data channel created: " + dataChannel.getLabel());
- }
-
- @Override
- public void onRenegotiationNeeded() {
- System.out.println("Renegotiation needed.");
- }
-
- @Override
- public void onAddTrack(RTCRtpReceiver receiver, MediaStream[] mediaStreams) {
- System.out.println("Track added.");
- }
- }
-}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/util/MediaFrameLogger.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/util/MediaFrameLogger.java
deleted file mode 100644
index ae1f748..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/util/MediaFrameLogger.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples.util;
-
-import dev.onvoid.webrtc.media.audio.AudioTrackSink;
-import dev.onvoid.webrtc.media.video.VideoFrame;
-import dev.onvoid.webrtc.media.video.VideoTrackSink;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Utility class for logging audio and video frame information.
- *
- * @author Alex Andres
- */
-public class MediaFrameLogger {
-
- private static final Logger LOG = LoggerFactory.getLogger(MediaFrameLogger.class);
-
-
- /**
- * Creates a new audio track sink that logs information about received audio data.
- *
- * @return An AudioTrackSink that logs audio frame information.
- */
- public static AudioTrackSink createAudioLogger() {
- return new AudioFrameLogger();
- }
-
- /**
- * Creates a new video track sink that logs information about received video frames.
- *
- * @return A VideoTrackSink that logs video frame information.
- */
- public static VideoTrackSink createVideoLogger() {
- return new VideoFrameLogger();
- }
-
-
-
- /**
- * A simple implementation of AudioTrackSink that logs information about received audio data.
- */
- private static class AudioFrameLogger implements AudioTrackSink {
-
- private static final long LOG_INTERVAL_MS = 1000; // Log every second
- private int frameCount = 0;
- private long lastLogTime = System.currentTimeMillis();
-
- @Override
- public void onData(byte[] data, int bitsPerSample, int sampleRate, int channels, int frames) {
- frameCount++;
-
- long now = System.currentTimeMillis();
- if (now - lastLogTime >= LOG_INTERVAL_MS) {
- LOG.info(String.format("Received %d audio frames in the last %.1f seconds",
- frameCount, (now - lastLogTime) / 1000.0));
- LOG.info(String.format("Last audio data: %d bytes, %d bits/sample, %d Hz, %d channels, %d frames",
- data.length, bitsPerSample, sampleRate, channels, frames));
-
- frameCount = 0;
- lastLogTime = now;
- }
- }
- }
-
-
-
- /**
- * A simple implementation of VideoTrackSink that logs information about received frames.
- */
- private static class VideoFrameLogger implements VideoTrackSink {
-
- private static final long LOG_INTERVAL_MS = 1000; // Log every second
- private int frameCount = 0;
- private long lastLogTime = System.currentTimeMillis();
-
- @Override
- public void onVideoFrame(VideoFrame frame) {
- frameCount++;
-
- long now = System.currentTimeMillis();
- if (now - lastLogTime >= LOG_INTERVAL_MS) {
- LOG.info(String.format("Received %d video frames in the last %.1f seconds",
- frameCount, (now - lastLogTime) / 1000.0));
- LOG.info(String.format("Last frame: %dx%d, rotation: %d, timestamp: %dms",
- frame.buffer.getWidth(), frame.buffer.getHeight(), frame.rotation,
- frame.timestampNs / 1000000));
-
- frameCount = 0;
- lastLogTime = now;
- }
-
- // Release the native resources associated with this frame to prevent memory leaks.
- frame.release();
- }
- }
-}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/WebClientExample.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/WebClientExample.java
deleted file mode 100644
index 80efc98..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/WebClientExample.java
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples.web;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URI;
-import java.util.logging.LogManager;
-
-import dev.onvoid.webrtc.examples.web.model.LeaveMessage;
-import dev.onvoid.webrtc.media.MediaStreamTrack;
-
-import dev.onvoid.webrtc.examples.web.client.SignalingManager;
-import dev.onvoid.webrtc.examples.web.connection.PeerConnectionManager;
-import dev.onvoid.webrtc.examples.web.media.MediaManager;
-import dev.onvoid.webrtc.examples.web.model.JoinMessage;
-import dev.onvoid.webrtc.examples.util.MediaFrameLogger;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Example demonstrating how to combine WebSocket signaling with WebRTC peer connections.
- *
- * This example shows how to:
- *
- * - Connect to a signaling server using WebSockets
- * - Set up media tracks
- * - Establish a WebRTC peer connection with audio and video
- *
- *
- * @author Alex Andres
- */
-public class WebClientExample {
-
- static {
- setupLogging();
- }
-
- private static final Logger LOG = LoggerFactory.getLogger(WebClientExample.class);
-
- /** Manages communication with the signaling server. */
- private final SignalingManager signaling;
-
- /** Handles WebRTC peer connection setup and management. */
- private final PeerConnectionManager peerConnectionManager;
-
- /** Manages audio and video tracks and devices. */
- private final MediaManager mediaManager;
-
-
- /**
- * Creates a new WebClientExample that combines WebSocket signaling with WebRTC.
- *
- * @param signalingUri The URI of the signaling server.
- * @param subprotocol The WebSocket subprotocol to use.
- */
- public WebClientExample(URI signalingUri, String subprotocol) {
- signaling = new SignalingManager(signalingUri, subprotocol);
- signaling.setUserId("java-client");
-
- peerConnectionManager = new PeerConnectionManager();
-
- mediaManager = new MediaManager();
- mediaManager.createTracks(peerConnectionManager, true, true);
-
- setupCallbacks();
-
- LOG.info("WebClientExample created with audio and video tracks");
- }
-
- /**
- * Sets up callbacks between components.
- */
- private void setupCallbacks() {
- // Set up signaling callbacks.
- signaling.setOnOfferReceived(peerConnectionManager::handleOffer);
- signaling.setOnAnswerReceived(peerConnectionManager::handleAnswer);
- signaling.setOnCandidateReceived(peerConnectionManager::handleCandidate);
- signaling.setOnJoinReceived(this::handleJoin);
- signaling.setOnLeaveReceived(this::handleLeave);
-
- // Set up peer connection callbacks.
- peerConnectionManager.setOnLocalDescriptionCreated(signaling::sendSessionDescription);
- peerConnectionManager.setOnIceCandidateGenerated(signaling::sendIceCandidate);
- peerConnectionManager.setOnTrackReceived(this::handleTrackReceived);
- }
-
- /**
- * Handles a received media track.
- *
- * @param track The received media track.
- */
- private void handleTrackReceived(MediaStreamTrack track) {
- String kind = track.getKind();
- LOG.info("Received track: {}", kind);
-
- if (kind.equals(MediaStreamTrack.AUDIO_TRACK_KIND)) {
- mediaManager.addAudioSink(MediaFrameLogger.createAudioLogger());
- }
- else if (kind.equals(MediaStreamTrack.VIDEO_TRACK_KIND)) {
- mediaManager.addVideoSink(MediaFrameLogger.createVideoLogger());
- }
- }
-
- /**
- * Connects to the signaling server.
- *
- * @return true if the connection was successful, false otherwise.
- */
- public boolean connect() {
- return signaling.connect();
- }
-
- /**
- * Disconnects from the signaling server and closes the peer connection.
- */
- public void disconnect() {
- signaling.disconnect();
-
- if (mediaManager != null) {
- mediaManager.dispose();
- }
- if (peerConnectionManager != null) {
- peerConnectionManager.close();
- }
-
- LOG.info("Disconnected from signaling server and closed peer connection");
- }
-
- /**
- * Joins a room on the signaling server.
- *
- * This method sends a join request to the signaling server for the specified room.
- *
- * @param roomName the name of the room to join on the signaling server
- */
- public void joinRoom(String roomName) {
- if (!signaling.isConnected()) {
- LOG.warn("Cannot join room: not connected to signaling server");
- return;
- }
-
- signaling.sendJoin(roomName);
- }
-
- /**
- * Initiates a call by creating and sending an offer.
- */
- public void call() {
- if (!signaling.isConnected()) {
- LOG.warn("Cannot initiate call: not connected to signaling server");
- return;
- }
-
- peerConnectionManager.setInitiator(true);
- peerConnectionManager.createOffer();
- }
-
- /**
- * Handles an incoming join message from the remote peer.
- *
- * @param message The join message.
- */
- private void handleJoin(JoinMessage message) {
- LOG.info("Received join message from peer: {}", message.getFrom());
-
- // Remote peer wants to join a room, we need to create an offer if we're not the initiator.
- if (!peerConnectionManager.isInitiator()) {
- peerConnectionManager.createOffer();
- }
- }
-
- /**
- * Handles an incoming leave message from the remote peer.
- *
- * @param message The leave message.
- */
- private void handleLeave(LeaveMessage message) {
- LOG.info("Peer {} has left the room", message.getFrom());
-
- // Handle peer leaving logic, such as closing tracks or updating UI.
- }
-
- /**
- * Entry point to demonstrate the WebClientExample.
- */
- public static void main(String[] args) {
- try {
- WebClientExample client = new WebClientExample(
- URI.create("wss://localhost:8443/ws"),
- "ws-signaling");
-
- if (client.connect()) {
- LOG.info("Connected to signaling server");
-
- // Join a room.
- client.joinRoom("default-room");
-
- // Initiate the call.
- client.call();
-
- // Keep the application running to observe state changes.
- System.out.println("Press Enter to exit...");
- System.in.read();
- }
- else {
- LOG.error("Failed to connect to signaling server");
- }
-
- // Clean up.
- client.disconnect();
- }
- catch (Exception e) {
- LOG.error("Error in WebClientExample", e);
- }
- }
-
- /**
- * Sets up logging for the application.
- */
- public static void setupLogging() {
- try {
- InputStream configFile = WebClientExample.class.getResourceAsStream("/resources/logging.properties");
- LogManager.getLogManager().readConfiguration(configFile);
- }
- catch (IOException e) {
- System.err.println("Could not load configuration file:");
- System.err.println(e.getMessage());
- }
- }
-}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/connection/PeerConnectionManager.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/connection/PeerConnectionManager.java
index fbece89..8880298 100644
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/connection/PeerConnectionManager.java
+++ b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/connection/PeerConnectionManager.java
@@ -32,23 +32,12 @@
import dev.onvoid.webrtc.RTCOfferOptions;
import dev.onvoid.webrtc.RTCPeerConnection;
import dev.onvoid.webrtc.RTCPeerConnectionState;
-import dev.onvoid.webrtc.RTCRtpReceiver;
-import dev.onvoid.webrtc.RTCRtpTransceiver;
import dev.onvoid.webrtc.RTCSdpType;
import dev.onvoid.webrtc.RTCSessionDescription;
import dev.onvoid.webrtc.RTCSignalingState;
import dev.onvoid.webrtc.SetSessionDescriptionObserver;
import dev.onvoid.webrtc.examples.web.model.IceCandidateMessage;
import dev.onvoid.webrtc.examples.web.model.SessionDescriptionMessage;
-import dev.onvoid.webrtc.media.MediaStream;
-import dev.onvoid.webrtc.media.MediaStreamTrack;
-
-import dev.onvoid.webrtc.media.audio.AudioOptions;
-import dev.onvoid.webrtc.media.audio.AudioTrack;
-import dev.onvoid.webrtc.media.audio.AudioTrackSource;
-import dev.onvoid.webrtc.media.audio.CustomAudioSource;
-import dev.onvoid.webrtc.media.video.VideoTrack;
-import dev.onvoid.webrtc.media.video.VideoTrackSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -69,7 +58,6 @@ public class PeerConnectionManager implements PeerConnectionSignalingHandler {
private Consumer onLocalDescriptionCreated;
private Consumer onIceCandidateGenerated;
- private Consumer onTrackReceived;
private boolean isInitiator = false;
@@ -92,56 +80,6 @@ public PeerConnectionManager() {
LOG.info("PeerConnectionManager created");
}
- /**
- * Adds a media track to the peer connection.
- *
- * @param track The media track to add.
- * @param streamIds The stream IDs to associate with the track.
- */
- public void addTrack(MediaStreamTrack track, List streamIds) {
- peerConnection.addTrack(track, streamIds);
-
- LOG.info("Added track: {}", track.getKind());
- }
-
- /**
- * Creates an audio track with the specified options and label.
- *
- * @param options Configuration options for the audio track source.
- * @param label A unique identifier for the audio track.
- *
- * @return A new AudioTrack instance configured with the provided options.
- */
- public AudioTrack createAudioTrack(AudioOptions options, String label) {
- AudioTrackSource audioSource = factory.createAudioSource(options);
-
- return factory.createAudioTrack(label, audioSource);
- }
-
- /**
- * Creates an audio track with a custom audio source that can push audio frames.
- *
- * @param source The custom audio source providing the audio frames.
- * @param label A unique identifier for the audio track.
- *
- * @return A new AudioTrack instance connected to the provided custom source.
- */
- public AudioTrack createAudioTrack(CustomAudioSource source, String label) {
- return factory.createAudioTrack(label, source);
- }
-
- /**
- * Creates a video track with the specified source and label.
- *
- * @param source The video track source providing the video frames.
- * @param label A unique identifier for the video track.
- *
- * @return A new VideoTrack instance connected to the provided source.
- */
- public VideoTrack createVideoTrack(VideoTrackSource source, String label) {
- return factory.createVideoTrack(label, source);
- }
-
/**
* Closes the peer connection.
*/
@@ -268,15 +206,6 @@ public void setOnLocalDescriptionCreated(Consumer callbac
public void setOnIceCandidateGenerated(Consumer callback) {
this.onIceCandidateGenerated = callback;
}
-
- /**
- * Sets a callback to be invoked when a media track is received.
- *
- * @param callback The callback to invoke.
- */
- public void setOnTrackReceived(Consumer callback) {
- this.onTrackReceived = callback;
- }
/**
* Sets whether this peer is the initiator of the connection.
@@ -403,27 +332,5 @@ public void onRenegotiationNeeded() {
LOG.info("Renegotiation needed");
createOffer();
}
-
- @Override
- public void onAddTrack(RTCRtpReceiver receiver, MediaStream[] mediaStreams) {
- LOG.info("Track added: {}", receiver.getTrack().getKind());
- }
-
- @Override
- public void onRemoveTrack(RTCRtpReceiver receiver) {
- LOG.info("Track removed: {}", receiver.getTrack().getKind());
- }
-
- @Override
- public void onTrack(RTCRtpTransceiver transceiver) {
- MediaStreamTrack track = transceiver.getReceiver().getTrack();
- String kind = track.getKind();
-
- LOG.info("{} track added to transceiver", kind);
-
- if (onTrackReceived != null) {
- onTrackReceived.accept(track);
- }
- }
}
}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/AudioGenerator.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/AudioGenerator.java
deleted file mode 100644
index a0ea68c..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/AudioGenerator.java
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples.web.media;
-
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import dev.onvoid.webrtc.media.audio.CustomAudioSource;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A generator that produces synthetic audio samples as a continuous sine wave.
- *
- * This class creates a 440 Hz (A4 note) sine wave and delivers audio frames
- * at regular 10 ms intervals. The generated audio is stereo with 16-bit samples
- * at a 48 kHz sample rate. The audio generator runs on a dedicated scheduled
- * thread that can be started and stopped on demand.
- *
- *
- * The sine wave phase is maintained between audio frames to ensure a continuous
- * waveform without clicks or pops that would occur from phase discontinuities.
- *
- *
- * @author Alex Andres
- */
-public class AudioGenerator {
-
- private static final Logger LOG = LoggerFactory.getLogger(AudioGenerator.class);
-
- /** The custom audio source that receives generated audio frames. */
- private final CustomAudioSource customAudioSource;
-
- /** Flag indicating whether the audio generator is running. */
- private final AtomicBoolean generatorRunning = new AtomicBoolean(false);
-
- /** Executor service for scheduling audio sample generation. */
- private ScheduledExecutorService executorService;
-
- /** Future for the scheduled audio sample generation task. */
- private ScheduledFuture> generatorFuture;
-
- /** Default audio parameters */
- private static final int DEFAULT_BITS_PER_SAMPLE = 16;
- private static final int DEFAULT_SAMPLE_RATE = 48000;
- private static final int DEFAULT_CHANNELS = 2;
- private static final int DEFAULT_FRAME_COUNT = 480; // 10ms at 48kHz
-
- /**
- * Sine wave phase tracking for audio generation.
- * Maintained between frames to ensure a continuous sine wave without clicks or pops.
- */
- private double sinePhase = 0.0;
-
-
- public AudioGenerator(CustomAudioSource audioSource) {
- customAudioSource = audioSource;
- }
-
- /**
- * Starts the audio sample generator thread that pushes audio frames
- * to the custom audio source every 10 ms.
- */
- public void start() {
- if (generatorRunning.get()) {
- LOG.info("Audio generator is already running");
- return;
- }
-
- executorService = Executors.newSingleThreadScheduledExecutor();
-
- generatorRunning.set(true);
-
- generatorFuture = executorService.scheduleAtFixedRate(() -> {
- if (!generatorRunning.get()) {
- return;
- }
-
- try {
- // Create a buffer with audio data (silence in this case).
- int bytesPerSample = DEFAULT_BITS_PER_SAMPLE / 8;
- byte[] audioData = new byte[DEFAULT_FRAME_COUNT * DEFAULT_CHANNELS * bytesPerSample];
-
- // Generate a pleasant sine wave at 440 Hz (A4 note).
- double amplitude = 0.2; // 30% of the maximum to avoid being too loud
- double frequency = 440.0; // A4 note (440 Hz)
- double radiansPerSample = 2.0 * Math.PI * frequency / DEFAULT_SAMPLE_RATE;
-
- for (int i = 0; i < DEFAULT_FRAME_COUNT; i++) {
- short sample = (short) (amplitude * Short.MAX_VALUE * Math.sin(sinePhase));
- sinePhase += radiansPerSample;
-
- // Keep the phase between 0 and 2Ï€.
- if (sinePhase > 2.0 * Math.PI) {
- sinePhase -= 2.0 * Math.PI;
- }
-
- // Write the sample to both channels (stereo).
- for (int channel = 0; channel < DEFAULT_CHANNELS; channel++) {
- int index = (i * DEFAULT_CHANNELS + channel) * bytesPerSample;
- // Write as little-endian (LSB first).
- audioData[index] = (byte) (sample & 0xFF);
- audioData[index + 1] = (byte) ((sample >> 8) & 0xFF);
- }
- }
-
- // Push the audio data to the custom audio source.
- customAudioSource.pushAudio(
- audioData,
- DEFAULT_BITS_PER_SAMPLE,
- DEFAULT_SAMPLE_RATE,
- DEFAULT_CHANNELS,
- DEFAULT_FRAME_COUNT
- );
- }
- catch (Exception e) {
- LOG.error("Error in audio generator thread", e);
- }
- }, 0, 10, TimeUnit.MILLISECONDS);
-
- LOG.info("Audio generator started");
- }
-
- /**
- * Stops the audio sample generator thread.
- */
- public void stop() {
- if (!generatorRunning.get()) {
- return;
- }
-
- generatorRunning.set(false);
-
- if (generatorFuture != null) {
- generatorFuture.cancel(false);
- generatorFuture = null;
- }
-
- if (executorService != null) {
- executorService.shutdown();
- try {
- if (!executorService.awaitTermination(100, TimeUnit.MILLISECONDS)) {
- executorService.shutdownNow();
- }
- }
- catch (InterruptedException e) {
- executorService.shutdownNow();
- Thread.currentThread().interrupt();
- }
- executorService = null;
- }
-
- LOG.info("Audio generator stopped");
- }
-
-}
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/MediaManager.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/MediaManager.java
deleted file mode 100644
index ec62676..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/MediaManager.java
+++ /dev/null
@@ -1,275 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples.web.media;
-
-import java.util.List;
-
-import dev.onvoid.webrtc.media.audio.AudioOptions;
-import dev.onvoid.webrtc.media.audio.AudioTrack;
-import dev.onvoid.webrtc.media.audio.AudioTrackSink;
-import dev.onvoid.webrtc.media.audio.CustomAudioSource;
-import dev.onvoid.webrtc.media.video.CustomVideoSource;
-import dev.onvoid.webrtc.media.video.VideoDeviceSource;
-import dev.onvoid.webrtc.media.video.VideoTrack;
-import dev.onvoid.webrtc.media.video.VideoTrackSink;
-
-import dev.onvoid.webrtc.examples.web.connection.PeerConnectionManager;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Manages media tracks for WebRTC connections, including audio and video.
- *
- * @author Alex Andres
- */
-public class MediaManager {
-
- private static final Logger LOG = LoggerFactory.getLogger(MediaManager.class);
-
- /** The audio track managed by this class. */
- private AudioTrack audioTrack;
-
- /** The video track managed by this class. */
- private VideoTrack videoTrack;
-
- /** The custom audio source for generating audio frames. */
- private CustomAudioSource customAudioSource;
-
- /** The audio generator responsible for creating and pushing audio frames to the custom audio source. */
- private AudioGenerator audioGenerator;
-
- /** The custom video source for generating video frames. */
- private CustomVideoSource customVideoSource;
-
- /** The video generator responsible for creating and pushing video frames to the custom video source. */
- private VideoGenerator videoGenerator;
-
-
- /**
- * Creates a new MediaManager.
- */
- public MediaManager() {
- LOG.info("MediaManager created");
- }
-
- /**
- * Creates and initializes audio and video tracks.
- *
- * @param peerConnectionManager The peer connection manager to use for creating tracks.
- */
- public void createTracks(PeerConnectionManager peerConnectionManager) {
- createAudioTrack(peerConnectionManager);
- createVideoTrack(peerConnectionManager);
-
- // Add tracks to the peer connection.
- List streamIds = List.of("stream0");
-
- peerConnectionManager.addTrack(getAudioTrack(), streamIds);
- peerConnectionManager.addTrack(getVideoTrack(), streamIds);
- }
-
- /**
- * Creates and initializes tracks with a custom audio source and standard video track.
- *
- * @param peerConnectionManager The peer connection manager to use for creating tracks.
- * @param useCustomAudio Whether to use a custom audio source that can push frames.
- */
- public void createTracks(PeerConnectionManager peerConnectionManager, boolean useCustomAudio) {
- if (useCustomAudio) {
- createCustomAudioTrack(peerConnectionManager);
- }
- else {
- createAudioTrack(peerConnectionManager);
- }
-
- createVideoTrack(peerConnectionManager);
-
- // Add tracks to the peer connection.
- List streamIds = List.of("stream0");
-
- peerConnectionManager.addTrack(getAudioTrack(), streamIds);
- peerConnectionManager.addTrack(getVideoTrack(), streamIds);
- }
-
- /**
- * Creates and initializes tracks with options for both custom audio and video sources.
- *
- * @param peerConnectionManager The peer connection manager to use for creating tracks.
- * @param useCustomAudio Whether to use a custom audio source that can push frames.
- * @param useCustomVideo Whether to use a custom video source that can push frames.
- */
- public void createTracks(PeerConnectionManager peerConnectionManager, boolean useCustomAudio, boolean useCustomVideo) {
- if (useCustomAudio) {
- createCustomAudioTrack(peerConnectionManager);
- }
- else {
- createAudioTrack(peerConnectionManager);
- }
-
- if (useCustomVideo) {
- createCustomVideoTrack(peerConnectionManager);
- }
- else {
- createVideoTrack(peerConnectionManager);
- }
-
- // Add tracks to the peer connection.
- List streamIds = List.of("stream0");
-
- peerConnectionManager.addTrack(getAudioTrack(), streamIds);
- peerConnectionManager.addTrack(getVideoTrack(), streamIds);
- }
-
- /**
- * Creates an audio track with default options.
- */
- private void createAudioTrack(PeerConnectionManager peerConnectionManager) {
- AudioOptions audioOptions = new AudioOptions();
- audioOptions.echoCancellation = true;
- audioOptions.autoGainControl = true;
- audioOptions.noiseSuppression = true;
-
- audioTrack = peerConnectionManager.createAudioTrack(audioOptions, "audio0");
-
- LOG.info("Audio track created");
- }
-
- /**
- * Creates an audio track with a custom audio source that can push audio frames.
- * Also starts the audio generator thread that pushes audio frames every 10ms.
- *
- * @param peerConnectionManager The peer connection manager to use for creating the track.
- */
- public void createCustomAudioTrack(PeerConnectionManager peerConnectionManager) {
- customAudioSource = new CustomAudioSource();
-
- audioTrack = peerConnectionManager.createAudioTrack(customAudioSource, "audio0");
-
- // Start the audio generator.
- audioGenerator = new AudioGenerator(customAudioSource);
- audioGenerator.start();
-
- LOG.info("Custom audio track created with audio generator");
- }
-
- /**
- * Creates a video track using the default video device.
- */
- private void createVideoTrack(PeerConnectionManager peerConnectionManager) {
- VideoDeviceSource videoSource = new VideoDeviceSource();
- videoSource.start();
-
- videoTrack = peerConnectionManager.createVideoTrack(videoSource, "video0");
-
- LOG.info("Video track created");
- }
-
- /**
- * Creates a video track with a custom video source that can push video frames.
- * Also starts the video generator thread that pushes video frames at regular intervals.
- *
- * @param peerConnectionManager The peer connection manager to use for creating the track.
- */
- public void createCustomVideoTrack(PeerConnectionManager peerConnectionManager) {
- customVideoSource = new CustomVideoSource();
-
- videoTrack = peerConnectionManager.createVideoTrack(customVideoSource, "video0");
-
- // Start the video generator.
- videoGenerator = new VideoGenerator(customVideoSource);
- videoGenerator.start();
-
- LOG.info("Custom video track created with video generator");
- }
-
- /**
- * Gets the audio track.
- *
- * @return The audio track.
- */
- public AudioTrack getAudioTrack() {
- return audioTrack;
- }
-
- /**
- * Gets the video track.
- *
- * @return The video track.
- */
- public VideoTrack getVideoTrack() {
- return videoTrack;
- }
-
- /**
- * Adds a sink to the audio track.
- *
- * @param sink The sink to add.
- */
- public void addAudioSink(AudioTrackSink sink) {
- if (audioTrack != null) {
- audioTrack.addSink(sink);
-
- LOG.info("Added sink to audio track");
- }
- }
-
- /**
- * Adds a sink to the video track.
- *
- * @param sink The sink to add.
- */
- public void addVideoSink(VideoTrackSink sink) {
- if (videoTrack != null) {
- videoTrack.addSink(sink);
-
- LOG.info("Added sink to video track");
- }
- }
-
- /**
- * Disposes of all media resources.
- */
- public void dispose() {
- // Stop the audio generator if it's running.
- if (audioGenerator != null) {
- audioGenerator.stop();
- audioGenerator = null;
- }
-
- // Stop the video generator if it's running.
- if (videoGenerator != null) {
- videoGenerator.stop();
- videoGenerator = null;
- }
-
- if (audioTrack != null) {
- audioTrack.dispose();
- audioTrack = null;
- }
-
- if (videoTrack != null) {
- videoTrack.dispose();
- videoTrack = null;
- }
-
- customAudioSource = null;
- customVideoSource = null;
-
- LOG.info("Media resources disposed");
- }
-}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/VideoGenerator.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/VideoGenerator.java
deleted file mode 100644
index 950ed5d..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/media/VideoGenerator.java
+++ /dev/null
@@ -1,220 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples.web.media;
-
-import java.nio.ByteBuffer;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import dev.onvoid.webrtc.media.video.CustomVideoSource;
-import dev.onvoid.webrtc.media.video.NativeI420Buffer;
-import dev.onvoid.webrtc.media.video.VideoFrame;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A generator that produces synthetic video frames.
- *
- * This class creates a color pattern that changes over time and delivers video frames
- * at regular intervals (30 fps by default). The generated video is in I420 format
- * with a default resolution of 640x480. The video generator runs on a dedicated scheduled
- * thread that can be started and stopped on demand.
- *
- *
- * @author Alex Andres
- */
-public class VideoGenerator {
-
- private static final Logger LOG = LoggerFactory.getLogger(VideoGenerator.class);
-
- /** The custom video source that receives generated video frames. */
- private final CustomVideoSource customVideoSource;
-
- /** Flag indicating whether the video generator is running. */
- private final AtomicBoolean generatorRunning = new AtomicBoolean(false);
-
- /** Counter for frame animation. */
- private final AtomicInteger frameCounter = new AtomicInteger(0);
-
- /** Executor service for scheduling video frame generation. */
- private ScheduledExecutorService executorService;
-
- /** Future for the scheduled video frame generation task. */
- private ScheduledFuture> generatorFuture;
-
- /** Default video parameters */
- private static final int DEFAULT_WIDTH = 640;
- private static final int DEFAULT_HEIGHT = 480;
- private static final int DEFAULT_FPS = 30;
- private static final int FRAME_INTERVAL_MS = 1000 / DEFAULT_FPS;
-
-
- /**
- * Creates a new VideoGenerator that will push frames to the specified video source.
- *
- * @param videoSource The custom video source to receive the generated frames.
- */
- public VideoGenerator(CustomVideoSource videoSource) {
- customVideoSource = videoSource;
- }
-
- /**
- * Starts the video frame generator thread that pushes video frames
- * to the custom video source at the specified frame rate.
- */
- public void start() {
- if (generatorRunning.get()) {
- LOG.info("Video generator is already running");
- return;
- }
-
- executorService = Executors.newSingleThreadScheduledExecutor();
- generatorRunning.set(true);
-
- generatorFuture = executorService.scheduleAtFixedRate(() -> {
- if (!generatorRunning.get()) {
- return;
- }
-
- try {
- // Create a new video frame with a color pattern.
- VideoFrame frame = generateVideoFrame();
-
- // Push the frame to the custom video source.
- customVideoSource.pushFrame(frame);
-
- // Release the frame after pushing it.
- frame.release();
-
- // Increment frame counter for animation.
- frameCounter.incrementAndGet();
- }
- catch (Exception e) {
- LOG.error("Error in video generator thread", e);
- }
- }, 0, FRAME_INTERVAL_MS, TimeUnit.MILLISECONDS);
-
- LOG.info("Video generator started at {} fps", DEFAULT_FPS);
- }
-
- /**
- * Stops the video frame generator thread.
- */
- public void stop() {
- if (!generatorRunning.get()) {
- return;
- }
-
- generatorRunning.set(false);
-
- if (generatorFuture != null) {
- generatorFuture.cancel(false);
- generatorFuture = null;
- }
-
- if (executorService != null) {
- executorService.shutdown();
- try {
- if (!executorService.awaitTermination(100, TimeUnit.MILLISECONDS)) {
- executorService.shutdownNow();
- }
- }
- catch (InterruptedException e) {
- executorService.shutdownNow();
- Thread.currentThread().interrupt();
- }
- executorService = null;
- }
-
- LOG.info("Video generator stopped");
- }
-
- /**
- * Generates a video frame with a color pattern that changes over time.
- *
- * @return A new VideoFrame with the generated pattern.
- */
- private VideoFrame generateVideoFrame() {
- // Allocate a new I420 buffer for the frame
- NativeI420Buffer buffer = NativeI420Buffer.allocate(DEFAULT_WIDTH, DEFAULT_HEIGHT);
-
- // Get the Y, U, V planes
- ByteBuffer dataY = buffer.getDataY();
- ByteBuffer dataU = buffer.getDataU();
- ByteBuffer dataV = buffer.getDataV();
-
- int strideY = buffer.getStrideY();
- int strideU = buffer.getStrideU();
- int strideV = buffer.getStrideV();
-
- // Generate a color pattern
- fillFrameWithPattern(dataY, dataU, dataV, strideY, strideU, strideV, frameCounter.get());
-
- // Create a new video frame with the buffer and current timestamp
- return new VideoFrame(buffer, System.nanoTime());
- }
-
- /**
- * Fills the frame buffers with a color pattern.
- * This creates a simple test pattern that changes over time.
- *
- * @param dataY The Y plane buffer.
- * @param dataU The U plane buffer.
- * @param dataV The V plane buffer.
- * @param strideY The Y plane stride.
- * @param strideU The U plane stride.
- * @param strideV The V plane stride.
- * @param frameCount The current frame count for animation.
- */
- private void fillFrameWithPattern(ByteBuffer dataY, ByteBuffer dataU, ByteBuffer dataV,
- int strideY, int strideU, int strideV, int frameCount) {
- // Reset buffer positions
- dataY.position(0);
- dataU.position(0);
- dataV.position(0);
-
- // Animation parameters
- int animOffset = frameCount % 255;
-
- // Fill Y plane (luma)
- for (int y = 0; y < DEFAULT_HEIGHT; y++) {
- for (int x = 0; x < DEFAULT_WIDTH; x++) {
- // Create a gradient pattern
- byte value = (byte) ((x + y + animOffset) % 255);
- dataY.put(y * strideY + x, value);
- }
- }
-
- // Fill U and V planes (chroma)
- // In I420 format, U and V planes are quarter size of Y plane
- for (int y = 0; y < DEFAULT_HEIGHT / 2; y++) {
- for (int x = 0; x < DEFAULT_WIDTH / 2; x++) {
- // Create color patterns that change over time
- byte uValue = (byte) ((x * 2 + animOffset) % 255);
- byte vValue = (byte) ((y * 2 + animOffset) % 255);
-
- dataU.put(y * strideU + x, uValue);
- dataV.put(y * strideV + x, vValue);
- }
- }
- }
-}
\ No newline at end of file
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/server/WebServer.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/server/WebServer.java
deleted file mode 100644
index 98eb42a..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/server/WebServer.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples.web.server;
-
-import java.io.InputStream;
-import java.security.KeyStore;
-
-import dev.onvoid.webrtc.examples.web.WebClientExample;
-
-import org.eclipse.jetty.http.pathmap.PathSpec;
-import org.eclipse.jetty.server.*;
-import org.eclipse.jetty.server.handler.PathMappingsHandler;
-import org.eclipse.jetty.server.handler.ResourceHandler;
-import org.eclipse.jetty.util.resource.ResourceFactory;
-import org.eclipse.jetty.util.ssl.SslContextFactory;
-import org.eclipse.jetty.websocket.server.WebSocketUpgradeHandler;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * A web server implementation using Jetty that provides both HTTPS and WebSocket functionality.
- *
- * This server:
- *
- * - Runs on port 8443 with HTTPS only (TLS 1.2/1.3)
- * - Provides WebSocket endpoints with the "ws-signaling" protocol
- * - Serves static resources from the classpath at "/resources/web/"
- * - Uses a self-signed certificate from a bundled keystore
- *
- *
- *
- * @author Alex Andres
- */
-public class WebServer {
-
- static {
- WebClientExample.setupLogging();
- }
-
- public static final Logger LOG = LoggerFactory.getLogger(WebServer.class);
-
- private static final int PORT = 8443;
-
-
- public static void main(String[] args) throws Exception {
- Server server = new Server();
-
- // Configure HTTPS only.
- HttpConfiguration httpsConfig = new HttpConfiguration();
- httpsConfig.addCustomizer(new SecureRequestCustomizer());
-
- // Create the HTTP/1.1 ConnectionFactory.
- HttpConnectionFactory http = new HttpConnectionFactory(httpsConfig);
-
- // Create the TLS ConnectionFactory, setting HTTP/1.1 as the wrapped protocol.
- SslContextFactory.Server sslContextFactory = createSslContextFactory();
- SslConnectionFactory tls = new SslConnectionFactory(sslContextFactory, http.getProtocol());
-
- ServerConnector httpsConnector = new ServerConnector(server, tls, http);
- httpsConnector.setPort(PORT);
-
- // Add only HTTPS connector.
- server.addConnector(httpsConnector);
-
- // Create WebSocket upgrade handler.
- WebSocketUpgradeHandler wsHandler = WebSocketUpgradeHandler.from(server, container -> {
- container.addMapping("/ws", (upgradeRequest, upgradeResponse, callback) -> {
- if (upgradeRequest.getSubProtocols().contains("ws-signaling")) {
- upgradeResponse.setAcceptedSubProtocol("ws-signaling");
- return new WebSocketHandler();
- }
- return null;
- });
- });
-
- // Create a static resource handler.
- ResourceHandler resourceHandler = new ResourceHandler();
- ResourceFactory resourceFactory = ResourceFactory.of(resourceHandler);
- resourceHandler.setBaseResource(resourceFactory.newClassLoaderResource("/resources/web/"));
-
- // Create a path mappings handler to combine WebSocket and static content.
- PathMappingsHandler pathHandler = new PathMappingsHandler();
- pathHandler.addMapping(PathSpec.from("/ws/*"), wsHandler);
- pathHandler.addMapping(PathSpec.from("/"), resourceHandler);
-
- server.setHandler(pathHandler);
- server.start();
-
- LOG.info("HTTPS: https://localhost:{}", PORT);
- LOG.info("WebSocket: wss://localhost:{}/ws", PORT);
- LOG.info("Note: Using self-signed certificate - browsers will show security warnings");
-
- server.join();
- }
-
- private static SslContextFactory.Server createSslContextFactory() {
- SslContextFactory.Server sslContextFactory = new SslContextFactory.Server();
-
- try (InputStream keystoreStream = WebServer.class.getResourceAsStream("/resources/keystore.p12")) {
- if (keystoreStream == null) {
- throw new IllegalArgumentException("Keystore not found in resources.");
- }
-
- KeyStore keyStore = KeyStore.getInstance("PKCS12");
- keyStore.load(keystoreStream, "l0c4lh0s7".toCharArray());
-
- sslContextFactory.setKeyStore(keyStore);
- sslContextFactory.setKeyStorePassword("l0c4lh0s7");
- }
- catch (Exception e) {
- LOG.error("Load keystore failed", e);
- }
-
- // Security settings.
- sslContextFactory.setIncludeProtocols("TLSv1.3", "TLSv1.2");
-
- return sslContextFactory;
- }
-}
diff --git a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/server/WebSocketHandler.java b/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/server/WebSocketHandler.java
deleted file mode 100644
index d4ece58..0000000
--- a/webrtc-examples/src/main/java/dev/onvoid/webrtc/examples/web/server/WebSocketHandler.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
- * Copyright 2025 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package dev.onvoid.webrtc.examples.web.server;
-
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.ObjectMapper;
-
-import dev.onvoid.webrtc.examples.web.model.LeaveMessage;
-import dev.onvoid.webrtc.examples.web.model.MessageType;
-import dev.onvoid.webrtc.examples.web.model.SignalingMessage;
-
-import org.eclipse.jetty.websocket.api.Callback;
-import org.eclipse.jetty.websocket.api.Session;
-import org.eclipse.jetty.websocket.api.annotations.*;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Handles WebSocket connections and messages for the WebRTC signaling server.
- *
- * This class manages all active WebSocket sessions, processes incoming messages,
- * and provides methods for broadcasting messages to connected clients.
- *
- *
- * @author Alex Andres
- */
-@WebSocket
-public class WebSocketHandler {
-
- private static final Logger LOG = LoggerFactory.getLogger(WebSocketHandler.class);
-
- /** Thread-safe set to store all active sessions. */
- private static final Set sessions = new CopyOnWriteArraySet<>();
-
- /** Thread-safe map to store session to user-id mappings. */
- private static final Map sessionToUserId = new ConcurrentHashMap<>();
-
- /** JSON serializer/deserializer for processing WebSocket messages. */
- private final ObjectMapper jsonMapper = new ObjectMapper();
-
-
- @OnWebSocketOpen
- public void onOpen(Session session) {
- sessions.add(session);
-
- LOG.info("New connection: {} (Total connections: {})", session.getRemoteSocketAddress(), sessions.size());
- }
-
- @OnWebSocketMessage
- public void onMessage(Session session, String message) {
- LOG.info("Message from {}: {}", session.getRemoteSocketAddress(), message);
-
- try {
- JsonNode messageNode = jsonMapper.readTree(message);
- String type = messageNode.path("type").asText();
-
- // Check if this is a heartbeat message.
- if (MessageType.HEARTBEAT.getValue().equals(type)) {
- // Send heartbeat acknowledgment.
- SignalingMessage heartbeatAck = new SignalingMessage("heartbeat-ack");
- String heartbeatAckJson = jsonMapper.writeValueAsString(heartbeatAck);
-
- sendMessage(session, heartbeatAckJson);
- return;
- }
-
- // Check if this is a join message and extract the user-id.
- if (MessageType.JOIN.getValue().equals(type)) {
- String userId = messageNode.path("from").asText();
-
- if (userId != null && !userId.isEmpty()) {
- // Store the user-id for this session.
- sessionToUserId.put(session, userId);
-
- LOG.info("Registered user-id '{}' for session {}", userId, session.getRemoteSocketAddress());
- }
- }
- }
- catch (JsonProcessingException e) {
- LOG.error("Error parsing message type", e);
- }
-
- // Broadcast the message to all other connected peers (excluding sender).
- broadcastToOthers(session, message);
- }
-
- @OnWebSocketClose
- public void onClose(Session session, int statusCode, String reason) {
- sessions.remove(session);
-
- LOG.info("Connection closed: {} ({}) - Status: {}", session.getRemoteSocketAddress(), reason, statusCode);
- LOG.info("Remaining connections: {}", sessions.size());
-
- // Notify other clients about disconnection.
- try {
- // Get the user-id for this session or use the socket address as a fallback.
- String userId = sessionToUserId.getOrDefault(session, session.getRemoteSocketAddress().toString());
-
- // Create a leave message.
- LeaveMessage leaveMessage = new LeaveMessage();
- leaveMessage.setFrom(userId);
-
- String leaveMessageJson = jsonMapper.writeValueAsString(leaveMessage);
- broadcastToAll(leaveMessageJson);
-
- LOG.info("Sent participant left message for user-id: {}", userId);
-
- // Clean up the session-to-userId mapping.
- sessionToUserId.remove(session);
- }
- catch (JsonProcessingException e) {
- LOG.error("Error creating participant left message", e);
- }
- }
-
- @OnWebSocketError
- public void onError(Session session, Throwable error) {
- LOG.error("WebSocket error for {}", session.getRemoteSocketAddress(), error);
- }
-
- /**
- * Broadcasts a message to all connected peers except the sender.
- *
- * @param sender the session of the sender.
- * @param message the message to broadcast.
- */
- private void broadcastToOthers(Session sender, String message) {
- sessions.stream()
- .filter(Session::isOpen)
- .filter(session -> !session.equals(sender))
- .forEach(session -> sendMessage(session, message));
- }
-
- /**
- * Broadcasts a message to all connected peers.
- *
- * @param message the message to broadcast.
- */
- private void broadcastToAll(String message) {
- sessions.stream()
- .filter(Session::isOpen)
- .forEach(session -> sendMessage(session, message));
- }
-
- private void sendMessage(Session session, String message) {
- session.sendText(message, Callback.from(() -> {}, throwable -> {
- LOG.error("Error sending message to session: {}", throwable.getMessage());
- // Remove broken sessions.
- sessions.remove(session);
- }));
- }
-}
diff --git a/webrtc-jni/src/main/cpp/CMakeLists.txt b/webrtc-jni/src/main/cpp/CMakeLists.txt
index 82f72ae..8e8b7b3 100644
--- a/webrtc-jni/src/main/cpp/CMakeLists.txt
+++ b/webrtc-jni/src/main/cpp/CMakeLists.txt
@@ -50,29 +50,11 @@ add_subdirectory(dependencies/jni-voithos)
file(GLOB SOURCES_ROOT "src/*.cpp")
file(GLOB SOURCES_API "src/api/*.cpp")
-file(GLOB SOURCES_API_AUDIO "src/api/audio/*.cpp")
-file(GLOB SOURCES_MEDIA "src/media/*.cpp")
-file(GLOB SOURCES_MEDIA_AUDIO "src/media/audio/*.cpp")
-file(GLOB SOURCES_MEDIA_AUDIO_OS "src/media/audio/${SOURCE_TARGET}/*.cpp")
-file(GLOB SOURCES_MEDIA_VIDEO "src/media/video/*.cpp")
-file(GLOB SOURCES_MEDIA_VIDEO_DESKTOP "src/media/video/desktop/*.cpp")
-file(GLOB SOURCES_MEDIA_VIDEO_DESKTOP_OS "src/media/video/desktop/${SOURCE_TARGET}/*.cpp")
-file(GLOB SOURCES_MEDIA_VIDEO_OS "src/media/video/${SOURCE_TARGET}/*.cpp")
-file(GLOB SOURCES_PLATFORM "src/platform/${SOURCE_TARGET}/*.cpp")
file(GLOB SOURCES_RTC "src/rtc/*.cpp")
list(APPEND SOURCES
${SOURCES_ROOT}
${SOURCES_API}
- ${SOURCES_API_AUDIO}
- ${SOURCES_MEDIA}
- ${SOURCES_MEDIA_AUDIO}
- ${SOURCES_MEDIA_AUDIO_OS}
- ${SOURCES_MEDIA_VIDEO}
- ${SOURCES_MEDIA_VIDEO_DESKTOP}
- ${SOURCES_MEDIA_VIDEO_DESKTOP_OS}
- ${SOURCES_MEDIA_VIDEO_OS}
- ${SOURCES_PLATFORM}
${SOURCES_RTC}
)
@@ -85,7 +67,6 @@ target_include_directories(${PROJECT_NAME}
PRIVATE
include
include/api
- include/media
include/rtc
)
@@ -102,7 +83,7 @@ target_link_libraries(${PROJECT_NAME} webrtc)
if(APPLE)
set_source_files_properties(${SOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c++")
target_link_options(${PROJECT_NAME} PRIVATE "-ObjC")
- target_link_libraries(${PROJECT_NAME} "-framework Foundation" "-framework AVFoundation" "-framework CoreMedia" "-framework CoreAudio" "-framework IOKit" "-framework CoreVideo" "-framework VideoToolbox" "-framework QuartzCore")
+ target_link_libraries(${PROJECT_NAME} "-framework Foundation" "-framework IOKit")
elseif(LINUX)
if(NOT TARGET_CPU MATCHES "^arm")
set(CXX_LIBS "-static-libgcc -stdlib=libc++ -lc++ -lc++abi")
@@ -110,10 +91,9 @@ elseif(LINUX)
set(CXX_LIBS "-static-libgcc")
endif()
- target_link_libraries(${PROJECT_NAME} ${CXX_LIBS} udev)
- target_link_libraries(${PROJECT_NAME} dl)
+ target_link_libraries(${PROJECT_NAME} ${CXX_LIBS})
elseif(WIN32)
- target_link_libraries(${PROJECT_NAME} dwmapi.lib mf.lib mfreadwrite.lib mfplat.lib mfuuid.lib shcore.lib)
+ target_link_libraries(${PROJECT_NAME} shcore.lib)
endif()
install(TARGETS ${PROJECT_NAME}
diff --git a/webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt b/webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt
index a11a7b5..ac48c71 100644
--- a/webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt
+++ b/webrtc-jni/src/main/cpp/dependencies/webrtc/CMakeLists.txt
@@ -164,19 +164,14 @@ if(APPLE)
${TARGET_INC_DIR}/sdk/objc
${TARGET_INC_DIR}/sdk/objc/base
)
- target_compile_definitions(${PROJECT_NAME} PUBLIC WEBRTC_MAC WEBRTC_POSIX WEBRTC_USE_H264)
- target_link_libraries(${PROJECT_NAME} "-framework Foundation" "-framework AVFoundation" "-framework CoreGraphics" "-framework CoreAudio" "-framework CoreVideo" "-framework ScreenCaptureKit" "-framework AudioToolbox" "-framework IOSurface" "-framework ApplicationServices" "-framework AppKit")
+ target_compile_definitions(${PROJECT_NAME} PUBLIC WEBRTC_MAC WEBRTC_POSIX)
+ target_link_libraries(${PROJECT_NAME} "-framework Foundation" "-framework IOKit")
elseif(LINUX)
- # Find DBus
- find_package(PkgConfig QUIET REQUIRED) # Include functions provided by PkgConfig module.
- pkg_check_modules(DBUS REQUIRED dbus-1)
-
target_include_directories(${PROJECT_NAME} PUBLIC ${DBUS_INCLUDE_DIRS})
- target_compile_definitions(${PROJECT_NAME} PUBLIC WEBRTC_LINUX WEBRTC_POSIX WEBRTC_USE_H264)
- target_link_libraries(${PROJECT_NAME} X11 Xfixes Xrandr Xcomposite dbus-1)
+ target_compile_definitions(${PROJECT_NAME} PUBLIC WEBRTC_LINUX WEBRTC_POSIX)
elseif(WIN32)
- target_compile_definitions(${PROJECT_NAME} PUBLIC WEBRTC_WIN WEBRTC_USE_H264 NOMINMAX WIN32_LEAN_AND_MEAN NDEBUG)
- target_link_libraries(${PROJECT_NAME} D3D11 DXGI user32 gdi32 iphlpapi dmoguids msdmo secur32 strmiids winmm wmcodecdspuuid ws2_32)
+ target_compile_definitions(${PROJECT_NAME} PUBLIC WEBRTC_WIN NOMINMAX WIN32_LEAN_AND_MEAN NDEBUG)
+ target_link_libraries(${PROJECT_NAME} user32 iphlpapi secur32 ws2_32)
endif()
if(EXISTS "${WEBRTC_LIB_PATH}" OR EXISTS "${WEBRTC_LIB_PATH_INSTALLED}")
@@ -265,9 +260,13 @@ rtc_enable_protobuf=false \
rtc_build_examples=false \
rtc_include_tests=false \
use_rtti=true \
-rtc_use_h264=true \
+rtc_use_h264=false \
ffmpeg_branding=\"Chrome\" \
-symbol_level=0")
+symbol_level=0 \
+rtc_use_x11=false \
+use_dbus=false \
+use_udev=false \
+rtc_use_pulseaudio=false")
if(APPLE)
set(COMPILE_ARGS "${COMPILE_ARGS} mac_deployment_target=\"${CMAKE_OSX_DEPLOYMENT_TARGET}\"")
diff --git a/webrtc-jni/src/main/cpp/dependencies/webrtc/patches/macos/patch_for_mac_deviceId.patch b/webrtc-jni/src/main/cpp/dependencies/webrtc/patches/macos/patch_for_mac_deviceId.patch
deleted file mode 100644
index af35cef..0000000
--- a/webrtc-jni/src/main/cpp/dependencies/webrtc/patches/macos/patch_for_mac_deviceId.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Subject: [PATCH] patch for mac deviceId
----
-Index: modules/audio_device/mac/audio_device_mac.cc
-IDEA additional info:
-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
-<+>UTF-8
-===================================================================
-diff --git a/modules/audio_device/mac/audio_device_mac.cc b/modules/audio_device/mac/audio_device_mac.cc
---- a/modules/audio_device/mac/audio_device_mac.cc (revision e4445e46a910eb407571ec0b0b8b7043562678cf)
-+++ b/modules/audio_device/mac/audio_device_mac.cc (date 1757498230183)
-@@ -834,6 +834,10 @@
-
- if (guid != NULL) {
- memset(guid, 0, kAdmMaxGuidSize);
-+ AudioDeviceID deviceIds[MaxNumberDevices];
-+ int numberDevices = GetNumberDevices(kAudioDevicePropertyScopeOutput, deviceIds, MaxNumberDevices);
-+ std::string deviceId = std::to_string(deviceIds[index]);
-+ deviceId.copy(guid, kAdmMaxGuidSize);
- }
-
- return GetDeviceName(kAudioDevicePropertyScopeOutput, index,
-@@ -853,6 +857,10 @@
-
- if (guid != NULL) {
- memset(guid, 0, kAdmMaxGuidSize);
-+ AudioDeviceID deviceIds[MaxNumberDevices];
-+ int numberDevices = GetNumberDevices(kAudioDevicePropertyScopeInput, deviceIds, MaxNumberDevices);
-+ std::string deviceId = std::to_string(deviceIds[index]);
-+ deviceId.copy(guid, kAdmMaxGuidSize);
- }
-
- return GetDeviceName(kAudioDevicePropertyScopeInput, index,
diff --git a/webrtc-jni/src/main/cpp/include/JNI_AudioConverter.h b/webrtc-jni/src/main/cpp/include/JNI_AudioConverter.h
deleted file mode 100644
index f29c41b..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_AudioConverter.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_AudioConverter */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_AudioConverter
-#define _Included_dev_onvoid_webrtc_media_audio_AudioConverter
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioConverter
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioConverter_dispose
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioConverter
- * Method: initialize
- * Signature: (IIII)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioConverter_initialize
- (JNIEnv*, jobject, jint, jint, jint, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioConverter
- * Method: convertInternal
- * Signature: ([BI[BI)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioConverter_convertInternal
- (JNIEnv*, jobject, jbyteArray, jint, jbyteArray, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_AudioDeviceModule.h b/webrtc-jni/src/main/cpp/include/JNI_AudioDeviceModule.h
deleted file mode 100644
index 888cc99..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_AudioDeviceModule.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_AudioDeviceModule */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_AudioDeviceModule
-#define _Included_dev_onvoid_webrtc_media_audio_AudioDeviceModule
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModule
- * Method: initialize
- * Signature: (Ldev/onvoid/webrtc/media/audio/AudioLayer;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModule_initialize
- (JNIEnv *, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_AudioDeviceModuleBase.h b/webrtc-jni/src/main/cpp/include/JNI_AudioDeviceModuleBase.h
deleted file mode 100644
index b1f28de..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_AudioDeviceModuleBase.h
+++ /dev/null
@@ -1,229 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
-#define _Included_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: initPlayout
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_initPlayout
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: stopPlayout
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_stopPlayout
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: startPlayout
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_startPlayout
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: initRecording
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_initRecording
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: stopRecording
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_stopRecording
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: startRecording
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_startRecording
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: getPlayoutDevices
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_getPlayoutDevices
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: getRecordingDevices
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_getRecordingDevices
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: setPlayoutDevice
- * Signature: (Ldev/onvoid/webrtc/media/audio/AudioDevice;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_setPlayoutDevice
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: setRecordingDevice
- * Signature: (Ldev/onvoid/webrtc/media/audio/AudioDevice;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_setRecordingDevice
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: isSpeakerMuted
- * Signature: ()Z
- */
- JNIEXPORT jboolean JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_isSpeakerMuted
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: isMicrophoneMuted
- * Signature: ()Z
- */
- JNIEXPORT jboolean JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_isMicrophoneMuted
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: getSpeakerVolume
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_getSpeakerVolume
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: getMaxSpeakerVolume
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_getMaxSpeakerVolume
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: getMinSpeakerVolume
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_getMinSpeakerVolume
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: getMicrophoneVolume
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_getMicrophoneVolume
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: getMaxMicrophoneVolume
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_getMaxMicrophoneVolume
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: getMinMicrophoneVolume
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_getMinMicrophoneVolume
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: setSpeakerVolume
- * Signature: (I)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_setSpeakerVolume
- (JNIEnv *, jobject, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: setSpeakerMute
- * Signature: (Z)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_setSpeakerMute
- (JNIEnv *, jobject, jboolean);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: setMicrophoneVolume
- * Signature: (I)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_setMicrophoneVolume
- (JNIEnv *, jobject, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: setMicrophoneMute
- * Signature: (Z)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_setMicrophoneMute
- (JNIEnv *, jobject, jboolean);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: addSinkInternal
- * Signature: (Ldev/onvoid/webrtc/media/audio/AudioSink;)J
- */
- JNIEXPORT jlong JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_addSinkInternal
- (JNIEnv*, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: removeSinkInternal
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_removeSinkInternal
- (JNIEnv*, jobject, jlong);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: addSourceInternal
- * Signature: (Ldev/onvoid/webrtc/media/audio/AudioSource;)J
- */
- JNIEXPORT jlong JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_addSourceInternal
- (JNIEnv*, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: removeSourceInternal
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_removeSourceInternal
- (JNIEnv*, jobject, jlong);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase
- * Method: disposeInternal
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioDeviceModuleBase_disposeInternal
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_AudioProcessing.h b/webrtc-jni/src/main/cpp/include/JNI_AudioProcessing.h
deleted file mode 100644
index 8e8644e..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_AudioProcessing.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_AudioProcessing */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_AudioProcessing
-#define _Included_dev_onvoid_webrtc_media_audio_AudioProcessing
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioProcessing
- * Method: applyConfig
- * Signature: (Ldev/onvoid/webrtc/media/audio/AudioProcessingConfig;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioProcessing_applyConfig
- (JNIEnv*, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioProcessing
- * Method: setStreamDelayMs
- * Signature: (I)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioProcessing_setStreamDelayMs
- (JNIEnv*, jobject, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioProcessing
- * Method: getStreamDelayMs
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioProcessing_getStreamDelayMs
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioProcessing
- * Method: processStream
- * Signature: ([BLdev/onvoid/webrtc/media/audio/AudioProcessingStreamConfig;Ldev/onvoid/webrtc/media/audio/AudioProcessingStreamConfig;[B)I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioProcessing_processStream
- (JNIEnv*, jobject, jbyteArray, jobject, jobject, jbyteArray);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioProcessing
- * Method: processReverseStream
- * Signature: ([BLdev/onvoid/webrtc/media/audio/AudioProcessingStreamConfig;Ldev/onvoid/webrtc/media/audio/AudioProcessingStreamConfig;[B)I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioProcessing_processReverseStream
- (JNIEnv*, jobject, jbyteArray, jobject, jobject, jbyteArray);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioProcessing
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioProcessing_dispose
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioProcessing
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioProcessing_initialize
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioProcessing
- * Method: updateStats
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioProcessing_updateStats
- (JNIEnv*, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_AudioResampler.h b/webrtc-jni/src/main/cpp/include/JNI_AudioResampler.h
deleted file mode 100644
index d667248..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_AudioResampler.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_AudioResampler */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_AudioResampler
-#define _Included_dev_onvoid_webrtc_media_audio_AudioResampler
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioResampler
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioResampler_dispose
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioResampler
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioResampler_initialize
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioResampler
- * Method: resample
- * Signature: ([BI[BII)I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioResampler_resampleInternal
- (JNIEnv*, jobject, jbyteArray, jint, jbyteArray, jint, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_AudioTrack.h b/webrtc-jni/src/main/cpp/include/JNI_AudioTrack.h
deleted file mode 100644
index 8261a1f..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_AudioTrack.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_AudioTrack */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_AudioTrack
-#define _Included_dev_onvoid_webrtc_media_audio_AudioTrack
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioTrack
- * Method: getSignalLevel
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_media_audio_AudioTrack_getSignalLevel
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioTrack
- * Method: addSinkInternal
- * Signature: (Ldev/onvoid/webrtc/media/audio/AudioTrackSink;)J
- */
- JNIEXPORT jlong JNICALL Java_dev_onvoid_webrtc_media_audio_AudioTrack_addSinkInternal
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_AudioTrack
- * Method: removeSinkInternal
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_AudioTrack_removeSinkInternal
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_CustomAudioSource.h b/webrtc-jni/src/main/cpp/include/JNI_CustomAudioSource.h
deleted file mode 100644
index 2355fe2..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_CustomAudioSource.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_CustomAudioSource */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_CustomAudioSource
-#define _Included_dev_onvoid_webrtc_media_audio_CustomAudioSource
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_audio_CustomAudioSource
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_CustomAudioSource_initialize
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_CustomAudioSource
- * Method: initializeWithClock
- * Signature: (Ldev/onvoid/webrtc/media/SyncClock;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_CustomAudioSource_initializeWithClock
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_CustomAudioSource
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_CustomAudioSource_dispose
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_CustomAudioSource
- * Method: pushAudio
- * Signature: ([BIIII)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_CustomAudioSource_pushAudio
- (JNIEnv *, jobject, jbyteArray, jint, jint, jint, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/JNI_CustomVideoSource.h b/webrtc-jni/src/main/cpp/include/JNI_CustomVideoSource.h
deleted file mode 100644
index 0b6de8a..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_CustomVideoSource.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_CustomVideoSource */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_CustomVideoSource
-#define _Included_dev_onvoid_webrtc_media_video_CustomVideoSource
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_CustomVideoSource
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_CustomVideoSource_initialize
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_CustomVideoSource
- * Method: initializeWithClock
- * Signature: (Ldev/onvoid/webrtc/media/SyncClock;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_CustomVideoSource_initializeWithClock
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_CustomVideoSource
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_CustomVideoSource_dispose
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_CustomVideoSource
- * Method: pushFrame
- * Signature: (Ldev/onvoid/webrtc/media/video/VideoFrame;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_CustomVideoSource_pushFrame
- (JNIEnv *, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/JNI_DesktopCapturer.h b/webrtc-jni/src/main/cpp/include/JNI_DesktopCapturer.h
deleted file mode 100644
index a9e46ae..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_DesktopCapturer.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_desktop_DesktopCapturer */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
-#define _Included_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer_dispose
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
- * Method: getDesktopSources
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer_getDesktopSources
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
- * Method: selectSource
- * Signature: (Ldev/onvoid/webrtc/media/video/desktop/DesktopSource;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer_selectSource
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
- * Method: setFocusSelectedSource
- * Signature: (Z)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer_setFocusSelectedSource
- (JNIEnv*, jobject, jboolean);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
- * Method: setMaxFrameRate
- * Signature: (I)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer_setMaxFrameRate
- (JNIEnv*, jobject, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
- * Method: start
- * Signature: (Ldev/onvoid/webrtc/media/video/desktop/DesktopCaptureCallback;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer_start
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_DesktopCapturer
- * Method: captureFrame
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_DesktopCapturer_captureFrame
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_HeadlessAudioDeviceModule.h b/webrtc-jni/src/main/cpp/include/JNI_HeadlessAudioDeviceModule.h
deleted file mode 100644
index 075fc21..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_HeadlessAudioDeviceModule.h
+++ /dev/null
@@ -1,22 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_HeadlessAudioDeviceModule */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_HeadlessAudioDeviceModule
-#define _Included_dev_onvoid_webrtc_media_audio_HeadlessAudioDeviceModule
-#ifdef __cplusplus
-extern "C" {
-#endif
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_HeadlessAudioDeviceModule
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_HeadlessAudioDeviceModule_initialize
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_MediaDevices.h b/webrtc-jni/src/main/cpp/include/JNI_MediaDevices.h
deleted file mode 100644
index fb7d0ed..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_MediaDevices.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_MediaDevices */
-
-#ifndef _Included_dev_onvoid_webrtc_media_MediaDevices
-#define _Included_dev_onvoid_webrtc_media_MediaDevices
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_MediaDevices
- * Method: addDeviceChangeListener
- * Signature: (Ldev/onvoid/webrtc/media/DeviceChangeListener;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaDevices_addDeviceChangeListener
- (JNIEnv*, jclass, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaDevices
- * Method: removeDeviceChangeListener
- * Signature: (Ldev/onvoid/webrtc/media/DeviceChangeListener;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaDevices_removeDeviceChangeListener
- (JNIEnv*, jclass, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaDevices
- * Method: getDefaultAudioRenderDevice
- * Signature: ()Ldev/onvoid/webrtc/media/audio/AudioDevice;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_MediaDevices_getDefaultAudioRenderDevice
- (JNIEnv*, jclass);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaDevices
- * Method: getDefaultAudioCaptureDevice
- * Signature: ()Ldev/onvoid/webrtc/media/audio/AudioDevice;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_MediaDevices_getDefaultAudioCaptureDevice
- (JNIEnv*, jclass);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaDevices
- * Method: getAudioRenderDevices
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_MediaDevices_getAudioRenderDevices
- (JNIEnv*, jclass);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaDevices
- * Method: getAudioCaptureDevices
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_MediaDevices_getAudioCaptureDevices
- (JNIEnv*, jclass);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaDevices
- * Method: getVideoCaptureDevices
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_MediaDevices_getVideoCaptureDevices
- (JNIEnv*, jclass);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaDevices
- * Method: getVideoCaptureCapabilities
- * Signature: (Ldev/onvoid/webrtc/media/video/VideoDevice;)Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_MediaDevices_getVideoCaptureCapabilities
- (JNIEnv*, jclass, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_MediaSource.h b/webrtc-jni/src/main/cpp/include/JNI_MediaSource.h
deleted file mode 100644
index 5a015e7..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_MediaSource.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_MediaSource */
-
-#ifndef _Included_dev_onvoid_webrtc_media_MediaSource
-#define _Included_dev_onvoid_webrtc_media_MediaSource
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_MediaSource
- * Method: getState
- * Signature: ()Ldev/onvoid/webrtc/media/MediaSource/State;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_MediaSource_getState
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_MediaStream.h b/webrtc-jni/src/main/cpp/include/JNI_MediaStream.h
deleted file mode 100644
index 8d10318..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_MediaStream.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_MediaStream */
-
-#ifndef _Included_dev_onvoid_webrtc_media_MediaStream
-#define _Included_dev_onvoid_webrtc_media_MediaStream
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_MediaStream
- * Method: id
- * Signature: ()Ljava/lang/String;
- */
- JNIEXPORT jstring JNICALL Java_dev_onvoid_webrtc_media_MediaStream_id
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStream
- * Method: getAudioTracks
- * Signature: ()[Ldev/onvoid/webrtc/media/audio/AudioTrack;
- */
- JNIEXPORT jobjectArray JNICALL Java_dev_onvoid_webrtc_media_MediaStream_getAudioTracks
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStream
- * Method: getVideoTracks
- * Signature: ()[Ldev/onvoid/webrtc/media/video/VideoTrack;
- */
- JNIEXPORT jobjectArray JNICALL Java_dev_onvoid_webrtc_media_MediaStream_getVideoTracks
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStream
- * Method: addTrack
- * Signature: (Ldev/onvoid/webrtc/media/MediaStreamTrack;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStream_addTrack
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStream
- * Method: removeTrack
- * Signature: (Ldev/onvoid/webrtc/media/MediaStreamTrack;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStream_removeTrack
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStream
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStream_dispose
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_MediaStreamTrack.h b/webrtc-jni/src/main/cpp/include/JNI_MediaStreamTrack.h
deleted file mode 100644
index 01e440f..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_MediaStreamTrack.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_MediaStreamTrack */
-
-#ifndef _Included_dev_onvoid_webrtc_media_MediaStreamTrack
-#define _Included_dev_onvoid_webrtc_media_MediaStreamTrack
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_dispose
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: getKind
- * Signature: ()Ljava/lang/String;
- */
- JNIEXPORT jstring JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_getKind
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: getId
- * Signature: ()Ljava/lang/String;
- */
- JNIEXPORT jstring JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_getId
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: isEnabled
- * Signature: ()Z
- */
- JNIEXPORT jboolean JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_isEnabled
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: setEnabled
- * Signature: (Z)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_setEnabled
- (JNIEnv *, jobject, jboolean);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: getState
- * Signature: ()Ldev/onvoid/webrtc/media/MediaStreamTrackState;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_getState
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: addEndedEventListener
- * Signature: (Ljava/lang/Runnable;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_addEndedEventListener
- (JNIEnv*, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: removeEndedEventListener
- * Signature: (Ljava/lang/Runnable;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_removeEndedEventListener
- (JNIEnv*, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: addMuteEventListener
- * Signature: (Ljava/util/function/Consumer;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_addMuteEventListener
- (JNIEnv*, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_MediaStreamTrack
- * Method: removeMuteEventListener
- * Signature: (Ljava/util/function/Consumer;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_MediaStreamTrack_removeMuteEventListener
- (JNIEnv*, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_NativeI420Buffer.h b/webrtc-jni/src/main/cpp/include/JNI_NativeI420Buffer.h
deleted file mode 100644
index 3998484..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_NativeI420Buffer.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_NativeI420Buffer */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_NativeI420Buffer
-#define _Included_dev_onvoid_webrtc_media_video_NativeI420Buffer
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_NativeI420Buffer
- * Method: allocate
- * Signature: (II)Ldev/onvoid/webrtc/media/video/NativeI420Buffer;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_video_NativeI420Buffer_allocate
- (JNIEnv *, jclass, jint, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_NativeI420Buffer
- * Method: copy
- * Signature: (IILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;I)Ldev/onvoid/webrtc/media/video/NativeI420Buffer;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_media_video_NativeI420Buffer_copy
- (JNIEnv*, jclass, jint, jint, jobject, jint, jobject, jint, jobject, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_NativeI420Buffer
- * Method: cropAndScale
- * Signature: (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;IIIIILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;III)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_NativeI420Buffer_cropAndScale
- (JNIEnv *, jclass, jobject, jint, jobject, jint, jobject, jint, jint, jint, jint, jint, jobject, jint, jobject, jint, jobject, jint, jint, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_PeerConnectionFactory.h b/webrtc-jni/src/main/cpp/include/JNI_PeerConnectionFactory.h
index 91d0ad6..351bd93 100644
--- a/webrtc-jni/src/main/cpp/include/JNI_PeerConnectionFactory.h
+++ b/webrtc-jni/src/main/cpp/include/JNI_PeerConnectionFactory.h
@@ -7,29 +7,6 @@
#ifdef __cplusplus
extern "C" {
#endif
- /*
- * Class: dev_onvoid_webrtc_PeerConnectionFactory
- * Method: createAudioSource
- * Signature: (Ldev/onvoid/webrtc/media/audio/AudioOptions;)Ldev/onvoid/webrtc/media/audio/AudioTrackSource;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_PeerConnectionFactory_createAudioSource
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_PeerConnectionFactory
- * Method: createAudioTrack
- * Signature: (Ljava/lang/String;Ldev/onvoid/webrtc/media/audio/AudioTrackSource;)Ldev/onvoid/webrtc/media/audio/AudioTrack;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_PeerConnectionFactory_createAudioTrack
- (JNIEnv *, jobject, jstring, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_PeerConnectionFactory
- * Method: createVideoTrack
- * Signature: (Ljava/lang/String;Ldev/onvoid/webrtc/media/video/VideoTrackSource;)Ldev/onvoid/webrtc/media/video/VideoTrack;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_PeerConnectionFactory_createVideoTrack
- (JNIEnv *, jobject, jstring, jobject);
/*
* Class: dev_onvoid_webrtc_PeerConnectionFactory
@@ -39,22 +16,6 @@ extern "C" {
JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_PeerConnectionFactory_createPeerConnection
(JNIEnv *, jobject, jobject, jobject);
- /*
- * Class: dev_onvoid_webrtc_PeerConnectionFactory
- * Method: getRtpReceiverCapabilities
- * Signature: (Ldev/onvoid/webrtc/media/MediaType;)Ldev/onvoid/webrtc/RTCRtpCapabilities;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_PeerConnectionFactory_getRtpReceiverCapabilities
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_PeerConnectionFactory
- * Method: getRtpSenderCapabilities
- * Signature: (Ldev/onvoid/webrtc/media/MediaType;)Ldev/onvoid/webrtc/RTCRtpCapabilities;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_PeerConnectionFactory_getRtpSenderCapabilities
- (JNIEnv *, jobject, jobject);
-
/*
* Class: dev_onvoid_webrtc_PeerConnectionFactory
* Method: dispose
diff --git a/webrtc-jni/src/main/cpp/include/JNI_PowerManagement.h b/webrtc-jni/src/main/cpp/include/JNI_PowerManagement.h
deleted file mode 100644
index f55be85..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_PowerManagement.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_desktop_ScreenSaver */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_desktop_ScreenSaver
-#define _Included_dev_onvoid_webrtc_media_video_desktop_ScreenSaver
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_PowerManagement
- * Method: enableUserActivity
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_PowerManagement_enableUserActivity
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_PowerManagement
- * Method: disableUserActivity
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_PowerManagement_disableUserActivity
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_RTCDtmfSender.h b/webrtc-jni/src/main/cpp/include/JNI_RTCDtmfSender.h
deleted file mode 100644
index 6a25bb5..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_RTCDtmfSender.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_RTCDtmfSender */
-
-#ifndef _Included_dev_onvoid_webrtc_RTCDtmfSender
-#define _Included_dev_onvoid_webrtc_RTCDtmfSender
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_RTCDtmfSender
- * Method: canInsertDtmf
- * Signature: ()Z
- */
- JNIEXPORT jboolean JNICALL Java_dev_onvoid_webrtc_RTCDtmfSender_canInsertDtmf
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCDtmfSender
- * Method: insertDtmf
- * Signature: (Ljava/lang/String;II)Z
- */
- JNIEXPORT jboolean JNICALL Java_dev_onvoid_webrtc_RTCDtmfSender_insertDtmf
- (JNIEnv *, jobject, jstring, jint, jint);
-
- /*
- * Class: dev_onvoid_webrtc_RTCDtmfSender
- * Method: tones
- * Signature: ()Ljava/lang/String;
- */
- JNIEXPORT jstring JNICALL Java_dev_onvoid_webrtc_RTCDtmfSender_tones
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCDtmfSender
- * Method: duration
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_RTCDtmfSender_duration
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCDtmfSender
- * Method: interToneGap
- * Signature: ()I
- */
- JNIEXPORT jint JNICALL Java_dev_onvoid_webrtc_RTCDtmfSender_interToneGap
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCDtmfSender
- * Method: registerObserver
- * Signature: (Ldev/onvoid/webrtc/RTCDtmfSenderObserver;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCDtmfSender_registerObserver
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCDtmfSender
- * Method: unregisterObserver
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCDtmfSender_unregisterObserver
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/JNI_RTCPeerConnection.h b/webrtc-jni/src/main/cpp/include/JNI_RTCPeerConnection.h
index 5ad409d..5b7fdec 100644
--- a/webrtc-jni/src/main/cpp/include/JNI_RTCPeerConnection.h
+++ b/webrtc-jni/src/main/cpp/include/JNI_RTCPeerConnection.h
@@ -7,53 +7,6 @@
#ifdef __cplusplus
extern "C" {
#endif
- /*
- * Class: dev_onvoid_webrtc_RTCPeerConnection
- * Method: getSenders
- * Signature: ()[Ldev/onvoid/webrtc/RTCRtpSender;
- */
- JNIEXPORT jobjectArray JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_getSenders
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCPeerConnection
- * Method: getReceivers
- * Signature: ()[Ldev/onvoid/webrtc/RTCRtpReceiver;
- */
- JNIEXPORT jobjectArray JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_getReceivers
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCPeerConnection
- * Method: getTransceivers
- * Signature: ()[Ldev/onvoid/webrtc/RTCRtpTransceiver;
- */
- JNIEXPORT jobjectArray JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_getTransceivers
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCPeerConnection
- * Method: addTrack
- * Signature: (Ldev/onvoid/webrtc/media/MediaStreamTrack;Ljava/util/List;)Ldev/onvoid/webrtc/RTCRtpSender;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_addTrack
- (JNIEnv *, jobject, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCPeerConnection
- * Method: removeTrack
- * Signature: (Ldev/onvoid/webrtc/RTCRtpSender;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_removeTrack
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCPeerConnection
- * Method: addTransceiver
- * Signature: (Ldev/onvoid/webrtc/media/MediaStreamTrack;Ldev/onvoid/webrtc/RTCRtpTransceiverInit;)Ldev/onvoid/webrtc/RTCRtpTransceiver;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_addTransceiver
- (JNIEnv *, jobject, jobject, jobject);
/*
* Class: dev_onvoid_webrtc_RTCPeerConnection
@@ -215,22 +168,6 @@ extern "C" {
JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_getStats__Ldev_onvoid_webrtc_RTCStatsCollectorCallback_2
(JNIEnv *, jobject, jobject);
- /*
- * Class: dev_onvoid_webrtc_RTCPeerConnection
- * Method: getStats
- * Signature: (Ldev/onvoid/webrtc/RTCRtpReceiver;Ldev/onvoid/webrtc/RTCStatsCollectorCallback;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_getStats__Ldev_onvoid_webrtc_RTCRtpReceiver_2Ldev_onvoid_webrtc_RTCStatsCollectorCallback_2
- (JNIEnv *, jobject, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCPeerConnection
- * Method: getStats
- * Signature: (Ldev/onvoid/webrtc/RTCRtpSender;Ldev/onvoid/webrtc/RTCStatsCollectorCallback;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCPeerConnection_getStats__Ldev_onvoid_webrtc_RTCRtpSender_2Ldev_onvoid_webrtc_RTCStatsCollectorCallback_2
- (JNIEnv *, jobject, jobject, jobject);
-
/*
* Class: dev_onvoid_webrtc_RTCPeerConnection
* Method: restartIce
diff --git a/webrtc-jni/src/main/cpp/include/JNI_RTCRtpReceiver.h b/webrtc-jni/src/main/cpp/include/JNI_RTCRtpReceiver.h
deleted file mode 100644
index 3ff3658..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_RTCRtpReceiver.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_RTCRtpReceiver */
-
-#ifndef _Included_dev_onvoid_webrtc_RTCRtpReceiver
-#define _Included_dev_onvoid_webrtc_RTCRtpReceiver
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_RTCRtpReceiver
- * Method: getTrack
- * Signature: ()Ldev/onvoid/webrtc/media/MediaStreamTrack;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpReceiver_getTrack
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpReceiver
- * Method: getTransport
- * Signature: ()Ldev/onvoid/webrtc/RTCDtlsTransport;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpReceiver_getTransport
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpReceiver
- * Method: getParameters
- * Signature: ()Ldev/onvoid/webrtc/RTCRtpParameters;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpReceiver_getParameters
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpReceiver
- * Method: getContributingSources
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpReceiver_getContributingSources
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpReceiver
- * Method: getSynchronizationSources
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpReceiver_getSynchronizationSources
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_RTCRtpSender.h b/webrtc-jni/src/main/cpp/include/JNI_RTCRtpSender.h
deleted file mode 100644
index 83f23ff..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_RTCRtpSender.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_RTCRtpSender */
-
-#ifndef _Included_dev_onvoid_webrtc_RTCRtpSender
-#define _Included_dev_onvoid_webrtc_RTCRtpSender
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_RTCRtpSender
- * Method: getTrack
- * Signature: ()Ldev/onvoid/webrtc/media/MediaStreamTrack;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpSender_getTrack
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpSender
- * Method: getTransport
- * Signature: ()Ldev/onvoid/webrtc/RTCDtlsTransport;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpSender_getTransport
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpSender
- * Method: replaceTrack
- * Signature: (Ldev/onvoid/webrtc/media/MediaStreamTrack;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCRtpSender_replaceTrack
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpSender
- * Method: setParameters
- * Signature: (Ldev/onvoid/webrtc/RTCRtpSendParameters;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCRtpSender_setParameters
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpSender
- * Method: getParameters
- * Signature: ()Ldev/onvoid/webrtc/RTCRtpSendParameters;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpSender_getParameters
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpSender
- * Method: setStreams
- * Signature: (Ljava/util/List;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCRtpSender_setStreams
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpSender
- * Method: getDtmfSender
- * Signature: ()Ldev/onvoid/webrtc/RTCDtmfSender;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpSender_getDtmfSender
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_RTCRtpTransceiver.h b/webrtc-jni/src/main/cpp/include/JNI_RTCRtpTransceiver.h
deleted file mode 100644
index d0b7419..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_RTCRtpTransceiver.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_RTCRtpTransceiver */
-
-#ifndef _Included_dev_onvoid_webrtc_RTCRtpTransceiver
-#define _Included_dev_onvoid_webrtc_RTCRtpTransceiver
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: getMid
- * Signature: ()Ljava/lang/String;
- */
- JNIEXPORT jstring JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_getMid
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: getSender
- * Signature: ()Ldev/onvoid/webrtc/RTCRtpSender;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_getSender
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: getReceiver
- * Signature: ()Ldev/onvoid/webrtc/RTCRtpReceiver;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_getReceiver
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: getDirection
- * Signature: ()Ldev/onvoid/webrtc/RTCRtpTransceiverDirection;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_getDirection
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: setDirection
- * Signature: (Ldev/onvoid/webrtc/RTCRtpTransceiverDirection;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_setDirection
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: getCurrentDirection
- * Signature: ()Ldev/onvoid/webrtc/RTCRtpTransceiverDirection;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_getCurrentDirection
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: stop
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_stop
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: stopped
- * Signature: ()Z
- */
- JNIEXPORT jboolean JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_stopped
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: getCodecPreferences
- * Signature: ()Ljava/util/List;
- */
- JNIEXPORT jobject JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_getCodecPreferences
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_RTCRtpTransceiver
- * Method: setCodecPreferences
- * Signature: (Ljava/util/List;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_RTCRtpTransceiver_setCodecPreferences
- (JNIEnv *, jobject, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_ScreenCapturer.h b/webrtc-jni/src/main/cpp/include/JNI_ScreenCapturer.h
deleted file mode 100644
index ccb0af3..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_ScreenCapturer.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_desktop_ScreenCapturer */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_desktop_ScreenCapturer
-#define _Included_dev_onvoid_webrtc_media_video_desktop_ScreenCapturer
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_ScreenCapturer
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_ScreenCapturer_initialize
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_SyncClock.h b/webrtc-jni/src/main/cpp/include/JNI_SyncClock.h
deleted file mode 100644
index 04a62b4..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_SyncClock.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_SyncClock */
-
-#ifndef _Included_dev_onvoid_webrtc_media_SyncClock
-#define _Included_dev_onvoid_webrtc_media_SyncClock
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_SyncClock
- * Method: getTimestampUs
- * Signature: ()J
- */
- JNIEXPORT jlong JNICALL Java_dev_onvoid_webrtc_media_SyncClock_getTimestampUs
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_SyncClock
- * Method: getTimestampMs
- * Signature: ()J
- */
- JNIEXPORT jlong JNICALL Java_dev_onvoid_webrtc_media_SyncClock_getTimestampMs
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_SyncClock
- * Method: getNtpTime
- * Signature: ()J
- */
- JNIEXPORT jlong JNICALL Java_dev_onvoid_webrtc_media_SyncClock_getNtpTime
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_SyncClock
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_SyncClock_dispose
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_SyncClock
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_SyncClock_initialize
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/JNI_VideoBufferConverter.h b/webrtc-jni/src/main/cpp/include/JNI_VideoBufferConverter.h
deleted file mode 100644
index 8373597..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_VideoBufferConverter.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_VideoBufferConverter */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_VideoBufferConverter
-#define _Included_dev_onvoid_webrtc_media_video_VideoBufferConverter
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoBufferConverter
- * Method: I420toByteArray
- * Signature: (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;I[BIII)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoBufferConverter_I420toByteArray
- (JNIEnv *, jclass, jobject, jint, jobject, jint, jobject, jint, jbyteArray, jint, jint, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoBufferConverter
- * Method: I420toDirectBuffer
- * Signature: (Ljava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;III)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoBufferConverter_I420toDirectBuffer
- (JNIEnv *, jclass, jobject, jint, jobject, jint, jobject, jint, jobject, jint, jint, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoBufferConverter
- * Method: byteArrayToI420
- * Signature: ([BIILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;II)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoBufferConverter_byteArrayToI420
- (JNIEnv *, jclass, jbyteArray, jint, jint, jobject, jint, jobject, jint, jobject, jint, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoBufferConverter
- * Method: directBufferToI420
- * Signature: (Ljava/nio/ByteBuffer;IILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;ILjava/nio/ByteBuffer;II)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoBufferConverter_directBufferToI420
- (JNIEnv *, jclass, jobject, jint, jint, jobject, jint, jobject, jint, jobject, jint, jint);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_VideoCapture.h b/webrtc-jni/src/main/cpp/include/JNI_VideoCapture.h
deleted file mode 100644
index 8371bc7..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_VideoCapture.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_VideoCapture */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_VideoCapture
-#define _Included_dev_onvoid_webrtc_media_video_VideoCapture
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoCapture
- * Method: setVideoCaptureDevice
- * Signature: (Ldev/onvoid/webrtc/media/video/VideoDevice;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoCapture_setVideoCaptureDevice
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoCapture
- * Method: setVideoCaptureCapability
- * Signature: (Ldev/onvoid/webrtc/media/video/VideoCaptureCapability;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoCapture_setVideoCaptureCapability
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoCapture
- * Method: setVideoSink
- * Signature: (Ldev/onvoid/webrtc/media/video/VideoTrackSink;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoCapture_setVideoSink
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoCapture
- * Method: start
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoCapture_start
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoCapture
- * Method: stop
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoCapture_stop
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoCapture
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoCapture_dispose
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoCapture
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoCapture_initialize
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_VideoDesktopSource.h b/webrtc-jni/src/main/cpp/include/JNI_VideoDesktopSource.h
deleted file mode 100644
index b255b3e..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_VideoDesktopSource.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_VideoDesktopSource */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_VideoDesktopSource
-#define _Included_dev_onvoid_webrtc_media_video_VideoDesktopSource
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDesktopSource
- * Method: setSourceId
- * Signature: (JZ)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDesktopSource_setSourceId
- (JNIEnv*, jobject, jlong, jboolean);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDesktopSource
- * Method: setFrameRate
- * Signature: (I)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDesktopSource_setFrameRate
- (JNIEnv*, jobject, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDesktopSource
- * Method: setMaxFrameSize
- * Signature: (II)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDesktopSource_setMaxFrameSize
- (JNIEnv*, jobject, jint, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDesktopSource
- * Method: setFocusSelectedSource
- * Signature: (Z)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDesktopSource_setFocusSelectedSource
- (JNIEnv*, jobject, jboolean);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDesktopSource
- * Method: start
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDesktopSource_start
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDesktopSource
- * Method: stop
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDesktopSource_stop
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDesktopSource
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDesktopSource_dispose
- (JNIEnv*, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDesktopSource
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDesktopSource_initialize
- (JNIEnv*, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_VideoDeviceSource.h b/webrtc-jni/src/main/cpp/include/JNI_VideoDeviceSource.h
deleted file mode 100644
index 3c1b300..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_VideoDeviceSource.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_VideoDeviceSource */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_VideoDeviceSource
-#define _Included_dev_onvoid_webrtc_media_video_VideoDeviceSource
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDeviceSource
- * Method: setVideoCaptureDevice
- * Signature: (Ldev/onvoid/webrtc/media/video/VideoDevice;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDeviceSource_setVideoCaptureDevice
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDeviceSource
- * Method: setVideoCaptureCapability
- * Signature: (Ldev/onvoid/webrtc/media/video/VideoCaptureCapability;)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDeviceSource_setVideoCaptureCapability
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDeviceSource
- * Method: start
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDeviceSource_start
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDeviceSource
- * Method: stop
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDeviceSource_stop
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDeviceSource
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDeviceSource_dispose
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoDeviceSource
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoDeviceSource_initialize
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_VideoTrack.h b/webrtc-jni/src/main/cpp/include/JNI_VideoTrack.h
deleted file mode 100644
index 5333b3d..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_VideoTrack.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_VideoTrack */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_VideoTrack
-#define _Included_dev_onvoid_webrtc_media_video_VideoTrack
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoTrack
- * Method: addSinkInternal
- * Signature: (Ldev/onvoid/webrtc/media/video/VideoTrackSink;)J
- */
- JNIEXPORT jlong JNICALL Java_dev_onvoid_webrtc_media_video_VideoTrack_addSinkInternal
- (JNIEnv *, jobject, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_video_VideoTrack
- * Method: removeSinkInternal
- * Signature: (J)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_VideoTrack_removeSinkInternal
- (JNIEnv *, jobject, jlong);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/JNI_VoiceActivityDetector.h b/webrtc-jni/src/main/cpp/include/JNI_VoiceActivityDetector.h
deleted file mode 100644
index ccda4dd..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_VoiceActivityDetector.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_audio_VoiceActivityDetector */
-
-#ifndef _Included_dev_onvoid_webrtc_media_audio_VoiceActivityDetector
-#define _Included_dev_onvoid_webrtc_media_audio_VoiceActivityDetector
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_audio_VoiceActivityDetector
- * Method: process
- * Signature: ([BII)V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_VoiceActivityDetector_process
- (JNIEnv *, jobject, jbyteArray, jint, jint);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_VoiceActivityDetector
- * Method: getLastVoiceProbability
- * Signature: ()F
- */
- JNIEXPORT jfloat JNICALL Java_dev_onvoid_webrtc_media_audio_VoiceActivityDetector_getLastVoiceProbability
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_VoiceActivityDetector
- * Method: dispose
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_VoiceActivityDetector_dispose
- (JNIEnv *, jobject);
-
- /*
- * Class: dev_onvoid_webrtc_media_audio_VoiceActivityDetector
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_audio_VoiceActivityDetector_initialize
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/JNI_WebRTC.h b/webrtc-jni/src/main/cpp/include/JNI_WebRTC.h
index 0eb3888..26405d1 100644
--- a/webrtc-jni/src/main/cpp/include/JNI_WebRTC.h
+++ b/webrtc-jni/src/main/cpp/include/JNI_WebRTC.h
@@ -20,10 +20,6 @@
#define PKG "dev/onvoid/webrtc/"
#define PKG_INTERNAL "dev/onvoid/webrtc/internal/"
#define PKG_LOG "dev/onvoid/webrtc/logging/"
-#define PKG_MEDIA "dev/onvoid/webrtc/media/"
-#define PKG_AUDIO "dev/onvoid/webrtc/media/audio/"
-#define PKG_VIDEO "dev/onvoid/webrtc/media/video/"
-#define PKG_DESKTOP "dev/onvoid/webrtc/media/video/desktop/"
#define BOOLEAN_SIG "Ljava/lang/Boolean;"
#define DOUBLE_SIG "Ljava/lang/Double;"
diff --git a/webrtc-jni/src/main/cpp/include/JNI_WindowCapturer.h b/webrtc-jni/src/main/cpp/include/JNI_WindowCapturer.h
deleted file mode 100644
index ed7bdda..0000000
--- a/webrtc-jni/src/main/cpp/include/JNI_WindowCapturer.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* DO NOT EDIT THIS FILE - it is machine generated */
-#include
-/* Header for class dev_onvoid_webrtc_media_video_desktop_WindowCapturer */
-
-#ifndef _Included_dev_onvoid_webrtc_media_video_desktop_WindowCapturer
-#define _Included_dev_onvoid_webrtc_media_video_desktop_WindowCapturer
-#ifdef __cplusplus
-extern "C" {
-#endif
- /*
- * Class: dev_onvoid_webrtc_media_video_desktop_WindowCapturer
- * Method: initialize
- * Signature: ()V
- */
- JNIEXPORT void JNICALL Java_dev_onvoid_webrtc_media_video_desktop_WindowCapturer_initialize
- (JNIEnv *, jobject);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/WebRTCContext.h b/webrtc-jni/src/main/cpp/include/WebRTCContext.h
index 9b7d405..03a78d9 100644
--- a/webrtc-jni/src/main/cpp/include/WebRTCContext.h
+++ b/webrtc-jni/src/main/cpp/include/WebRTCContext.h
@@ -19,45 +19,24 @@
#include "JavaContext.h"
#include "api/environment/environment.h"
-#include "media/audio/AudioDeviceManager.h"
-#include "media/video/VideoDeviceManager.h"
-#include "media/video/desktop/PowerManagement.h"
#include
#include
-#include
namespace jni
{
- class WebRTCContext : public JavaContext
- {
- public:
- WebRTCContext(JavaVM * vm);
- ~WebRTCContext() = default;
-
- void initialize(JNIEnv * env) override;
- void initializeClassLoader(JNIEnv* env, const char * loaderName) override;
- void destroy(JNIEnv * env) override;
-
- avdev::AudioDeviceManager * getAudioDeviceManager();
- avdev::VideoDeviceManager * getVideoDeviceManager();
- avdev::PowerManagement * getPowerManagement();
-
- const webrtc::Environment webrtcEnv;
-
- private:
- void initializeAudioManager();
- void initializeVideoManager();
- void initializePowerManagement();
-
- private:
- std::mutex aMutex;
- std::mutex vMutex;
- std::unique_ptr audioDevManager;
- std::unique_ptr videoDevManager;
- std::unique_ptr powerManagement;
- };
+ class WebRTCContext : public JavaContext
+ {
+ public:
+ WebRTCContext(JavaVM * vm);
+ ~WebRTCContext() = default;
+
+ void initialize(JNIEnv * env) override;
+ void initializeClassLoader(JNIEnv* env, const char * loaderName) override;
+ void destroy(JNIEnv * env) override;
+
+ const webrtc::Environment webrtcEnv;
+ };
}
#endif
-
diff --git a/webrtc-jni/src/main/cpp/include/api/AudioOptions.h b/webrtc-jni/src/main/cpp/include/api/AudioOptions.h
deleted file mode 100644
index 1c5e645..0000000
--- a/webrtc-jni/src/main/cpp/include/api/AudioOptions.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_AUDIO_OPTIONS_H_
-#define JNI_WEBRTC_API_AUDIO_OPTIONS_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/audio_options.h"
-
-#include
-
-namespace jni
-{
- namespace AudioOptions
- {
- class JavaAudioOptionsClass : public JavaClass
- {
- public:
- explicit JavaAudioOptionsClass(JNIEnv * env);
-
- jclass cls;
- jfieldID echoCancellation;
- jfieldID autoGainControl;
- jfieldID noiseSuppression;
- jfieldID highpassFilter;
- jfieldID typingDetection;
- jfieldID residualEchoDetector;
- };
-
- webrtc::AudioOptions toNative(JNIEnv * env, const JavaRef & javaType);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/AudioTrackSink.h b/webrtc-jni/src/main/cpp/include/api/AudioTrackSink.h
deleted file mode 100644
index fc65fe9..0000000
--- a/webrtc-jni/src/main/cpp/include/api/AudioTrackSink.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_AUDIO_TRACK_SINK_H_
-#define JNI_WEBRTC_API_AUDIO_TRACK_SINK_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/media_stream_interface.h"
-
-#include
-
-namespace jni
-{
- class AudioTrackSink : public webrtc::AudioTrackSinkInterface
- {
- public:
- AudioTrackSink(JNIEnv * env, const JavaGlobalRef & sink);
- ~AudioTrackSink() = default;
-
- // AudioTrackSinkInterface implementation.
- void OnData(const void * data, int bitsPerSample, int sampleRate, size_t channels, size_t frames) override;
-
- private:
- class JavaAudioTrackSinkClass : public JavaClass
- {
- public:
- explicit JavaAudioTrackSinkClass(JNIEnv * env);
-
- jmethodID onData;
- };
-
- private:
- JavaGlobalRef sink;
-
- const std::shared_ptr javaClass;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/HeadlessAudioDeviceModule.h b/webrtc-jni/src/main/cpp/include/api/HeadlessAudioDeviceModule.h
deleted file mode 100644
index c3ae3c3..0000000
--- a/webrtc-jni/src/main/cpp/include/api/HeadlessAudioDeviceModule.h
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_HEADLESS_ADM_H_
-#define JNI_WEBRTC_API_HEADLESS_ADM_H_
-
-#include
-#include
-#include
-#include
-#include
-
-#include "api/environment/environment.h"
-#include "api/environment/environment_factory.h"
-#include "api/make_ref_counted.h"
-#include "modules/audio_device/audio_device_buffer.h"
-#include "modules/audio_device/include/audio_device.h"
-#include "modules/audio_device/include/audio_device_defines.h"
-#include "rtc_base/buffer.h"
-#include "rtc_base/platform_thread.h"
-#include "rtc_base/ref_counted_object.h"
-#include "rtc_base/synchronization/mutex.h"
-#include "rtc_base/thread.h"
-#include "rtc_base/time_utils.h"
-
-namespace jni
-{
- // A headless AudioDeviceModule that drives the render pipeline by pulling
- // 10 ms PCM chunks from AudioTransport and discarding them, and simulates
- // a microphone by pulling 10 ms PCM chunks from the registered AudioTransport
- // and feeding them into the WebRTC capture pipeline.
- class HeadlessAudioDeviceModule : public webrtc::AudioDeviceModule
- {
- public:
- static webrtc::scoped_refptr Create(
- const webrtc::Environment & env,
- int sample_rate_hz = 48000,
- size_t channels = 1)
- {
- return webrtc::make_ref_counted(
- env, sample_rate_hz, channels);
- }
-
- HeadlessAudioDeviceModule(const webrtc::Environment & env, int sample_rate_hz, size_t channels);
- ~HeadlessAudioDeviceModule() override;
-
- // ----- AudioDeviceModule interface -----
- int32_t ActiveAudioLayer(webrtc::AudioDeviceModule::AudioLayer * audioLayer) const override;
- int32_t RegisterAudioCallback(webrtc::AudioTransport * audioCallback) override;
- int32_t Init() override;
- int32_t Terminate() override;
- bool Initialized() const override;
-
- // --- Device enumeration (stubbed; 1 virtual output device) ---
- int16_t PlayoutDevices() override;
- int16_t RecordingDevices() override;
- int32_t PlayoutDeviceName(uint16_t index,
- char name[webrtc::kAdmMaxDeviceNameSize],
- char guid[webrtc::kAdmMaxGuidSize]) override;
- int32_t RecordingDeviceName(uint16_t index,
- char name[webrtc::kAdmMaxDeviceNameSize],
- char guid[webrtc::kAdmMaxGuidSize]) override;
-
- // --- Device selection (recording not supported) ---
- int32_t SetPlayoutDevice(uint16_t index) override;
- int32_t SetPlayoutDevice(WindowsDeviceType device) override;
- int32_t SetRecordingDevice(uint16_t index) override;
- int32_t SetRecordingDevice(WindowsDeviceType device) override;
-
- // --- Audio transport initialization ---
- int32_t PlayoutIsAvailable(bool * available) override;
- int32_t InitPlayout() override;
- bool PlayoutIsInitialized() const override;
- int32_t RecordingIsAvailable(bool * available) override;
- int32_t InitRecording() override;
- bool RecordingIsInitialized() const override;
-
- // --- Audio transport control (playout only) ---
- int32_t StartPlayout() override;
- int32_t StopPlayout() override;
- bool Playing() const override;
- int32_t StartRecording() override;
- int32_t StopRecording() override;
- bool Recording() const override;
-
- // --- Mixer init (report success; nothing to init physically) ---
- int32_t InitSpeaker() override;
- bool SpeakerIsInitialized() const override;
- int32_t InitMicrophone() override;
- bool MicrophoneIsInitialized() const override;
-
- // --- Speaker volume (not supported) ---
- int32_t SpeakerVolumeIsAvailable(bool * available) override;
- int32_t SetSpeakerVolume(uint32_t volume) override;
- int32_t SpeakerVolume(uint32_t * volume) const override;
- int32_t MaxSpeakerVolume(uint32_t * maxVolume) const override;
- int32_t MinSpeakerVolume(uint32_t * minVolume) const override;
-
- // --- Microphone volume (not supported) ---
- int32_t MicrophoneVolumeIsAvailable(bool * available) override;
- int32_t SetMicrophoneVolume(uint32_t volume) override;
- int32_t MicrophoneVolume(uint32_t * volume) const override;
- int32_t MaxMicrophoneVolume(uint32_t * maxVolume) const override;
- int32_t MinMicrophoneVolume(uint32_t * minVolume) const override;
-
- // --- Mute controls (not supported) ---
- int32_t SpeakerMuteIsAvailable(bool * available) override;
- int32_t SetSpeakerMute(bool enable) override;
- int32_t SpeakerMute(bool * enabled) const override;
- int32_t MicrophoneMuteIsAvailable(bool * available) override;
- int32_t SetMicrophoneMute(bool enable) override;
- int32_t MicrophoneMute(bool * enabled) const override;
-
- // --- Stereo support (playout only) ---
- int32_t StereoPlayoutIsAvailable(bool * available) const override;
- int32_t SetStereoPlayout(bool enable) override;
- int32_t StereoPlayout(bool * enabled) const override;
- int32_t StereoRecordingIsAvailable(bool * available) const override;
- int32_t SetStereoRecording(bool enable) override;
- int32_t StereoRecording(bool * enabled) const override;
-
- // --- Playout delay (fixed, nominal) ---
- int32_t PlayoutDelay(uint16_t * delayMS) const override;
-
- // --- Built-in effects (not supported here) ---
- bool BuiltInAECIsAvailable() const override;
- bool BuiltInAGCIsAvailable() const override;
- bool BuiltInNSIsAvailable() const override;
- int32_t EnableBuiltInAEC(bool enable) override;
- int32_t EnableBuiltInAGC(bool enable) override;
- int32_t EnableBuiltInNS(bool enable) override;
-
- // Android-only in real ADMs; just return 0 here.
- int32_t GetPlayoutUnderrunCount() const override;
-
- private:
- bool PlayThreadProcess();
- bool CaptureThreadProcess();
-
- // State
- bool initialized_ = false;
- bool playout_initialized_ = false;
- bool recording_initialized_ = false;
- bool playing_ = false;
- bool recording_ = false;
-
- // Format
- int sample_rate_hz_ = 48000;
- size_t channels_ = 1;
-
- webrtc::BufferT play_buffer_;
- webrtc::BufferT record_buffer_;
-
- size_t playoutFramesIn10MS_;
- size_t recordingFramesIn10MS_;
- int64_t lastCallPlayoutMillis_;
- int64_t lastCallRecordMillis_;
-
- mutable webrtc::Mutex mutex_;
- std::unique_ptr audio_device_buffer_ RTC_GUARDED_BY(mutex_);
- webrtc::AudioTransport * audio_callback_;
-
- webrtc::PlatformThread render_thread_;
- webrtc::PlatformThread capture_thread_;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/PeerConnectionObserver.h b/webrtc-jni/src/main/cpp/include/api/PeerConnectionObserver.h
index 55b5ef9..3f2f0d2 100644
--- a/webrtc-jni/src/main/cpp/include/api/PeerConnectionObserver.h
+++ b/webrtc-jni/src/main/cpp/include/api/PeerConnectionObserver.h
@@ -36,9 +36,6 @@ namespace jni
// PeerConnectionObserver implementation.
void OnConnectionChange(webrtc::PeerConnectionInterface::PeerConnectionState state) override;
void OnSignalingChange(webrtc::PeerConnectionInterface::SignalingState state) override;
- void OnTrack(webrtc::scoped_refptr transceiver) override;
- void OnAddTrack(webrtc::scoped_refptr receiver, const std::vector> & streams) override;
- void OnRemoveTrack(webrtc::scoped_refptr receiver) override;
void OnDataChannel(webrtc::scoped_refptr channel) override;
void OnRenegotiationNeeded() override;
void OnIceConnectionChange(webrtc::PeerConnectionInterface::IceConnectionState state) override;
@@ -56,9 +53,6 @@ namespace jni
jmethodID onConnectionChange;
jmethodID onSignalingChange;
- jmethodID onTrack;
- jmethodID onAddTrack;
- jmethodID onRemoveTrack;
jmethodID onDataChannel;
jmethodID onRenegotiationNeeded;
jmethodID onIceConnectionChange;
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCDtmfSender.h b/webrtc-jni/src/main/cpp/include/api/RTCDtmfSender.h
deleted file mode 100644
index 98cf6a2..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCDtmfSender.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_DTMF_SENDER_H_
-#define JNI_WEBRTC_API_RTC_DTMF_SENDER_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/dtmf_sender_interface.h"
-
-#include
-
-namespace jni
-{
- namespace RTCDtmfSender
- {
- class JavaRTCDtmfSenderClass : public JavaClass
- {
- public:
- explicit JavaRTCDtmfSenderClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- };
-
- JavaLocalRef toJava(JNIEnv * env);
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCDtmfSenderObserver.h b/webrtc-jni/src/main/cpp/include/api/RTCDtmfSenderObserver.h
deleted file mode 100644
index 994ea04..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCDtmfSenderObserver.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_DTMF_SENDER_OBSERVER_H_
-#define JNI_WEBRTC_API_RTC_DTMF_SENDER_OBSERVER_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/dtmf_sender_interface.h"
-
-#include
-#include
-
-namespace jni
-{
- class RTCDtmfSenderObserver : public webrtc::DtmfSenderObserverInterface
- {
- public:
- explicit RTCDtmfSenderObserver(JNIEnv * env, const JavaGlobalRef & observer);
- ~RTCDtmfSenderObserver() = default;
-
- // DtmfSenderObserverInterface implementation.
- void OnToneChange(const std::string & tone, const std::string & tone_buffer) override;
-
- private:
- class JavaRTCDtmfSenderObserverClass : public JavaClass
- {
- public:
- explicit JavaRTCDtmfSenderObserverClass(JNIEnv * env);
-
- jmethodID onToneChange;
- };
-
- private:
- JavaGlobalRef observer;
-
- const std::shared_ptr javaClass;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtcpParameters.h b/webrtc-jni/src/main/cpp/include/api/RTCRtcpParameters.h
deleted file mode 100644
index 598c3ec..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtcpParameters.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTCP_PARAMETERS_H_
-#define JNI_WEBRTC_API_RTC_RTCP_PARAMETERS_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtcpParameters
- {
- class JavaRTCRtcpParametersClass : public JavaClass
- {
- public:
- explicit JavaRTCRtcpParametersClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID cName;
- jfieldID reducedSize;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtcpParameters & parameters);
- webrtc::RtcpParameters toNative(JNIEnv * env, const JavaRef & parameters);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpCapabilities.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpCapabilities.h
deleted file mode 100644
index 437a15f..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpCapabilities.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_CAPABILITIES_H_
-#define JNI_WEBRTC_API_RTC_RTP_CAPABILITIES_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpCapabilities
- {
- class JavaRTCRtpCapabilitiesClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpCapabilitiesClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpCapabilities & capabilities);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpCodecCapability.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpCodecCapability.h
deleted file mode 100644
index 7a8dc62..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpCodecCapability.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_CODEC_CAPABILITY_H_
-#define JNI_WEBRTC_API_RTC_RTP_CODEC_CAPABILITY_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpCodecCapability
- {
- class JavaRTCRtpCodecCapabilityClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpCodecCapabilityClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID mediaType;
- jfieldID name;
- jfieldID clockRate;
- jfieldID channels;
- jfieldID sdpFmtp;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpCodecCapability & capability);
- webrtc::RtpCodecCapability toNative(JNIEnv * env, const JavaRef & capability);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpCodecParameters.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpCodecParameters.h
deleted file mode 100644
index 3503c61..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpCodecParameters.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_CODEC_PARAMETERS_H_
-#define JNI_WEBRTC_API_RTC_RTP_CODEC_PARAMETERS_H_
-
-#include "JavaClass.h"
-#include "JavaObject.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpCodecParameters
- {
- class JavaRTCRtpCodecParametersClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpCodecParametersClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID payloadType;
- jfieldID mediaType;
- jfieldID codecName;
- jfieldID clockRate;
- jfieldID channels;
- jfieldID parameters;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpCodecParameters & parameters);
- webrtc::RtpCodecParameters toNative(JNIEnv * env, const JavaRef & parameters);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpContributingSource.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpContributingSource.h
deleted file mode 100644
index 07cccd8..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpContributingSource.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_CONTRIBUTING_SOURCE_H_
-#define JNI_WEBRTC_API_RTC_RTP_CONTRIBUTING_SOURCE_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/transport/rtp/rtp_source.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpContributingSource
- {
- class JavaRTCRtpContributingSourceClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpContributingSourceClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID timestamp;
- jfieldID sourceId;
- jfieldID sourceType;
- jfieldID audioLevel;
- jfieldID rtpTimestamp;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpSource & source);
- webrtc::RtpSource toNative(JNIEnv * env, const JavaRef & source);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpEncodingParameters.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpEncodingParameters.h
deleted file mode 100644
index 6e2c4d4..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpEncodingParameters.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_ENCODING_PARAMETERS_H_
-#define JNI_WEBRTC_API_RTC_RTP_ENCODING_PARAMETERS_H_
-
-#include "JavaClass.h"
-#include "JavaObject.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpEncodingParameters
- {
- class JavaRTCRtpEncodingParametersClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpEncodingParametersClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID ssrc;
- jfieldID active;
- jfieldID minBitrate;
- jfieldID maxBitrate;
- jfieldID maxFramerate;
- jfieldID scaleResolution;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpEncodingParameters & parameters);
- webrtc::RtpEncodingParameters toNative(JNIEnv * env, const JavaRef & parameters);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpHeaderExtension.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpHeaderExtension.h
deleted file mode 100644
index a45d4df..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpHeaderExtension.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_HEADER_EXTENSION_H_
-#define JNI_WEBRTC_API_RTC_RTP_HEADER_EXTENSION_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpHeaderExtension
- {
- class JavaRTCRtpHeaderExtensionClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpHeaderExtensionClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID uri;
- jfieldID id;
- jfieldID encrypted;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpExtension & extension);
- webrtc::RtpExtension toNative(JNIEnv * env, const JavaRef & jExtension);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpHeaderExtensionCapability.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpHeaderExtensionCapability.h
deleted file mode 100644
index cd7c68f..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpHeaderExtensionCapability.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_HEADER_EXT_CAPABILITY_H_
-#define JNI_WEBRTC_API_RTC_RTP_HEADER_EXT_CAPABILITY_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpHeaderExtensionCapability
- {
- class JavaRTCRtpHeaderExtensionCapabilityClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpHeaderExtensionCapabilityClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpHeaderExtensionCapability & capability);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpParameters.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpParameters.h
deleted file mode 100644
index b1cb155..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpParameters.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_PARAMETERS_H_
-#define JNI_WEBRTC_API_RTC_RTP_PARAMETERS_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpParameters
- {
- class JavaRTCRtpParametersClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpParametersClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID headerExtensions;
- jfieldID rtcp;
- jfieldID codecs;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpParameters & parameters);
- webrtc::RtpParameters toNative(JNIEnv * env, const JavaRef & parameters);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpSendParameters.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpSendParameters.h
deleted file mode 100644
index 61ab494..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpSendParameters.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_SEND_PARAMETERS_H_
-#define JNI_WEBRTC_API_RTC_RTP_SEND_PARAMETERS_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/rtp_parameters.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpSendParameters
- {
- class JavaRTCRtpSendParametersClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpSendParametersClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID transactionId;
- jfieldID encodings;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpParameters & parameters);
- webrtc::RtpParameters toNative(JNIEnv * env, const JavaRef & parameters);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpSynchronizationSource.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpSynchronizationSource.h
deleted file mode 100644
index 760d4b4..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpSynchronizationSource.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_SYNCHRONIZATION_SOURCE_H_
-#define JNI_WEBRTC_API_RTC_RTP_SYNCHRONIZATION_SOURCE_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/transport/rtp/rtp_source.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpSynchronizationSource
- {
- class JavaRTCRtpSynchronizationSourceClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpSynchronizationSourceClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID voiceActivityFlag;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const webrtc::RtpSource & source);
- webrtc::RtpSource toNative(JNIEnv * env, const JavaRef & source);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/RTCRtpTransceiverInit.h b/webrtc-jni/src/main/cpp/include/api/RTCRtpTransceiverInit.h
deleted file mode 100644
index f8c0908..0000000
--- a/webrtc-jni/src/main/cpp/include/api/RTCRtpTransceiverInit.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_RTC_RTP_TRANSCEIVER_INIT_H_
-#define JNI_WEBRTC_API_RTC_RTP_TRANSCEIVER_INIT_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/rtp_transceiver_interface.h"
-
-#include
-
-namespace jni
-{
- namespace RTCRtpTransceiverInit
- {
- class JavaRTCRtpTransceiverInitClass : public JavaClass
- {
- public:
- explicit JavaRTCRtpTransceiverInitClass(JNIEnv * env);
-
- jclass cls;
- jfieldID direction;
- jfieldID streamIds;
- jfieldID sendEncodings;
- };
-
- webrtc::RtpTransceiverInit toNative(JNIEnv * env, const JavaRef & javaType);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/VideoFrame.h b/webrtc-jni/src/main/cpp/include/api/VideoFrame.h
deleted file mode 100644
index 6be8e88..0000000
--- a/webrtc-jni/src/main/cpp/include/api/VideoFrame.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_VIDEO_FRAME_H_
-#define JNI_WEBRTC_API_VIDEO_FRAME_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/video/video_frame.h"
-#include "api/video/video_frame_buffer.h"
-
-#include
-
-namespace jni
-{
- namespace VideoFrame
- {
- webrtc::VideoFrame toNative(JNIEnv * env, const JavaRef & javaFrame);
- }
-
- namespace I420Buffer
- {
- JavaLocalRef toJava(JNIEnv * env, const webrtc::scoped_refptr & buffer);
- }
-
- class JavaVideoFrameClass : public JavaClass
- {
- public:
- explicit JavaVideoFrameClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID buffer;
- jfieldID rotation;
- jfieldID timestampNs;
- };
-
- class JavaNativeI420BufferClass : public JavaClass
- {
- public:
- explicit JavaNativeI420BufferClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID dataY;
- jfieldID dataU;
- jfieldID dataV;
- jfieldID strideY;
- jfieldID strideU;
- jfieldID strideV;
- jfieldID width;
- jfieldID height;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/api/VideoTrackSink.h b/webrtc-jni/src/main/cpp/include/api/VideoTrackSink.h
deleted file mode 100644
index a224d21..0000000
--- a/webrtc-jni/src/main/cpp/include/api/VideoTrackSink.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_VIDEO_TRACK_SINK_H_
-#define JNI_WEBRTC_API_VIDEO_TRACK_SINK_H_
-
-#include "api/VideoFrame.h"
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/video/video_frame.h"
-#include "api/video/video_sink_interface.h"
-
-#include
-
-namespace jni
-{
- class VideoTrackSink : public webrtc::VideoSinkInterface
- {
- public:
- VideoTrackSink(JNIEnv * env, const JavaGlobalRef & sink);
- ~VideoTrackSink() = default;
-
- // VideoSinkInterface implementation.
- void OnFrame(const webrtc::VideoFrame & frame) override;
-
- private:
- class JavaVideoTrackSinkClass : public JavaClass
- {
- public:
- JavaVideoTrackSinkClass(JNIEnv * env);
-
- jmethodID onFrame;
- };
-
- private:
- JavaGlobalRef sink;
-
- const std::shared_ptr javaClass;
- const std::shared_ptr javaFrameClass;
- const std::shared_ptr javaBufferClass;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/Device.h b/webrtc-jni/src/main/cpp/include/media/Device.h
deleted file mode 100644
index a8f5896..0000000
--- a/webrtc-jni/src/main/cpp/include/media/Device.h
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_DEVICE_H_
-#define JNI_WEBRTC_MEDIA_DEVICE_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include
-#include
-#include
-
-namespace jni
-{
- namespace avdev
- {
- /**
- DeviceTransport and DeviceFormFactor only for audio devices.
- */
- enum class DeviceTransport {
- trUnknown,
- trHdmi,
- trUsb,
- trWireless,
- };
-
- enum class DeviceFormFactor {
- ffUnknown,
- ffSpeaker,
- ffMicrophone,
- ffHeadset,
- ffHeadphone
- };
-
- class Device
- {
- public:
- virtual ~Device() {};
-
- virtual bool operator==(const Device & other);
- virtual bool operator!=(const Device & other);
- virtual bool operator<(const Device & other);
-
- std::string getName() const;
- std::string getDescriptor() const;
- DeviceTransport getDeviceTransport();
- DeviceFormFactor getDeviceFormFactor();
- void setDeviceTransport(DeviceTransport deviceTransport);
- void setDeviceFormFactor(DeviceFormFactor deviceFormFactor);
-
- protected:
- Device(std::string name, std::string descriptor);
-
- private:
- const std::string name;
- const std::string descriptor;
- DeviceTransport deviceTransport;
- DeviceFormFactor deviceFormFactor;
- };
-
-
- using DevicePtr = std::shared_ptr;
- }
-
- namespace Device
- {
- class JavaDeviceClass : public JavaClass
- {
- public:
- explicit JavaDeviceClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID name;
- jfieldID descriptor;
- jfieldID deviceTransport;
- jfieldID deviceFormFactor;
- };
-
- JavaLocalRef toJavaDevice(JNIEnv * env, avdev::DevicePtr device);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/DeviceChangeListener.h b/webrtc-jni/src/main/cpp/include/media/DeviceChangeListener.h
deleted file mode 100644
index 65a5a9f..0000000
--- a/webrtc-jni/src/main/cpp/include/media/DeviceChangeListener.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_DEVICE_CHANGE_LISTENER_H_
-#define JNI_WEBRTC_MEDIA_DEVICE_CHANGE_LISTENER_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "media/DeviceHotplugListener.h"
-
-#include
-#include
-
-namespace jni
-{
-
- class DeviceChangeListener : public avdev::DeviceHotplugListener
- {
- public:
- explicit DeviceChangeListener(JNIEnv * env, const JavaGlobalRef & listener);
- ~DeviceChangeListener() = default;
-
- // DeviceHotplugListener implementation.
- void deviceConnected(avdev::DevicePtr device) override;
- void deviceDisconnected(avdev::DevicePtr device) override;
-
- private:
- class JavaDeviceChangeListenerClass : public JavaClass
- {
- public:
- explicit JavaDeviceChangeListenerClass(JNIEnv * env);
-
- jmethodID deviceConnected;
- jmethodID deviceDisconnected;
- };
-
- private:
- JavaGlobalRef listener;
-
- const std::shared_ptr javaClass;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/DeviceHotplugListener.h b/webrtc-jni/src/main/cpp/include/media/DeviceHotplugListener.h
deleted file mode 100644
index cdc3071..0000000
--- a/webrtc-jni/src/main/cpp/include/media/DeviceHotplugListener.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_DEVICE_HOTPLUG_LISTENER_H_
-#define JNI_WEBRTC_MEDIA_DEVICE_HOTPLUG_LISTENER_H_
-
-#include "media/Device.h"
-
-#include
-
-namespace jni
-{
- namespace avdev
- {
- class DeviceHotplugListener
- {
- public:
- virtual ~DeviceHotplugListener() {};
-
- virtual void deviceConnected(DevicePtr device) = 0;
- virtual void deviceDisconnected(DevicePtr device) = 0;
- };
-
-
- using PDeviceHotplugListener = std::shared_ptr;
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/DeviceList.h b/webrtc-jni/src/main/cpp/include/media/DeviceList.h
deleted file mode 100644
index b6b9178..0000000
--- a/webrtc-jni/src/main/cpp/include/media/DeviceList.h
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_DEVICE_LIST_H_
-#define JNI_WEBRTC_MEDIA_DEVICE_LIST_H_
-
-#include
-#include
-#include
-
-namespace jni
-{
- template
- class DeviceList
- {
- public:
- DeviceList() = default;
- virtual ~DeviceList() = default;
-
- bool insertDevice(T device)
- {
- std::unique_lock mlock(mutex);
- auto result = devicesSet.insert(device);
- mlock.unlock();
-
- return result.second;
- }
-
- bool removeDevice(T device)
- {
- std::unique_lock mlock(mutex);
- size_t result = devicesSet.erase(device);
- mlock.unlock();
-
- return result;
- }
-
- T removeDevice(std::function pred)
- {
- T device = nullptr;
-
- std::unique_lock mlock(mutex);
-
- for (auto it = devicesSet.begin(), end = devicesSet.end(); it != end; ) {
- if (pred(*it)) {
- device = *it;
- devicesSet.erase(it);
- break;
- }
- else {
- ++it;
- }
- }
-
- mlock.unlock();
-
- return device;
- }
-
- template
- T findDevice(Predicate pred)
- {
- T device = nullptr;
-
- std::unique_lock mlock(mutex);
-
- typename std::set::iterator it = std::find_if(devicesSet.begin(), devicesSet.end(), pred);
- if (it != devicesSet.end()) {
- device = *it;
- }
-
- mlock.unlock();
-
- return device;
- }
-
- bool empty()
- {
- std::unique_lock mlock(mutex);
-
- return devicesSet.empty();
- }
-
- void clearDevices()
- {
- std::unique_lock mlock(mutex);
- devicesSet.clear();
- mlock.unlock();
- }
-
- std::set devices()
- {
- std::unique_lock mlock(mutex);
-
- return devicesSet;
- }
-
- private:
- std::set devicesSet;
- std::mutex mutex;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/DeviceManager.h b/webrtc-jni/src/main/cpp/include/media/DeviceManager.h
deleted file mode 100644
index a4482ff..0000000
--- a/webrtc-jni/src/main/cpp/include/media/DeviceManager.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_DEVICE_MANAGER_H_
-#define JNI_WEBRTC_MEDIA_DEVICE_MANAGER_H_
-
-#include
-#include
-
-#include "media/DeviceHotplugListener.h"
-
-namespace jni
-{
- namespace avdev
- {
- enum DeviceEvent
- {
- Connected,
- Disconnected
- };
-
- class DeviceManager
- {
- public:
- virtual ~DeviceManager() {};
-
- void attachHotplugListener(PDeviceHotplugListener listener);
- void detachHotplugListener(PDeviceHotplugListener listener);
-
- protected:
- void notifyDeviceConnected(DevicePtr device);
- void notifyDeviceDisconnected(DevicePtr device);
-
- private:
- void notifyListeners(DevicePtr device, const DeviceEvent event);
-
- std::list> hotplugListeners;
- };
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/MediaStreamTrackObserver.h b/webrtc-jni/src/main/cpp/include/media/MediaStreamTrackObserver.h
deleted file mode 100644
index 041fde2..0000000
--- a/webrtc-jni/src/main/cpp/include/media/MediaStreamTrackObserver.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2022 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_STREAM_TRACK_LISTENER_H_
-#define JNI_WEBRTC_MEDIA_STREAM_TRACK_LISTENER_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "api/media_stream_interface.h"
-
-#include
-#include
-
-namespace jni
-{
- enum class MediaStreamTrackEvent {
- ended,
- mute
- };
-
- class MediaStreamTrackObserver : public webrtc::ObserverInterface
- {
- public:
- explicit MediaStreamTrackObserver(JNIEnv * env, const JavaGlobalRef & javaTrack, const webrtc::MediaStreamTrackInterface * track, const MediaStreamTrackEvent & eventType);
- ~MediaStreamTrackObserver() = default;
-
- // ObserverInterface implementation.
- void OnChanged() override;
-
- private:
- class JavaMediaStreamTrackListenerClass : public JavaClass
- {
- public:
- explicit JavaMediaStreamTrackListenerClass(JNIEnv * env);
-
- jmethodID onTrackEnd;
- jmethodID onTrackMute;
- };
-
- JavaLocalRef createJavaTrack(JNIEnv * env);
-
- private:
- const JavaGlobalRef javaTrack;
- const webrtc::MediaStreamTrackInterface * track;
- const MediaStreamTrackEvent eventType;
- const std::shared_ptr javaClass;
- webrtc::MediaStreamTrackInterface::TrackState trackState;
- bool trackEnabled;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/SyncClock.h b/webrtc-jni/src/main/cpp/include/media/SyncClock.h
deleted file mode 100644
index 283a933..0000000
--- a/webrtc-jni/src/main/cpp/include/media/SyncClock.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_SYNC_CLOCK_H_
-#define JNI_WEBRTC_MEDIA_SYNC_CLOCK_H_
-
-#include "system_wrappers/include/clock.h"
-#include "system_wrappers/include/ntp_time.h"
-
-#include
-
-namespace jni
-{
- // Synchronized Clock for A/V timing
- class SyncClock
- {
- public:
- SyncClock();
-
- // Get current timestamp in microseconds
- int64_t GetTimestampUs() const;
-
- // Get current timestamp in milliseconds
- int64_t GetTimestampMs() const;
-
- // Get NTP timestamp for RTP synchronization
- webrtc::NtpTime GetNtpTime() const;
-
- private:
- std::chrono::steady_clock::time_point start_time_;
- };
-}
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioConverter.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioConverter.h
deleted file mode 100644
index fa496ec..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioConverter.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_CONVERTER_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_CONVERTER_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include
-
-namespace jni
-{
- class AudioConverter
- {
- public:
- AudioConverter(const AudioConverter&) = delete;
- AudioConverter& operator=(const AudioConverter&) = delete;
-
- static std::unique_ptr create(size_t srcFrames, size_t srcChannels, size_t dstFrames, size_t dstChannels);
-
- virtual ~AudioConverter() = default;
-
- virtual void convert(const int16_t * src, size_t srcSize, int16_t * dst, size_t dstSize) = 0;
-
- size_t getSrcChannels() const { return srcChannels; }
- size_t getSrcFrames() const { return srcFrames; }
- size_t getDstChannels() const { return dstChannels; }
- size_t getDstFrames() const { return dstFrames; }
-
- protected:
- AudioConverter();
- AudioConverter(size_t srcFrames, size_t srcChannels, size_t dstFrames, size_t dstChannels);
-
- void checkSizes(size_t srcSize, size_t dstCapacity) const;
-
- const size_t srcFrames;
- const size_t srcChannels;
- const size_t dstFrames;
- const size_t dstChannels;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioDevice.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioDevice.h
deleted file mode 100644
index 2edf487..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioDevice.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_DEVICE_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_DEVICE_H_
-
-#include "media/Device.h"
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include
-
-namespace jni
-{
- namespace avdev
- {
-
- enum class AudioDeviceDirectionType {
- adtUnknown,
- adtCapture,
- adtRender
- };
-
- class AudioDevice : public Device
- {
- public:
- AudioDevice(std::string name, std::string descriptor);
- virtual ~AudioDevice() {};
- AudioDeviceDirectionType directionType;
- };
- }
-
- namespace AudioDevice
- {
- class JavaAudioDeviceClass : public JavaClass
- {
- public:
- explicit JavaAudioDeviceClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID name;
- jfieldID descriptor;
- jfieldID deviceTransport;
- jfieldID deviceFormFactor;
- jfieldID directionType;
- };
-
- JavaLocalRef toJavaAudioDevice(JNIEnv * env, avdev::DevicePtr device);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioDeviceManager.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioDeviceManager.h
deleted file mode 100644
index e2b3f5a..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioDeviceManager.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_DEVICE_MANAGER_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_DEVICE_MANAGER_H_
-
-#include "media/DeviceManager.h"
-#include "media/DeviceList.h"
-#include "media/audio/AudioDevice.h"
-
-#include
-#include
-
-namespace jni
-{
- namespace avdev
- {
- using AudioDevicePtr = std::shared_ptr;
-
-
- class AudioDeviceManager : public DeviceManager
- {
- public:
- AudioDeviceManager();
- virtual ~AudioDeviceManager() {};
-
- virtual AudioDevicePtr getDefaultAudioCaptureDevice();
- virtual AudioDevicePtr getDefaultAudioPlaybackDevice();
-
- virtual std::set getAudioCaptureDevices() = 0;
- virtual std::set getAudioPlaybackDevices() = 0;
-
- protected:
- void setDefaultCaptureDevice(AudioDevicePtr device);
- AudioDevicePtr getDefaultCaptureDevice();
-
- void setDefaultPlaybackDevice(AudioDevicePtr device);
- AudioDevicePtr getDefaultPlaybackDevice();
-
- DeviceList captureDevices;
- DeviceList playbackDevices;
-
- private:
- AudioDevicePtr defaultCaptureDevice;
- AudioDevicePtr defaultPlaybackDevice;
- std::mutex mutex;
- };
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessing.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessing.h
deleted file mode 100644
index 4accfae..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessing.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_PROCESSING_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_PROCESSING_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "modules/audio_processing/include/audio_processing.h"
-
-#include
-
-namespace jni
-{
- namespace AudioProcessing
- {
- class JavaAudioProcessingClass : public JavaClass
- {
- public:
- explicit JavaAudioProcessingClass(JNIEnv * env);
-
- jclass cls;
- jfieldID stats;
- };
-
- void updateStats(const webrtc::AudioProcessingStats & stats, JNIEnv * env, const JavaRef & javaType);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingConfig.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingConfig.h
deleted file mode 100644
index 5fb98d1..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingConfig.h
+++ /dev/null
@@ -1,207 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_PROCESSING_CONFIG_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_PROCESSING_CONFIG_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "modules/audio_processing/include/audio_processing.h"
-
-#include
-
-namespace jni
-{
- namespace AudioProcessingConfig
- {
- class JavaAudioProcessingConfigClass : public JavaClass
- {
- public:
- explicit JavaAudioProcessingConfigClass(JNIEnv * env);
-
- jclass cls;
- jfieldID pipeline;
- jfieldID echoCanceller;
- jfieldID gainController;
- jfieldID gainControllerDigital;
- jfieldID highPassFilter;
- jfieldID noiseSuppression;
- jfieldID captureLevelAdjustment;
- };
-
- webrtc::AudioProcessing::Config toNative(JNIEnv * env, const JavaRef & javaType);
- webrtc::AudioProcessing::Config::Pipeline toPipeline(JNIEnv* env, const JavaLocalRef & javaType);
- webrtc::AudioProcessing::Config::GainController1 toGainController1(JNIEnv * env, const JavaLocalRef & javaType);
- webrtc::AudioProcessing::Config::GainController2 toGainController2(JNIEnv * env, const JavaLocalRef & javaType);
-
-
- class JavaPipelineClass : public JavaClass
- {
- public:
- explicit JavaPipelineClass(JNIEnv * env);
-
- jclass cls;
- jfieldID maximumInternalProcessingRate;
- jfieldID multiChannelRender;
- jfieldID multiChannelCapture;
- jfieldID captureDownmixMethod;
- };
-
- class JavaEchoCancellerClass : public JavaClass
- {
- public:
- explicit JavaEchoCancellerClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID enforceHighPassFiltering;
- };
-
- class JavaGainControllerDigitalClass : public JavaClass
- {
- public:
- explicit JavaGainControllerDigitalClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID inputVolumeController;
- jfieldID fixedDigital;
- jfieldID adaptiveDigital;
- };
-
- class JavaInputVolumeControllerClass : public JavaClass
- {
- public:
- explicit JavaInputVolumeControllerClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- };
-
- class JavaGainControlFixedDigitalClass : public JavaClass
- {
- public:
- explicit JavaGainControlFixedDigitalClass(JNIEnv * env);
-
- jclass cls;
- jfieldID gainDb;
- };
-
- class JavaGainControlAdaptiveDigitalClass : public JavaClass
- {
- public:
- explicit JavaGainControlAdaptiveDigitalClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID headroomDb;
- jfieldID maxGainDb;
- jfieldID initialGainDb;
- jfieldID maxGainChangeDbPerSecond;
- jfieldID maxOutputNoiseLevelDbfs;
- };
-
- class JavaGainControllerClass : public JavaClass
- {
- public:
- explicit JavaGainControllerClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID targetLevelDbfs;
- jfieldID compressionGainDb;
- jfieldID enableLimiter;
- jfieldID mode;
- jfieldID analogGainController;
- };
-
- class JavaAgc1AnalogGainControllerClass : public JavaClass
- {
- public:
- explicit JavaAgc1AnalogGainControllerClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID startupMinVolume;
- jfieldID clippedLevelMin;
- jfieldID enableDigitalAdaptive;
- jfieldID clippedLevelStep;
- jfieldID clippedRatioThreshold;
- jfieldID clippedWaitFrames;
- jfieldID clippingPredictor;
- };
-
- class JavaAgc1ClippingPredictorClass : public JavaClass
- {
- public:
- explicit JavaAgc1ClippingPredictorClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID mode;
- jfieldID windowLength;
- jfieldID referenceWindowLength;
- jfieldID referenceWindowDelay;
- jfieldID clippingThreshold;
- jfieldID crestFactorMargin;
- jfieldID usePredictedStep;
- };
-
- class JavaHighPassFilterClass : public JavaClass
- {
- public:
- explicit JavaHighPassFilterClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- };
-
- class JavaNoiseSuppressionClass : public JavaClass
- {
- public:
- explicit JavaNoiseSuppressionClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID level;
- };
-
- class JavaCaptureLevelAdjustmentClass : public JavaClass
- {
- public:
- explicit JavaCaptureLevelAdjustmentClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID preGainFactor;
- jfieldID postGainFactor;
- jfieldID analogMicGainEmulation;
- };
-
- class JavaAnalogMicGainEmulationClass : public JavaClass
- {
- public:
- explicit JavaAnalogMicGainEmulationClass(JNIEnv * env);
-
- jclass cls;
- jfieldID enabled;
- jfieldID initialLevel;
- };
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingStats.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingStats.h
deleted file mode 100644
index 6b277aa..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingStats.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_PROCESSING_STATS_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_PROCESSING_STATS_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "modules/audio_processing/include/audio_processing.h"
-
-#include
-
-namespace jni
-{
- namespace AudioProcessingStats
- {
- class JavaAudioProcessingStatsClass : public JavaClass
- {
- public:
- explicit JavaAudioProcessingStatsClass(JNIEnv * env);
-
- jclass cls;
- jfieldID echoReturnLoss;
- jfieldID echoReturnLossEnhancement;
- jfieldID divergentFilterFraction;
- jfieldID delayMs;
- jfieldID delayMedianMs;
- jfieldID delayStandardDeviationMs;
- jfieldID residualEchoLikelihood;
- jfieldID residualEchoLikelihoodRecentMax;
- };
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingStreamConfig.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingStreamConfig.h
deleted file mode 100644
index 851df9d..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioProcessingStreamConfig.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_PROCESSING_STREAM_CONFIG_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_PROCESSING_STREAM_CONFIG_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "modules/audio_processing/include/audio_processing.h"
-
-#include
-
-namespace jni
-{
- namespace AudioProcessingStreamConfig
- {
- class JavaAudioProcessingStreamConfigClass : public JavaClass
- {
- public:
- explicit JavaAudioProcessingStreamConfigClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID sampleRate;
- jfieldID channels;
- };
-
- webrtc::StreamConfig toNative(JNIEnv * env, const JavaRef & javaType);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioSink.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioSink.h
deleted file mode 100644
index 30d501c..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioSink.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_SINK_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_SINK_H_
-
-#include "modules/audio_device/include/audio_device_defines.h"
-
-namespace jni
-{
- class AudioSink : public webrtc::AudioTransport
- {
- public:
- virtual ~AudioSink() {};
-
- int32_t NeedMorePlayData(const size_t nSamples,
- const size_t nBytesPerSample,
- const size_t nChannels,
- const uint32_t samplesPerSec,
- void* audioSamples,
- size_t& nSamplesOut,
- int64_t* elapsed_time_ms,
- int64_t* ntp_time_ms)
- {
- *elapsed_time_ms = 0;
- *ntp_time_ms = 0;
-
- return 0;
- }
-
- void PullRenderData(int bits_per_sample,
- int sample_rate,
- size_t number_of_channels,
- size_t number_of_frames,
- void* audio_data,
- int64_t* elapsed_time_ms,
- int64_t* ntp_time_ms)
- {
- }
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioSource.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioSource.h
deleted file mode 100644
index b5b68f5..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioSource.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_AUDIO_SOURCE_H_
-#define JNI_WEBRTC_MEDIA_AUDIO_SOURCE_H_
-
-#include "modules/audio_device/include/audio_device_defines.h"
-
-namespace jni
-{
- class AudioSource : public webrtc::AudioTransport
- {
- public:
- virtual ~AudioSource() {};
-
- int32_t RecordedDataIsAvailable(const void* audioSamples,
- const size_t nSamples,
- const size_t nBytesPerSample,
- const size_t nChannels,
- const uint32_t samplesPerSec,
- const uint32_t totalDelayMS,
- const int32_t clockDrift,
- const uint32_t currentMicLevel,
- const bool keyPressed,
- uint32_t& newMicLevel)
- {
- return 0;
- }
-
- void PullRenderData(int bits_per_sample,
- int sample_rate,
- size_t number_of_channels,
- size_t number_of_frames,
- void* audio_data,
- int64_t* elapsed_time_ms,
- int64_t* ntp_time_ms)
- {
- }
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioTransportSink.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioTransportSink.h
deleted file mode 100644
index a7b76aa..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioTransportSink.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_AUDIO_TRANSPORT_SINK_H_
-#define JNI_WEBRTC_API_AUDIO_TRANSPORT_SINK_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "AudioSink.h"
-
-#include
-
-namespace jni
-{
- class AudioTransportSink : public AudioSink
- {
- public:
- AudioTransportSink(JNIEnv * env, const JavaGlobalRef & sink);
- ~AudioTransportSink() = default;
-
- // AudioTransport implementation.
- int32_t RecordedDataIsAvailable(
- const void * audioSamples,
- const size_t nSamples,
- const size_t nBytesPerSample,
- const size_t nChannels,
- const uint32_t samplesPerSec,
- const uint32_t totalDelayMS,
- const int32_t clockDrift,
- const uint32_t currentMicLevel,
- const bool keyPressed,
- uint32_t & newMicLevel) override;
-
- private:
- class JavaAudioSinkClass : public JavaClass
- {
- public:
- explicit JavaAudioSinkClass(JNIEnv * env);
-
- jmethodID onRecordedData;
- };
-
- private:
- JavaGlobalRef sink;
-
- const std::shared_ptr javaClass;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/AudioTransportSource.h b/webrtc-jni/src/main/cpp/include/media/audio/AudioTransportSource.h
deleted file mode 100644
index 3af8fd1..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/AudioTransportSource.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_AUDIO_TRANSPORT_SOURCE_H_
-#define JNI_WEBRTC_API_AUDIO_TRANSPORT_SOURCE_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include "AudioSource.h"
-
-#include
-
-namespace jni
-{
- class AudioTransportSource : public AudioSource
- {
- public:
- AudioTransportSource(JNIEnv * env, const JavaGlobalRef & sink);
- ~AudioTransportSource() = default;
-
- // AudioTransport implementation.
- int32_t NeedMorePlayData(
- const size_t nSamples,
- const size_t nBytesPerSample,
- const size_t nChannels,
- const uint32_t samplesPerSec,
- void * audioSamples,
- size_t & nSamplesOut,
- int64_t * elapsed_time_ms,
- int64_t * ntp_time_ms) override;
-
- private:
- class JavaAudioSourceClass : public JavaClass
- {
- public:
- explicit JavaAudioSourceClass(JNIEnv * env);
-
- jmethodID onPlaybackData;
- };
-
- private:
- JavaGlobalRef source;
- JavaGlobalRef buffer;
-
- const std::shared_ptr javaClass;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/CustomAudioSource.h b/webrtc-jni/src/main/cpp/include/media/audio/CustomAudioSource.h
deleted file mode 100644
index 5667972..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/CustomAudioSource.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_API_AUDIO_CUSTOM_AUDIO_SOURCE_H_
-#define JNI_WEBRTC_API_AUDIO_CUSTOM_AUDIO_SOURCE_H_
-
-#include "api/media_stream_interface.h"
-#include "rtc_base/ref_counted_object.h"
-
-#include "media/SyncClock.h"
-
-#include
-#include
-#include
-
-namespace jni
-{
- class CustomAudioSource : public webrtc::AudioSourceInterface
- {
- public:
- explicit CustomAudioSource(std::shared_ptr clock);
-
- // AudioSourceInterface implementation
- void RegisterObserver(webrtc::ObserverInterface * observer) override;
- void UnregisterObserver(webrtc::ObserverInterface * observer) override;
- void AddSink(webrtc::AudioTrackSinkInterface * sink) override;
- void RemoveSink(webrtc::AudioTrackSinkInterface * sink) override;
- SourceState state() const override;
- bool remote() const override;
-
- // Push audio data with synchronization
- void PushAudioData(const void * audio_data, int bits_per_sample,
- int sample_rate, size_t number_of_channels,
- size_t number_of_frames);
-
- // Set audio capture delay for synchronization adjustment
- void SetAudioCaptureDelay(int64_t delay_us);
-
- private:
- std::vector sinks_;
- std::shared_ptr clock_;
- //webrtc::CriticalSection crit_;
- std::atomic total_samples_captured_;
- int64_t audio_capture_delay_us_;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/RawAudioFileSink.h b/webrtc-jni/src/main/cpp/include/media/audio/RawAudioFileSink.h
deleted file mode 100644
index 9e445f8..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/RawAudioFileSink.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_RAW_AUDIO_FILE_SINK_H_
-#define JNI_WEBRTC_MEDIA_RAW_AUDIO_FILE_SINK_H_
-
-#include "AudioSink.h"
-
-#include
-#include
-#include
-
-namespace jni
-{
- class RawAudioFileSink : public AudioSink
- {
- public:
- RawAudioFileSink(std::string fileName);
- ~RawAudioFileSink();
-
- int32_t RecordedDataIsAvailable(
- const void * audioSamples,
- const size_t nSamples,
- const size_t nBytesPerSample,
- const size_t nChannels,
- const uint32_t samplesPerSec,
- const uint32_t totalDelayMS,
- const int32_t clockDrift,
- const uint32_t currentMicLevel,
- const bool keyPressed,
- uint32_t & newMicLevel) override;
-
- private:
- std::ofstream outputStream;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/RawAudioFileSource.h b/webrtc-jni/src/main/cpp/include/media/audio/RawAudioFileSource.h
deleted file mode 100644
index 4b7a16d..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/RawAudioFileSource.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_RAW_AUDIO_FILE_SOURCE_H_
-#define JNI_WEBRTC_MEDIA_RAW_AUDIO_FILE_SOURCE_H_
-
-#include "AudioSource.h"
-
-#include
-#include
-
-namespace jni
-{
- class RawAudioFileSource : public AudioSource
- {
- public:
- RawAudioFileSource(std::string fileName);
- ~RawAudioFileSource();
-
- int32_t NeedMorePlayData(
- const size_t nSamples,
- const size_t nBytesPerSample,
- const size_t nChannels,
- const uint32_t samplesPerSec,
- void * audioSamples,
- size_t & nSamplesOut,
- int64_t * elapsed_time_ms,
- int64_t * ntp_time_ms) override;
-
- private:
- std::ifstream inputStream;
- size_t fileLength;
- size_t fileRemainingBytes;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/WavAudioFileSink.h b/webrtc-jni/src/main/cpp/include/media/audio/WavAudioFileSink.h
deleted file mode 100644
index 4249c21..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/WavAudioFileSink.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_WAV_AUDIO_FILE_SINK_H_
-#define JNI_WEBRTC_MEDIA_WAV_AUDIO_FILE_SINK_H_
-
-#include "AudioSink.h"
-
-#include "common_audio/wav_file.h"
-
-#include
-#include
-
-#if defined(WEBRTC_MAC)
-#define MAYBE_CPP DISABLED_CPP
-#define MAYBE_CPPFileDescriptor DISABLED_CPPFileDescriptor
-#else
-#define MAYBE_CPP CPP
-#define MAYBE_CPPFileDescriptor CPPFileDescriptor
-#endif
-
-namespace jni
-{
- class WavAudioFileSink : public AudioSink
- {
- public:
- WavAudioFileSink(std::string fileName);
- ~WavAudioFileSink();
-
- int32_t RecordedDataIsAvailable(
- const void * audioSamples,
- const size_t nSamples,
- const size_t nBytesPerSample,
- const size_t nChannels,
- const uint32_t samplesPerSec,
- const uint32_t totalDelayMS,
- const int32_t clockDrift,
- const uint32_t currentMicLevel,
- const bool keyPressed,
- uint32_t & newMicLevel) override;
-
- private:
- std::unique_ptr wavWriter;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/WavAudioFileSource.h b/webrtc-jni/src/main/cpp/include/media/audio/WavAudioFileSource.h
deleted file mode 100644
index 2810227..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/WavAudioFileSource.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_WAV_AUDIO_FILE_SOURCE_H_
-#define JNI_WEBRTC_MEDIA_WAV_AUDIO_FILE_SOURCE_H_
-
-#include "AudioSource.h"
-
-#include "common_audio/wav_file.h"
-
-#include
-#include
-
-#if defined(WEBRTC_MAC)
-#define MAYBE_CPP DISABLED_CPP
-#define MAYBE_CPPFileDescriptor DISABLED_CPPFileDescriptor
-#else
-#define MAYBE_CPP CPP
-#define MAYBE_CPPFileDescriptor CPPFileDescriptor
-#endif
-
-namespace jni
-{
- class WavAudioFileSource : public AudioSource
- {
- public:
- WavAudioFileSource(std::string fileName);
- ~WavAudioFileSource();
-
- int32_t NeedMorePlayData(
- const size_t nSamples,
- const size_t nBytesPerSample,
- const size_t nChannels,
- const uint32_t samplesPerSec,
- void * audioSamples,
- size_t & nSamplesOut,
- int64_t * elapsed_time_ms,
- int64_t * ntp_time_ms) override;
-
- private:
- std::unique_ptr wavReader;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/linux/PulseAudioDeviceManager.h b/webrtc-jni/src/main/cpp/include/media/audio/linux/PulseAudioDeviceManager.h
deleted file mode 100644
index b07b429..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/linux/PulseAudioDeviceManager.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_PULSE_AUDIO_DEVICE_MANAGER_H_
-#define JNI_WEBRTC_MEDIA_PULSE_AUDIO_DEVICE_MANAGER_H_
-
-#include "media/audio/AudioDeviceManager.h"
-
-#include
-#include
-
-namespace jni
-{
- namespace avdev
- {
- class PulseAudioDeviceManager : public AudioDeviceManager
- {
- public:
- PulseAudioDeviceManager();
- ~PulseAudioDeviceManager();
-
- AudioDevicePtr getDefaultAudioCaptureDevice() override;
- AudioDevicePtr getDefaultAudioPlaybackDevice() override;
-
- std::set getAudioCaptureDevices() override;
- std::set getAudioPlaybackDevices() override;
-
- private:
- void dispose();
-
- void iterate(pa_threaded_mainloop * main_loop, pa_operation * op);
-
- /* PulseAudio API callbacks. */
- static void stateCallback(pa_context * ctx, void * userdata);
- static void serverInfoCallback(pa_context * ctx, const pa_server_info * info, void * userdata);
- static void subscribeCallback(pa_context * ctx, pa_subscription_event_type_t t, uint32_t idx, void * userdata);
- static void getSourceInfoCallback(pa_context * ctx, const pa_source_info * info, int last, void * userdata);
- static void getSourceCallback(pa_context * ctx, const pa_source_info * info, int last, void * userdata);
- static void newSourceCallback(pa_context * ctx, const pa_source_info * info, int last, void * userdata);
- static void getSinkInfoCallback(pa_context * ctx, const pa_sink_info * info, int last, void * userdata);
- static void getSinkCallback(pa_context * ctx, const pa_sink_info * info, int last, void * userdata);
- static void newSinkCallback(pa_context * ctx, const pa_sink_info * info, int last, void * userdata);
-
- void insertDevice(DeviceList & devices, pa_proplist * proplist, const char * name, const char * desc, uint32_t index, bool notify, bool isCapture);
- void removeDevice(DeviceList & devices, uint32_t index, bool isCapture);
-
- void fillAdditionalTypes(AudioDevicePtr device, pa_proplist * proplist);
- DeviceFormFactor getActualFormFactor(std::string formFactor);
- DeviceTransport getActualTransport(std::string transport);
-
- private:
- pa_threaded_mainloop * mainloop;
- pa_context * context;
-
- std::string defaultCaptureName;
- std::string defaultCaptureDescName;
- std::string defaultPlaybackName;
- std::string defaultPlaybackDescName;
-
- std::unordered_map deviceMap;
- };
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/linux/PulseAudioLoader.h b/webrtc-jni/src/main/cpp/include/media/audio/linux/PulseAudioLoader.h
deleted file mode 100644
index 4ac742a..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/linux/PulseAudioLoader.h
+++ /dev/null
@@ -1,164 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef PULSE_AUDIO_LOADER_H
-#define PULSE_AUDIO_LOADER_H
-
-#include
-#include
-#include
-#include "Exception.h"
-
-namespace jni
-{
- namespace avdev
- {
- typedef pa_threaded_mainloop* (*pa_threaded_mainloop_new_t)();
- typedef void (*pa_threaded_mainloop_free_t)(pa_threaded_mainloop* m);
- typedef int (*pa_threaded_mainloop_start_t)(pa_threaded_mainloop* m);
- typedef void (*pa_threaded_mainloop_stop_t)(pa_threaded_mainloop* m);
- typedef pa_mainloop_api* (*pa_threaded_mainloop_get_api_t)(pa_threaded_mainloop* m);
- typedef void (*pa_threaded_mainloop_lock_t)(pa_threaded_mainloop* m);
- typedef void (*pa_threaded_mainloop_unlock_t)(pa_threaded_mainloop* m);
- typedef void (*pa_threaded_mainloop_wait_t)(pa_threaded_mainloop* m);
- typedef void (*pa_threaded_mainloop_signal_t)(pa_threaded_mainloop* m, int wait_for_accept);
- typedef int (*pa_threaded_mainloop_in_thread_t)(pa_threaded_mainloop* m);
-
- typedef pa_context* (*pa_context_new_t)(pa_mainloop_api* mainloop, const char* name);
- typedef void (*pa_context_unref_t)(pa_context* c);
- typedef void (*pa_context_set_state_callback_t)(pa_context* c, pa_context_notify_cb_t cb, void* userdata);
- typedef void (*pa_context_set_subscribe_callback_t)(pa_context* c, pa_context_subscribe_cb_t cb, void* userdata);
- typedef int (*pa_context_connect_t)(pa_context* c, const char* server, pa_context_flags_t flags, const pa_spawn_api* api);
- typedef void (*pa_context_disconnect_t)(pa_context* c);
- typedef pa_context_state_t (*pa_context_get_state_t)(const pa_context* c);
- typedef pa_operation* (*pa_context_subscribe_t)(pa_context* c, pa_subscription_mask_t m, pa_context_success_cb_t cb, void* userdata);
- typedef pa_operation* (*pa_context_get_server_info_t)(pa_context* c, pa_server_info_cb_t cb, void* userdata);
- typedef pa_operation* (*pa_context_get_source_info_by_name_t)(pa_context* c, const char* name, pa_source_info_cb_t cb, void* userdata);
- typedef pa_operation* (*pa_context_get_source_info_list_t)(pa_context* c, pa_source_info_cb_t cb, void* userdata);
- typedef pa_operation* (*pa_context_get_source_info_by_index_t)(pa_context* c, uint32_t idx, pa_source_info_cb_t cb, void* userdata);
- typedef pa_operation* (*pa_context_get_sink_info_by_name_t)(pa_context* c, const char* name, pa_sink_info_cb_t cb, void* userdata);
- typedef pa_operation* (*pa_context_get_sink_info_list_t)(pa_context* c, pa_sink_info_cb_t cb, void* userdata);
- typedef pa_operation* (*pa_context_get_sink_info_by_index_t)(pa_context* c, uint32_t idx, pa_sink_info_cb_t cb, void* userdata);
-
- typedef void (*pa_operation_unref_t)(pa_operation* o);
- typedef pa_operation_state_t (*pa_operation_get_state_t)(const pa_operation* o);
- typedef const char* (*pa_proplist_gets_t)(const pa_proplist* p, const char* key);
-
- class PulseAudioLoader {
- public:
- static PulseAudioLoader& instance() {
- static PulseAudioLoader instance;
- return instance;
- }
-
- bool load() {
- if (loaded) return true;
-
- // Try to open the library
- lib_handle = dlopen("libpulse.so.0", RTLD_NOW);
- if (!lib_handle) return false;
-
- #define LOAD_SYM(name) \
- name = (name##_t)dlsym(lib_handle, #name); \
- if (!name) { close(); return false; }
-
- LOAD_SYM(pa_threaded_mainloop_new);
- LOAD_SYM(pa_threaded_mainloop_free);
- LOAD_SYM(pa_threaded_mainloop_start);
- LOAD_SYM(pa_threaded_mainloop_stop);
- LOAD_SYM(pa_threaded_mainloop_get_api);
- LOAD_SYM(pa_threaded_mainloop_lock);
- LOAD_SYM(pa_threaded_mainloop_unlock);
- LOAD_SYM(pa_threaded_mainloop_wait);
- LOAD_SYM(pa_threaded_mainloop_signal);
- LOAD_SYM(pa_threaded_mainloop_in_thread);
-
- LOAD_SYM(pa_context_new);
- LOAD_SYM(pa_context_unref);
- LOAD_SYM(pa_context_set_state_callback);
- LOAD_SYM(pa_context_set_subscribe_callback);
- LOAD_SYM(pa_context_connect);
- LOAD_SYM(pa_context_disconnect);
- LOAD_SYM(pa_context_get_state);
- LOAD_SYM(pa_context_subscribe);
-
- LOAD_SYM(pa_context_get_server_info);
- LOAD_SYM(pa_context_get_source_info_by_name);
- LOAD_SYM(pa_context_get_source_info_list);
- LOAD_SYM(pa_context_get_source_info_by_index);
- LOAD_SYM(pa_context_get_sink_info_by_name);
- LOAD_SYM(pa_context_get_sink_info_list);
- LOAD_SYM(pa_context_get_sink_info_by_index);
-
- LOAD_SYM(pa_operation_unref);
- LOAD_SYM(pa_operation_get_state);
- LOAD_SYM(pa_proplist_gets);
-
- loaded = true;
- return true;
- }
-
- void close() {
- if (lib_handle) {
- dlclose(lib_handle);
- lib_handle = nullptr;
- }
- loaded = false;
- }
-
- bool isLoaded() const { return loaded; }
-
- pa_threaded_mainloop_new_t pa_threaded_mainloop_new;
- pa_threaded_mainloop_free_t pa_threaded_mainloop_free;
- pa_threaded_mainloop_start_t pa_threaded_mainloop_start;
- pa_threaded_mainloop_stop_t pa_threaded_mainloop_stop;
- pa_threaded_mainloop_get_api_t pa_threaded_mainloop_get_api;
- pa_threaded_mainloop_lock_t pa_threaded_mainloop_lock;
- pa_threaded_mainloop_unlock_t pa_threaded_mainloop_unlock;
- pa_threaded_mainloop_wait_t pa_threaded_mainloop_wait;
- pa_threaded_mainloop_signal_t pa_threaded_mainloop_signal;
- pa_threaded_mainloop_in_thread_t pa_threaded_mainloop_in_thread;
-
- pa_context_new_t pa_context_new;
- pa_context_unref_t pa_context_unref;
- pa_context_set_state_callback_t pa_context_set_state_callback;
- pa_context_set_subscribe_callback_t pa_context_set_subscribe_callback;
- pa_context_connect_t pa_context_connect;
- pa_context_disconnect_t pa_context_disconnect;
- pa_context_get_state_t pa_context_get_state;
- pa_context_subscribe_t pa_context_subscribe;
-
- pa_context_get_server_info_t pa_context_get_server_info;
- pa_context_get_source_info_by_name_t pa_context_get_source_info_by_name;
- pa_context_get_source_info_list_t pa_context_get_source_info_list;
- pa_context_get_source_info_by_index_t pa_context_get_source_info_by_index;
- pa_context_get_sink_info_by_name_t pa_context_get_sink_info_by_name;
- pa_context_get_sink_info_list_t pa_context_get_sink_info_list;
- pa_context_get_sink_info_by_index_t pa_context_get_sink_info_by_index;
-
- pa_operation_unref_t pa_operation_unref;
- pa_operation_get_state_t pa_operation_get_state;
- pa_proplist_gets_t pa_proplist_gets;
-
- private:
- PulseAudioLoader() : loaded(false), lib_handle(nullptr) {}
- bool loaded;
- void* lib_handle;
- };
- } // namespace avdev
-} // namespace jni
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/macos/CoreAudioDeviceManager.h b/webrtc-jni/src/main/cpp/include/media/audio/macos/CoreAudioDeviceManager.h
deleted file mode 100644
index 7eb36f2..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/macos/CoreAudioDeviceManager.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_CORE_AUDIO_DEVICE_MANAGER_H_
-#define JNI_WEBRTC_MEDIA_CORE_AUDIO_DEVICE_MANAGER_H_
-
-#include "media/audio/AudioDeviceManager.h"
-
-#include
-
-namespace jni
-{
- namespace avdev
- {
- class CoreAudioDeviceManager : public AudioDeviceManager
- {
- public:
- CoreAudioDeviceManager();
- ~CoreAudioDeviceManager();
-
- std::set getAudioCaptureDevices() override;
- std::set getAudioPlaybackDevices() override;
-
- AudioDevicePtr getDefaultAudioCaptureDevice() override;
- AudioDevicePtr getDefaultAudioPlaybackDevice() override;
-
- private:
- void enumerateDevices(const AudioObjectPropertyScope & scope);
- void onDevicesChanged();
- void onDefaultDeviceChanged(const AudioObjectPropertyScope & scope, DeviceList & devices, const AudioDevicePtr & device);
- void checkDeviceGone(DeviceList & devices, AudioDeviceID * devIDs, const int numDevIDs, const AudioObjectPropertyScope & scope);
- AudioDevicePtr createDefaultAudioDevice(const AudioObjectPropertyScope & scope);
- AudioDevicePtr createAudioDevice(const AudioDeviceID & deviceID, const AudioObjectPropertyScope & scope);
- bool insertAudioDevice(const AudioDevicePtr & device, const AudioObjectPropertyScope & scope);
- int getChannelCount(const AudioDeviceID & deviceID, const AudioObjectPropertyScope & scope);
- AudioDeviceID getDefaultDeviceID(const AudioObjectPropertyScope & scope);
- DeviceFormFactor getActualFormFactor(const unsigned int sourceID);
- DeviceTransport getActualTransport(const unsigned int transportType);
- void fillAdditionalTypes(const AudioDeviceID & deviceID, const AudioObjectPropertyScope & scope, AudioDevicePtr device);
-
- static OSStatus deviceListenerProc(AudioObjectID objectID, UInt32 numberAddresses, const AudioObjectPropertyAddress addresses[], void * clientData);
- };
- }
-}
-
-#endif
diff --git a/webrtc-jni/src/main/cpp/include/media/audio/windows/WindowsAudioDeviceManager.h b/webrtc-jni/src/main/cpp/include/media/audio/windows/WindowsAudioDeviceManager.h
deleted file mode 100644
index 1e8fcbb..0000000
--- a/webrtc-jni/src/main/cpp/include/media/audio/windows/WindowsAudioDeviceManager.h
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_MF_AUDIO_DEVICE_MANAGER_H_
-#define JNI_WEBRTC_MEDIA_MF_AUDIO_DEVICE_MANAGER_H_
-
-#include
-#include "media/audio/AudioDeviceManager.h"
-#include "platform/windows/ComPtr.h"
-#include "platform/windows/ComInitializer.h"
-#include "platform/windows/MFInitializer.h"
-#include "mmdeviceapi.h"
-
-namespace jni
-{
- namespace avdev
- {
- class WindowsAudioDeviceManager : public AudioDeviceManager, IMMNotificationClient
- {
- public:
- WindowsAudioDeviceManager();
- ~WindowsAudioDeviceManager();
-
- std::set getAudioCaptureDevices() override;
- std::set getAudioPlaybackDevices() override;
-
- AudioDevicePtr getDefaultAudioCaptureDevice() override;
- AudioDevicePtr getDefaultAudioPlaybackDevice() override;
-
- private:
- void enumerateDevices(EDataFlow dataFlow);
- void addDevice(LPCWSTR deviceId);
- void removeDevice(LPCWSTR deviceId);
- AudioDevicePtr createDefaultAudioDevice(const EDataFlow & dataFlow);
- AudioDevicePtr createAudioDevice(LPCWSTR deviceId, EDataFlow * dataFlow);
- bool insertAudioDevice(AudioDevicePtr device, EDataFlow dataFlow);
- void removeAudioDevice(DeviceList & devices, std::string id, EDataFlow dataFlow);
- DeviceFormFactor getActualFormFactor(EndpointFormFactor formFactor);
- DeviceTransport getActualTransport(EndpointFormFactor formFactor);
- void fillAdditionalTypes(AudioDevicePtr device);
-
- // IMMNotificationClient implementation.
- STDMETHOD_(ULONG, AddRef)();
- STDMETHOD_(ULONG, Release)();
- STDMETHOD(QueryInterface)(REFIID iid, void ** object);
- STDMETHOD(OnDefaultDeviceChanged) (EDataFlow flow, ERole role, LPCWSTR deviceId);
- STDMETHOD(OnDeviceAdded) (LPCWSTR deviceId);
- STDMETHOD(OnDeviceRemoved) (LPCWSTR deviceId);
- STDMETHOD(OnDeviceStateChanged) (LPCWSTR deviceId, DWORD newState);
- STDMETHOD(OnPropertyValueChanged) (LPCWSTR /*deviceId*/, const PROPERTYKEY /*key*/);
-
- ComInitializer comInitializer;
- MFInitializer initializer;
- ComPtr deviceEnumerator;
- };
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/CustomVideoSource.h b/webrtc-jni/src/main/cpp/include/media/video/CustomVideoSource.h
deleted file mode 100644
index e6d923e..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/CustomVideoSource.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_CUSTOM_VIDEO_SOURCE_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_CUSTOM_VIDEO_SOURCE_H_
-
-#include "api/video/video_frame.h"
-#include "api/video/video_source_interface.h"
-#include "media/base/adapted_video_track_source.h"
-#include "rtc_base/ref_counted_object.h"
-
-#include "media/SyncClock.h"
-
-#include
-
-namespace jni
-{
- class CustomVideoSource : public webrtc::AdaptedVideoTrackSource
- {
- public:
- explicit CustomVideoSource(std::shared_ptr clock);
-
- // AdaptedVideoTrackSource implementation.
- virtual bool is_screencast() const override;
- virtual std::optional needs_denoising() const override;
- SourceState state() const override;
- bool remote() const override;
-
- void PushFrame(const webrtc::VideoFrame & frame);
-
- private:
- std::shared_ptr clock_;
- uint16_t frame_id_;
- };
-}
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/RawVideoFileSink.h b/webrtc-jni/src/main/cpp/include/media/video/RawVideoFileSink.h
deleted file mode 100644
index 0957e30..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/RawVideoFileSink.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_RAW_VIDEO_FILE_SINK_H_
-#define JNI_WEBRTC_MEDIA_RAW_VIDEO_FILE_SINK_H_
-
-#include "VideoSink.h"
-
-#include
-#include
-#include
-
-namespace jni
-{
- class RawVideoFileSink : public VideoSink
- {
- public:
- RawVideoFileSink(std::string fileName);
- ~RawVideoFileSink();
-
- void OnFrame(const webrtc::VideoFrame & frame) override;
- void OnDiscardedFrame() override;
-
- private:
- std::ofstream outputStream;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/VideoCapture.h b/webrtc-jni/src/main/cpp/include/media/video/VideoCapture.h
deleted file mode 100644
index 66929aa..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/VideoCapture.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_CAPTURE_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_CAPTURE_H_
-
-#include "media/video/VideoCaptureBase.h"
-
-#include "modules/video_capture/video_capture.h"
-#include "modules/video_capture/video_capture_defines.h"
-
-namespace jni
-{
- class VideoCapture : public VideoCaptureBase
- {
- public:
- VideoCapture();
- ~VideoCapture();
-
- void start() override;
- void stop() override;
- void destroy() override;
-
- private:
- webrtc::scoped_refptr captureModule;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/VideoCaptureBase.h b/webrtc-jni/src/main/cpp/include/media/video/VideoCaptureBase.h
deleted file mode 100644
index ae171b0..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/VideoCaptureBase.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright 2021 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_CAPTURE_BASE_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_CAPTURE_BASE_H_
-
-#include "media/video/VideoDevice.h"
-
-#include "api/video/video_sink_interface.h"
-#include "modules/video_capture/video_capture_defines.h"
-
-namespace jni
-{
- class VideoCaptureBase
- {
- public:
- VideoCaptureBase();
- ~VideoCaptureBase();
-
- void setDevice(const avdev::DevicePtr & device);
- void setVideoCaptureCapability(const webrtc::VideoCaptureCapability & capability);
- void setVideoSink(std::unique_ptr> sink);
-
- virtual void start() = 0;
- virtual void stop() = 0;
- virtual void destroy() = 0;
-
- protected:
- avdev::DevicePtr device;
- webrtc::VideoCaptureCapability capability;
- std::unique_ptr> sink;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/VideoCaptureCapability.h b/webrtc-jni/src/main/cpp/include/media/video/VideoCaptureCapability.h
deleted file mode 100644
index 2c17332..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/VideoCaptureCapability.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_CAPTURE_CAPABILITY_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_CAPTURE_CAPABILITY_H_
-
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include
-
-#include "modules/video_capture/video_capture_defines.h"
-
-namespace jni
-{
- namespace avdev
- {
- class VideoCaptureCapability : public webrtc::VideoCaptureCapability
- {
- public:
- bool operator<(const VideoCaptureCapability & other) const;
- };
- }
-
- namespace VideoCaptureCapability
- {
- class JavaVideoCaptureCapabilityClass : public JavaClass
- {
- public:
- explicit JavaVideoCaptureCapabilityClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- };
-
- JavaLocalRef toJava(JNIEnv * env, const avdev::VideoCaptureCapability & capability);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/VideoDevice.h b/webrtc-jni/src/main/cpp/include/media/video/VideoDevice.h
deleted file mode 100644
index 10bf3cf..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/VideoDevice.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_DEVICE_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_DEVICE_H_
-
-#include "media/Device.h"
-#include "JavaClass.h"
-#include "JavaRef.h"
-
-#include
-
-namespace jni
-{
- namespace avdev
- {
- class VideoDevice : public Device
- {
- public:
- VideoDevice(std::string name, std::string descriptor);
- virtual ~VideoDevice() {};
- };
-
-
- using VideoDevicePtr = std::shared_ptr;
- }
-
- namespace VideoDevice
- {
- class JavaVideoDeviceClass : public JavaClass
- {
- public:
- explicit JavaVideoDeviceClass(JNIEnv * env);
-
- jclass cls;
- jmethodID ctor;
- jfieldID name;
- jfieldID descriptor;
- };
-
- JavaLocalRef toJavaVideoDevice(JNIEnv * env, const avdev::VideoDevice & device);
- avdev::VideoDevice toNativeVideoDevice(JNIEnv * env, const JavaRef & javaType);
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/VideoDeviceManager.h b/webrtc-jni/src/main/cpp/include/media/video/VideoDeviceManager.h
deleted file mode 100644
index 95d92ad..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/VideoDeviceManager.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_DEVICE_MANAGER_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_DEVICE_MANAGER_H_
-
-#include "media/DeviceManager.h"
-#include "media/DeviceList.h"
-#include "media/video/VideoDevice.h"
-#include "media/video/VideoCaptureCapability.h"
-
-#include "modules/video_capture/video_capture_defines.h"
-
-#include
-#include
-
-namespace jni
-{
- namespace avdev
- {
- using VideoDevicePtr = std::shared_ptr;
-
-
- class VideoDeviceManager : public DeviceManager
- {
- public:
- VideoDeviceManager();
- virtual ~VideoDeviceManager() {};
-
- VideoDevicePtr getDefaultVideoCaptureDevice();
-
- virtual std::set getVideoCaptureDevices() = 0;
- virtual std::set getVideoCaptureCapabilities(const VideoDevice & device) = 0;
-
- protected:
- void setDefaultCaptureDevice(VideoDevicePtr device);
- VideoDevicePtr getDefaultCaptureDevice();
-
- protected:
- DeviceList captureDevices;
-
- private:
- VideoDevicePtr defaultCaptureDevice;
- std::mutex mutex;
- };
- }
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/VideoSink.h b/webrtc-jni/src/main/cpp/include/media/video/VideoSink.h
deleted file mode 100644
index b525168..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/VideoSink.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_SINK_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_SINK_H_
-
-#include "api/video/video_sink_interface.h"
-#include "api/video/video_frame.h"
-
-namespace jni
-{
- class VideoSink : public webrtc::VideoSinkInterface
- {
- public:
- virtual ~VideoSink() {};
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/VideoTrackDesktopSource.h b/webrtc-jni/src/main/cpp/include/media/video/VideoTrackDesktopSource.h
deleted file mode 100644
index 06b8a42..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/VideoTrackDesktopSource.h
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_TRACK_DESKTOP_SOURCE_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_TRACK_DESKTOP_SOURCE_H_
-
-#include "api/video/i420_buffer.h"
-#include "media/base/adapted_video_track_source.h"
-#include "modules/desktop_capture/desktop_capturer.h"
-#include "rtc_base/platform_thread.h"
-
-namespace jni
-{
- class VideoTrackDesktopSource : public webrtc::AdaptedVideoTrackSource, public webrtc::DesktopCapturer::Callback
- {
- public:
- VideoTrackDesktopSource();
- ~VideoTrackDesktopSource();
-
- void setSourceId(webrtc::DesktopCapturer::SourceId source, bool isWindow);
- void setFrameRate(const uint16_t frameRate);
- void setMaxFrameSize(webrtc::DesktopSize size);
- void setFocusSelectedSource(bool focus);
-
- void start();
- void stop();
- void terminate();
-
- // AdaptedVideoTrackSource implementation.
- virtual bool is_screencast() const override;
- virtual std::optional needs_denoising() const override;
- SourceState state() const override;
- bool remote() const override;
-
- // DesktopCapturer::Callback implementation.
- void OnCaptureResult(webrtc::DesktopCapturer::Result result, std::unique_ptr frame) override;
-
- private:
- void capture();
- void process(std::unique_ptr& frame);
-
- private:
- uint16_t frameRate;
- bool isCapturing;
- bool focusSelectedSource;
-
- webrtc::DesktopSize maxFrameSize;
-
- webrtc::MediaSourceInterface::SourceState sourceState;
-
- webrtc::DesktopCapturer::SourceId sourceId;
- bool sourceIsWindow;
-
- std::unique_ptr lastFrame;
-
- webrtc::PlatformThread captureThread;
-
- webrtc::scoped_refptr buffer;
- };
-}
-
-#endif
\ No newline at end of file
diff --git a/webrtc-jni/src/main/cpp/include/media/video/VideoTrackDeviceSource.h b/webrtc-jni/src/main/cpp/include/media/video/VideoTrackDeviceSource.h
deleted file mode 100644
index 17b5893..0000000
--- a/webrtc-jni/src/main/cpp/include/media/video/VideoTrackDeviceSource.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright 2019 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
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef JNI_WEBRTC_MEDIA_VIDEO_TRACK_DEVICE_SOURCE_H_
-#define JNI_WEBRTC_MEDIA_VIDEO_TRACK_DEVICE_SOURCE_H_
-
-#include "api/create_peerconnection_factory.h"
-#include "api/video/video_frame.h"
-#include "api/video/video_sink_interface.h"
-#include "pc/video_track_source.h"
-#include "media/base/video_adapter.h"
-#include "media/base/video_broadcaster.h"
-#include "modules/video_capture/video_capture.h"
-#include "modules/video_capture/video_capture_defines.h"
-
-#include "media/video/VideoTrackDeviceSourceBase.h"
-#include "media/video/VideoDevice.h"
-
-namespace jni
-{
- class VideoTrackDeviceSource : public webrtc::VideoTrackSource, public webrtc::VideoSinkInterface, public VideoTrackDeviceSourceBase
- {
- public:
- VideoTrackDeviceSource();
- ~VideoTrackDeviceSource();
-
- // VideoTrackDeviceSourceBase implementation.
- void start() override;
- void stop() override;
-
- // VideoSourceInterface implementation.
- void AddOrUpdateSink(webrtc::VideoSinkInterface