/** * Initializes a new <tt>VideoGreyFadingMediaDevice</tt> with the given * framerate and dimension. * @param framerate the framerate of the <tt>CaptureDevice</tt> behind this * <tt>MediaDevice</tt>. * @param dimension the dimension (width & height) of the * <tt>CaptureDevice</tt> behind this <tt>MediaDevice</tt>. */ public VideoGreyFadingMediaDevice(int framerate, Dimension dimension) { super(new CaptureDeviceInfo( "GreyFadingVideo", new MediaLocator("greyfading:"), new Format[] { new RGBFormat( dimension, // size Format.NOT_SPECIFIED, // maxDataLength Format.byteArray, // dataType framerate, // frameRate 32, // bitsPerPixel 2 /* red */, 3 /* green */, 4 /* blue */) }), MediaType.VIDEO); } }
int bitsPerPixel = rgbFormat.getBitsPerPixel(); int pixelStride = rgbFormat.getPixelStride(); format.getFrameRate(), bitsPerPixel, rgbFormat.getRedMask(), rgbFormat.getGreenMask(), rgbFormat.getBlueMask(), pixelStride, ((pixelStride == Format.NOT_SPECIFIED) ? Format.NOT_SPECIFIED rgbFormat.getFlipped(), rgbFormat.getEndian());
switch (rgb.getBitsPerPixel()) switch (rgb.getRedMask())
/** * Initializes a new <tt>SwScale</tt> 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. * * @param fixOddYuv420Size <tt>true</tt> to have the new instance keep the * width and height of YUV 420 output even; otherwise, <tt>false</tt> * @param preserveAspectRatio <tt>true</tt> to have the new instance * preserve the aspect ratio of the video frames provided to it as input to * be processed; otherwise, <tt>false</tt> */ public SwScale(boolean fixOddYuv420Size, boolean preserveAspectRatio) { this.fixOddYuv420Size = fixOddYuv420Size; this.preserveAspectRatio = preserveAspectRatio; inputFormats = new Format[] { new AVFrameFormat(), new RGBFormat(), new YUVFormat(YUVFormat.YUV_420) }; addControl(frameProcessingControl); }
new RGBFormat( ((width == 0) && (height == 0) ? null
new Format[] new RGBFormat( size,
FFmpeg.PIX_FMT_ARGB, Format.NOT_SPECIFIED), new RGBFormat(
VideoFormat[] desiredFormats = new VideoFormat[] {new H263Format(), new JPEGFormat(), new RGBFormat(), new YUVFormat()}; for (VideoFormat checkFormat : desiredFormats) {
FFmpeg.PIX_FMT_ARGB, Format.NOT_SPECIFIED), new RGBFormat(
new RGBFormat() });