Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into resolve-CVE-202-13956
Browse files Browse the repository at this point in the history
  • Loading branch information
mekya committed Nov 3, 2024
2 parents 60f5001 + e5a9da0 commit 0da89e1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/main/java/io/antmedia/AppSettings.java
Original file line number Diff line number Diff line change
Expand Up @@ -2275,6 +2275,13 @@ public boolean isWriteStatsToDatastore() {
@Value("${srtReceiveLatencyInMs:150}")
private int srtReceiveLatencyInMs = 150;

/*
* The size of encoding queue to keep the frames waiting for encoding in Stream Adaptor
* default: 150 (5 seconds frame for 30 fps stream)
*/
@Value("${encodingQueueSize:150}")
private int encodingQueueSize = 150;

//Make sure you have a default constructor because it's populated by MongoDB
public AppSettings() {
try {
Expand Down Expand Up @@ -3971,4 +3978,11 @@ public void setWebhookStreamStatusUpdatePeriodMs(long webhookStreamStatusUpdateP
}


public int getEncodingQueueSize() {
return encodingQueueSize;
}

public void setEncodingQueueSize(int encodingQueueSize) {
this.encodingQueueSize = encodingQueueSize;
}
}
6 changes: 6 additions & 0 deletions src/main/java/io/antmedia/webrtc/api/IWebRTCClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ public interface IWebRTCClient {
* @return
*/
public String getStreamId();

/**
* Getter for remote ip address
* @return
*/
public String getRemoteIpAddress();


}
5 changes: 4 additions & 1 deletion src/test/java/io/antmedia/test/AppSettingsUnitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -642,14 +642,17 @@ public void testUnsetAppSettings(AppSettings appSettings) {

assertEquals(-1, appSettings.getWebhookStreamStatusUpdatePeriodMs());

assertEquals(150, appSettings.getEncodingQueueSize());
appSettings.setEncodingQueueSize(200);
assertEquals(200, appSettings.getEncodingQueueSize());


//if we add a new field, we just need to check its default value in this test
//When a new field is added or removed please update the number of fields and make this test pass
//by also checking its default value.

assertEquals("New field is added to settings. PAY ATTENTION: Please CHECK ITS DEFAULT VALUE and fix the number of fields.",
189, numberOfFields);
190, numberOfFields);
}


Expand Down

0 comments on commit 0da89e1

Please sign in to comment.