<div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif;color:rgb(0,0,0)">Sorry for the late reply. But thanks for your suggestions. I am working on an updated player now.</div><div class="gmail_default" style="font-family:tahoma,sans-serif;color:#000000"><br clear="all"></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>-Rein<br></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 30, 2018 at 4:00 AM James Cameron <<a href="mailto:quozl@laptop.org">quozl@laptop.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">G'day,<br>
<br>
Your failure every five times sounds like a race condition between<br>
GTK+ and GStreamer.  Either of them could win the race; with the<br>
Gtk.DrawingArea not realised at the time the GStreamer sink window is,<br>
or vice versa.  Looking at player.py briefly, the things I notice are;<br>
<br>
1.  you aren't calling enable_sync_message_emission, or connecting to the<br>
sync-message::element signal, to catch the prepare-window-handler<br>
message and calling set_window_handle there if the XID is known,<br>
<br>
2.  you aren't connecting to the realize signal of the Gtk.DrawingArea<br>
to catch the XID, and calling set_window_handle there if the sink is<br>
known,<br>
<br>
3.  you are polling for state changes to a local variable instead of<br>
using Gst.Pipeline::get_state with a timeout.<br>
<br>
4.  you are using "import threading"; which is something that I've not<br>
found necessary.<br>
<br>
Hope that helps.  I've nothing to say about changing location of<br>
filesrc.<br>
<br>
On Wed, Aug 29, 2018 at 09:09:35AM -0500, reinzor wrote:<br>
> Hi All,<br>
> <br>
> Use case:<br>
> <br>
> I recently started a new project: building a video wall using a farm of<br>
> Raspberry Pi zero's using gstreamer:<br>
> <br>
> <a href="https://github.com/reinzor/videowall" rel="noreferrer" target="_blank">https://github.com/reinzor/videowall</a><br>
> <br>
> The application is a server / client system and the principle is as follows:<br>
> <br>
> The server provides the net time using the NetTimeProvider of the GstNet<br>
> library and sends meta-information (filenames, base_time, etc) via multicast<br>
> to all the clients. The clients have a NetClientClock as clock provider for<br>
> their own pipelines. The principle works and I am able to play videos<br>
> synchronously over the network where I use my laptop as a server and several<br>
> Raspberry pi zeros as clients.<br>
> <br>
> Problem:<br>
> <br>
> However, sometimes, the client players do not start playing. This occurs<br>
> once every 5 times or so. When I send a request for a new video with an<br>
> update base time, it mostly works again. <br>
> <br>
> Question:<br>
> <br>
> - Is there a way I can obtain more information why the client players are<br>
> not starting? (I am already setting GST_DEBUG=1)<br>
> - The players are wrapped in a GTK window<br>
> (<a href="https://github.com/reinzor/videowall/blob/master/src/videowall/players/player.py#L102" rel="noreferrer" target="_blank">https://github.com/reinzor/videowall/blob/master/src/videowall/players/player.py#L102</a>)<br>
> and the GTK loop is handling the Glib events in a separate thread<br>
> (<a href="https://github.com/reinzor/videowall/blob/master/src/videowall/players/player.py#L56" rel="noreferrer" target="_blank">https://github.com/reinzor/videowall/blob/master/src/videowall/players/player.py#L56</a>),<br>
> is this the right way to do it?<br>
> - On every new play request, I am re-creating the total pipeline because<br>
> changing the location property of the filesrc seem to be very unstable. What<br>
> is the recommended way to do this?<br>
> <br>
> Thanks in advance,<br>
> <br>
> Rein<br>
> <br>
> <br>
> <br>
> --<br>
> Sent from: <a href="http://gstreamer-devel.966125.n4.nabble.com/" rel="noreferrer" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/</a><br>
> _______________________________________________<br>
> gstreamer-devel mailing list<br>
> <a href="mailto:gstreamer-devel@lists.freedesktop.org" target="_blank">gstreamer-devel@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
<br>
-- <br>
James Cameron<br>
<a href="http://quozl.netrek.org/" rel="noreferrer" target="_blank">http://quozl.netrek.org/</a><br>
</blockquote></div>