Package com.amazonaws.ivs.broadcast
Class StageVideoConfiguration
java.lang.Object
com.amazonaws.ivs.broadcast.StageVideoConfiguration
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumIndicates the priority of an Layer, which influences the bandwidth allocation among LocalStageStream.static classSimulcast configuration. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionintReturn desired fps for local preview or 0 if none was setReturn desired size for local preview or null if none was setThe current degradation preference.intReturns the maximum bitrate for the publishing video stream.intThe minimum bitrate for the publishing video stream.getSize()Returns the resolution of the publishing video stream.intReturns the target framerate of the publishing video stream.booleanReturns whether we are using the minBitrate.voidsetCameraCaptureQuality(int fps, BroadcastConfiguration.Vec2 size) Set camera capture quality, by default will match publish configuration.voidsetDegradationPreference(StageVideoConfiguration.DegradationPreference degradationPreference) Set the degradation preference for the publishing video stream.voidsetMaxBitrate(int maxBitrate) Set the maximum bitrate for the publishing video stream.voidsetMinBitrate(int minBitrate) Set the minimum bitrate for the publishing video stream.voidSet the resolution of the publishing video stream.voidsetTargetFramerate(int targetFramerate) Set the target framerate of the publishing video stream.voiduseMinBitrate(boolean useMinBitrate) Set whether we should use minBitrate.
-
Field Details
-
simulcast
-
-
Constructor Details
-
StageVideoConfiguration
public StageVideoConfiguration() -
StageVideoConfiguration
-
-
Method Details
-
getDegradationPreference
The current degradation preference. By default this is DegradationPreference.BALANCED. -
setDegradationPreference
public void setDegradationPreference(StageVideoConfiguration.DegradationPreference degradationPreference) Set the degradation preference for the publishing video stream.- Parameters:
degradationPreference- the desired degradation preference
-
getMaxBitrate
public int getMaxBitrate()Returns the maximum bitrate for the publishing video stream. By default this is 600k. -
setMaxBitrate
public void setMaxBitrate(int maxBitrate) Set the maximum bitrate for the publishing video stream. This value must be between 50k and 2,500k. If the provided bitrate falls outside this range, the bitrate will not be set and anIllegalArgumentExceptionwill be thrown.- Parameters:
maxBitrate- the desired maximum bitrate- Throws:
IllegalArgumentException- if bitrate is not valid
-
getMinBitrate
public int getMinBitrate()The minimum bitrate for the publishing video stream. By default this is 100k. -
setMinBitrate
public void setMinBitrate(int minBitrate) Set the minimum bitrate for the publishing video stream. This value must be between 50k 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 anIllegalArgumentExceptionwill be thrown.- 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) Set 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 anIllegalArgumentExceptionwill 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
Set 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 anIllegalArgumentExceptionwill 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) Set 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
-