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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static File
    createThumbnailFile(Dimension dim, String pathToVideo, String pathToThumbnail)
    Attempts to create a new thumbnail file.
    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
    "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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static BufferedImage createThumbnailImage(Dimension dim, String pathToVideo)
      Attempts to create a new thumbnail image.
      Parameters:
      dim - the dimension of the image
      pathToVideo - the path to the source video file
      Returns:
      the thumbnail image, or null if failed
    • createThumbnailFile

      public static File createThumbnailFile(Dimension dim, String pathToVideo, String pathToThumbnail)
      Attempts to create a new thumbnail file.
      Parameters:
      dim - the dimension of the image
      pathToVideo - the path to the source video file
      pathToThumbnail - 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 interface com.xuggle.mediatool.IMediaListener
      Overrides:
      onVideoPicture in class com.xuggle.mediatool.MediaToolAdapter
      Parameters:
      event - the IVideoPictureEvent from the mediaReader