File tree Expand file tree Collapse file tree 2 files changed +103
-59
lines changed
src/main/java/org/red5/server Expand file tree Collapse file tree 2 files changed +103
-59
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,11 @@ public final class Red5 {
6666 * Server capabilities
6767 */
6868 public static final Integer CAPABILITIES = Integer .valueOf (33 );
69+
70+ /**
71+ * Since 128 is way too small, we'll use 1024 by default when publish or play are called.
72+ */
73+ public static int targetChunkSize = 1024 ;
6974
7075 /**
7176 * Data version for NetStatusEvents
@@ -251,4 +256,23 @@ public static Red5 from(CompositeData cd) {
251256 return instance ;
252257 }
253258
259+ /**
260+ * Sets the target chunk size to use for publish and play invocations. Default is 1024 which is much greater
261+ * than the original default of 128.
262+ *
263+ * @param targetChunkSize the chunk size to use
264+ */
265+ public static void setTargetChunkSize (int targetChunkSize ) {
266+ Red5 .targetChunkSize = targetChunkSize ;
267+ }
268+
269+ /**
270+ * Returns the target chunk size.
271+ *
272+ * @return targetChunkSize
273+ */
274+ public static int getTargetChunkSize () {
275+ return targetChunkSize ;
276+ }
277+
254278}
You can’t perform that action at this time.
0 commit comments