public class SwScale
extends net.sf.fmj.media.AbstractCodec
| Modifier and Type | Field and Description |
|---|---|
static int |
MIN_SWS_SCALE_HEIGHT_OR_WIDTH
The minimum height and/or width of the input and/or output to be passed
to sws_scale in order to prevent its crashing.
|
| Constructor and Description |
|---|
SwScale()
Initializes a new SwScale instance which doesn't have an output
size and will use a default one when it becomes necessary unless an
explicit one is specified in the meantime.
|
SwScale(boolean fixOddYuv420Size)
Initializes a new SwScale instance which can optionally attempt
to keep the width and height of YUV 420 output even.
|
SwScale(boolean fixOddYuv420Size,
boolean preserveAspectRatio)
Initializes a new SwScale instance which can optionally attempt
to keep the width and height of YUV 420 output even and to preserve the
aspect ratio of the video frames provided to the instance as input to be
processed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close codec.
|
javax.media.Format |
getInputFormat()
Gets the Format in which this Codec is currently
configured to accept input media data.
|
Dimension |
getOutputSize()
Gets the output size.
|
javax.media.Format[] |
getSupportedOutputFormats(javax.media.Format input)
Gets the supported output formats for an input one.
|
int |
process(javax.media.Buffer in,
javax.media.Buffer out)
Processes (converts color space and/or scales) an input Buffer
into an output Buffer.
|
javax.media.Format |
setInputFormat(javax.media.Format format)
Sets the input format.
|
javax.media.Format |
setOutputFormat(javax.media.Format format)
Sets the Format in which this Codec is to output media
data.
|
void |
setOutputSize(Dimension size)
Sets the output size.
|
checkInputBuffer, dump, getOutputFormat, getSupportedInputFormats, isEOM, propagateEOMaddControl, getControl, getControls, removeControlpublic static final int MIN_SWS_SCALE_HEIGHT_OR_WIDTH
public SwScale()
public SwScale(boolean fixOddYuv420Size)
fixOddYuv420Size - true to have the new instance keep the
width and height of YUV 420 output even; otherwise, falsepublic SwScale(boolean fixOddYuv420Size,
boolean preserveAspectRatio)
fixOddYuv420Size - true to have the new instance keep the
width and height of YUV 420 output even; otherwise, falsepreserveAspectRatio - true to have the new instance
preserve the aspect ratio of the video frames provided to it as input to
be processed; otherwise, falsepublic void close()
close in interface javax.media.PlugInclose in class net.sf.fmj.media.AbstractPlugInpublic javax.media.Format getInputFormat()
Makes the protected super implementation public.
getInputFormat in class net.sf.fmj.media.AbstractCodecAbstractCodec.getInputFormat()public Dimension getOutputSize()
public javax.media.Format[] getSupportedOutputFormats(javax.media.Format input)
getSupportedOutputFormats in interface javax.media.CodecgetSupportedOutputFormats in class net.sf.fmj.media.AbstractCodecinput - input format to get supported output ones forpublic int process(javax.media.Buffer in,
javax.media.Buffer out)
process in interface javax.media.Codecprocess in class net.sf.fmj.media.AbstractCodecin - the input Buffer to process (from)out - the output Buffer to process intopublic javax.media.Format setInputFormat(javax.media.Format format)
setInputFormat in interface javax.media.CodecsetInputFormat in class net.sf.fmj.media.AbstractCodecformat - format to setpublic javax.media.Format setOutputFormat(javax.media.Format format)
setOutputFormat in interface javax.media.CodecsetOutputFormat in class net.sf.fmj.media.AbstractCodecformat - the Format in which this Codec is to
output media datapublic void setOutputSize(Dimension size)
size - the size to set as the output sizeCopyright © 2021 jitsi.org. All rights reserved.