Class ReferenceTimestampMeta

java.lang.Object
org.javagi.base.ProxyInstance
org.freedesktop.gstreamer.gst.ReferenceTimestampMeta
All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public class ReferenceTimestampMeta extends ProxyInstance

GstReferenceTimestampMeta can be used to attach alternative timestamps and possibly durations to a GstBuffer. These are generally not according to the pipeline clock and could be e.g. the NTP timestamp when the media was captured.

The reference is stored as a GstCaps in reference. Examples of valid references would be

  • timestamp/x-drivername-stream: for timestamps that are locally generated by some driver named drivername when generating the stream, e.g. based on a frame counter
  • timestamp/x-ntp, host=pool.ntp.org, port=123: for timestamps based on a specific NTP server. Note that the host/port parameters might not always be given.
  • timestamp/x-ptp, version=IEEE1588-2008, domain=1: for timestamps based on a given PTP clock.
  • timestamp/x-unix: for timestamps based on the UNIX epoch according to the local clock.

Since 1.24 it can be serialized using gst_meta_serialize() and gst_meta_deserialize().

Since:
1.14
  • Constructor Details

    • ReferenceTimestampMeta

      public ReferenceTimestampMeta(MemorySegment address)
      Create a ReferenceTimestampMeta proxy instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • ReferenceTimestampMeta

      public ReferenceTimestampMeta(Arena arena)
      Allocate a new ReferenceTimestampMeta.
      Parameters:
      arena - to control the memory allocation scope
    • ReferenceTimestampMeta

      public ReferenceTimestampMeta()
      Allocate a new ReferenceTimestampMeta. The memory is allocated with Arena.ofAuto().
    • ReferenceTimestampMeta

      public ReferenceTimestampMeta(Meta parent, Caps reference, ClockTime timestamp, ClockTime duration, Arena arena)
      Allocate a new ReferenceTimestampMeta with the fields set to the provided values.
      Parameters:
      parent - value for the field parent
      reference - value for the field reference
      timestamp - value for the field timestamp
      duration - value for the field duration
      arena - to control the memory allocation scope
    • ReferenceTimestampMeta

      public ReferenceTimestampMeta(Meta parent, Caps reference, ClockTime timestamp, ClockTime duration)
      Allocate a new ReferenceTimestampMeta with the fields set to the provided values. The memory is allocated with Arena.ofAuto().
      Parameters:
      parent - value for the field parent
      reference - value for the field reference
      timestamp - value for the field timestamp
      duration - value for the field duration
  • Method Details

    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • readParent

      public @Nullable Meta readParent()
      Read the value of the field parent.
      Returns:
      The value of the field parent
    • writeParent

      public void writeParent(@Nullable Meta parent)
      Write a value in the field parent.
      Parameters:
      parent - The new value for the field parent
    • readReference

      public Caps readReference()
      Read the value of the field reference.
      Returns:
      The value of the field reference
    • writeReference

      public void writeReference(Caps reference)
      Write a value in the field reference.
      Parameters:
      reference - The new value for the field reference
    • readTimestamp

      public ClockTime readTimestamp()
      Read the value of the field timestamp.
      Returns:
      The value of the field timestamp
    • writeTimestamp

      public void writeTimestamp(ClockTime timestamp)
      Write a value in the field timestamp.
      Parameters:
      timestamp - The new value for the field timestamp
    • readDuration

      public ClockTime readDuration()
      Read the value of the field duration.
      Returns:
      The value of the field duration
    • writeDuration

      public void writeDuration(ClockTime duration)
      Write a value in the field duration.
      Parameters:
      duration - The new value for the field duration
    • getInfo

      public static MetaInfo getInfo()
      Gets the global GstMetaInfo describing the GstReferenceTimestampMeta meta.
      Returns:
      The GstMetaInfo
      Since:
      1.14