Package com.amazonaws.ivs.broadcast
Class StageVideoConfiguration
java.lang.Object
com.amazonaws.ivs.broadcast.StageVideoConfiguration
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
static class
Simulcast configuration. -
Field Summary
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionint
Return desired fps for local preview or 0 if none was setReturn desired size for local preview or null if none was setint
int
getSize()
int
boolean
void
setCameraCaptureQuality
(int fps, BroadcastConfiguration.Vec2 size) Set camera capture quality, by default will match publish configuration.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
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 Details
-
simulcast
-
-
Constructor Details
-
StageVideoConfiguration
public StageVideoConfiguration() -
StageVideoConfiguration
-
-
Method Details
-
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:
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:
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:
IllegalArgumentException
- if target framerate is not valid
-
getSize
- Returns:
- The resolution of the publishing video stream. By default this is 360x640.
-
setSize
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:
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
-
setCameraCaptureQuality
Set camera capture quality, by default will match publish configuration.- Parameters:
fps
- Desired fps from 10 to 30, pass 0 for no preferencesize
- Desired size from 640x360 to 1920x1080, pass null for no preference- Throws:
IllegalArgumentException
- if the parameters are not within correct range
-
getCameraCaptureQualityFps
public int getCameraCaptureQualityFps()Return desired fps for local preview or 0 if none was set- Returns:
- Local preview fps or 0
-
getCameraCaptureQualitySize
Return desired size for local preview or null if none was set- Returns:
- Local preview size or null
-