-
Notifications
You must be signed in to change notification settings - Fork 0
[FEAT]: Implement stream and media handling methods #110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feat/implement-base-streamApi
Are you sure you want to change the base?
[FEAT]: Implement stream and media handling methods #110
Conversation
| @@ -0,0 +1,8 @@ | |||
| package com.simplito.java.privmx_endpoint.model.streams; | |||
|
|
|||
| public abstract class Frame { | |||
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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() { |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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")) { |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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;"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "()[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) | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove this line
No description provided.