Video sync via GstClock
Andreas Rödig
a.roedig at null821.de
Tue Mar 12 07:11:42 PDT 2013
Hi Tim-Philipp,
yes i try this before. But it does not work.
I use it at that way:
Server (If state changed to GST_STATE_PLAYING):
netclock = (GstClock *)gst_pipeline_get_clock((GstPipeline*)pipeline);
gst_net_time_provider_new(netclock, NULL, 40000);
Client (If state changed to GST_STATE_PLAYING):
localClock = (GstClock)gst_pipeline_get_clock((GstPipeline*)pipeline);
netclock = gst_net_client_clock_new("clientclock", "localhost", 40000,
gst_clock_get_time(localClock));
gst_clock_set_master(localClock, netclock);
Thanks,
Andreas Rödig
Am 11.03.2013 23:54, schrieb Tim-Philipp Müller:
> On Mon, 2013-03-11 at 17:03 +0100, Andreas Rödig wrote:
>
> Hi,
>
>> i want to synchronize to videos.
>>
>> I found that i can use GstClock (gst_clock_set_calibration) to jump
>> forward. So i transport the position from the master to every client
>> over network.
>>
>> Then i set the client with gst_clock_set_calibration to the master
>> position. That works if master time bigger than client time.
>> But i can not jump backwards with this function. And sometimes (at far
>> jumps) my audio plugin crashed.
>>
>> Are there something i forgot? Is this the right function to change the
>> pipeline clock?
>>
>> Here are my steps:
>> - start pipeline (playbin2)
>> - get clock (gst_pipeline_get_clock)
>> - get basetime (gst_clock_get_time)
>> .
>> .
>> running
>> .
>> .
>> - incomming master position (0 - n milliseconds)
>> - set clock (basetime + master position)
>
> Have you seen GstNetTimeProvider and GstNetClientClock ?
>
> Cheers
> -Tim
>
> _______________________________________________
> 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