timestamp-offset property of videotestsrc

Aleksandr Slobodeniuk aslobodeniuk at fluendo.com
Thu Jan 19 13:57:26 UTC 2023


Hi, I wanted to ask about the limit of the timestamp-offset property of the
videotestsrc element.
Running gst-indent on the x64 system shows that the boundary
is 2147483646999999999.

When for the identity element the "ts-offset"'s limit
is 9223372036854775807.

Looking at the code of the videotestsrc we can see

  g_object_class_install_property (gobject_class, PROP_TIMESTAMP_OFFSET,
      g_param_spec_int64 ("timestamp-offset", "Timestamp offset",
          "An offset added to timestamps set on buffers (in ns)", 0,
          (G_MAXLONG == G_MAXINT64) ? G_MAXINT64 : (G_MAXLONG * GST_SECOND
- 1),
          0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));

the maximum value for this property is defined by the condition:

 (G_MAXLONG == G_MAXINT64) ? G_MAXINT64 : (G_MAXLONG * GST_SECOND - 1)

So the question is what is the purpose of this condition, why can't it be
G_MAXINT64 ?

It's just ight now I have a problem with this limit, because I want the
videotestsrc output a buffer with a timestamp that is higher then this
value (it's a ts of the buffer from an rtspsrc).

Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20230119/258712b3/attachment.htm>


More information about the gstreamer-devel mailing list