Assigning Buffer Timestamps

Edward Hervey bilboed at gmail.com
Wed May 29 23:31:11 PDT 2013


Hi,

  While I could explain the various concepts of timing, synchronization
and so forth here (which is better suited for a blog/presentation)...
you could also just base your decoder on the base decoder classes and
not care about timing (it will properly propagate them from the upstream
element/demuxer/....).

  What kind of decoder is it ?

    Edward

On Tue, 2013-05-28 at 12:42 -0700, johnwesting wrote:
> 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.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel




More information about the gstreamer-devel mailing list