-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FEC 10479 - Multicast integraion (#714)
* case udp * multicast support + setup * Update MulticastSettings.java
- Loading branch information
Showing
4 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 66 additions & 0 deletions
66
playkit/src/main/java/com/kaltura/playkit/player/MulticastSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
package com.kaltura.playkit.player; | ||
|
||
public class MulticastSettings { | ||
|
||
private boolean useExoDefaultSettings = true; | ||
// maxPacketSize The maximum datagram packet size, in bytes. | ||
private int maxPacketSize = 3000; | ||
// socketTimeoutMillis The socket timeout in milliseconds. A timeout of zero is interpreted | ||
private int socketTimeoutMillis = 10000; | ||
|
||
private ExtractorMode extractorMode = ExtractorMode.MODE_MULTI_PMT; | ||
|
||
enum ExtractorMode { | ||
MODE_MULTI_PMT(0), | ||
MODE_SINGLE_PMT(1), | ||
MODE_HLS(2); | ||
|
||
public final int mode; | ||
ExtractorMode(int mode) { | ||
this.mode = mode; | ||
} | ||
} | ||
|
||
public MulticastSettings() {} | ||
|
||
public boolean getUseExoDefaultSettings() { | ||
return useExoDefaultSettings; | ||
} | ||
|
||
public int getMaxPacketSize() { | ||
return maxPacketSize; | ||
} | ||
|
||
public MulticastSettings setUseExoDefaultSettings(boolean useExoDefaultSettings) { | ||
this.useExoDefaultSettings = useExoDefaultSettings; | ||
return this; | ||
} | ||
|
||
public MulticastSettings setMaxPacketSize(int maxPacketSize) { | ||
this.maxPacketSize = maxPacketSize; | ||
this.useExoDefaultSettings = false; | ||
return this; | ||
} | ||
|
||
public int getSocketTimeoutMillis() { | ||
return socketTimeoutMillis; | ||
} | ||
|
||
public MulticastSettings setSocketTimeoutMillis(int socketTimeoutMillis) { | ||
this.socketTimeoutMillis = socketTimeoutMillis; | ||
this.useExoDefaultSettings = false; | ||
return this; | ||
} | ||
|
||
public ExtractorMode getExtractorMode() { | ||
return extractorMode; | ||
} | ||
|
||
public MulticastSettings setExtractorMode(ExtractorMode extractorMode) { | ||
if (extractorMode != null) { | ||
this.extractorMode = extractorMode; | ||
} | ||
this.useExoDefaultSettings = false; | ||
return this; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters