alsasrc with clock from ALSA time stamps

Sebastian Dröge sebastian at centricular.com
Fri Nov 22 11:09:10 PST 2013


On Fr, 2013-11-15 at 16:07 +0100, Deti Fliegl wrote:
> Hi,
> 
> somehow it should be possible to use the alsasrc with time stamps from
> the ALSA drivers. This is what I found out by looking at the source
> code. The feature seems to depend on GST_CLOCK_TYPE_MONOTONIC. When ever
> I use an alsasrc the clock type in is GST_CLOCK_TYPE_OTHER.
> My goal is to get time stamps with more accuracy for use with the RTSP
> server libary. The default clock source has too much jitter for my
> application to preserve audio phase accuracy via network. I am using the
> trunk version with this launch syntax:
> 
> alsasrc device=%s do-timestamp=true latency-time=%d buffer-time=%d !
> audio/x-raw,rate=%d ! audioconvert ! audio/x-raw, format=S16BE !
> rtpL16pay name=pay0 pt=97
> 
> Any help would be appreciated.

You need to force a monotonic clock on the complete pipeline. For that
get an instance of GstSystemClock, set the clock-type to MONOTONIC and
then set it on the pipeline via gst_pipeline_use_clock().

-- 
Sebastian Dröge <sebastian at centricular.com>
Centricular Ltd - http://www.centricular.com
Expertise, Straight from the Source
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 966 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20131122/a8551cc4/attachment.pgp>


More information about the gstreamer-devel mailing list