Class XuggleThumbnailTool
java.lang.Object
com.xuggle.mediatool.AMediaGeneratorMixin
com.xuggle.mediatool.AMediaToolMixin
com.xuggle.mediatool.MediaToolAdapter
org.opensourcephysics.media.xuggle.XuggleThumbnailTool
- All Implemented Interfaces:
com.xuggle.mediatool.IMediaGenerator
,com.xuggle.mediatool.IMediaListener
,com.xuggle.mediatool.IMediaTool
public class XuggleThumbnailTool
extends com.xuggle.mediatool.MediaToolAdapter
A class to create thumbnail images of videos.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic File
createThumbnailFile
(Dimension dim, String pathToVideo, String pathToThumbnail) Attempts to create a new thumbnail file.static BufferedImage
createThumbnailImage
(Dimension dim, String pathToVideo) Attempts to create a new thumbnail image.void
onVideoPicture
(com.xuggle.mediatool.event.IVideoPictureEvent event) Creates a thumbnail image from the video image passed in by an IMediaReader.static void
start()
"Starts" this tool so minijar will include it BH: now called by XuggleVideoType creating this class using reflection.Methods inherited from class com.xuggle.mediatool.MediaToolAdapter
addListener, getListeners, onAddStream, onAudioSamples, onClose, onCloseCoder, onFlush, onOpen, onOpenCoder, onReadPacket, onWriteHeader, onWritePacket, onWriteTrailer, removeListener
-
Constructor Details
-
XuggleThumbnailTool
public XuggleThumbnailTool()
-
-
Method Details
-
start
public static void start()"Starts" this tool so minijar will include it BH: now called by XuggleVideoType creating this class using reflection. -
createThumbnailImage
Attempts to create a new thumbnail image.- Parameters:
dim
- the dimension of the imagepathToVideo
- the path to the source video file- Returns:
- the thumbnail image, or null if failed
-
createThumbnailFile
Attempts to create a new thumbnail file.- Parameters:
dim
- the dimension of the imagepathToVideo
- the path to the source video filepathToThumbnail
- the path to the desired thumbnail file- Returns:
- the thumbnail file, or null if failed
-
onVideoPicture
public void onVideoPicture(com.xuggle.mediatool.event.IVideoPictureEvent event) Creates a thumbnail image from the video image passed in by an IMediaReader.- Specified by:
onVideoPicture
in interfacecom.xuggle.mediatool.IMediaListener
- Overrides:
onVideoPicture
in classcom.xuggle.mediatool.MediaToolAdapter
- Parameters:
event
- the IVideoPictureEvent from the mediaReader
-