Class SegmentDetection

    • Method Detail

      • type

        public final SegmentType type()

        The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

        If the service returns an enum value that is not available in the current SDK version, type will return SegmentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

        Returns:
        The type of the segment. Valid values are TECHNICAL_CUE and SHOT.
        See Also:
        SegmentType
      • typeAsString

        public final String typeAsString()

        The type of the segment. Valid values are TECHNICAL_CUE and SHOT.

        If the service returns an enum value that is not available in the current SDK version, type will return SegmentType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from typeAsString().

        Returns:
        The type of the segment. Valid values are TECHNICAL_CUE and SHOT.
        See Also:
        SegmentType
      • startTimestampMillis

        public final Long startTimestampMillis()

        The start time of the detected segment in milliseconds from the start of the video. This value is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of 100 millis.

        Returns:
        The start time of the detected segment in milliseconds from the start of the video. This value is rounded down. For example, if the actual timestamp is 100.6667 milliseconds, Amazon Rekognition Video returns a value of 100 millis.
      • endTimestampMillis

        public final Long endTimestampMillis()

        The end time of the detected segment, in milliseconds, from the start of the video. This value is rounded down.

        Returns:
        The end time of the detected segment, in milliseconds, from the start of the video. This value is rounded down.
      • durationMillis

        public final Long durationMillis()

        The duration of the detected segment in milliseconds.

        Returns:
        The duration of the detected segment in milliseconds.
      • startTimecodeSMPTE

        public final String startTimecodeSMPTE()

        The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment. StartTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).

        Returns:
        The frame-accurate SMPTE timecode, from the start of a video, for the start of a detected segment. StartTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).
      • endTimecodeSMPTE

        public final String endTimecodeSMPTE()

        The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. EndTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).

        Returns:
        The frame-accurate SMPTE timecode, from the start of a video, for the end of a detected segment. EndTimecode is in HH:MM:SS:fr format (and ;fr for drop frame-rates).
      • durationSMPTE

        public final String durationSMPTE()

        The duration of the timecode for the detected segment in SMPTE format.

        Returns:
        The duration of the timecode for the detected segment in SMPTE format.
      • technicalCueSegment

        public final TechnicalCueSegment technicalCueSegment()

        If the segment is a technical cue, contains information about the technical cue.

        Returns:
        If the segment is a technical cue, contains information about the technical cue.
      • shotSegment

        public final ShotSegment shotSegment()

        If the segment is a shot detection, contains information about the shot detection.

        Returns:
        If the segment is a shot detection, contains information about the shot detection.
      • startFrameNumber

        public final Long startFrameNumber()

        The frame number of the start of a video segment, using a frame index that starts with 0.

        Returns:
        The frame number of the start of a video segment, using a frame index that starts with 0.
      • endFrameNumber

        public final Long endFrameNumber()

        The frame number at the end of a video segment, using a frame index that starts with 0.

        Returns:
        The frame number at the end of a video segment, using a frame index that starts with 0.
      • durationFrames

        public final Long durationFrames()

        The duration of a video segment, expressed in frames.

        Returns:
        The duration of a video segment, expressed in frames.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)