Assigning Buffer Timestamps

johnwesting john.blank.westing at gmail.com
Tue May 28 12:42:43 PDT 2013


Hi, I really need some help understanding how timestamps are used in
GStreamer. I've been working with GStreamer for approximately 6 months and
have encountered so many problems with timestamps and cooperation with
elements like alsasink and liveadder. I've made several attempts to set the
timestamps correctly, but every change seems to make things worse, i.e.
elements like alsasink no longer play the audio. At the moment I am giving
up on setting the timestamp in my decoder, and just set to
GST_CLOCK_TIME_NONE because I always get the best results with alsasink. I
want to to do it right, but I don't know what right is.

The algorithm I was using in my decoder was: if the first buffer does not
have a timestamp then start the outgoing timestamps at 0, else start them at
the time of the first buffer. After that I increment the timestamp by the
duration of the PCM buffer I pass along. I thought this was the correct
solution, but using this algorithm alsasink will not play audio when it is
the next element past my decoder, even with sync=false set in alsasink, and
regardless of if the first buffer has a valid timestamp.

How should I be assigning the buffer timestamps?




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Assigning-Buffer-Timestamps-tp4660123.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list