Class MovieVideo

All Implemented Interfaces:
PropertyChangeListener, EventListener, Drawable, Interactive, Measurable, DrawableImage, InteractiveImage, Trackable, Video
Direct Known Subclasses:
JSMovieVideo, XuggleVideo

public abstract class MovieVideo extends VideoAdapter
An abstract class that describes common aspects of VideoAdapters that involve actual digital video sources such as MP4 (JSMovieVideo and XuggleVideo). (formerly MovieVideoI interface)
Author:
hansonr
  • Field Details

    • PROPERTY_VIDEO_PROGRESS

      public static final String PROPERTY_VIDEO_PROGRESS
      See Also:
    • PROPERTY_VIDEO_STALLED

      public static final String PROPERTY_VIDEO_STALLED
      See Also:
    • PLATFORM_JAVA

      protected static final String PLATFORM_JAVA
      See Also:
    • TIME_SLOP_MS

      protected static final double TIME_SLOP_MS
      See Also:
    • fileName

      protected String fileName
    • url

      protected URL url
    • frameTimes

      protected ArrayList<Double> frameTimes
      These are temporary only, during loading. see startTimes
    • allowControlData

      protected boolean allowControlData
      set true to read control data start_times, duration (for rawDuration), and frame_count; false to instead scan video again
    • rawDuration

      protected double rawDuration
      the duration reported by the video, possibly longer for Xuggle than this.getDuration(); in seconds
    • nominalFrameRate

      protected int nominalFrameRate
      nominal rounded frame rate -- 24, 25, 30, 50, 60...; used only for offset to center of frames
    • path

      protected String path
    • isLocal

      protected boolean isLocal
    • isExport

      protected boolean isExport
    • rawFrameCount

      protected int rawFrameCount
      frame count by this engine's calculation; may be different from frameCount, which could be coming from another creator via a video XMLControlElement
    • control

      protected XMLControl control
      the originating video XMLControlElement, if it exists
    • isVariableFrameRate

      protected boolean isVariableFrameRate
    • frameRateMinimum

      protected double frameRateMinimum
    • frameRateMaximum

      protected double frameRateMaximum
  • Constructor Details

  • Method Details

    • getPlatform

      protected abstract String getPlatform()
      Get this platform's name
      Returns:
      "Java" or navigator.userAgent
    • seekMS

      protected abstract boolean seekMS(double timeMS)
      seek to a time in milliseconds.
      Parameters:
      timeMS -
      Returns:
    • finalizeLoading

      protected abstract void finalizeLoading() throws IOException
      Throws:
      IOException
    • getImageForMSTimePoint

      protected abstract BufferedImage getImageForMSTimePoint(double timeSec)
    • setStartTimes

      protected void setStartTimes()
      Specified by:
      setStartTimes in class VideoAdapter
    • getFrameNumberBefore

      protected int getFrameNumberBefore(double time)
      Gets the number of the last frame before the specified time. a 0.1-ms slop is added
      Parameters:
      time - the time in milliseconds
      Returns:
      the frame number, or -1 if not found
    • setFromControl

      protected XMLControl setFromControl(XMLControl control)
      Set frameCount, startTimes, and rawDuration if available from the control. Ignore if the saved platform string is "Java" and
      Parameters:
      control -
      Returns:
      null if cannot be set (older versions)
    • setFromMediaTrackInfo

      protected String setFromMediaTrackInfo(Map<String,Object> info)
      JavaScript only -- use MediaInfo for rate information
      Parameters:
      info -
      Returns:
      error string or null if no error