Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
9a6b670
refactor: remove unused, old models
Doominika Apr 15, 2026
00c7063
refactor: move AudioTrackInfo and VideoTrackInfo to JanusPublisher class
Doominika Apr 15, 2026
7afb51a
refactor: move AudioTrackInfo and VideoTrackInfo to JanusPublisher class
Doominika Apr 15, 2026
9e53e42
refactor: remove usage of removed ConnectionType class
Doominika Apr 15, 2026
ce22a48
Merge remote-tracking branch 'origin/docs/add-documention-for-model-c…
Doominika Apr 15, 2026
73c3381
chore: organize imports
Doominika Apr 15, 2026
d926721
refactor: remove Settings class
Doominika Apr 16, 2026
6ccb676
refactor: remove talking param from StreamInfo
Doominika Apr 16, 2026
3c89f07
docs: add docs for StreamTrackModification
Doominika Apr 16, 2026
ed8854b
docs: add docs for StreamTrackInfo
Doominika Apr 16, 2026
efb7455
docs: add docs for StreamTrackModificationPair
Doominika Apr 16, 2026
f6780d8
docs: add docs for StreamSubscription
Doominika Apr 16, 2026
8306e2b
docs: add docs for StreamRoom
Doominika Apr 16, 2026
da9b818
docs: add docs for StreamPublishResult
Doominika Apr 16, 2026
02a7dcd
docs: add docs for StreamInfo
Doominika Apr 16, 2026
6989013
docs: add docs for StreamHandle
Doominika Apr 16, 2026
0a0170b
docs: add docs for PublishedStreamData
Doominika Apr 16, 2026
2ed958f
refactor: move PublishedStreamData class
Doominika Apr 16, 2026
65ee166
docs: add docs for UpdatedStreamData
Doominika Apr 16, 2026
df20b7f
docs: add docs for StreamUpdatedEventData
Doominika Apr 16, 2026
958e016
docs: add docs for StreamUnpublishedEventData
Doominika Apr 16, 2026
ff16d8b
docs: add docs for StreamsUpdatedData
Doominika Apr 16, 2026
47ecb6d
docs: add docs for StreamRoomDeletedEventData
Doominika Apr 16, 2026
06a3c01
docs: add docs for StreamPublishedEventData
Doominika Apr 16, 2026
f631d5b
docs: add docs for StreamLeftEventData
Doominika Apr 16, 2026
2f5ded5
docs: add docs for StreamEventData
Doominika Apr 16, 2026
ba74e9e
docs: add docs for NewStreams
Doominika Apr 16, 2026
9b3ed5e
docs: add docs for StreamEventType
Doominika Apr 16, 2026
b5263c4
docs: add docs for StreamEventSelectorType
Doominika Apr 16, 2026
147ee44
feat: update StreamTrackInfo
Doominika Apr 24, 2026
cc27b8b
feat: update streamId param description
Doominika Apr 24, 2026
64ce5b4
feat: update users list description in StreamRoom class
Doominika Apr 24, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1769,13 +1769,11 @@ namespace privmx {
"Ljava/util/List;" // tracks
"Ljava/lang/String;" // metadata
"Ljava/lang/Boolean;" // dummy
"Ljava/lang/Boolean;" // talking
")V"
);

jobject metadata = nullptr;
jobject dummy = nullptr;
jobject talking = nullptr;

if (streamInfo_c.metadata.has_value()) {
metadata = ctx->NewStringUTF(streamInfo_c.metadata.value().c_str());
Expand All @@ -1785,20 +1783,7 @@ namespace privmx {
dummy = ctx.bool2jBoolean(streamInfo_c.dummy.value());
}

if (streamInfo_c.talking.has_value()) {
talking = ctx.bool2jBoolean(streamInfo_c.talking.value());
}

jobject tracks = ctx->NewObject(arrayCls, initArrayMID);
for (auto &track: streamInfo_c.tracks) {
ctx->CallBooleanMethod(
tracks,
addToArrayMID,
streamTrackInfo2Java(ctx, track)
);
}

// todo - check null?
jobject tracks = vectorTojArray(ctx, streamInfo_c.tracks, streamTrackInfo2Java);

return ctx->NewObject(
itemCls,
Expand All @@ -1807,10 +1792,8 @@ namespace privmx {
ctx->NewStringUTF(streamInfo_c.userId.c_str()),
tracks,
metadata,
dummy,
talking
dummy
);

}

jobject publishedStreamData2Java(JniContextUtils &ctx, privmx::endpoint::stream::PublishedStreamData publishedStreamData_c) {
Expand Down
5 changes: 0 additions & 5 deletions jni-wrappers/privmx-endpoint/src/cpp/parsers/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -838,11 +838,6 @@ privmx::endpoint::stream::StreamHandle parseStreamHandle(
return jobject2long(ctx, ctx->GetObjectField(streamHandle, valueFID));
}

privmx::endpoint::stream::Settings parseSettings(JniContextUtils &ctx, jobject settings) {
auto result = privmx::endpoint::stream::Settings();
return result;
}

privmx::endpoint::stream::StreamSubscription parseStreamSubscription(JniContextUtils &ctx, jobject streamSubscription) {
privmx::endpoint::stream::StreamSubscription result;
jclass cls = ctx->GetObjectClass(streamSubscription);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.simplito.java.privmx_endpoint.modules.stream;

import com.simplito.java.privmx_endpoint.model.ConnectionType;

import org.json.JSONObject;
import org.webrtc.PeerConnection;
import org.webrtc.PeerConnectionFactory;
Expand All @@ -19,20 +17,17 @@ public class JanusConnection {
protected final PeerConnection peerConnection;
protected final PeerConnectionFactory peerConnectionFactory;
protected PmxKeyStore keyStore;
public final ConnectionType connectionType;
private long sessionId = -1L;
private final PcObserver pcObserver;

public JanusConnection(
PeerConnectionFactory pcFactory,
PmxKeyStore keyStore,
ConnectionType connectionType,
TrackObserver trackObserver,
BiConsumer<Long,String> onTrickle,
Consumer<PeerConnection.IceConnectionState> onConnectionChange
) {
this.peerConnectionFactory = pcFactory;
this.connectionType = connectionType;
this.keyStore = keyStore;
this.pcObserver = new PcObserver(
peerConnectionFactory,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
package com.simplito.java.privmx_endpoint.modules.stream;

import androidx.annotation.Nullable;

import com.simplito.java.privmx_endpoint.model.AudioTrackInfo;
import com.simplito.java.privmx_endpoint.model.ConnectionType;
import com.simplito.java.privmx_endpoint.model.stream.SdpWithTypeModel;
import com.simplito.java.privmx_endpoint.model.VideoTrackInfo;

import org.webrtc.AudioTrack;
import org.webrtc.MediaConstraints;
import org.webrtc.PeerConnection;
import org.webrtc.PeerConnectionFactory;
Expand All @@ -15,7 +11,7 @@
import org.webrtc.PmxKeyStore;
import org.webrtc.RtpSender;
import org.webrtc.SessionDescription;
import org.webrtc.VideoCapturer;
import org.webrtc.VideoTrack;

import java.util.HashMap;
import java.util.Map;
Expand All @@ -39,7 +35,7 @@ public JanusPublisher(
BiConsumer<Long, SdpWithTypeModel> acceptRenegotiationOffer,
Consumer<PeerConnection.IceConnectionState> onConnectionChange
) {
super(pcFactory, keyStore, ConnectionType.Publisher, observer, onTrickle, onConnectionChange);
super(pcFactory, keyStore, observer, onTrickle, onConnectionChange);
this.setNewOfferOnReconfigure = acceptRenegotiationOffer;
}

Expand Down Expand Up @@ -162,4 +158,37 @@ public void onRenegotiationNeeded() {
});
}
}

static class AudioTrackInfo {
public AudioTrack track;
public RtpSender sender;
public PmxFrameCryptor frameCryptor;

public AudioTrackInfo(
AudioTrack track,
RtpSender sender,
PmxFrameCryptor frameCryptor
) {
this.track = track;
this.sender = sender;
this.frameCryptor = frameCryptor;
}
}

static class VideoTrackInfo {
public VideoTrack track;
public RtpSender sender;
public PmxFrameCryptor frameCryptor;

public VideoTrackInfo(
VideoTrack track,
RtpSender sender,
PmxFrameCryptor frameCryptor
) {
this.track = track;
this.sender = sender;
this.frameCryptor = frameCryptor;
}
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.simplito.java.privmx_endpoint.modules.stream;

import com.simplito.java.privmx_endpoint.model.ConnectionType;

import org.webrtc.MediaConstraints;
import org.webrtc.PeerConnection;
Expand All @@ -19,7 +18,7 @@ public JanusSubscriber(
TrackObserver observer,
BiConsumer<Long, String> onTrickle
) {
super(pcFactory, keyStore, ConnectionType.Subscriber, observer, onTrickle,null);
super(pcFactory, keyStore, observer, onTrickle,null);
}

public String createAnswer(String offerSdp, String type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

import androidx.annotation.NonNull;

import com.simplito.java.privmx_endpoint.model.ConnectionType;
import com.simplito.java.privmx_endpoint.model.ContainerPolicy;
import com.simplito.java.privmx_endpoint.model.PagingList;
import com.simplito.java.privmx_endpoint.model.UserWithPubKey;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,12 +1,26 @@
package com.simplito.java.privmx_endpoint.model.stream;

/**
* Unique handle to a stream, used to perform operations on the stream.
*/
public class StreamHandle {
/**
* The value of the {@link StreamHandle}.
*/
private final Long value;

/**
* Constructs a new {@link StreamHandle} instance.
*
* @param value The value of the {@link StreamHandle}.
*/
public StreamHandle(Long value) {
this.value = value;
}

/**
* Gets the value of the {@link StreamHandle}.
*/
public Long getValue() {
return value;
}
Expand Down
Loading