TimecodeSegment (Media Authoring with Java API)
Date: 2016-02-05

tv.amwa.maj.model

## Interface TimecodeSegment

- All Superinterfaces:
    Component, InterchangeObject, MediaEntity, MetadataObject, Segment
  All Known Subinterfaces:
    QTimecode
  All Known Implementing Classes:
    TimecodeSegmentImpl

      public interface TimecodeSegment
      extends Segment

  Specifies the storage of video tape or audio tape timecode information.

  In contrast to a timecode stream, a timecode segment specifies timecode by specifying the single starting timecode value; other timecode values are calculated from the starting timecode and the time offset.

  See the section on naming conflicts in the package documentation.

  See Also:
    `TimecodeValue`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `TimecodeSegment` | `clone()` Create a cloned copy of this timecode segment.
    `boolean` | `getDropFrame()` Determines whether the timecode is drop (`true` value) or nondrop (`false` value).
    `short` | `getFramesPerSecond()` Returns the frames per second of the videotape or audio tape of the timecode.
    `long` | `getStartTimecode()` Returns the timecode value by the number of frames offset from the start of the video or audio.
    `TimecodeValue` | `getTimecode()` Returns the timecode value for this timecode segment, which specifies the start timecode for the segment, the frames per second of the tape and whether the timecode is drop or non-drop.
    `void` | `setTimecode(TimecodeValue timecode)` Set the timecode value for this timecode segment, which specifies the start timecode for the segment, the frames per second of the tape and whether the timecode is drop or non-drop.

    - ### Methods inherited from interface tv.amwa.maj.model.Segment

      `generateSequence, segmentOffsetToTC, segmentTCToOffset`

    - ### Methods inherited from interface tv.amwa.maj.model.Component

      `appendComponentAttribute, appendComponentAttribute, appendComponentKLVData, appendComponentUserComment, appendComponentUserComment, clearComponentAttributes, clearComponentKLVData, clearComponentUserComments, countComponentAttributes, countComponentKLVData, countComponentUserComments, getComponentAttributes, getComponentDataDefinition, getComponentKLVData, getComponentLength, getComponentUserComments, getLengthPresent, removeComponentAttribute, removeComponentKLVData, removeComponentUserComment, setComponentDataDefinition, setComponentLength, setLengthPresent`

    - ### Methods inherited from interface tv.amwa.maj.model.InterchangeObject

      `addApplicationPlugin, clearApplicationPlugins, containsApplicationPlugin, containsApplicationPlugin, countApplicationPlugins, deepEquals, disableGenerationTracking, enableGenerationTracking, equals, getApplicationPlugins, getGeneration, getLinkedGenerationID, getObjectClass, isGenerationTracked, removeApplicationPlugin, removeApplicationPlugin, setLinkedGenerationID, setObjectClass, toString`

    - ### Methods inherited from interface tv.amwa.maj.industry.MediaEntity

      `getPersistentID, setPersistentIndex`

- - ### Method Detail

    - #### getTimecode

          TimecodeValue getTimecode()

      Returns the timecode value for this timecode segment, which specifies the start timecode for the segment, the frames per second of the tape and whether the timecode is drop or non-drop.

      Returns:
        Timecode value for the timecode segment.
      See Also:
        `getStartTimecode()`, `getFramesPerSecond()`, `getDropFrame()`

    - #### getStartTimecode

          @FrameOffset
          long getStartTimecode()

      Returns the timecode value by the number of frames offset from the start of the video or audio.

      Returns:
        Timecode offset value.
      See Also:
        `getTimecode()`

    - #### getFramesPerSecond

          @UInt16
          short getFramesPerSecond()

      Returns the frames per second of the videotape or audio tape of the timecode.

      Returns:
        Frames per second of the videotape or audiotape of the timecode.
      See Also:
        `getTimecode()`

    - #### getDropFrame

          boolean getDropFrame()

      Determines whether the timecode is drop (`true` value) or nondrop (`false` value).

      If drop is set to `true`, the real frames-per-second rate represented by the timecode is 29.97. Calculations of the real time represented by a timecode or to create a textual representation of the time code drop 108 selected frames per hour.

      Returns:
        Is the timecode a drop value?
      See Also:
        `getTimecode()`

    - #### setTimecode

          void setTimecode(TimecodeValue timecode)
                    throws NullPointerException

      Set the timecode value for this timecode segment, which specifies the start timecode for the segment, the frames per second of the tape and whether the timecode is drop or non-drop.

      Parameters:
        `timecode` - Timecode value for this timecode segment.
      Throws:
        `NullPointerException` - The given value for the timecode is `null`.
      See Also:
        `Forge.makeTimecode(long, short, boolean)`

    - #### clone

          TimecodeSegment clone()

      Create a cloned copy of this timecode segment.

      Specified by:
        `clone` in interface `Component`
      Specified by:
        `clone` in interface `InterchangeObject`
      Specified by:
        `clone` in interface `MediaEntity`
      Specified by:
        `clone` in interface `Segment`
      Returns:
        Cloned copy of this timecode segment.

(c)2007-2016 Richard Cartwright, all rights reserved. Licensed under Apache 2 license and subject to the AMWA IPR policy.