Package com.amazonaws.ivs.broadcast
Class StageVideoConfiguration
- java.lang.Object
- 
- com.amazonaws.ivs.broadcast.StageVideoConfiguration
 
- 
 @RequiresApi(api=28) public class StageVideoConfiguration extends java.lang.Object
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classStageVideoConfiguration.DegradationPreferencestatic classStageVideoConfiguration.SimulcastSimulcast configuration.
 - 
Field SummaryFields Modifier and Type Field Description StageVideoConfiguration.Simulcastsimulcast
 - 
Constructor SummaryConstructors Constructor Description StageVideoConfiguration()StageVideoConfiguration(StageVideoConfiguration other)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCameraCaptureQualityFps()Return desired fps for local preview or 0 if none was setBroadcastConfiguration.Vec2getCameraCaptureQualitySize()Return desired size for local preview or null if none was setStageVideoConfiguration.DegradationPreferencegetDegradationPreference()intgetMaxBitrate()intgetMinBitrate()BroadcastConfiguration.Vec2getSize()intgetTargetFramerate()booleanisUsingMinBitrate()voidsetCameraCaptureQuality(int fps, BroadcastConfiguration.Vec2 size)Set camera capture quality, by default will match publish configuration.voidsetDegradationPreference(StageVideoConfiguration.DegradationPreference degradationPreference)Sets the degradation preference for the publishing video stream.voidsetMaxBitrate(int maxBitrate)Sets the maximum bitrate for the publishing video stream.voidsetMinBitrate(int minBitrate)Sets the minimum bitrate for the publishing video stream.voidsetSize(BroadcastConfiguration.Vec2 size)Sets the resolution of the publishing video stream.voidsetTargetFramerate(int targetFramerate)Sets the target framerate of the publishing video stream.voiduseMinBitrate(boolean useMinBitrate)Determines whether we should use minBitrate.
 
- 
- 
- 
Field Detail- 
simulcastpublic StageVideoConfiguration.Simulcast simulcast 
 
- 
 - 
Constructor Detail- 
StageVideoConfigurationpublic StageVideoConfiguration() 
 - 
StageVideoConfigurationpublic StageVideoConfiguration(StageVideoConfiguration other) 
 
- 
 - 
Method Detail- 
getDegradationPreferencepublic StageVideoConfiguration.DegradationPreference getDegradationPreference() - Returns:
- The current degradation preference. By default this is DegradationPreference.BALANCED.
 
 - 
setDegradationPreferencepublic 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
 
 - 
getMaxBitratepublic int getMaxBitrate() - Returns:
- The maximum bitrate for the publishing video stream. By default this is 900k.
 
 - 
setMaxBitratepublic 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 anIllegalArgumentExceptionwill be thrown.- Parameters:
- maxBitrate- the desired maximum bitrate
- Throws:
- java.lang.IllegalArgumentException- if bitrate is not valid
 
 - 
getMinBitratepublic int getMinBitrate() - Returns:
- The minimum bitrate for the publishing video stream. By default this is 100k.
 
 - 
setMinBitratepublic 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 anIllegalArgumentExceptionwill be thrown. This is ignored when simulcast is enabled.- Parameters:
- minBitrate- the desired minimum bitrate
- Throws:
- java.lang.IllegalArgumentException- if bitrate is not valid
 
 - 
getTargetFrameratepublic int getTargetFramerate() - Returns:
- The target framerate of the publishing video stream. By default this is 15.
 
 - 
setTargetFrameratepublic 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 anIllegalArgumentExceptionwill be thrown.- Parameters:
- targetFramerate- the desired target framerate
- Throws:
- java.lang.IllegalArgumentException- if target framerate is not valid
 
 - 
getSizepublic BroadcastConfiguration.Vec2 getSize() - Returns:
- The resolution of the publishing video stream. By default this is 360x640.
 
 - 
setSizepublic 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 anIllegalArgumentExceptionwill be thrown.- Parameters:
- size- the desired resolution
- Throws:
- java.lang.IllegalArgumentException- if resolution is not valid
 
 - 
isUsingMinBitratepublic boolean isUsingMinBitrate() - Returns:
- Whether we are using the minBitrate.
 
 - 
useMinBitratepublic void useMinBitrate(boolean useMinBitrate) Determines whether we should use minBitrate.- Parameters:
- useMinBitrate- whether to use minBitrate
 
 - 
setCameraCaptureQualitypublic void setCameraCaptureQuality(int fps, @Nullable BroadcastConfiguration.Vec2 size)Set camera capture quality, by default will match publish configuration.- Parameters:
- fps- Desired fps from 10 to 30, pass 0 for no preference
- size- Desired size from 640x360 to 1920x1080, pass null for no preference
- Throws:
- java.lang.IllegalArgumentException- if the parameters are not within correct range
 
 - 
getCameraCaptureQualityFpspublic int getCameraCaptureQualityFps() Return desired fps for local preview or 0 if none was set- Returns:
- Local preview fps or 0
 
 - 
getCameraCaptureQualitySize@Nullable public BroadcastConfiguration.Vec2 getCameraCaptureQualitySize() Return desired size for local preview or null if none was set- Returns:
- Local preview size or null
 
 
- 
 
-