Respected Java naming conventions

pull/540/head
Saul Pablo Labajo Izquierdo 2020-09-12 14:37:45 +02:00
parent 0fdbcaac90
commit 7ceba5e098
4 changed files with 16 additions and 16 deletions

View File

@ -69,7 +69,7 @@ public class CDREventWebrtcConnection extends CDREventEnd implements Comparable<
if (kMediaOptions.rtspUri != null) { if (kMediaOptions.rtspUri != null) {
json.addProperty("rtspUri", kMediaOptions.rtspUri); json.addProperty("rtspUri", kMediaOptions.rtspUri);
json.addProperty("adaptativeBitrate", kMediaOptions.adaptativeBitrate); json.addProperty("adaptativeBitrate", kMediaOptions.adaptativeBitrate);
json.addProperty("networkCache", kMediaOptions.network_cache); json.addProperty("networkCache", kMediaOptions.networkCache);
json.addProperty("onlyPlayWithSubscribers", kMediaOptions.onlyPlayWithSubscribers); json.addProperty("onlyPlayWithSubscribers", kMediaOptions.onlyPlayWithSubscribers);
} }
} }

View File

@ -32,7 +32,7 @@ public class KurentoMediaOptions extends MediaOptions {
public String rtspUri; public String rtspUri;
public Boolean adaptativeBitrate; public Boolean adaptativeBitrate;
public Boolean onlyPlayWithSubscribers; public Boolean onlyPlayWithSubscribers;
public Integer network_cache; public Integer networkCache;
public KurentoMediaOptions(boolean isOffer, String sdpOffer, Boolean hasAudio, Boolean hasVideo, public KurentoMediaOptions(boolean isOffer, String sdpOffer, Boolean hasAudio, Boolean hasVideo,
Boolean audioActive, Boolean videoActive, String typeOfVideo, Integer frameRate, String videoDimensions, Boolean audioActive, Boolean videoActive, String typeOfVideo, Integer frameRate, String videoDimensions,
@ -46,7 +46,7 @@ public class KurentoMediaOptions extends MediaOptions {
public KurentoMediaOptions(boolean isOffer, String sdpOffer, Boolean hasAudio, Boolean hasVideo, public KurentoMediaOptions(boolean isOffer, String sdpOffer, Boolean hasAudio, Boolean hasVideo,
Boolean audioActive, Boolean videoActive, String typeOfVideo, Integer frameRate, String videoDimensions, Boolean audioActive, Boolean videoActive, String typeOfVideo, Integer frameRate, String videoDimensions,
KurentoFilter filter, boolean doLoopback, String rtspUri, Boolean adaptativeBitrate, KurentoFilter filter, boolean doLoopback, String rtspUri, Boolean adaptativeBitrate,
Boolean onlyPlayWithSubscribers, Integer network_cache) { Boolean onlyPlayWithSubscribers, Integer networkCache) {
super(hasAudio, hasVideo, audioActive, videoActive, typeOfVideo, frameRate, videoDimensions, filter); super(hasAudio, hasVideo, audioActive, videoActive, typeOfVideo, frameRate, videoDimensions, filter);
this.isOffer = isOffer; this.isOffer = isOffer;
this.sdpOffer = sdpOffer; this.sdpOffer = sdpOffer;
@ -54,7 +54,7 @@ public class KurentoMediaOptions extends MediaOptions {
this.rtspUri = rtspUri; this.rtspUri = rtspUri;
this.adaptativeBitrate = adaptativeBitrate; this.adaptativeBitrate = adaptativeBitrate;
this.onlyPlayWithSubscribers = onlyPlayWithSubscribers; this.onlyPlayWithSubscribers = onlyPlayWithSubscribers;
this.network_cache = network_cache; this.networkCache = networkCache;
} }
public KurentoMediaOptions(Boolean hasAudio, Boolean hasVideo, Boolean audioActive, Boolean videoActive, public KurentoMediaOptions(Boolean hasAudio, Boolean hasVideo, Boolean audioActive, Boolean videoActive,
@ -67,7 +67,7 @@ public class KurentoMediaOptions extends MediaOptions {
this.rtspUri = streamProperties.rtspUri; this.rtspUri = streamProperties.rtspUri;
this.adaptativeBitrate = streamProperties.adaptativeBitrate; this.adaptativeBitrate = streamProperties.adaptativeBitrate;
this.onlyPlayWithSubscribers = streamProperties.onlyPlayWithSubscribers; this.onlyPlayWithSubscribers = streamProperties.onlyPlayWithSubscribers;
this.network_cache = streamProperties.network_cache; this.networkCache = streamProperties.networkCache;
} }
@Override @Override
@ -79,8 +79,8 @@ public class KurentoMediaOptions extends MediaOptions {
if (onlyPlayWithSubscribers != null) { if (onlyPlayWithSubscribers != null) {
json.addProperty("onlyPlayWithSubscribers", onlyPlayWithSubscribers); json.addProperty("onlyPlayWithSubscribers", onlyPlayWithSubscribers);
} }
if (network_cache != null) { if (networkCache != null) {
json.addProperty("networkCache", network_cache); json.addProperty("networkCache", networkCache);
} }
return json; return json;
} }

View File

@ -364,8 +364,8 @@ public abstract class MediaEndpoint {
if (!mediaOptions.adaptativeBitrate) { if (!mediaOptions.adaptativeBitrate) {
playerBuilder = playerBuilder.useEncodedMedia(); playerBuilder = playerBuilder.useEncodedMedia();
} }
if (mediaOptions.network_cache != null) { if (mediaOptions.networkCache != null) {
playerBuilder = playerBuilder.withNetworkCache(mediaOptions.network_cache); playerBuilder = playerBuilder.withNetworkCache(mediaOptions.networkCache);
} }
playerBuilder.buildAsync(new Continuation<PlayerEndpoint>() { playerBuilder.buildAsync(new Continuation<PlayerEndpoint>() {

View File

@ -755,19 +755,19 @@ public class SessionRestController {
String rtspUri; String rtspUri;
Boolean adaptativeBitrate; Boolean adaptativeBitrate;
Boolean onlyPlayWithSubscribers; Boolean onlyPlayWithSubscribers;
String network_cache_str; String networkCacheStr;
Integer network_cache; Integer networkCache;
String data; String data;
try { try {
type = (String) params.get("type"); type = (String) params.get("type");
rtspUri = (String) params.get("rtspUri"); rtspUri = (String) params.get("rtspUri");
adaptativeBitrate = (Boolean) params.get("adaptativeBitrate"); adaptativeBitrate = (Boolean) params.get("adaptativeBitrate");
onlyPlayWithSubscribers = (Boolean) params.get("onlyPlayWithSubscribers"); onlyPlayWithSubscribers = (Boolean) params.get("onlyPlayWithSubscribers");
network_cache_str = (String) params.get("networkCache"); networkCacheStr = (String) params.get("networkCache");
if (network_cache_str != null) if (networkCacheStr != null)
network_cache = Integer.parseInt(network_cache_str); networkCache = Integer.parseInt(networkCacheStr);
else else
network_cache = null; networkCache = null;
data = (String) params.get("data"); data = (String) params.get("data");
} catch (ClassCastException e) { } catch (ClassCastException e) {
return this.generateErrorResponse("Type error in some parameter", return this.generateErrorResponse("Type error in some parameter",
@ -792,7 +792,7 @@ public class SessionRestController {
String videoDimensions = null; String videoDimensions = null;
KurentoMediaOptions mediaOptions = new KurentoMediaOptions(true, null, hasAudio, hasVideo, audioActive, KurentoMediaOptions mediaOptions = new KurentoMediaOptions(true, null, hasAudio, hasVideo, audioActive,
videoActive, typeOfVideo, frameRate, videoDimensions, null, false, rtspUri, adaptativeBitrate, videoActive, typeOfVideo, frameRate, videoDimensions, null, false, rtspUri, adaptativeBitrate,
onlyPlayWithSubscribers, network_cache); onlyPlayWithSubscribers, networkCache);
// While closing a session IP cameras can't be published // While closing a session IP cameras can't be published
if (session.closingLock.readLock().tryLock()) { if (session.closingLock.readLock().tryLock()) {