clock issue

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

clock issue

IgalKroyter
Hi,
I wonder in which way both following commands are different
*gst_clock_set_master* and *gst_pipeline_use_clock*?
Let say that *v4l2 *is utilizing a HW clock while *alsasrc *is utilizing a
different HW clock, which of the functions shoould be used to synchronize
the *v4l2 *and *alsasrc *if both reside in different pipelines?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: clock issue

Olivier Crête-3
Hi,

You want to use gst_pipeline_use_clock() with a common clock (it can be
the system clock). If you want the timestamps on packets from both
pipeline to match, you also need to do gst_pipeline_set_base_time()
with the same value (0 is a good value). Then they will both use the
same clock. You can just use the system clock on both (obtain using
gst_system_clock_option() ).

Also, you should know that the V4L2 API doesn't expose any hardware
clocks but instead converts (or timestamps) everything using the
monotonic clock.



On Mon, 2019-08-19 at 03:39 -0500, IgalKroyter wrote:

> Hi,
> I wonder in which way both following commands are different
> *gst_clock_set_master* and *gst_pipeline_use_clock*?
> Let say that *v4l2 *is utilizing a HW clock while *alsasrc *is utilizing a
> different HW clock, which of the functions shoould be used to synchronize
> the *v4l2 *and *alsasrc *if both reside in different pipelines?
>
>
>
> --
> Sent from: http://gstreamer-devel.966125.n4.nabble.com/
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
--
Olivier Crête
[hidden email]

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: clock issue

IgalKroyter
Olivier hi,

thanks for the prompt reply.

Did you mean by *gst_system_clock_option*() to *gst_system_clock_obtain*()?
I could not find the *gst_system_clock_option*().

I have applied your suggestions (leaving the master clock idea behind) and I
am getting a constant offset of ~800[mSec] between the audio and video (as I
start first the audio pipeline only later a video pipeline) so I have
reduced the audio time stamps by *gst_pad_set_ofset(audiopad, -800000000)*.
Although, during the beginning the audio and video are in sync after a while
they start to diverge.

Any ideas?



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel