Record Class SubtitleCues.Cue

java.lang.Object
java.lang.Record
limn.video.ffmpeg.SubtitleCues.Cue
Record Components:
text - the cue, as plain text. Subtitle formats carry markup (an ASS dialogue line has override tags like {\an8} for placement), and none of it survives to here: the leading dialogue fields, the brace-delimited override runs and the escapes are all removed by the decoder side, \N becoming a line break and \n and \h a space. What arrives is what an ordinary text stack can draw, which is the point: a cue handed over with its markup intact is a cue an application draws literally. It may contain line breaks and it is never empty
startMicros - when it appears, on the same timeline as a picture's presentation time: the container's start time is subtracted from both, so a cue and the picture it belongs over carry comparable numbers
endMicros - when it goes, exclusive; SubtitleCues.END_UNKNOWN for a cue the container gave no duration, which is resolved to the next cue's start as soon as one is read
Enclosing class:
SubtitleCues

public static record SubtitleCues.Cue(String text, long startMicros, long endMicros) extends Record
One subtitle cue: its text, and the interval it is on screen for.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Cue(String text, long startMicros, long endMicros)
    Creates an instance of a Cue record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the value of the endMicros record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the startMicros record component.
    Returns the value of the text record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Cue

      public Cue(String text, long startMicros, long endMicros)
      Creates an instance of a Cue record class.
      Parameters:
      text - the value for the text record component
      startMicros - the value for the startMicros record component
      endMicros - the value for the endMicros record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • text

      public String text()
      Returns the value of the text record component.
      Returns:
      the value of the text record component
    • startMicros

      public long startMicros()
      Returns the value of the startMicros record component.
      Returns:
      the value of the startMicros record component
    • endMicros

      public long endMicros()
      Returns the value of the endMicros record component.
      Returns:
      the value of the endMicros record component