Package 

Class TTMLParser


  • 
    public class TTMLParser
    
                        

    Implementation of a parser which understands much of the DFXP TTML specification (though not all). Specifically, these items are recognized:

    • Region element definitions
    • Style element definitions
    • Basic body structure with with P tags wrapped in top-level divs which contain spans, br's and unspanned text
    • Method Detail

      • parseTimeValue

        @Deprecated() static int parseTimeValue(String value)

        Parses a string representing a time code position within a video following the format:HH:MM:ss.mmm or HH:MM:ss:mmWhere the following values are expected:

        • HH - a 2 digit hours value, zero padded
        • MM - a 2 digit minutes value, zero padded
        • ss - a 2 digit seconds value, zero padded
        • mmm - a 2 or 3 digit milliseconds value, zero padded
        The parsed value is converted to an integer representing the total number of milliseconds represented by thistime code expression, relative to the start of a video timeline.
        Parameters:
        value - the time code expression to be parsed
      • parseTimeValueLong

         static long parseTimeValueLong(String value)

        Parses a string representing a time code position within a video following the format:HH:MM:ss.mmm or HH:MM:ss:mmWhere the following values are expected:

        • HH - a 2 digit hours value, zero padded
        • MM - a 2 digit minutes value, zero padded
        • ss - a 2 digit seconds value, zero padded
        • mmm - a 2 or 3 digit milliseconds value, zero padded
        The parsed value is converted to an integer representing the total number of milliseconds represented by thistime code expression, relative to the start of a video timeline.
        Parameters:
        value - the time code expression to be parsed