fix for timestamps in audiotestsrc

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

fix for timestamps in audiotestsrc

Jordi Burguet Castell
Hello,

The audiotestsrc element sets and reports the timestamps of the
buffers it creates with a small error.

Basically, by using gst_util_uint64_scale_int() in some places, the
timestamp can be off by almost a nanosecond. In our pipeline we are
sensitive to any error in the timestamp, and because of this (small)
problem we can't use audiotestsrc to test it.

Fortunately, the fix is very easy. In audiotestsrc the timestamp (in
"next_time") is computed always from next_sample, so it can be solved
by changing gst_util_uint64_scale_int() to
gst_util_uint64_scale_int_round() (note the extra "_round")
everywhere. Patch attached.

Please let me know if this is ok, or if I should report a bug in some
other way, etc.

Thanks,
Jordi

--
Jordi Burguet-Castell <[hidden email]>
UWM Physics Dept. 464
1900 E. Kenwood Blvd.  Milwaukee WI 53211 USA
+1 414-229-2590

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel

0001-audiotestsrc-compute-timestamps-more-accurately-by-u.patch (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: fix for timestamps in audiotestsrc

Tristan Matthews-2


2010/11/28 Jordi Burguet Castell <[hidden email]>
Hello,

The audiotestsrc element sets and reports the timestamps of the
buffers it creates with a small error.

Basically, by using gst_util_uint64_scale_int() in some places, the
timestamp can be off by almost a nanosecond. In our pipeline we are
sensitive to any error in the timestamp, and because of this (small)
problem we can't use audiotestsrc to test it.

Fortunately, the fix is very easy. In audiotestsrc the timestamp (in
"next_time") is computed always from next_sample, so it can be solved
by changing gst_util_uint64_scale_int() to
gst_util_uint64_scale_int_round() (note the extra "_round")
everywhere. Patch attached.

Please let me know if this is ok, or if I should report a bug in some
other way, etc.


You should file a bug against gst-plugins-base:

https://bugzilla.gnome.org/buglist.cgi?quicksearch=component%3Agst-plugins-base+product%3A"GStreamer"+
 

Thanks,
Jordi

--
Jordi Burguet-Castell <[hidden email]>
UWM Physics Dept. 464
1900 E. Kenwood Blvd.  Milwaukee WI 53211 USA
+1 414-229-2590

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel




--
Tristan Matthews
email: [hidden email]
web: http://tristanswork.blogspot.com

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: fix for timestamps in audiotestsrc

Jordi Burguet Castell
On Sun, Nov 28, 2010 at 9:11 PM, Tristan Matthews <[hidden email]> wrote:
> You should file a bug against gst-plugins-base:
>
> https://bugzilla.gnome.org/buglist.cgi?quicksearch=component%3Agst-plugins-base+product%3A"GStreamer"+

Thanks Tristan. Done.

Jordi

------------------------------------------------------------------------------
Increase Visibility of Your 3D Game App & Earn a Chance To Win $500!
Tap into the largest installed PC base & get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel