Unable to get GstClock from GstElement

Sebastian Dröge sebastian at centricular.com
Fri Feb 13 00:28:01 PST 2015


Hi,

there's also a bug report about all this with further information here:
https://bugzilla.gnome.org/show_bug.cgi?id=744442

If you ask your questions in both places at once, make sure to say that
in both places to not have people waste their time on already solved
problems.

On Fr, 2015-02-13 at 09:24 +0100, Edward Hervey wrote:
> Hi,
> 
>   The clock is chosen and distributed by the pipeline in PAUSED to
> PLAYING.
> 
>   In the case of the distributed playback use-cases, you will need to:
>   1) grab the clock in PLAYING on the server, and wrap it with the
> nettimeprovider
>   2) set the net client clock on the clients (you can do that in any
> state)
> 
>     Edward
> 
> On Thu, 2015-02-12 at 10:13 -0800, svenyonson wrote:
> > I am trying to port the sample python code from noraisin.net (synchronized
> > playback across machines) to Android devices. I have the tutorial 5 working,
> > and am now trying to integrate the relevant pieces from the python code:
> > 
> >     // Create our own GLib Main Context and make it the default one
> >     data->context = g_main_context_new ();
> >     g_main_context_push_thread_default(data->context);
> > 
> >     // Build pipeline
> >     data->pipeline = gst_parse_launch("playbin", &error);
> >     if (error) {
> >         gchar *message = g_strdup_printf("Unable to build pipeline: %s",
> > error->message);
> >         g_clear_error (&error);
> >         set_ui_message(message, data);
> >         g_free (message);
> >         return NULL;
> >     }
> > 
> >     GstPipeline* pipeline = GST_PIPELINE_CAST(data->pipeline);
> >     GstElement* element = data->pipeline;
> > 
> >     gchar* uri = "http://docs.gstreamer.com/media/sintel_trailer-368p.ogv";
> > 
> >     g_object_set(data->pipeline, "uri", uri, NULL);
> > 
> >     // Set the pipeline to READY, so it can already accept a window handle,
> > if we have one
> >     data->target_state = GST_STATE_READY;
> >     gst_element_set_state(data->pipeline, GST_STATE_READY);
> > 
> >     // Add sync stuff from tutorial
> >     GstClock* clock = gst_element_get_clock(data->pipeline);
> > 
> >     GST_DEBUG ("gst_element_get_clock... (GstClock:%p)", clock);
> > 
> > When I run this code, clock is 0x0.
> > 
> > 
> > 
> > 
> > 
> > --
> > View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Unable-to-get-GstClock-from-GstElement-tp4670705.html
> > Sent from the GStreamer-devel mailing list archive at Nabble.com.
> > _______________________________________________
> > gstreamer-devel mailing list
> > gstreamer-devel at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150213/7c06241c/attachment.sig>


More information about the gstreamer-devel mailing list