Package com.avpkit.core.video
Class ArgbConverter
- java.lang.Object
-
- com.avpkit.core.video.AConverter
-
- com.avpkit.core.video.ArgbConverter
-
- All Implemented Interfaces:
IConverter
public class ArgbConverter extends AConverter
A converter to translateIVideoPictures to and fromBufferedImages of typeBufferedImage.TYPE_INT_ARGB.
-
-
Field Summary
-
Fields inherited from class com.avpkit.core.video.AConverter
mImageHeight, mImageWidth, mPictureHeight, mPictureWidth, mToImageResampler, mToPictureResampler
-
-
Constructor Summary
Constructors Constructor Description ArgbConverter(IPixelFormat.Type pictureType, int pictureWidth, int pictureHeight, int imageWidth, int imageHeight)Construct as converter to translateIVideoPictures to and fromBufferedImages of typeBufferedImage.TYPE_INT_ARGB.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelete()Release any resources used by this converter.java.awt.image.BufferedImagetoImage(IVideoPicture picture)Converts anIVideoPictureto aBufferedImage.IVideoPicturetoPicture(java.awt.image.BufferedImage image, long timestamp)Converts aBufferedImageto anIVideoPicture.-
Methods inherited from class com.avpkit.core.video.AConverter
close, getDescription, getImageType, getPictureType, getRequiredPictureType, resample, toString, validateImage, validatePicture, willResample
-
-
-
-
Constructor Detail
-
ArgbConverter
public ArgbConverter(IPixelFormat.Type pictureType, int pictureWidth, int pictureHeight, int imageWidth, int imageHeight)
Construct as converter to translateIVideoPictures to and fromBufferedImages of typeBufferedImage.TYPE_INT_ARGB.- Parameters:
pictureType- the picture type recognized by this converterpictureWidth- the width of picturespictureHeight- the height of picturesimageWidth- the width of imagesimageHeight- the height of images
-
-
Method Detail
-
toPicture
public IVideoPicture toPicture(java.awt.image.BufferedImage image, long timestamp)
Converts aBufferedImageto anIVideoPicture.- Parameters:
image- the source buffered image.timestamp- the time stamp which should be attached to the the video picture (in microseconds).
-
toImage
public java.awt.image.BufferedImage toImage(IVideoPicture picture)
Converts anIVideoPictureto aBufferedImage.- Parameters:
picture- the source video picture.
-
delete
public void delete()
Description copied from interface:IConverterRelease any resources used by this converter. Calls to the converter after this call are illegal and may fail in unspecified ways.
-
-