Skip to content

Conversation

@Doominika
Copy link
Contributor

No description provided.

@djenczewski djenczewski marked this pull request as ready for review November 28, 2025 14:31
@@ -0,0 +1,8 @@
package com.simplito.java.privmx_endpoint.model.streams;

public abstract class Frame {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this class is probably unnecessary, because its not used anywhere


@FunctionalInterface
public interface OnFrameCallback {
void run(long a, long b, Frame c, String d);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do a,b,c,d means?

package com.simplito.java.privmx_endpoint.model.streams;

public class RemoteStreamId {
private final Long value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this is private

this.value = value;
}

public Long getValue() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for what getValue?

package com.simplito.java.privmx_endpoint.model.streams;

public class StreamHandle {
private final Long value;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why private

) {
JniContextUtils ctx(env);
if (ctx.nullCheck(stream_handle, "Stream Handle") ||
ctx.nullCheck(track, "Media Device")) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be parameter name

jobject thiz,
jobject stream_handle
) {
JniContextUtils ctx(env);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing null check

privmx::endpoint::stream::StreamSettings result;
JniContextUtils ctx(env);
jclass cls = ctx->GetObjectClass(streamSettings);
StreamSettingsJNI streamSettingsJni (env, streamSettings);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will cause memory leak

"com/simplito/java/privmx_endpoint/model/streams/DeviceType");

jmethodID valuesMID = ctx->GetStaticMethodID(itemCls, "values",
"()[Lcom/simplito/java/privmx_endpoint/model/streams/DeviceType;");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"()[Lcom/simplito/java/privmx_endpoint/model/streams/DeviceType;");
"()Lcom/simplito/java/privmx_endpoint/model/streams/DeviceType;"

ctx->NewStringUTF(mediaDevice_c.name.c_str()),
ctx->NewStringUTF(mediaDevice_c.id.c_str()),
deviceType2Java(ctx, mediaDevice_c.type)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants