Class Packet

java.lang.Object
com.github.kokorin.jaffree.ffprobe.Packet
All Implemented Interfaces:
FrameSubtitle, PacketFrameSubtitle, TagAware

public class Packet extends Object implements TagAware, PacketFrameSubtitle
Packet description.
  • Constructor Details

    • Packet

      public Packet(ProbeData probeData)
      Creates Packet description based on provided ffprobe data.
      Parameters:
      probeData - ffprobe data
  • Method Details

    • getProbeData

      public ProbeData getProbeData()
      Returns data section which holds all the data provided by ffprobe.

      Use this method if you have to access properties which are not accessible through other getters.

      Specified by:
      getProbeData in interface TagAware
      Returns:
      probe data
    • getPts

      public Long getPts()
      Returns Packet presentation timestamp in Stream timebase units (the time at which the decompressed packet will be presented to the user).
      Returns:
      pts
      See Also:
    • getPtsTime

      public Float getPtsTime()
      Returns Packet presentation timestamp in seconds (time when frame should be shown to user).
      Returns:
      pts in seconds
    • getSideDataList

      public List<SideData> getSideDataList()
      Returns additional packet data that can be provided by the container. Packet can contain several types of side information.
      Returns:
      side data for the packet
    • getCodecType

      public StreamType getCodecType()
      Returns packet media type.
      Returns:
      media type
    • getStreamIndex

      public Integer getStreamIndex()
      Returns packet stream index.
      Returns:
      stream index
    • getDts

      public Long getDts()
      Returns Packet decompression timestamp in Stream timebase units (the time at which the packet is decompressed).
      Returns:
      dts
      See Also:
    • getDtsTime

      public Float getDtsTime()
      Returns Packet decompression timestamp in seconds (the time at which the packet is decompressed).
      Returns:
      pts in seconds
    • getDuration

      public Long getDuration()
      Returns duration of this packet in Stream timebase units, 0 if unknown. Equals next_pts - this_pts in presentation order.
      Returns:
      packet duration
    • getDurationTime

      public Float getDurationTime()
      Returns duration of this packet in seconds, 0 if unknown.
      Returns:
      duration in seconds
    • getConvergenceDuration

      public Long getConvergenceDuration()
      Deprecated.
      description from ffmpeg source code: this was required for Matroska subtitles, whose duration values could overflow when the duration field was still an int.
      Same as the duration field, but as int64_t.
      Returns:
      packet duration
      See Also:
    • getConvergenceDurationTime

      public Float getConvergenceDurationTime()
      Deprecated.
      description from ffmpeg source code: this was required for Matroska subtitles, whose duration values could overflow when the duration field was still an int.
      Same as the duration_time field, but as int64_t.
      Returns:
      duration in seconds
      See Also:
    • getSize

      public Long getSize()
      Returns packet size.
      Returns:
      size
    • getPos

      public Long getPos()
      Returns packet byte position in stream, -1 if unknown.
      Returns:
      position
    • getFlags

      public String getFlags()
      Returns a combination of binary AV_PKT_FLAG values.
      Returns:
      binary flag
      See Also:
    • getData

      public String getData()
      Returns packet data.
      Returns:
      packet data
    • getDataHash

      public String getDataHash()
      Returns packet data hash.
      Returns:
      packet data hash