public class VideoSource extends MediaSource
Modifier and Type | Class and Description |
---|---|
static class |
VideoSource.AspectRatio
Simple aspect ratio clas for use in constraining output format.
|
MediaSource.State
Constructor and Description |
---|
VideoSource(long nativeSource) |
Modifier and Type | Method and Description |
---|---|
void |
adaptOutputFormat(int width,
int height,
int fps)
Calling this function will cause frames to be scaled down to the requested resolution.
|
void |
adaptOutputFormat(int landscapeWidth,
int landscapeHeight,
int portraitWidth,
int portraitHeight,
int fps)
Same as above, but allows setting two different target resolutions depending on incoming
frame orientation.
|
void |
adaptOutputFormat(VideoSource.AspectRatio targetLandscapeAspectRatio,
java.lang.Integer maxLandscapePixelCount,
VideoSource.AspectRatio targetPortraitAspectRatio,
java.lang.Integer maxPortraitPixelCount,
java.lang.Integer maxFps)
Same as above, with even more control as each constraint is optional.
|
void |
dispose() |
CapturerObserver |
getCapturerObserver() |
void |
setIsScreencast(boolean isScreencast) |
void |
setVideoProcessor(VideoProcessor newVideoProcessor)
Hook for injecting a custom video processor before frames are passed onto WebRTC.
|
getNativeMediaSource, state
public void adaptOutputFormat(int width, int height, int fps)
public void adaptOutputFormat(int landscapeWidth, int landscapeHeight, int portraitWidth, int portraitHeight, int fps)
public void adaptOutputFormat(VideoSource.AspectRatio targetLandscapeAspectRatio, @Nullable java.lang.Integer maxLandscapePixelCount, VideoSource.AspectRatio targetPortraitAspectRatio, @Nullable java.lang.Integer maxPortraitPixelCount, @Nullable java.lang.Integer maxFps)
public void setIsScreencast(boolean isScreencast)
public void setVideoProcessor(@Nullable VideoProcessor newVideoProcessor)
public CapturerObserver getCapturerObserver()
public void dispose()
dispose
in class MediaSource
6.4.1