Package com.amazonaws.ivs.broadcast
Class StageVideoConfiguration
- java.lang.Object
-
- com.amazonaws.ivs.broadcast.StageVideoConfiguration
-
@RequiresApi(api=29) public class StageVideoConfiguration extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StageVideoConfiguration.DegradationPreference
-
Field Summary
Fields Modifier and Type Field Description StageVideoConfiguration.Simulcast
simulcast
-
Constructor Summary
Constructors Constructor Description StageVideoConfiguration()
StageVideoConfiguration(StageVideoConfiguration other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StageVideoConfiguration.DegradationPreference
getDegradationPreference()
int
getMaxBitrate()
int
getMinBitrate()
BroadcastConfiguration.Vec2
getSize()
int
getTargetFramerate()
boolean
isUsingMinBitrate()
void
setDegradationPreference(StageVideoConfiguration.DegradationPreference degradationPreference)
Sets the degradation preference for the publishing video stream.void
setMaxBitrate(int maxBitrate)
Sets the maximum bitrate for the publishing video stream.void
setMinBitrate(int minBitrate)
Sets the minimum bitrate for the publishing video stream.void
setSize(BroadcastConfiguration.Vec2 size)
Sets the resolution of the publishing video stream.void
setTargetFramerate(int targetFramerate)
Sets the target framerate of the publishing video stream.void
useMinBitrate(boolean useMinBitrate)
Determines whether we should use minBitrate.
-
-
-
Field Detail
-
simulcast
public StageVideoConfiguration.Simulcast simulcast
-
-
Constructor Detail
-
StageVideoConfiguration
public StageVideoConfiguration()
-
StageVideoConfiguration
public StageVideoConfiguration(StageVideoConfiguration other)
-
-
Method Detail
-
getDegradationPreference
public StageVideoConfiguration.DegradationPreference getDegradationPreference()
- Returns:
- The current degradation preference. By default this is DegradationPreference.BALANCED.
-
setDegradationPreference
public void setDegradationPreference(StageVideoConfiguration.DegradationPreference degradationPreference)
Sets the degradation preference for the publishing video stream. This is ignored when simulcast is enabled.- Parameters:
degradationPreference
- the desired degradation preference
-
getMaxBitrate
public int getMaxBitrate()
- Returns:
- The maximum bitrate for the publishing video stream. By default this is 900k.
-
setMaxBitrate
public void setMaxBitrate(int maxBitrate)
Sets the maximum bitrate for the publishing video stream. This value must be between 100k and 2,500k. If the provided bitrate falls outside this range, the bitrate will not be set and anIllegalArgumentException
will be thrown.- Parameters:
maxBitrate
- the desired maximum bitrate- Throws:
java.lang.IllegalArgumentException
- if bitrate is not valid
-
getMinBitrate
public int getMinBitrate()
- Returns:
- The minimum bitrate for the publishing video stream. By default this is 100k.
-
setMinBitrate
public void setMinBitrate(int minBitrate)
Sets the minimum bitrate for the publishing video stream. This value must be between 100k and 2,500k, and is only enabled when useMinBitrate is true. If the provided bitrate falls outside this range, the bitrate will not be set and anIllegalArgumentException
will be thrown. This is ignored when simulcast is enabled.- Parameters:
minBitrate
- the desired minimum bitrate- Throws:
java.lang.IllegalArgumentException
- if bitrate is not valid
-
getTargetFramerate
public int getTargetFramerate()
- Returns:
- The target framerate of the publishing video stream. By default this is 15.
-
setTargetFramerate
public void setTargetFramerate(int targetFramerate)
Sets the target framerate of the publishing video stream. The target framerate must be between 10 and 30. If the provided frame rate is outside of this range, the framerate will not be set and anIllegalArgumentException
will be thrown.- Parameters:
targetFramerate
- the desired target framerate- Throws:
java.lang.IllegalArgumentException
- if target framerate is not valid
-
getSize
public BroadcastConfiguration.Vec2 getSize()
- Returns:
- The resolution of the publishing video stream. By default this is 360x640.
-
setSize
public void setSize(BroadcastConfiguration.Vec2 size)
Sets the resolution of the publishing video stream. The width and height must both be within 160 and 1280, and the maximum total number of pixels is 921,600. So the smallest size you can provide is 160x160, and the largest is either 720x1280 or 1280x720. If the provided resolution does not meet this criteria, the resolution will not be set and anIllegalArgumentException
will be thrown.- Parameters:
size
- the desired resolution- Throws:
java.lang.IllegalArgumentException
- if resolution is not valid
-
isUsingMinBitrate
public boolean isUsingMinBitrate()
- Returns:
- Whether we are using the minBitrate.
-
useMinBitrate
public void useMinBitrate(boolean useMinBitrate)
Determines whether we should use minBitrate.- Parameters:
useMinBitrate
- whether to use minBitrate
-
-